2
0
forked from Wavyzz/dolibarr

CSS enhancement

This commit is contained in:
Laurent Destailleur
2017-03-23 10:59:13 +01:00
parent 917ef1e01e
commit 0a35d17207
16 changed files with 128 additions and 101 deletions

View File

@@ -86,7 +86,7 @@ print '<input type="hidden" name="action" value="save">';
$head=security_prepare_head(); $head=security_prepare_head();
dol_fiche_head($head, 'audit', $langs->trans("Security")); dol_fiche_head($head, 'audit', $langs->trans("Security"), -1);
$var=true; $var=true;

View File

@@ -118,7 +118,7 @@ $db->commit();
$head=security_prepare_head(); $head=security_prepare_head();
dol_fiche_head($head, 'default', $langs->trans("Security")); dol_fiche_head($head, 'default', $langs->trans("Security"), -1);
// Show warning about external users // Show warning about external users

View File

@@ -96,7 +96,7 @@ print '<input type="hidden" name="action" value="set_proxy">';
$head=security_prepare_head(); $head=security_prepare_head();
dol_fiche_head($head, 'proxy', $langs->trans("Security")); dol_fiche_head($head, 'proxy', $langs->trans("Security"), -1);
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)

View File

@@ -198,7 +198,7 @@ print "<br>\n";
$head=security_prepare_head(); $head=security_prepare_head();
dol_fiche_head($head, 'passwords', $langs->trans("Security")); dol_fiche_head($head, 'passwords', $langs->trans("Security"), -1);
$var=false; $var=false;

View File

@@ -124,7 +124,7 @@ print '<input type="hidden" name="action" value="updateform">';
$head=security_prepare_head(); $head=security_prepare_head();
dol_fiche_head($head, 'file', $langs->trans("Security")); dol_fiche_head($head, 'file', $langs->trans("Security"), -1);
// Upload options // Upload options

View File

@@ -103,7 +103,7 @@ print '<input type="hidden" name="action" value="updateform">';
$head=security_prepare_head(); $head=security_prepare_head();
dol_fiche_head($head, 'misc', $langs->trans("Security")); dol_fiche_head($head, 'misc', $langs->trans("Security"), -1);
// Other Options // Other Options

View File

@@ -181,7 +181,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
$head=translation_prepare_head(); $head=translation_prepare_head();
dol_fiche_head($head, $mode, '', 0, ''); dol_fiche_head($head, $mode, '', -1, '');
if ($mode == 'overwrite') if ($mode == 'overwrite')
{ {

View File

@@ -5998,7 +5998,7 @@ class Form
if ($urladvanced) $ret.='<a href="'.$urladvanced.'">'; if ($urladvanced) $ret.='<a href="'.$urladvanced.'">';
else $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">'; else $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
} }
$ret.='<img alt="Photo" id="photologo'.(preg_replace('/[^a-z]/i','_',$file)).'" class="'.$cssclass.'" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">'; $ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Photo" id="photologo'.(preg_replace('/[^a-z]/i','_',$file)).'" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
if ($addlinktofullsize) $ret.='</a>'; if ($addlinktofullsize) $ret.='</a>';
} }
else if ($altfile && file_exists($dir."/".$altfile)) else if ($altfile && file_exists($dir."/".$altfile))
@@ -6009,7 +6009,7 @@ class Form
if ($urladvanced) $ret.='<a href="'.$urladvanced.'">'; if ($urladvanced) $ret.='<a href="'.$urladvanced.'">';
else $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">'; else $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
} }
$ret.='<img alt="Photo alt" id="photologo'.(preg_replace('/[^a-z]/i','_',$file)).'" class="'.$cssclass.'" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($altfile).'&cache='.$cache.'">'; $ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Photo alt" id="photologo'.(preg_replace('/[^a-z]/i','_',$file)).'" class="'.$cssclass.'" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($altfile).'&cache='.$cache.'">';
if ($addlinktofullsize) $ret.='</a>'; if ($addlinktofullsize) $ret.='</a>';
} }
else else

