Fix behaviour on grey/visible menu must be same everywhere on
application.
This commit is contained in:
parent
8010cb7f33
commit
331ebbdd73
@ -513,7 +513,7 @@ class FormCompany
|
||||
}
|
||||
}
|
||||
$out.= '</select>';
|
||||
if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
if ($user->admin) $out.= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
|
||||
// Make select dynamic
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
|
||||
@ -462,15 +462,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
$langs->load("users");
|
||||
|
||||
if ($user->admin)
|
||||
{
|
||||
$langs->load("admin");
|
||||
$langs->load("help");
|
||||
//if ($user->admin)
|
||||
//{
|
||||
|
||||
// Setup
|
||||
$newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup');
|
||||
$newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, $user->admin, '', $mainmenu, 'setup');
|
||||
if (empty($leftmenu) || $leftmenu=="setup")
|
||||
{
|
||||
$langs->load("admin");
|
||||
$langs->load("help");
|
||||
|
||||
$warnpicto='';
|
||||
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY))
|
||||
{
|
||||
@ -503,9 +504,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
|
||||
// System tools
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools');
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, $user->admin, '', $mainmenu, 'admintools');
|
||||
if (empty($leftmenu) || preg_match('/^admintools/',$leftmenu))
|
||||
{
|
||||
$langs->load("admin");
|
||||
$langs->load("help");
|
||||
|
||||
$newmenu->add('/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1);
|
||||
if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Modules'), 2);
|
||||
if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Triggers'), 2);
|
||||
@ -534,7 +538,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, 1, '', $mainmenu, 'modulesadmintools');
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, $user->admin, '', $mainmenu, 'modulesadmintools');
|
||||
// Special case: This entry can't be embedded into modules because we need it for both module service and products and we don't want duplicate lines.
|
||||
if ((empty($leftmenu) || $leftmenu=="modulesadmintools") && $user->admin)
|
||||
{
|
||||
@ -543,18 +547,21 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
$newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, 1, '', $mainmenu, 'users');
|
||||
if (empty($leftmenu) || $leftmenu == 'none' || $leftmenu=="users")
|
||||
$newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->rights->user->user->lire, '', $mainmenu, 'users');
|
||||
if ($user->rights->user->user->lire)
|
||||
{
|
||||
$newmenu->add("", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/card.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin, '', 'home');
|
||||
$newmenu->add("/user/index.php", $langs->trans("ListOfUsers"), 2, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/hierarchy.php", $langs->trans("HierarchicView"), 2, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("", $langs->trans("Groups"), 1, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/group/card.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin);
|
||||
$newmenu->add("/user/group/index.php", $langs->trans("ListOfGroups"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin);
|
||||
if (empty($leftmenu) || $leftmenu == 'none' || $leftmenu=="users")
|
||||
{
|
||||
$newmenu->add("", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/card.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin, '', 'home');
|
||||
$newmenu->add("/user/index.php", $langs->trans("ListOfUsers"), 2, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/hierarchy.php", $langs->trans("HierarchicView"), 2, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("", $langs->trans("Groups"), 1, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/group/card.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin);
|
||||
$newmenu->add("/user/group/index.php", $langs->trans("ListOfGroups"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,6 @@ MenuForUsers=Menu for users
|
||||
LangFile=.lang file
|
||||
System=System
|
||||
SystemInfo=System information
|
||||
SystemTools=System tools
|
||||
SystemToolsArea=System tools area
|
||||
SystemToolsAreaDesc=This area provides administration features. Use the menu to choose the feature you're looking for.
|
||||
Purge=Purge
|
||||
|
||||
@ -680,6 +680,7 @@ LinkedToSpecificUsers=Linked to a particular user contact
|
||||
DeleteAFile=Delete a file
|
||||
ConfirmDeleteAFile=Are you sure you want to delete file
|
||||
NoResults=No results
|
||||
SystemTools=System tools
|
||||
ModulesSystemTools=Modules tools
|
||||
Test=Test
|
||||
Element=Element
|
||||
|
||||
@ -57,6 +57,7 @@ RemoveFromGroup=Remove from group
|
||||
PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>.
|
||||
PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>.
|
||||
MenuUsersAndGroups=Users & Groups
|
||||
MenuMyUserCard=My user card
|
||||
LastGroupsCreated=Last %s created groups
|
||||
LastUsersCreated=Last %s users created
|
||||
ShowGroup=Show group
|
||||
|
||||
@ -1877,9 +1877,9 @@ if (! function_exists("llxFooter"))
|
||||
if ($comment) print '<!-- '.$comment.' -->'."\n";
|
||||
|
||||
printCommonFooter($zone);
|
||||
//var_dump($langs); // Uncommment to see the property _tab_loaded to see which language file were loaded
|
||||
|
||||
if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile) && empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End div id-container -->'."\n"; // End div container
|
||||
|
||||
print "</body>\n";
|
||||
print "</html>\n";
|
||||
}
|
||||
|
||||
@ -83,14 +83,14 @@ class Societe extends CommonObject
|
||||
var $state_id;
|
||||
var $state_code;
|
||||
var $state;
|
||||
|
||||
|
||||
/**
|
||||
* State code
|
||||
* State code
|
||||
* @var string
|
||||
* @deprecated Use state_code instead
|
||||
*/
|
||||
var $departement_code;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated Use state instead
|
||||
@ -1762,7 +1762,8 @@ class Societe extends CommonObject
|
||||
|
||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1;
|
||||
|
||||
if ($conf->global->SOCIETE_ADD_REF_IN_LIST && (!empty($withpicto))) {
|
||||
if ($conf->global->SOCIETE_ADD_REF_IN_LIST && (!empty($withpicto)))
|
||||
{
|
||||
if (($this->client) && (! empty ( $this->code_client ))) {
|
||||
$code = $this->code_client . ' - ';
|
||||
}
|
||||
@ -1834,7 +1835,7 @@ class Societe extends CommonObject
|
||||
|
||||
if ($withpicto) $result.=($link.img_object(($notooltip?'':$label), 'company', ($notooltip?'':'class="classfortooltip"')).$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
$result.=$link.($maxlen?dol_trunc($name,$maxlen):$name).$linkend;
|
||||
if ($withpicto != 2) $result.=$link.($maxlen?dol_trunc($name,$maxlen):$name).$linkend;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1124,11 +1124,11 @@ else
|
||||
// Type - Size
|
||||
print '<tr><td><label for="typent_id">'.$langs->trans("ThirdPartyType").'</label></td><td>'."\n";
|
||||
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td>';
|
||||
print '<td><label for="effectif_id">'.$langs->trans("Staff").'</label></td><td>';
|
||||
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id);
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Legal Form
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 312 B |
Binary file not shown.
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 317 B |
@ -1040,11 +1040,11 @@ div.vmenu, td.vmenu {
|
||||
#menu_contenu_logo { padding-right: 4px; }
|
||||
|
||||
a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; }
|
||||
font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #93a5aa; }
|
||||
font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #aaa; }
|
||||
a.vmenu:link, a.vmenu:visited { color: #<?php echo $colortextbackvmenu; ?>; }
|
||||
|
||||
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; margin: 1px 1px 1px 8px; }
|
||||
font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #93a5aa; }
|
||||
font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #aaa; }
|
||||
a.vsmenu:link, a.vsmenu:visited { color: #<?php echo $colortextbackvmenu; ?>; }
|
||||
font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; }
|
||||
|
||||
|
||||
@ -1829,10 +1829,11 @@ class User extends CommonObject
|
||||
$label.= '<br><b>' . $langs->trans("EMail").':</b> '.$this->email;
|
||||
if (! empty($this->admin))
|
||||
$label.= '<br><b>' . $langs->trans("Administrator").'</b>: '.yn($this->admin);
|
||||
if (! empty($this->societe_id)) {
|
||||
if (! empty($this->societe_id)) // Add thirdparty for external users
|
||||
{
|
||||
$thirdpartystatic = new Societe($db);
|
||||
$thirdpartystatic->fetch($this->societe_id);
|
||||
$companylink = ' ('.$thirdpartystatic->getNomUrl('','').')';
|
||||
$companylink = ' '.$thirdpartystatic->getNomUrl(2); // picto only of company
|
||||
$company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')';
|
||||
}
|
||||
$type=($this->societe_id?$langs->trans("External").$company:$langs->trans("Internal"));
|
||||
@ -1875,7 +1876,7 @@ class User extends CommonObject
|
||||
$result.=($link.img_object(($notooltip?'':$label), 'user', ($notooltip?'':'class="classfortooltip"')).$linkend);
|
||||
if ($withpicto != 2) $result.=' ';
|
||||
}
|
||||
$result.= $link . $this->getFullName($langs,'',-1,$maxlen) . $companylink . $linkend;
|
||||
$result.= $link . $this->getFullName($langs,'',-1,$maxlen) . $linkend . $companylink;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user