NEW Can disable meteo on smartphone only
This commit is contained in:
parent
f7c87a9ad3
commit
c5695db3e4
@ -122,6 +122,13 @@ $modules=array(
|
||||
),
|
||||
);
|
||||
|
||||
$labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly"));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
foreach($modules as $module => $delays)
|
||||
@ -201,9 +208,10 @@ if ($action == 'edit')
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td class="center" width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=false;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '</td></tr>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">';
|
||||
print $form->selectarray('MAIN_DISABLE_METEO', $labelmeteo, (empty($conf->global->MAIN_DISABLE_METEO)?0:$conf->global->MAIN_DISABLE_METEO));
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
@ -241,7 +249,9 @@ else
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td class="center" width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">' . yn($conf->global->MAIN_DISABLE_METEO) . '</td></tr>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">';
|
||||
print $labelmeteo[$conf->global->MAIN_DISABLE_METEO];
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@ -358,7 +358,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
/*
|
||||
* Dolibarr Working Board with weather
|
||||
*/
|
||||
$showweather=empty($conf->global->MAIN_DISABLE_METEO)?1:0;
|
||||
$showweather=(empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
|
||||
|
||||
//Array that contains all WorkboardResponse classes to process them
|
||||
$dashboardlines=array();
|
||||
@ -536,7 +536,7 @@ $boxwork.='</tr>'."\n";
|
||||
if ($showweather)
|
||||
{
|
||||
$boxwork.='<tr class="nohover">';
|
||||
$boxwork.='<td class="nohover hideonsmartphone center valignmiddle">';
|
||||
$boxwork.='<td class="nohover'.($conf->global->MAIN_DISABLE_METEO == 2 ?' hideonsmartphone' : '').' center valignmiddle">';
|
||||
$text='';
|
||||
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate",$totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')';
|
||||
else $text=$langs->transnoentitiesnoconv("NoItemLate");
|
||||
|
||||
@ -1809,3 +1809,4 @@ UseSearchToSelectResource=Use a search form to choose a resource (rather than a
|
||||
DisabledResourceLinkUser=Disable feature to link a resource to users
|
||||
DisabledResourceLinkContact=Disable feature to link a resource to contacts
|
||||
ConfirmUnactivation=Confirm module reset
|
||||
OnMobileOnly=On small screen (smartphone) only
|
||||
Loading…
Reference in New Issue
Block a user