Standardize look and feel on leave request module
This commit is contained in:
parent
97d399595f
commit
fea5746618
@ -806,7 +806,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" onsubmit="return valider()" name="demandeCP">'."\n";
|
||||
print '<input type="hidden" name="action" value="create" />'."\n";
|
||||
|
||||
dol_fiche_head();
|
||||
dol_fiche_head('', '', '', -1);
|
||||
|
||||
$out='';
|
||||
$typeleaves=$object->getTypes(1,1);
|
||||
|
||||
@ -55,7 +55,7 @@ if (! $sortorder) $sortorder="ASC";
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
// If the user does not have perm to read the page
|
||||
if(!$user->rights->holiday->read) accessforbidden();
|
||||
if (!$user->rights->holiday->read) accessforbidden();
|
||||
|
||||
|
||||
// Initialize technical object to manage context to save list fields
|
||||
@ -204,7 +204,16 @@ if ($result < 0)
|
||||
setEventMessages($holiday->error, $holiday->errors, 'errors');
|
||||
}
|
||||
|
||||
$filters='';
|
||||
$filters = '';
|
||||
|
||||
// Filter on array of ids of all childs
|
||||
$userchilds=array();
|
||||
if (empty($user->rights->holiday->read_all))
|
||||
{
|
||||
$userchilds=$user->getAllChildIds(1);
|
||||
$filters.=' AND u.rowid IN ('.join(', ',$userchilds).')';
|
||||
}
|
||||
|
||||
$filters.=natural_search(array('u.firstname','u.lastname'), $search_name);
|
||||
if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2);
|
||||
|
||||
@ -231,13 +240,6 @@ else
|
||||
$canedit=0;
|
||||
if (! empty($user->rights->holiday->define_holiday)) $canedit=1;
|
||||
|
||||
// Get array of ids of all childs
|
||||
$userchilds=array();
|
||||
if (empty($user->rights->holiday->read_all))
|
||||
{
|
||||
$userchilds=$user->getAllChildIds();
|
||||
}
|
||||
|
||||
print '<input type="hidden" name="action" value="update" />';
|
||||
|
||||
$moreforfilter='';
|
||||
@ -291,7 +293,7 @@ else
|
||||
{
|
||||
print_liste_field_titre($langs->trans("NoLeaveWithCounterDefined"), $_SERVER["PHP_SELF"], '', '', '', '');
|
||||
}
|
||||
print_liste_field_titre($langs->trans('Note'), $_SERVER["PHP_SELF"]);
|
||||
print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : $langs->trans('Note')), $_SERVER["PHP_SELF"]);
|
||||
print_liste_field_titre('');
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -250,13 +250,13 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
|
||||
if ($id > 0)
|
||||
if ($id > 0) // For user tab
|
||||
{
|
||||
$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');
|
||||
dol_fiche_head($head, 'paidholidays', $title, -1, 'user');
|
||||
|
||||
dol_banner_tab($fuser,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
@ -277,14 +277,14 @@ else
|
||||
//print count($holiday->holiday);
|
||||
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, "", $num, count($holiday->holiday), 'title_hrm.png', 0, '', '', $limit);
|
||||
|
||||
if (empty($conf->global->HOLIDAY_HIDE_BALANCE))
|
||||
/*if (empty($conf->global->HOLIDAY_HIDE_BALANCE))
|
||||
{
|
||||
dol_fiche_head('');
|
||||
dol_fiche_head('', '', '', -1);
|
||||
|
||||
showMyBalance($holiday, $user_id);
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user