';
+
+ print '| ';
+ print $langs->trans("DashboardDisableBlocks");
+ print ' | ';
+ print ' |
';
+
+ print '| ' . $langs->trans('DashboardDisableGlobal') . ' | ';
+ print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
+ print ' | ';
+ print '
';
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
- print '| ';
- print $langs->trans("DashboardDisableBlocks");
- print ' | |
';
-
// Block meteo
print '| ' . $langs->trans('MAIN_DISABLE_METEO') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block agenda
print '| ' . $langs->trans('DashboardDisableBlockAgenda') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block agenda
print '| ' . $langs->trans('DashboardDisableBlockProject') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block customer
print '| ' . $langs->trans('DashboardDisableBlockCustomer') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block supplier
print '| ' . $langs->trans('DashboardDisableBlockSupplier') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block contract
print '| ' . $langs->trans('DashboardDisableBlockContract') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block ticket
print '| ' . $langs->trans('DashboardDisableBlockTicket') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block bank
print '| ' . $langs->trans('DashboardDisableBlockBank') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block adherent
print '| ' . $langs->trans('DashboardDisableBlockAdherent') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block expense report
print '| ' . $langs->trans('DashboardDisableBlockExpenseReport') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
// Block holiday
print '| ' . $langs->trans('DashboardDisableBlockHoliday') . ' | ';
- print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0);
+ print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red');
print ' | ';
print '
';
}
diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php
index fa182226b7e..ac0c24bd05b 100644
--- a/htdocs/core/lib/ajax.lib.php
+++ b/htdocs/core/lib/ajax.lib.php
@@ -543,12 +543,13 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete =
* @param int $revertonoff 1=Revert on/off
* @param int $strict Use only "disabled" with delConstant and "enabled" with setConstant
* @param int $forcereload Force to reload page if we click/change value (this is supported only when there is no 'alert' option in input)
- * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No left margin. Works for fontawesome picto only.
+ * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No left margin.
* @param int $forcenoajax 1 = Force to use a ahref link instead of ajax code.
* @param int $setzeroinsteadofdel 1 = Set constantto '0' instead of deleting it
+ * @param string $suffix Suffix to use on the name of the switch_on picto. Example: '', '_red'
* @return string
*/
-function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0, $setzeroinsteadofdel = 0)
+function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0, $setzeroinsteadofdel = 0, $suffix = '')
{
global $conf, $langs, $user;
@@ -607,7 +608,7 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
$out .= '';
$out .= ''.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'';
- $out .= ''.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort)).'';
+ $out .= ''.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).'';
$out .= "\n";
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index dd22c804f23..9c93b69ee16 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3615,7 +3615,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
'off', 'on', 'order',
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'stock', 'resize', 'service', 'stats', 'trip',
- 'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
+ 'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
@@ -3659,7 +3659,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
'trip'=>'wallet', 'expensereport'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
'sign-out'=>'sign-out-alt',
- 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
+ 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'switch_on_red'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
'bank'=>'university', 'close_title'=>'times', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter',
'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarmonth'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
'intervention'=>'ambulance', 'invoice'=>'file-invoice-dollar', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice',
@@ -3720,7 +3720,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
// Define $marginleftonlyshort
$arrayconvpictotomarginleftonly = array(
'bank', 'check', 'delete', 'generic', 'grip', 'grip_title', 'jabber',
- 'grip_title', 'grip', 'listlight', 'note', 'on', 'off', 'playdisabled', 'printer', 'resize', 'sign-out', 'stats', 'switch_on', 'switch_off',
+ 'grip_title', 'grip', 'listlight', 'note', 'on', 'off', 'playdisabled', 'printer', 'resize', 'sign-out', 'stats', 'switch_on', 'switch_on_red', 'switch_off',
'uparrow', '1uparrow', '1downarrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected'
);
if (!isset($arrayconvpictotomarginleftonly[$pictowithouttext])) {
@@ -3742,7 +3742,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'members'=>'infobox-adherent', 'member'=>'infobox-adherent', 'money-bill-alt'=>'infobox-bank_account',
'order'=>'infobox-commande',
'user'=>'infobox-adherent', 'users'=>'infobox-adherent',
- 'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
+ 'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4', 'switch_on_red'=>'font-status8',
'holiday'=>'infobox-holiday', 'info'=>'opacityhigh', 'invoice'=>'infobox-commande',
'knowledgemanagement'=>'infobox-contrat rotate90', 'loan'=>'infobox-bank_account',
'payment'=>'infobox-bank_account', 'poll'=>'infobox-adherent', 'pos'=>'infobox-bank_account', 'project'=>'infobox-project', 'projecttask'=>'infobox-project', 'propal'=>'infobox-propal',
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 0e8043dad63..998c6c7aff0 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1270,7 +1270,7 @@ SimpleNumRefNoDateModelDesc=Returns the reference number in the format %s-nnnn w
ShowProfIdInAddress=Show professional ID with addresses
ShowVATIntaInAddress=Hide intra-Community VAT number
TranslationUncomplete=Partial translation
-MAIN_DISABLE_METEO=Disable meteorological view
+MAIN_DISABLE_METEO=Disable weather thumb
MeteoStdMod=Standard mode
MeteoStdModEnabled=Standard mode enabled
MeteoPercentageMod=Percentage mode
@@ -2164,19 +2164,19 @@ YouShouldSetThisToOff=You should set this to 0 or off
InstallAndUpgradeLockedBy=Install and upgrades are locked by the file %s
OldImplementation=Old implementation
PDF_SHOW_LINK_TO_ONLINE_PAYMENT=If some online payment modules are enabled (Paypal, Stripe, ...), add a link on the PDF to make the online payment
-DashboardDisableGlobal=Disable totally dashboard
+DashboardDisableGlobal=Disable globally all the thumbs of open objects
BoxstatsDisableGlobal=Disable totally box statistics
-DashboardDisableBlocks=Dashboard - Blocks to disable
-DashboardDisableBlockAgenda=Disable block agenda
-DashboardDisableBlockProject=Disable block project
-DashboardDisableBlockCustomer=Disable block customer
-DashboardDisableBlockSupplier=Disable block supplier
-DashboardDisableBlockContract=Disable block contract
-DashboardDisableBlockTicket=Disable block ticket
-DashboardDisableBlockBank=Disable block bank
-DashboardDisableBlockAdherent=Disable block adherent
-DashboardDisableBlockExpenseReport=Disable block expense report
-DashboardDisableBlockHoliday=Disable block holiday
+DashboardDisableBlocks=Thumbs of open objects (to process or late) on main dashboard
+DashboardDisableBlockAgenda=Disable the thumb for agenda
+DashboardDisableBlockProject=Disable the thumb for projects
+DashboardDisableBlockCustomer=Disable the thumb for customers
+DashboardDisableBlockSupplier=Disable the thumb for suppliers
+DashboardDisableBlockContract=Disable the thumb for contracts
+DashboardDisableBlockTicket=Disable the thumb for tickets
+DashboardDisableBlockBank=Disable the thumb for banks
+DashboardDisableBlockAdherent=Disable the thumb for memberships
+DashboardDisableBlockExpenseReport=Disable the thumb for expense reports
+DashboardDisableBlockHoliday=Disable the thumb for leaves
EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off)
IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax
IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax