trip.lib.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. * or see http://www.gnu.org/
  17. */
  18. /**
  19. * \file htdocs/core/lib/trip.lib.php
  20. * \brief Ensemble de fonctions de base pour les deplacements
  21. */
  22. /**
  23. * Prepare array with list of tabs
  24. *
  25. * @param Object $object Object related to tabs
  26. * @return array Array of tabs to shoc
  27. */
  28. function trip_prepare_head($object)
  29. {
  30. global $langs, $conf;
  31. $h = 0;
  32. $head = array();
  33. $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/fiche.php?id=' . $object->id;
  34. $head[$h][1] = $langs->trans("Card");
  35. $head[$h][2] = 'card';
  36. $h++;
  37. // Show more tabs from modules
  38. // Entries must be declared in modules descriptor with line
  39. // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
  40. // $this->tabs = array('entity:-tabname); to remove a tab
  41. complete_head_from_modules($conf,$langs,$object,$head,$h,'trip');
  42. $head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/document.php?id='.$object->id;
  43. $head[$h][1] = $langs->trans("Documents");
  44. $head[$h][2] = 'documents';
  45. $h++;
  46. $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/info.php?id=' . $object->id;
  47. $head[$h][1] = $langs->trans("Info");
  48. $head[$h][2] = 'info';
  49. $h++;
  50. complete_head_from_modules($conf,$langs,$object,$head,$h,'trip','remove');
  51. return $head;
  52. }
  53. ?>