Skip to content

Commit

Permalink
Debug v20
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 3, 2024
1 parent e5742de commit c62183b
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions htdocs/user/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@
}
}

$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5);


/*
* View
*/

$title = $langs->trans("MenuUsersAndGroups");
$help_url = '';
llxHeader('', $title, $help_url);
Expand Down Expand Up @@ -108,7 +112,7 @@
/*
* Latest created users
*/
$max = 10;

$lastcreatedbox = '';
$sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.admin, u.login, u.fk_soc, u.datec, u.statut";
$sql .= ", u.entity";
Expand Down Expand Up @@ -141,8 +145,15 @@

$lastcreatedbox .= '<div class="div-table-responsive-no-min">';
$lastcreatedbox .= '<table class="noborder centpercent">';
$lastcreatedbox .= '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastUsersCreated", min($num, $max)).'</td>';
$lastcreatedbox .= '<td class="right" colspan="2"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/list.php?sortfield=u.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>';
$lastcreatedbox .= '<tr class="liste_titre"><td colspan="3" class="valignmiddle">';
$lastcreatedbox .= '<span class="valignmiddle">'.$langs->trans("LastUsersCreated", min($num, $max)).'</span>';
$lastcreatedbox .= '<a class="valignmiddle" href="'.DOL_URL_ROOT.'/user/list.php?sortfield=u.datec&sortorder=DESC" title="'.$langs->trans("FullList").'">';
$lastcreatedbox .= '<span class="badge marginleftonlyshort valignmiddle">...</span>';
$lastcreatedbox .= '</a>';
$lastcreatedbox .= '</td>';
$lastcreatedbox .= '<td class="right" colspan="2">';
//$lastcreatedbox .= '<a class="commonlink" href="'.DOL_URL_ROOT.'/user/list.php?sortfield=u.datec&sortorder=DESC">'.$langs->trans("FullList");
$lastcreatedbox .= '</td>';
$lastcreatedbox .= '</tr>'."\n";
$i = 0;

Expand Down Expand Up @@ -220,8 +231,6 @@
*/
$lastgroupbox = '';
if ($canreadperms) {
$max = 5;

$sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec";
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
if (isModEnabled('multicompany') && $conf->entity == 1 && (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE') || ($user->admin && !$user->entity))) {
Expand All @@ -242,8 +251,16 @@

$lastgroupbox .= '<div class="div-table-responsive-no-min">';
$lastgroupbox .= '<table class="noborder centpercent">';
$lastgroupbox .= '<tr class="liste_titre"><td colspan="'.$colspan.'">'.$langs->trans("LastGroupsCreated", ($num ? $num : $max)).'</td>';
$lastgroupbox .= '<td class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/group/list.php?sortfield=g.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>';
$lastgroupbox .= '<tr class="liste_titre"><td colspan="'.$colspan.'">';
$lastgroupbox .= '<span class="valignmiddle">'.$langs->trans("LastGroupsCreated", ($num ? $num : $max)).'</span>';
$lastgroupbox .= '<a class="valignmiddle" href="'.DOL_URL_ROOT.'/user/group/list.php?sortfield=g.datec&sortorder=DESC" title="'.$langs->trans("FullList").'">';
$lastgroupbox .= '<span class="badge marginleftonlyshort valignmiddle">...</span>';
$lastgroupbox .= '</a>';

$lastgroupbox .= '</td>';
$lastgroupbox .= '<td class="right">';
//$lastgroupbox .= '<a class="commonlink" href="'.DOL_URL_ROOT.'/user/group/list.php?sortfield=g.datec&sortorder=DESC">'.$langs->trans("FullList");
$lastgroupbox .= '</td>';
$lastgroupbox .= '</tr>';
$i = 0;

Expand Down

0 comments on commit c62183b

Please sign in to comment.