diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index c60fa8c5cdb..b603967c52f 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -71,8 +71,11 @@ $month=GETPOST("month","int")?GETPOST("month","int"):date("m"); $day=GETPOST("day","int")?GETPOST("day","int"):0; $pid=GETPOST("projectid","int")?GETPOST("projectid","int"):0; $status=GETPOST("status"); +$maxprint=GETPOST("maxprint"); -if (GETPOST('viewcal')) $day=''; // View by month +if (GETPOST('viewcal')) { $action='show_month'; $day=''; } // View by month +if (GETPOST('viewweek')) { $action='show_week'; $week='TODO'; } // View by week +if (GETPOST('viewday')) { $action='show_day'; $day=date("d"); } // View by day $langs->load("other"); $langs->load("commercial"); @@ -83,7 +86,7 @@ if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MA /* * Actions */ -if (! empty($_POST["viewlist"])) +if (GETPOST("viewlist")) { $param=''; foreach($_POST as $key => $val) @@ -174,6 +177,7 @@ if ($showbirthday) $param.="&showbirthday=1"; if ($pid) $param.="&projectid=".$pid; if (GETPOST("type")) $param.="&type=".GETPOST("type"); if ($action == 'show_day') $param.='&action='.$action; +if ($maxprint) $param.="&maxprint=on"; // Show navigation bar if (empty($action) || $action=='show_month') @@ -445,7 +449,7 @@ else $link.=$langs->trans("AgendaHideBirthdayEvents"); $link.=''; print_fiche_titre('',$link); -if ($_GET["action"] != 'show_day') // View by month +if (empty($action) || $action == 'show_month') // View by month { echo '
| '; - show_day_events ($db, $day, $month, $year, $month, $style, $eventarray, 0, 80, $newparam, 1); + show_day_events ($db, $day, $month, $year, $month, $style, $eventarray, 0, 80, $newparam, 1, 300); echo " | \n"; echo "
| '; // Minimum 60px height + print ' | ||
| '; //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); $i=0; @@ -699,7 +702,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } else { - print ''.img_picto("all","1downarrow_selected.png").' ...'; diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index df4418eaca1..0957413bee7 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -87,7 +87,7 @@ if (! $user->rights->agenda->allactions->read || $_GET["filter"]=='mine') // If /* * Actions */ -if (! empty($_POST["viewcal"])) +if (GETPOST("viewcal") || GETPOST("viewweek") || GETPOST("viewday")) { $param=''; foreach($_POST as $key => $val) diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index fd12ebe67f7..65e3653fa58 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -23,8 +23,10 @@ ActionsToDoBy=Events affected to ActionsDoneBy=Events done by AllMyActions= All my events/tasks AllActions= All events/tasks -ViewList= View list -ViewCal= View calendar +ViewList=List view +ViewCal=Month view +ViewDay=Day view +ViewWeek=Week view ViewWithPredefinedFilters= View with predefined filters AutoActions= Automatic filling of agenda AgendaAutoActionDesc= Define here events for which you want Dolibarr to create automatically an action 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 f02afd2dadc..297c1472dea 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -23,8 +23,10 @@ ActionsToDoBy=Evénements affectées à ActionsDoneBy=Evénements réalisés par AllMyActions=Tous mes événements AllActions=Tous les événements -ViewList=Voir liste -ViewCal=Voir calendrier +ViewList=Vue liste +ViewCal=Vue mois +ViewDay=Vue jour +ViewWeek=Vue semaine ViewWithPredefinedFilters=Vues avec filtres prédéfinis AutoActions=Alimentation automatique de l'agenda 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/lib/agenda.lib.php b/htdocs/lib/agenda.lib.php index 412b14f900e..c55b0491089 100644 --- a/htdocs/lib/agenda.lib.php +++ b/htdocs/lib/agenda.lib.php @@ -101,10 +101,11 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbort // Buttons print ' | ';
- print img_picto($langs->trans("ViewCal"),'object_calendar').' ';
+ print img_picto($langs->trans("ViewCal"),'object_calendar').' ';
print ' '; + print img_picto($langs->trans("ViewDay"),'object_calendarday').' '; print ' '; - print img_picto($langs->trans("ViewList"),'object_list').' '; + print img_picto($langs->trans("ViewList"),'object_list').' '; print ' | ';
print '|