From 8462c4d3d349fc7d22fabf58b3dbce64ccd0855e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Mar 2021 13:37:43 +0100 Subject: [PATCH] Clean menu --- htdocs/admin/mails_senderprofile_list.php | 15 --------------- htdocs/core/lib/admin.lib.php | 3 ++- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 4eeeb21c8ae..8f781318995 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -328,21 +328,6 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit // Output page // -------------------------------------------------------------------- -// Example : Adding jquery code -print ''; - $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 759b97aaedb..6715ded36fa 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1886,7 +1886,8 @@ function email_admin_prepare_head() } } - if (!empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) { + // admin and non admin can view this menu entry, but it is not shown yet when we on user menu "Email templates" + if (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates') { $head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php"; $head[$h][1] = $langs->trans("EmailSenderProfiles"); $head[$h][2] = 'senderprofiles';