diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index b52c1f73c98..b8eae83d4eb 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2015 Laurent Destailleur * * This file is a modified version of datepicker.php from phpBSM to fix some * bugs, to add new features and to dramatically increase speed. diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 88052f380c0..ec70253641f 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -218,18 +218,42 @@ class MenuManager } foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' { - $relurl2=dol_buildpath($val2['url'],1); - $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); - $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); - $canonurl2=preg_replace('/\?.*$/','',$val2['url']); - //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); - if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; - if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic - else print str_pad('',$val2['level']+1).'
  • '; // ui-btn to highlight on clic - if ($relurl2) print ''; - print $val2['titre']; - if ($relurl2) print ''; - print '
  • '."\n"; + $showmenu=true; + if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($val2['enabled'])) $showmenu=false; + + if ($showmenu) // Visible (option to hide when not allowed is off or allowed) + { + $relurl2=dol_buildpath($val2['url'],1); + $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); + $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); + $canonurl2=preg_replace('/\?.*$/','',$val2['url']); + //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); + if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; + if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic + else print str_pad('',$val2['level']+1).'
  • '; // ui-btn to highlight on clic + if ($relurl2) + { + if ($val2['enabled']) // Allowed + { + print ''; + } + else // Not allowed but visible (greyed) + { + print ''; + } + } + print $val2['titre']; + if ($relurl2) + { + if ($val2['enabled']) // Allowed + print ''; + else + print ''; + } + print '
  • '."\n"; + } } //var_dump($submenu); print ''; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index af85537d455..31e83c808a8 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -150,6 +150,7 @@ class MenuManager { print '
      '; print '
    • '; + if ($val['enabled'] == 1) { $relurl=dol_buildpath($val['url'],1); @@ -184,23 +185,42 @@ class MenuManager } foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'] { - $relurl2=dol_buildpath($val2['url'],1); - $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); - $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); - $canonurl2=preg_replace('/\?.*$/','',$val2['url']); - //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); - if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; - if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic - else print str_pad('',$val2['level']+1).'
    • '; // ui-btn to highlight on clic - if ($relurl2) - { - print ''; - } - print $val2['titre']; - if ($relurl2) print ''; - print '
    • '."\n"; + $showmenu=true; + if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($val2['enabled'])) $showmenu=false; + + if ($showmenu) // Visible (option to hide when not allowed is off or allowed) + { + $relurl2=dol_buildpath($val2['url'],1); + $relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2); + $relurl2=preg_replace('/__USERID__/',$user->id,$relurl2); + $canonurl2=preg_replace('/\?.*$/','',$val2['url']); + //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']); + if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2=''; + if ($val2['level']==0) print str_pad('',$val2['level']+1).''; // ui-btn to highlight on clic + else print str_pad('',$val2['level']+1).'
    • '; // ui-btn to highlight on clic + if ($relurl2) + { + if ($val2['enabled']) // Allowed + { + print ''; + } + else // Not allowed but visible (greyed) + { + print ''; + } + } + print $val2['titre']; + if ($relurl2) + { + if ($val2['enabled']) // Allowed + print ''; + else + print ''; + } + print '
    • '."\n"; + } } //var_dump($submenu); print '
    '; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 3c2844f3fe4..e543c269fb4 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -100,7 +100,7 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex if ($result < 0) { setEventMessage($object->error,'errors'); } - else + else { $res = $object->reprogram_jobs($user->login); if ($res > 0) @@ -314,11 +314,11 @@ print "\n
    \n"; if (! $user->rights->cron->create) { - print ''.$langs->trans("New").''; + print ''.$langs->trans("CronCreateJob").''; } else { - print ''.$langs->trans("New").''; + print ''.$langs->trans("CronCreateJob").''; } print '
    '; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index e39486e242a..b70f9fa8a84 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -497,7 +497,7 @@ Module1780Desc=Category management (products, suppliers and customers) Module2000Name=WYSIWYG editor Module2000Desc=Allow to edit some text area using an advanced editor Module2300Name=Cron -Module2300Desc=Scheduled task management +Module2300Desc=Scheduled job management Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management @@ -733,10 +733,10 @@ Permission1237=Export supplier orders and their details Permission1251=Run mass imports of external data into database (data load) Permission1321=Export customer invoices, attributes and payments Permission1421=Export customer orders and attributes -Permission23001 = Read Scheduled task -Permission23002 = Create/update Scheduled task -Permission23003 = Delete Scheduled task -Permission23004 = Execute Scheduled task +Permission23001=Read Scheduled job +Permission23002=Create/update Scheduled job +Permission23003=Delete Scheduled job +Permission23004=Execute Scheduled job Permission2401=Read actions (events or tasks) linked to his account Permission2402=Create/modify actions (events or tasks) linked to his account Permission2403=Delete actions (events or tasks) linked to his account diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 31e701f1e2d..bba9584012a 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -26,15 +26,15 @@ CronLastOutput=Last run output CronLastResult=Last result code CronListOfCronJobs=List of scheduled jobs CronCommand=Command -CronList=Jobs list -CronDelete= Delete cron jobs -CronConfirmDelete= Are you sure you want to delete this cron job ? -CronExecute=Launch job -CronConfirmExecute= Are you sure to execute this job now -CronInfo= Jobs allow to execute task that have been planned -CronWaitingJobs=Wainting jobs +CronList=Scheduled job +CronDelete=Delete scheduled jobs +CronConfirmDelete=Are you sure you want to delete this scheduled jobs ? +CronExecute=Launch scheduled jobs +CronConfirmExecute=Are you sure to execute this scheduled jobs now ? +CronInfo=Scheduled job module allow to execute job that have been planned +CronWaitingJobs=Waiting jobs CronTask=Job -CronNone= None +CronNone=None CronDtStart=Start date CronDtEnd=End date CronDtNextLaunch=Next execution @@ -75,6 +75,7 @@ CronObjectHelp=The object name to load.
    For exemple to fetch method of Doli CronMethodHelp=The object method to launch.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of method is is fecth CronArgsHelp=The method arguments.
    For exemple to fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value of paramters can be 0, ProductRef CronCommandHelp=The system command line to execute. +CronCreateJob=Create new Scheduled Job # Info CronInfoPage=Information # Common