Different display if employee mode
This commit is contained in:
parent
b7b25c9682
commit
c7df6c15a2
@ -32,7 +32,6 @@ 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');
|
||||
@ -230,17 +229,16 @@ if ($id > 0)
|
||||
{
|
||||
if ($mode == 'employee') // For HRM module development
|
||||
{
|
||||
$head = employee_prepare_head($fuser);
|
||||
$title = $langs->trans("Employee");
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/hrm/employee/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$head = user_prepare_head($fuser);
|
||||
$title = $langs->trans("User");
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
$head = user_prepare_head($fuser);
|
||||
|
||||
dol_fiche_head($head, 'paidholidays', $title, 0, 'user');
|
||||
|
||||
|
||||
@ -145,7 +145,7 @@ class Employee extends CommonObject
|
||||
$label.= '</div><div style="clear: both;"></div>';
|
||||
}
|
||||
|
||||
$link.= '<a href="'.DOL_URL_ROOT.'/hrm/employee/card.php?id='.$this->id.'"';
|
||||
$link.= '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'&mode=employee"';
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
|
||||
@ -45,6 +45,7 @@ if (! empty($conf->multicompany->enabled)) dol_include_once('/multicompany/class
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$action = GETPOST('action','alpha');
|
||||
$mode = GETPOST('mode','alpha');
|
||||
$confirm = GETPOST('confirm','alpha');
|
||||
$subaction = GETPOST('subaction','alpha');
|
||||
$group = GETPOST("group","int",3);
|
||||
@ -1108,8 +1109,18 @@ else
|
||||
}
|
||||
|
||||
// Show tabs
|
||||
if ($mode == 'employee') // For HRM module development
|
||||
{
|
||||
$title = $langs->trans("Employee");
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/hrm/employee/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = $langs->trans("User");
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
$head = user_prepare_head($object);
|
||||
$title = $langs->trans("User");
|
||||
|
||||
/*
|
||||
* Confirmation reinitialisation mot de passe
|
||||
@ -1158,9 +1169,7 @@ else
|
||||
{
|
||||
dol_fiche_head($head, 'user', $title, 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user