diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 612f26145e6..4015b202d62 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -937,7 +937,7 @@ if ($id > 0) else print dol_print_date($object->datep,'day'); if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); print ''; - print ''."\n"; + print ''."\n"; print '
'; print ''; print ''; @@ -965,6 +965,15 @@ if ($id > 0) //print ''; print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' '; print '
'."\n"; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + //print ''; + print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone"').' '; + print '
'."\n"; print ''; print ''; @@ -984,7 +993,7 @@ if ($id > 0) print ''.$langs->trans("Location").''.$object->location.''; // Assigned to - print ''.$langs->trans("ActionAffectedTo").''; + print ''.$langs->trans("ActionAffectedTo").''; if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1); print ''; diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index ba6fd2198e9..b9e90550b2e 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -63,15 +63,15 @@ $limit = $conf->liste_limit; $offset = $limit * $page ; if (! $sortorder) { - $sortorder="ASC"; - if ($status == 'todo') $sortorder="ASC"; - if ($status == 'done') $sortorder="DESC"; + $sortorder="DESC"; + if ($status == 'todo') $sortorder="DESC"; + //if ($status == 'done') $sortorder="DESC"; } if (! $sortfield) { - $sortfield="a.percent"; + $sortfield="a.datep"; if ($status == 'todo') $sortfield="a.datep"; - if ($status == 'done') $sortfield="a.datep2"; + //if ($status == 'done') $sortfield="a.datep2"; } // Security check diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 575f9973eac..a1fde80a842 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -399,7 +399,8 @@ if ($resql) $event->datep=$db->jdate($obj->datep); // datep and datef are GMT date $event->datef=$db->jdate($obj->datep2); $event->type_code=$obj->code; - $event->libelle=$obj->label; + $event->libelle=$obj->label; // deprecated + $event->label=$obj->label; $event->percentage=$obj->percent; $event->author->id=$obj->fk_user_author; // user id of creator $event->usertodo->id=$obj->fk_user_action; // user id of owner @@ -657,21 +658,18 @@ jQuery(document).ready(function() { { /* alert(\'no event\'); */ url = "'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&affectedto="+userid+"&datep="+year+month+day+hour+min+"00" - alert(url); window.location.href = url; } else if (ids.indexOf(",") > -1) /* There is several events */ { /* alert(\'several events\'); */ url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?usertodo="+userid - alert(url); window.location.href = url; } else /* One event */ { /* alert(\'one event\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/list.php?action=view&id="+ids - alert(url); + url = "'.DOL_URL_ROOT.'/comm/action/fiche.php?action=view&id="+ids window.location.href = url; } }); @@ -787,23 +785,33 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $color = ''; //init if (empty($event->fulldayevent)) { - $a = dol_mktime((int) $h,0,0,$month,$day,$year); - $b = dol_mktime((int) $h,30,0,$month,$day,$year); - $c = dol_mktime((int) $h+1,0,0,$month,$day,$year); + $a = dol_mktime((int) $h,0,0,$month,$day,$year,false,false); + $b = dol_mktime((int) $h,30,0,$month,$day,$year,false,false); + $c = dol_mktime((int) $h+1,0,0,$month,$day,$year,false,false); - if ($event->date_start_in_calendar < $b && $event->date_end_in_calendar > $a) + $dateendtouse=$event->date_end_in_calendar; + if ($dateendtouse==$event->date_start_in_calendar) $dateendtouse++; + + if ($event->date_start_in_calendar < $b && $dateendtouse > $a) { - $cases1[$h][$event->id]++; + $busy=$event->transparency; + $cases1[$h][$event->id]['busy']=$busy; + $cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour').' - '.dol_print_date($event->date_end_in_calendar,'dayhour').' - '.$event->label; } - if ($event->date_start_in_calendar < $c && $event->date_end_in_calendar > $b) + if ($event->date_start_in_calendar < $c && $dateendtouse > $b) { - $cases2[$h][$event->id]++; + $busy=$event->transparency; + $cases2[$h][$event->id]['busy']=$busy; + $cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour').' - '.dol_print_date($event->date_end_in_calendar,'dayhour').' - '.$event->label; } } else { - $cases1[$h][$event->id]=1; - $cases2[$h][$event->id]=1; + $busy=$event->transparency; + $cases1[$h][$event->id]['busy']=$busy; + $cases2[$h][$event->id]['busy']=$busy; + $cases1[$h][$event->id]['string']=$event->label; + $cases2[$h][$event->id]['string']=$event->label; break; } } @@ -819,34 +827,24 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $style1='';$style2=''; $string1=' ';$string2=' '; $title1='';$title2=''; - if (isset($cases1[$h])) + if (isset($cases1[$h]) && $cases1[$h] != '') { - if ($cases1[$h] != '') + $title1=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans("Event"):$langs->trans("Events")); + $string1=' '; + $style1='peruser_notbusy'; + foreach($cases1[$h] as $id => $ev) { - $title1=count($cases1[$h]).' '.$langs->trans("Events"); - /*$title = $h; - $title .= 'h'; - if ((int) $cases1[$h] != $cases1[$h]) - $title .= '30'; - else - $title .= '00';*/ - $string1=' '; - $style1='peruser_busy'; - $url=''; + if ($ev['busy']) $style1='peruser_busy'; } } - if (isset($cases2[$h])) + if (isset($cases2[$h]) && $cases2[$h] != '') { - if ($cases2[$h] != '') + $title2=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans("Event"):$langs->trans("Events")); + $string2=' '; + $style2='peruser_notbusy'; + foreach($cases2[$h] as $id => $ev) { - /*$title = $h; - $title .= 'h'; - if ((int) $cases2[$h] != $cases2[$h]) $title .= '30'; - else $title .= '00';*/ - $title2=count($cases1[$h]).' '.$langs->trans("Events"); - $string2=' '; - $style2='peruser_busy'; - $url=''; + if ($ev['busy']) $style2='peruser_busy'; } } @@ -856,20 +854,22 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & if (count($cases1[$h]) == 1) // 1 seul evenement { $ids=array_keys($cases1[$h]); - $id=$ids[0]; + $output = array_slice($cases1[$h], 0, 1); + if ($output[0]['string']) $title1.=' - '.$output[0]['string']; } if (count($cases2[$h]) == 1) // 1 seul evenement { $ids=array_keys($cases2[$h]); - $id=$ids[0]; + $output = array_slice($cases2[$h], 0, 1); + if ($output[0]['string']) $title2.=' - '.$output[0]['string']; } $ids1=join(',',array_keys($cases1[$h])); $ids2=join(',',array_keys($cases2[$h])); //var_dump($cases1[$h]); print ''; - print ''; print '
'; + print '
'; print $string1; - print ''; + print ''; print $string2; print '
'; diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 73f169609e3..4fcc6708a73 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -7,9 +7,10 @@ Agendas= Agendas Calendar= Calendar Calendars= Calendars LocalAgenda=Local calendar -AffectedTo= Assigned to -DoneBy= Done by -Events= Events +AffectedTo=Assigned to +DoneBy=Done by +Event=Event +Events=Events EventsNb=Number of events MyEvents=My events OtherEvents=Other events @@ -17,11 +18,11 @@ ListOfActions=List of events Location=Location EventOnFullDay=Event on all day(s) SearchAnAction= Search an event/task -MenuToDoActions= All incomplete events -MenuDoneActions= All terminated events -MenuToDoMyActions= My incomplete events -MenuDoneMyActions= My terminated events -ListOfEvents= List of Dolibarr events +MenuToDoActions=All incomplete events +MenuDoneActions=All terminated events +MenuToDoMyActions=My incomplete events +MenuDoneMyActions=My terminated events +ListOfEvents=List of Dolibarr events ActionsAskedBy=Events reported by ActionsToDoBy=Events assigned to ActionsDoneBy=Events done by @@ -33,7 +34,7 @@ ViewList=List view ViewCal=Month view ViewDay=Day view ViewWeek=Week view -ViewPerUser=Per user +ViewPerUser=Per user view ViewWithPredefinedFilters= View with predefined filters AutoActions= Automatic filling AgendaAutoActionDesc= Define here events for which you want Dolibarr to create automatically an event in agenda. If nothing is checked (by default), only manual actions will be included in agenda. diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index 80ffc54e07e..2ab1ad01359 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -33,7 +33,7 @@ ViewList=Vue liste ViewCal=Vue mois ViewDay=Vue jour ViewWeek=Vue semaine -ViewPerUser=Par utilisateur +ViewPerUser=Vue par utilisateur ViewWithPredefinedFilters= Vues avec filtres prédéfinis AutoActions= Alimentation automatique AgendaAutoActionDesc= Définissez dans cet onglet les événements pour lesquels Dolibarr créera automatiquement une action dans l'agenda. Si aucune case n'est cochée (par défaut), seules les actions manuelles seront incluses dans l'agenda. diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index c6340e9d19c..40d77cfd596 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -1698,19 +1698,18 @@ table.cal_month { border-spacing: 0px; } .cal_other_month_peruserleft { border-top: 0; border-left: solid 3px #6C7C7B !important; border-right: 0; } .cal_current_month_right { border-right: solid 1px #E0E0E0; } .cal_other_month_right { border-right: solid 1px #C0C0C0; } - .cal_other_month { opacity: 0.6; background: #EAEAEA; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past_month { opacity: 0.6; background: #EEEEEE; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_current_month_peruserleft { background: #FFFFFF; border-left: solid 3px #6C7C7B; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } - .cal_today_peruser { background: #FFFFFF; border-right: solid 1px #6C7C7B; border-top: solid 1px #A0A0A0; border-bottom: solid 1px #A0A0A0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today_peruser_peruserleft { background: #FFFFFF; border-left: solid 3px #6C7C7B; border-top: solid 1px #A0A0A0; border-right: solid 1px #6C7C7B; border-bottom: solid 1px #A0A0A0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } - .cal_today { background:#ffffff; border:solid 2px #bbbbbb; } +.peruser_busy { background: #CC8888; } +.peruser_notbusy { background: #EEDDDD; } div.dayevent table.nobordernopadding tr td {padding:1px;} diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 0ec5b806880..1159e40ff0a 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -1858,6 +1858,8 @@ li.cal_event { border: none; list-style-type: none; } .cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_peruser { padding: 0px; } +.peruser_busy { background: #CC8888; } +.peruser_notbusy { background: #EEDDDD; } /* ============================================================================== */ diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index e9c742a24c1..950b2ce0001 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -1961,6 +1961,8 @@ li.cal_event { border: none; list-style-type: none; } .cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; } .cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; } +.peruser_busy { background: #CC8888; } +.peruser_notbusy { background: #EEDDDD; } /* ============================================================================== */ diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 555e674fb92..bfb64ab09a0 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -1986,6 +1986,8 @@ li.cal_event { border: none; list-style-type: none; } .cal_event a:visited {font-size: 11px; font-weight: bold !important; } .cal_event a:active {font-size: 11px; font-weight: bold !important; } .cal_event a:hover {font-size: 11px; font-weight: bold !important; } +.peruser_busy { background: #CC8888; } +.peruser_notbusy { background: #EEDDDD; } /* ============================================================================== */ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 36cbc9afb54..45c9499a45b 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2329,7 +2329,8 @@ table.cal_month { border-spacing: 0px; } .cal_today_peruser_peruserleft { background: #FFFFFF; border-left: solid 3px #6C7C7B; border-top: solid 1px #A0A0A0; border-right: solid 1px #6C7C7B; border-bottom: solid 1px #A0A0A0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } .cal_peruser { padding: 0px; } -.peruser_busy { background: #FF8888; } +.peruser_busy { background: #CC8888; } +.peruser_notbusy { background: #EEDDDD; } table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25); moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);