NEW Disabled users are striked.
This commit is contained in:
parent
40144eee8d
commit
974879ea9d
@ -1662,7 +1662,7 @@ class Societe extends CommonObject
|
||||
|
||||
$reparray=array();
|
||||
|
||||
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.email";
|
||||
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.statut, u.entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.rowid = sc.fk_user AND sc.fk_soc =".$this->id;
|
||||
$sql.= " AND entity in (0, ".$conf->entity.")";
|
||||
@ -1679,6 +1679,8 @@ class Societe extends CommonObject
|
||||
$reparray[$i]['lastname']=$obj->lastname;
|
||||
$reparray[$i]['firstname']=$obj->firstname;
|
||||
$reparray[$i]['email']=$obj->email;
|
||||
$reparray[$i]['statut']=$obj->statut;
|
||||
$reparray[$i]['entity']=$obj->entity;
|
||||
$i++;
|
||||
}
|
||||
return $reparray;
|
||||
|
||||
@ -141,7 +141,7 @@ if ($socid)
|
||||
print '<tr><td>'.$langs->trans("SalesRepresentatives").'</td>';
|
||||
print '<td colspan="3">';
|
||||
|
||||
$sql = "SELECT u.rowid, u.lastname, u.firstname";
|
||||
$sql = "SELECT u.rowid, u.login, u.fk_soc, u.lastname, u.firstname, u.statut, u.entity";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql .= " WHERE sc.fk_soc =".$object->id;
|
||||
@ -154,6 +154,8 @@ if ($socid)
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$tmpuser = new User($db);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@ -165,10 +167,20 @@ if ($socid)
|
||||
null; // actions in normal case
|
||||
}
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->rowid.'">';
|
||||
$tmpuser->id = $obj->rowid;
|
||||
$tmpuser->firstname = $obj->firstname;
|
||||
$tmpuser->lastname = $obj->lastname;
|
||||
$tmpuser->statut = $obj->statut;
|
||||
$tmpuser->login = $obj->login;
|
||||
$tmpuser->entity = $obj->entity;
|
||||
$tmpuser->societe_id = $obj->fk_soc;
|
||||
print $tmpuser->getNomUrl(1);
|
||||
|
||||
/*print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->rowid.'">';
|
||||
print img_object($langs->trans("ShowUser"),"user").' ';
|
||||
print dolGetFirstLastname($obj->firstname, $obj->lastname)."\n";
|
||||
print '</a> ';
|
||||
print '</a>';*/
|
||||
print ' ';
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
print '<a href="commerciaux.php?socid='.$_GET["socid"].'&delcommid='.$obj->rowid.'">';
|
||||
@ -205,7 +217,7 @@ if ($socid)
|
||||
$langs->load("users");
|
||||
$title=$langs->trans("ListOfUsers");
|
||||
|
||||
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.login";
|
||||
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.login, u.statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
|
||||
if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND u.statut<>0 ";
|
||||
@ -224,6 +236,7 @@ if ($socid)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Login").'</td>';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -238,7 +251,9 @@ if ($socid)
|
||||
print img_object($langs->trans("ShowUser"),"user").' ';
|
||||
print dolGetFirstLastname($obj->firstname, $obj->lastname)."\n";
|
||||
print '</a>';
|
||||
print '</td><td>'.$obj->login.'</td>';
|
||||
print '</td>';
|
||||
print '<td>'.$obj->login.'</td>';
|
||||
print '<td>'.User::LibStatut($obj->statut,0).'</td>';
|
||||
print '<td><a href="commerciaux.php?socid='.$_GET["socid"].'&commid='.$obj->rowid.'">'.$langs->trans("Add").'</a></td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
$userstatic->id=$val['id'];
|
||||
$userstatic->lastname=$val['lastname'];
|
||||
$userstatic->firstname=$val['firstname'];
|
||||
$userstatic->statut=$val['statut'];
|
||||
print $userstatic->getNomUrl(1);
|
||||
$i++;
|
||||
if ($i < $nbofsalesrepresentative) print ', ';
|
||||
|
||||
@ -526,6 +526,9 @@ div.myavailability {
|
||||
.selectlimit {
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.strikefordisabled {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Styles to hide objects */
|
||||
|
||||
@ -514,6 +514,10 @@ div.myavailability {
|
||||
.selectlimit {
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.strikefordisabled {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Styles to hide objects */
|
||||
|
||||
@ -2015,7 +2015,7 @@ class User extends CommonObject
|
||||
}
|
||||
if (abs($withpictoimg) != 2)
|
||||
{
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='<div class="inline-block valignmiddle'.($morecss?' usertext'.$morecss:'').'">';
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='<div class="inline-block valignmiddle'.($this->statut?'':' strikefordisabled').($morecss?' usertext'.$morecss:'').'">';
|
||||
if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen);
|
||||
else $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen);
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='</div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user