diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 05200feee30..19685bd950f 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -513,7 +513,7 @@ class FormCompany } } $out.= ''; - 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'; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b1197202d1b..874aa723c69 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.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); + } } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2c6db68dac7..61ce5d93edf 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -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 diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index b61140df377..ae766c7a147 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -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 diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index 9670d002be6..e6764df49a2 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -57,6 +57,7 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to %s. PasswordChangeRequestSent=Request to change password for %s sent to %s. MenuUsersAndGroups=Users & Groups +MenuMyUserCard=My user card LastGroupsCreated=Last %s created groups LastUsersCreated=Last %s users created ShowGroup=Show group diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 13ef97c514e..7a390ab7d9d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1877,9 +1877,9 @@ if (! function_exists("llxFooter")) if ($comment) print ''."\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 ' '."\n"; // End div container - print "\n"; print "\n"; } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 18bfea5fb0c..e4b6334690e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -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; } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 9d7a0cf8a1e..760982b9ad7 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1124,11 +1124,11 @@ else // Type - Size print ''."\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 ''; print ''; 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 ''; // Legal Form diff --git a/htdocs/theme/eldy/img/help.png b/htdocs/theme/eldy/img/help.png index 12e6cd655d6..2c56e645a01 100644 Binary files a/htdocs/theme/eldy/img/help.png and b/htdocs/theme/eldy/img/help.png differ diff --git a/htdocs/theme/eldy/img/info.png b/htdocs/theme/eldy/img/info.png index 12e6cd655d6..78650eb5364 100644 Binary files a/htdocs/theme/eldy/img/info.png and b/htdocs/theme/eldy/img/info.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a546ba1544a..5a6723ed535 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -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:px; font-family: ; text-align: ; font-weight: bold; } -font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #93a5aa; } +font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #aaa; } a.vmenu:link, a.vmenu:visited { color: #; } a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #202020; margin: 1px 1px 1px 8px; } -font.vsmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #93a5aa; } +font.vsmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #aaa; } a.vsmenu:link, a.vsmenu:visited { color: #; } font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 0da1b5f8d90..b255e3ffa68 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1829,10 +1829,11 @@ class User extends CommonObject $label.= '
' . $langs->trans("EMail").': '.$this->email; if (! empty($this->admin)) $label.= '
' . $langs->trans("Administrator").': '.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; }