diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 26d01c34371..9ca28f0c040 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -113,7 +113,7 @@ class modHoliday extends DolibarrModules // 'contact' to add a tab in contact view // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) $this->tabs = array('user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=holiday&id=__ID__'); - $this->tabs = array('employee:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=holiday&id=__ID__'); + $this->tabs = array('employee:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=holiday&mode=employee&id=__ID__'); // Boxes $this->boxes = array(); // List of boxes diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 09d7d165d1f..eeb44703048 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/hrm.lib.php'; $langs->load('users'); $langs->load('holidays'); @@ -39,6 +40,7 @@ $langs->load('holidays'); // Protection if external user if ($user->societe_id > 0) accessforbidden(); +$mode = GETPOST("mode",'alpha'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); @@ -226,13 +228,22 @@ $formother = new FormOther($db); if ($id > 0) { - $head = user_prepare_head($fuser); + if ($mode == 'employee') // For HRM module development + { + $head = employee_prepare_head($fuser); + $title = $langs->trans("Employee"); + $linkback = ''.$langs->trans("BackToList").''; + } + else + { + $head = user_prepare_head($fuser); + $title = $langs->trans("User"); + $linkback = ''.$langs->trans("BackToList").''; + } - $title = $langs->trans("User"); + dol_fiche_head($head, 'paidholidays', $title, 0, 'user'); - $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($fuser,'id',$linkback,$user->rights->user->user->lire || $user->admin);