NEW Indicator on workboard are red/green if late or not.
This commit is contained in:
parent
a33d6c1d3c
commit
9642967c1f
@ -4509,20 +4509,21 @@ class Form
|
||||
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
|
||||
* @param array $array Array with key+value
|
||||
* @param string|string[] $id Preselected key or preselected keys for multiselect
|
||||
* @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' '), <0 to add an empty value with key that is this value.
|
||||
* @param int $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (value is '' or ' ' if 1), <0 to add an empty value with key that is this value.
|
||||
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||
* @param int $value_as_key 1 to use value as key
|
||||
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
|
||||
* @param int $translate Translate and encode value
|
||||
* @param int $maxlen Length maximum for labels
|
||||
* @param int $disabled Html select box is disabled
|
||||
* @param int $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort
|
||||
* @param string $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort
|
||||
* @param string $morecss Add more class to css styles
|
||||
* @param int $addjscombo Add js combo
|
||||
* @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set.
|
||||
* @return string HTML select string.
|
||||
* @see multiselectarray
|
||||
*/
|
||||
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0)
|
||||
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@ -4558,7 +4559,8 @@ class Form
|
||||
{
|
||||
$textforempty=' ';
|
||||
if (! empty($conf->use_javascript_ajax)) $textforempty=' '; // If we use ajaxcombo, we need here to avoid to have an empty element that is too small.
|
||||
$out.='<option value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id==-2?' selected':'').'>'.$textforempty.'</option>'."\n"; // id is -2 because -1 is already "do not contact"
|
||||
if (! is_numeric($show_empty)) $textforempty=$show_empty;
|
||||
$out.='<option class="optiongrey" '.($moreparamonempty?$moreparamonempty.' ':'').'value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id == $show_empty ?' selected':'').'>'.$textforempty.'</option>'."\n";
|
||||
}
|
||||
|
||||
if (is_array($array))
|
||||
|
||||
@ -1012,7 +1012,7 @@ class FormOther
|
||||
$selectboxlist.='<input type="hidden" name="userid" value="'.$user->id.'">';
|
||||
$selectboxlist.='<input type="hidden" name="areacode" value="'.$areacode.'">';
|
||||
$selectboxlist.='<input type="hidden" name="boxorder" value="'.$boxorder.'">';
|
||||
$selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel,'',1);
|
||||
$selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel, '', $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', '', 0, ' disabled hidden selected');
|
||||
if (empty($conf->use_javascript_ajax)) $selectboxlist.=' <input type="submit" class="button" value="'.$langs->trans("AddBox").'">';
|
||||
$selectboxlist.='</form>';
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ print '<th class="liste_titre" colspan="2">'.$langs->trans("DolibarrWorkBoard").
|
||||
print '<th class="liste_titre" align="right">'.$langs->trans("Number").'</th>';
|
||||
print '<th class="liste_titre" align="right">'.$langs->trans("Late").'</th>';
|
||||
print '<th class="liste_titre"> </th>';
|
||||
print '<th class="liste_titre" width="20"> </th>';
|
||||
//print '<th class="liste_titre" width="20"> </th>';
|
||||
if ($showweather) print '<th class="liste_titre hideonsmartphone" width="80"> </th>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -469,7 +469,8 @@ foreach($valid_dashboardlines as $board)
|
||||
print '<td align="right">';
|
||||
//if ($board->nbtodolate > 0)
|
||||
//{
|
||||
print '<a class="dashboardlineindicatorlate" href="'.$board->url.'"><span class="dashboardlineindicatorlate">';
|
||||
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days");
|
||||
print '<a title="'.dol_escape_htmltag($textlate).'" class="dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'" href="'.$board->url.'"><span class="dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'">';
|
||||
print $board->nbtodolate;
|
||||
print '</span></a>';
|
||||
//}
|
||||
@ -478,9 +479,9 @@ foreach($valid_dashboardlines as $board)
|
||||
if ($board->nbtodolate > 0) print img_picto($langs->trans("NActionsLate",$board->nbtodolate).' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')',"warning");
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '<td class="nowrap" align="right">';
|
||||
/*print '<td class="nowrap" align="right">';
|
||||
print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')';
|
||||
print '</td>';
|
||||
print '</td>';*/
|
||||
if ($showweather)
|
||||
{
|
||||
print '<td class="nohover hideonsmartphone" rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">';
|
||||
|
||||
@ -95,3 +95,4 @@ ForCustomersInvoices=Customers invoices
|
||||
ForCustomersOrders=Customers orders
|
||||
ForProposals=Proposals
|
||||
LastXMonthRolling=The last %s month rolling
|
||||
ChooseBoxToAdd=Choose a box to add
|
||||
@ -230,6 +230,8 @@ Now=Now
|
||||
HourStart=Start hour
|
||||
Date=Date
|
||||
DateAndHour=Date and hour
|
||||
DateToday=Today's date
|
||||
DateReference=Reference date
|
||||
DateStart=Date start
|
||||
DateEnd=Date end
|
||||
DateCreation=Creation date
|
||||
|
||||
@ -293,6 +293,10 @@ input.smallpadd {
|
||||
select.flat, form.flat select {
|
||||
font-weight: normal;
|
||||
}
|
||||
.optiongrey {
|
||||
opacity: 0.5;
|
||||
}
|
||||
select:invalid { color: gray; }
|
||||
input:disabled {
|
||||
background:#ddd;
|
||||
}
|
||||
@ -2540,10 +2544,17 @@ div.tabBar .noborder {
|
||||
}
|
||||
span.boxstatsindicator {
|
||||
font-size: 110%;
|
||||
font-weight: bold;
|
||||
font-weight: normal;
|
||||
}
|
||||
span.dashboardlineindicator, span.dashboardlineindicatorlate {
|
||||
font-size: 120%;
|
||||
font-weight: normal;
|
||||
}
|
||||
span.dashboardlineok {
|
||||
color: #008800;
|
||||
}
|
||||
span.dashboardlineko {
|
||||
color: #880000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.boxtable {
|
||||
|
||||
@ -2376,13 +2376,14 @@ div.tabBar .noborder {
|
||||
}
|
||||
span.boxstatsindicator {
|
||||
font-size: 110%;
|
||||
font-weight: bold;
|
||||
font-weight: normal;
|
||||
}
|
||||
span.dashboardlineindicator, span.dashboardlineindicatorlate {
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.boxtable {
|
||||
-moz-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
-webkit-box-shadow: 3px 3px 4px #f4f4f4;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user