mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW Better presentation of list of user approver.
This commit is contained in:
parent
99e8842f0a
commit
33b915abbe
|
|
@ -235,14 +235,14 @@ if (isModEnabled("supplier_order")) {
|
|||
|
||||
|
||||
/*
|
||||
* List of users allowed
|
||||
* List of users allowed to approve
|
||||
*/
|
||||
|
||||
$sql = "SELECT";
|
||||
if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
|
||||
$sql .= " DISTINCT";
|
||||
}
|
||||
$sql .= " u.rowid, u.lastname, u.firstname, u.email, u.statut";
|
||||
$sql .= " u.rowid, u.login, u.lastname, u.firstname, u.email, u.photo, u.statut";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
|
||||
$sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||
|
|
@ -252,7 +252,7 @@ if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_
|
|||
} else {
|
||||
$sql .= " WHERE (u.entity IN (".getEntity('user')."))";
|
||||
}
|
||||
$sql .= " AND u.fk_soc IS NULL"; // An external user can not approved
|
||||
$sql .= " AND u.fk_soc IS NULL"; // An external user can not approve
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
|
|
@ -264,6 +264,9 @@ if ($resql) {
|
|||
print '<tr class="liste_titre"><th>'.$langs->trans("UserWithApproveOrderGrant").'</th>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
|
@ -272,19 +275,29 @@ if ($resql) {
|
|||
$userstatic->loadRights('fournisseur');
|
||||
|
||||
if ($userstatic->hasRight('fournisseur', 'commande', 'approuver')) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($i > 0) {
|
||||
print ', ';
|
||||
}
|
||||
|
||||
$userstatic->lastname = $obj->lastname;
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
$userstatic->email = $obj->email;
|
||||
$userstatic->login = $obj->login;
|
||||
$userstatic->photo = $obj->photo;
|
||||
$userstatic->status = $obj->statut;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print $userstatic->getNomUrl(-1);
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
if ($i == 0) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Nobody").'</span>';
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table></div><br>";
|
||||
$db->free($resql);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user