resource.lib.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /* Module to manage locations, buildings, floors and rooms into Dolibarr ERP/CRM
  3. * Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \file htdocs/core/lib/resource.lib.php
  20. * \ingroup resource
  21. * \brief This file is library for resource module
  22. */
  23. /**
  24. * Prepare head for tabs
  25. *
  26. * @param Object $object Object
  27. * @return array Array of head entries
  28. */
  29. function resourcePrepareHead($object)
  30. {
  31. global $langs, $conf, $user;
  32. $h = 0;
  33. $head = array();
  34. $head[$h][0] = dol_buildpath('/resource/card.php',1).'?id='.$object->id;
  35. $head[$h][1] = $langs->trans("ResourceCard");
  36. $head[$h][2] = 'resource';
  37. $h++;
  38. // Show more tabs from modules
  39. // Entries must be declared in modules descriptor with line
  40. // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
  41. // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
  42. complete_head_from_modules($conf,$langs,$object,$head,$h,'resource');
  43. return $head;
  44. }