dolibarr  7.0.0-beta
hrm.lib.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.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  */
17 
23 $langs->load('hrm');
24 
31 function establishment_prepare_head($object)
32 {
33  global $langs, $conf;
34 
35  $h = 0;
36  $head = array();
37 
38  $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/card.php?id=' . $object->id;
39  $head[$h][1] = $langs->trans("Card");
40  $head[$h][2] = 'card';
41  $h++;
42 
43  // Show more tabs from modules
44  // Entries must be declared in modules descriptor with line
45  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
46  // $this->tabs = array('entity:-tabname); to remove a tab
47  complete_head_from_modules($conf,$langs,$object,$head,$h,'establishment');
48 
49  $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/info.php?id=' . $object->id;
50  $head[$h][1] = $langs->trans("Info");
51  $head[$h][2] = 'info';
52  $h++;
53 
54  complete_head_from_modules($conf,$langs,$object,$head,$h,'establishment','remove');
55 
56  return $head;
57 }
58 
65 {
66  global $langs, $conf, $user;
67 
68  $h = 0;
69  $head = array();
70 
71  $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_hrm.php';
72  $head[$h][1] = $langs->trans("Parameters");
73  $head[$h][2] = 'parameters';
74  $h++;
75 
76  $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php';
77  $head[$h][1] = $langs->trans("Establishments");
78  $head[$h][2] = 'establishments';
79  $h++;
80 
81  // Show more tabs from modules
82  // Entries must be declared in modules descriptor with line
83  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
84  // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
85  complete_head_from_modules($conf,$langs,'',$head,$h,'hrm_admin');
86 
87  complete_head_from_modules($conf,$langs,'',$head,$h,'hrm_admin','remove');
88 
89  return $head;
90 }
91 
hrm_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: hrm.lib.php:64
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add')
Complete or removed entries into a head array (used to build tabs).
establishment_prepare_head($object)
Return head table for establishment tabs screen.
Definition: hrm.lib.php:31