View File

@@ -2378,7 +2378,7 @@ function img_picto($titlealt, $picto, $morealt = '', $pictoisfullpath = false, $
if (preg_match('/:[^\s0-9]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB if (preg_match('/:[^\s0-9]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB
$title=$tmparray[0]; $title=$tmparray[0];
$alt=empty($tmparray[1])?'':$tmparray[1]; $alt=empty($tmparray[1])?'':$tmparray[1];
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($morealt?' '.$morealt:'').'>'; // Alt is used for accessibility, title for popup return '<img src="'.$fullpathpicto.'" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($morealt?' '.$morealt:'').'>'; // Alt is used for accessibility, title for popup
} }
} }

View File

@@ -828,7 +828,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
// Date start // Date start
print '<tr>'; print '<tr>';
print '<td class="fieldrequired">'.$langs->trans("DateDebCP").' ('.$langs->trans("FirstDayOfHoliday").')</td>'; print '<td class="fieldrequired">';
print $langs->trans("DateDebCP");
print ' ('.$langs->trans("FirstDayOfHoliday").')';
print '</td>';
print '<td>'; print '<td>';
// Si la demande ne vient pas de l'agenda // Si la demande ne vient pas de l'agenda
if (! GETPOST('date_debut_')) { if (! GETPOST('date_debut_')) {
@@ -844,7 +847,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
// Date end // Date end
print '<tr>'; print '<tr>';
print '<td class="fieldrequired">'.$langs->trans("DateFinCP").' ('.$langs->trans("LastDayOfHoliday").')</td>'; print '<td class="fieldrequired">';
print $langs->trans("DateFinCP");
print ' ('.$langs->trans("LastDayOfHoliday").')';
print '</td>';
print '<td>'; print '<td>';
// Si la demande ne vient pas de l'agenda // Si la demande ne vient pas de l'agenda
if (! GETPOST('date_fin_')) { if (! GETPOST('date_fin_')) {

View File

@@ -519,6 +519,12 @@ textarea.centpercent {
.nounderline { .nounderline {
text-decoration: none; text-decoration: none;
} }
.paddingleft {
padding-<?php print $left; ?>: 4px;
}
.paddingright {
padding-<?php print $right; ?>: 4px;
}
.cursorpointer { .cursorpointer {
cursor: pointer; cursor: pointer;
} }
@@ -1090,7 +1096,8 @@ img.photorefnoborder {
height: 48px; height: 48px;
width: 48px; width: 48px;
object-fit: contain; object-fit: contain;
border: 1px solid #CCC; border: 1px solid #AAA;
border-radius: 100px;
} }
.underrefbanner { .underrefbanner {
} }
@@ -1615,11 +1622,16 @@ img.login, img.printer, img.entity {
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
img.loginphoto { .userimgatoplogin img.userphoto { /* size for user photo in login bar */
border-radius: 2px;
width: 16px; width: 16px;
height: 16px; height: 16px;
} }
img.userphoto { /* size for user photo in lists */
border-radius: 2px;
width: 18px;
height: 18px;
vertical-align: middle;
}
.span-icon-user { .span-icon-user {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png',1); ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png',1); ?>);
background-repeat: no-repeat; background-repeat: no-repeat;

View File

@@ -526,6 +526,12 @@ textarea.centpercent {
.nounderline { .nounderline {
text-decoration: none; text-decoration: none;
} }
.paddingleft {
padding-<?php print $left; ?>: 4px;
}
.paddingright {
padding-<?php print $right; ?>: 4px;
}
.cursorpointer { .cursorpointer {
cursor: pointer; cursor: pointer;
} }
@@ -1141,7 +1147,8 @@ img.photorefnoborder {
height: 48px; height: 48px;
width: 48px; width: 48px;
object-fit: contain; object-fit: contain;
border: 1px solid #CCC; border: 1px solid #AAA;
border-radius: 100px;
} }
.underrefbanner { .underrefbanner {
} }
@@ -1654,13 +1661,17 @@ img.login, img.printer, img.entity {
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
img.loginphoto { .userimgatoplogin img.userphoto { /* size for user photo in login bar */
border-radius: 5px; border-radius: 5px;
margin-top: -4px; width: 16px;
width: 20px; height: 16px;
height: 20px; vertical-align: text-bottom;
}
img.userphoto { /* size for user photo in lists */
width: 18px;
height: 18px;
vertical-align: middle;
} }
.span-icon-user { .span-icon-user {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png',1); ?>); background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png',1); ?>);
background-repeat: no-repeat; background-repeat: no-repeat;

View File

@@ -1981,77 +1981,77 @@ class User extends CommonObject
function getNomUrl($withpictoimg=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='') function getNomUrl($withpictoimg=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='')
{ {
global $langs, $conf, $db, $hookmanager; global $langs, $conf, $db, $hookmanager;
global $dolibarr_main_authentication, $dolibarr_main_demo; global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager; global $menumanager;
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0; if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
$result = ''; $result = '';
$companylink = ''; $companylink = '';
$link = ''; $link = '';
$label = '<u>' . $langs->trans("User") . '</u>'; $label = '<u>' . $langs->trans("User") . '</u>';
$label.= '<div width="100%">'; $label.= '<div width="100%">';
$label.= '<b>' . $langs->trans('Name') . ':</b> ' . $this->getFullName($langs,'',''); $label.= '<b>' . $langs->trans('Name') . ':</b> ' . $this->getFullName($langs,'','');
if (! empty($this->login)) if (! empty($this->login))
$label.= '<br><b>' . $langs->trans('Login') . ':</b> ' . $this->login; $label.= '<br><b>' . $langs->trans('Login') . ':</b> ' . $this->login;
$label.= '<br><b>' . $langs->trans("EMail").':</b> '.$this->email; $label.= '<br><b>' . $langs->trans("EMail").':</b> '.$this->email;
if (! empty($this->admin)) if (! empty($this->admin))
$label.= '<br><b>' . $langs->trans("Administrator").'</b>: '.yn($this->admin); $label.= '<br><b>' . $langs->trans("Administrator").'</b>: '.yn($this->admin);
if (! empty($this->societe_id) ) // Add thirdparty for external users if (! empty($this->societe_id) ) // Add thirdparty for external users
{ {
$thirdpartystatic = new Societe($db); $thirdpartystatic = new Societe($db);
$thirdpartystatic->fetch($this->societe_id); $thirdpartystatic->fetch($this->societe_id);
if (empty($hidethirdpartylogo)) $companylink = ' '.$thirdpartystatic->getNomUrl(2); // picto only of company if (empty($hidethirdpartylogo)) $companylink = ' '.$thirdpartystatic->getNomUrl(2); // picto only of company
$company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')'; $company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')';
} }
$type=($this->societe_id?$langs->trans("External").$company:$langs->trans("Internal")); $type=($this->societe_id?$langs->trans("External").$company:$langs->trans("Internal"));
$label.= '<br><b>' . $langs->trans("Type") . ':</b> ' . $type; $label.= '<br><b>' . $langs->trans("Type") . ':</b> ' . $type;
$label.='</div>'; $label.='</div>';
if (! empty($this->photo)) if (! empty($this->photo))
{ {
$label.= '<div class="photointooltip">'; $label.= '<div class="photointooltip">';
$label.= Form::showphoto('userphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small', 0, 1); $label.= Form::showphoto('userphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small', 0, 1);
$label.= '</div><div style="clear: both;"></div>'; $label.= '</div><div style="clear: both;"></div>';
} }
// Info Login // Info Login
if ($infologin) if ($infologin)
{ {
$label.= '<br>'; $label.= '<br>';
$label.= '<br><u>'.$langs->trans("Connection").'</u>'; $label.= '<br><u>'.$langs->trans("Connection").'</u>';
$label.= '<br><b>'.$langs->trans("IPAddress").'</b>: '.$_SERVER["REMOTE_ADDR"]; $label.= '<br><b>'.$langs->trans("IPAddress").'</b>: '.$_SERVER["REMOTE_ADDR"];
if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $label.= '<br><b>'.$langs->trans("ConnectedOnMultiCompany").':</b> '.$conf->entity.' (user entity '.$this->entity.')'; if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $label.= '<br><b>'.$langs->trans("ConnectedOnMultiCompany").':</b> '.$conf->entity.' (user entity '.$this->entity.')';
$label.= '<br><b>'.$langs->trans("AuthenticationMode").':</b> '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)'); $label.= '<br><b>'.$langs->trans("AuthenticationMode").':</b> '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)');
$label.= '<br><b>'.$langs->trans("ConnectedSince").':</b> '.dol_print_date($this->datelastlogin,"dayhour",'tzuser'); $label.= '<br><b>'.$langs->trans("ConnectedSince").':</b> '.dol_print_date($this->datelastlogin,"dayhour",'tzuser');
$label.= '<br><b>'.$langs->trans("PreviousConnexion").':</b> '.dol_print_date($this->datepreviouslogin,"dayhour",'tzuser'); $label.= '<br><b>'.$langs->trans("PreviousConnexion").':</b> '.dol_print_date($this->datepreviouslogin,"dayhour",'tzuser');
$label.= '<br><b>'.$langs->trans("CurrentTheme").':</b> '.$conf->theme; $label.= '<br><b>'.$langs->trans("CurrentTheme").':</b> '.$conf->theme;
$label.= '<br><b>'.$langs->trans("CurrentMenuManager").':</b> '.$menumanager->name; $label.= '<br><b>'.$langs->trans("CurrentMenuManager").':</b> '.$menumanager->name;
$s=picto_from_langcode($langs->getDefaultLang()); $s=picto_from_langcode($langs->getDefaultLang());
$label.= '<br><b>'.$langs->trans("CurrentUserLanguage").':</b> '.($s?$s.' ':'').$langs->getDefaultLang(); $label.= '<br><b>'.$langs->trans("CurrentUserLanguage").':</b> '.($s?$s.' ':'').$langs->getDefaultLang();
$label.= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')'; $label.= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
$label.= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout; $label.= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout;
$label.= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; $label.= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
if (! empty($conf->browser->phone)) $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$conf->browser->phone; if (! empty($conf->browser->phone)) $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$conf->browser->phone;
if (! empty($_SESSION["disablemodules"])) $label.= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ',explode(',',$_SESSION["disablemodules"])); if (! empty($_SESSION["disablemodules"])) $label.= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));
} }
if ($option == 'leave') $link.= '<a href="'.DOL_URL_ROOT.'/holiday/list.php?id='.$this->id.'"'; if ($option == 'leave') $link.= '<a href="'.DOL_URL_ROOT.'/holiday/list.php?id='.$this->id.'"';
else $link.= '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'"'; else $link.= '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'"';
$linkclose=""; $linkclose="";
if (empty($notooltip)) if (empty($notooltip))
{ {
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{ {
$langs->load("users"); $langs->load("users");
$label=$langs->trans("ShowUser"); $label=$langs->trans("ShowUser");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
} }
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; $linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
} }
if (! is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
@@ -2071,9 +2071,11 @@ class User extends CommonObject
{ {
$paddafterimage=''; $paddafterimage='';
if (abs($withpictoimg) == 1) $paddafterimage='style="margin-right: 3px;"'; if (abs($withpictoimg) == 1) $paddafterimage='style="margin-right: 3px;"';
if ($withpictoimg > 0) $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'</div>'; // Only picto
else $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto', 'mini', 0, 1).'</div>'; if ($withpictoimg > 0) $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'</div>';
$result.=$picto; // Picto must be a photo
else $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto', 'mini', 0, 1).'</div>';
$result.=$picto;
} }
if (abs($withpictoimg) != 2) if (abs($withpictoimg) != 2)
{ {

View File

@@ -146,8 +146,7 @@ $param="search_statut=".$search_statut;
print '<table class="liste nohover" width="100%">'; print '<table class="liste nohover" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("HierarchicView")); print_liste_field_titre($langs->trans("HierarchicView"));
print '<td align="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a>'; print_liste_field_titre('<div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a> | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div>',$_SERVER['PHP_SELF'],"",'',"",'align="center"');
print ' | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td>';
print_liste_field_titre($langs->trans("Status"),$_SERVER['PHP_SELF'],"",'',"",'align="right"'); print_liste_field_titre($langs->trans("Status"),$_SERVER['PHP_SELF'],"",'',"",'align="right"');
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','','','','maxwidthsearch '); print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','','','','maxwidthsearch ');
print '</tr>'; print '</tr>';

View File

@@ -62,22 +62,21 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Search User // Search User
$var=false;
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[$var].'><td>'; print '<tr><td>';
print $langs->trans("User").':</td><td><input class="flat inputsearch" type="text" name="search_user" size="18"></td><td'.($canreadperms?' rowspan="2"':'').'><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("User").':</td><td><input class="flat inputsearch" type="text" name="search_user" size="18"></td></tr>';
// Search Group // Search Group
if ($canreadperms) if ($canreadperms)
{ {
$var=false; print '<tr><td>';
print '<tr '.$bc[$var].'><td>';
print $langs->trans("Group").':</td><td><input class="flat inputsearch" type="text" name="search_group" size="18"></td></tr>'; print $langs->trans("Group").':</td><td><input class="flat inputsearch" type="text" name="search_group" size="18"></td></tr>';
} }
print '<tr><td class="center" colspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print "</table><br>\n"; print "</table><br>\n";
print '</form>'; print '</form>';

View File

@@ -461,12 +461,10 @@ print "</tr>\n";
$user2=new User($db); $user2=new User($db);
$var=True;
$i = 0; $i = 0;
while ($i < min($num,$limit)) while ($i < min($num,$limit))
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
$var=!$var;
$userstatic->id=$obj->rowid; $userstatic->id=$obj->rowid;
$userstatic->ref=$obj->label; $userstatic->ref=$obj->label;
@@ -482,18 +480,18 @@ while ($i < min($num,$limit))
$li=$userstatic->getNomUrl(-1,'',0,0,24,1,'login'); $li=$userstatic->getNomUrl(-1,'',0,0,24,1,'login');
print "<tr ".$bc[$var].">"; print "<tr>";
if (! empty($arrayfields['u.login']['checked'])) if (! empty($arrayfields['u.login']['checked']))
{ {
print '<td>'; print '<td>';
print $li; print $li;
if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity) if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity)
{ {
print img_picto($langs->trans("SuperAdministrator"),'redstar'); print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"');
} }
else if ($obj->admin) else if ($obj->admin)
{ {
print img_picto($langs->trans("Administrator"),'star'); print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"');
} }
print '</td>'; print '</td>';
} }
@@ -584,11 +582,11 @@ while ($i < min($num,$limit))
print $user2->getNomUrl(-1,'',0,0,24,0,''); print $user2->getNomUrl(-1,'',0,0,24,0,'');
if (! empty($conf->multicompany->enabled) && $obj->admin2 && ! $obj->entity2) if (! empty($conf->multicompany->enabled) && $obj->admin2 && ! $obj->entity2)
{ {
print img_picto($langs->trans("SuperAdministrator"),'redstar'); print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"');
} }
else if ($obj->admin2) else if ($obj->admin2)
{ {
print img_picto($langs->trans("Administrator"),'star'); print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"');
} }
} }
print '</td>'; print '</td>';