diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 7d29e9f1dc7..0faba1ddc26 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1863,23 +1863,23 @@ if ($id > 0) { $linkback = ''; // Link to other agenda views $linkback .= img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("BackToList").''; + $linkback .= ''.$langs->trans("BackToList").''; $linkback .= ''; $linkback .= '
  • '; $linkback .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("ViewCal").''; + $linkback .= ''.$langs->trans("ViewCal").''; $linkback .= '
  • '; $linkback .= '
  • '; $linkback .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("ViewWeek").''; + $linkback .= ''.$langs->trans("ViewWeek").''; $linkback .= '
  • '; $linkback .= '
  • '; $linkback .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("ViewDay").''; + $linkback .= ''.$langs->trans("ViewDay").''; $linkback .= '
  • '; $linkback .= '
  • '; $linkback .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("ViewPerUser").''; + $linkback .= ''.$langs->trans("ViewPerUser").''; //$linkback.=$out; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 3e2520f43da..e2adf06425f 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1359,7 +1359,7 @@ class ActionComm extends CommonObject $response->warning_delay = $conf->agenda->warning_delay / 60 / 60 / 24; $response->label = $langs->trans("ActionsToDo"); $response->labelShort = $langs->trans("ActionsToDoShort"); - $response->url = DOL_URL_ROOT.'/comm/action/list.php?action=show_list&actioncode=0&status=todo&mainmenu=agenda'; + $response->url = DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&actioncode=0&status=todo&mainmenu=agenda'; if ($user->rights->agenda->allactions->read) { $response->url .= '&filtert=-1'; } diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index cfe87f1a259..35e00006c6f 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -140,18 +140,18 @@ if ($object->id > 0) { print dol_get_fiche_head($head, 'documents', $langs->trans("Action"), -1, 'action'); $linkback = img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("BackToList").''; + $linkback .= ''.$langs->trans("BackToList").''; // Link to other agenda views $out = ''; $out .= '
  • '.img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewPerUser").''; + $out .= ''.$langs->trans("ViewPerUser").''; $out .= '
  • '.img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewCal").''; + $out .= ''.$langs->trans("ViewCal").''; $out .= '
  • '.img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewWeek").''; + $out .= ''.$langs->trans("ViewWeek").''; $out .= '
  • '.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewDay").''; + $out .= ''.$langs->trans("ViewDay").''; $linkback .= $out; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 8696bbc82d4..0f829132cb7 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -97,6 +97,11 @@ if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // I } $action = GETPOST('action', 'aZ09'); + +$mode = GETPOST('mode', 'aZ09'); +if (empty($mode) && preg_match('/show_/', $action)) { + $mode = $action; // For backward compatibility +} $resourceid = GETPOST("search_resourceid", "int"); $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y"); $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m"); @@ -134,20 +139,20 @@ if ($status == '' && !GETPOSTISSET('search_status')) { $defaultview = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); $defaultview = (empty($user->conf->AGENDA_DEFAULT_VIEW) ? $defaultview : $user->conf->AGENDA_DEFAULT_VIEW); -if (empty($action) && !GETPOSTISSET('action')) { - $action = $defaultview; +if (empty($mode) && !GETPOSTISSET('mode')) { + $mode = $defaultview; } -if ($action == 'default') { // When action is default, we want a calendar view and not the list - $action = (($defaultview != 'show_list') ? $defaultview : 'show_month'); +if ($mode == 'default') { // When action is default, we want a calendar view and not the list + $mode = (($defaultview != 'show_list') ? $defaultview : 'show_month'); } -if (GETPOST('viewcal', 'int') && GETPOST('action', 'alpha') != 'show_day' && GETPOST('action', 'alpha') != 'show_week') { - $action = 'show_month'; $day = ''; +if (GETPOST('viewcal', 'int') && GETPOST('mode', 'alpha') != 'show_day' && GETPOST('mode', 'alpha') != 'show_week') { + $mode = 'show_month'; $day = ''; } // View by month -if (GETPOST('viewweek', 'int') || GETPOST('action', 'alpha') == 'show_week') { - $action = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); +if (GETPOST('viewweek', 'int') || GETPOST('mode', 'alpha') == 'show_week') { + $mode = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); } // View by week -if (GETPOST('viewday', 'int') || GETPOST('action', 'alpha') == 'show_day') { - $action = 'show_day'; $day = ($day ? $day : date("d")); +if (GETPOST('viewday', 'int') || GETPOST('mode', 'alpha') == 'show_day') { + $mode = 'show_day'; $day = ($day ? $day : date("d")); } // View by day $object = new ActionComm($db); @@ -168,7 +173,7 @@ if ($user->socid && $socid) { * Actions */ -if (GETPOST("viewlist", 'alpha') || $action == 'show_list') { +if (GETPOST("viewlist", 'alpha') || $mode == 'show_list') { $param = ''; if (is_array($_POST)) { foreach ($_POST as $key => $val) { @@ -179,14 +184,14 @@ if (GETPOST("viewlist", 'alpha') || $action == 'show_list') { } } if (!preg_match('/action=/', $param)) { - $param .= ($param ? '&' : '').'action=show_list'; + $param .= ($param ? '&' : '').'mode=show_list'; } //print $param; header("Location: ".DOL_URL_ROOT.'/comm/action/list.php?'.$param); exit; } -if (GETPOST("viewperuser", 'alpha') || $action == 'show_peruser') { +if (GETPOST("viewperuser", 'alpha') || $mode == 'show_peruser') { $param = ''; if (is_array($_POST)) { foreach ($_POST as $key => $val) { @@ -202,7 +207,7 @@ if (GETPOST("viewperuser", 'alpha') || $action == 'show_peruser') { } /* -if ($action == 'delete_action') { +if ($action == 'delete_action' && $user->rights->agenda->delete) { $event = new ActionComm($db); $event->fetch($actionid); $event->fetch_optionals(); @@ -307,7 +312,7 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) { } } -if (empty($action) || $action == 'show_month') { +if (empty($mode) || $mode == 'show_month') { $prev = dol_get_prev_month($month, $year); $prev_year = $prev['year']; $prev_month = $prev['month']; @@ -331,7 +336,7 @@ if (empty($action) || $action == 'show_month') { } $lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year, 'tzuserrel'); } -if ($action == 'show_week') { +if ($mode == 'show_week') { $prev = dol_get_first_day_week($day, $month, $year); $prev_year = $prev['prev_year']; $prev_month = $prev['prev_month']; @@ -356,7 +361,7 @@ if ($action == 'show_week') { $tmpday = $first_day; } -if ($action == 'show_day') { +if ($mode == 'show_day') { $prev = dol_get_prev_day($day, $month, $year); $prev_year = $prev['year']; $prev_month = $prev['month']; @@ -415,13 +420,13 @@ if ($pid) { if ($type) { $param .= "&search_type=".urlencode($type); } -if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month') { - $param .= '&action='.urlencode($action); -} $param .= "&maxprint=".urlencode($maxprint); +if ($mode == 'show_day' || $mode == 'show_week' || $mode == 'show_month') { + $param .= '&mode='.urlencode($mode); +} // Show navigation bar -if (empty($action) || $action == 'show_month') { +if (empty($mode) || $mode == 'show_month') { $nav = "  \n"; $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%b %Y"); $nav .= " \n"; @@ -431,7 +436,7 @@ if (empty($action) || $action == 'show_month') { } $picto = 'calendar'; } -if ($action == 'show_week') { +if ($mode == 'show_week') { $nav = "trans("Previous"))."\">  \n"; $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("Week")." ".$week; $nav .= " \n"; @@ -441,8 +446,8 @@ if ($action == 'show_week') { } $picto = 'calendarweek'; } -if ($action == 'show_day') { - $nav = "  \n"; +if ($mode == 'show_day') { + $nav = "  \n"; $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "daytextshort"); $nav .= " \n"; $nav .= "   \n"; @@ -465,16 +470,16 @@ $param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : ''); /*$tabactive = ''; - if ($action == 'show_month') $tabactive = 'cardmonth'; - if ($action == 'show_week') $tabactive = 'cardweek'; - if ($action == 'show_day') $tabactive = 'cardday'; - if ($action == 'show_list') $tabactive = 'cardlist'; - if ($action == 'show_pertuser') $tabactive = 'cardperuser'; - if ($action == 'show_pertype') $tabactive = 'cardpertype'; + if ($mode == 'show_month') $tabactive = 'cardmonth'; + if ($mode == 'show_week') $tabactive = 'cardweek'; + if ($mode == 'show_day') $tabactive = 'cardday'; + if ($mode == 'show_list') $tabactive = 'cardlist'; + if ($mode == 'show_pertuser') $tabactive = 'cardperuser'; + if ($mode == 'show_pertype') $tabactive = 'cardpertype'; */ -$paramnoaction = preg_replace('/action=[a-z_]+/', '', $param); -$paramnoactionodate = preg_replace('/action=[a-z_]+/', '', $paramnodate); +$paramnoaction = preg_replace('/mode=[a-z_]+/', '', preg_replace('/action=[a-z_]+/', '', $param)); +$paramnoactionodate = preg_replace('/mode=[a-z_]+/', '', preg_replace('/action=[a-z_]+/', '', $paramnodate)); $head = calendars_prepare_head($paramnoaction); @@ -483,37 +488,38 @@ if ($optioncss != '') { print ''; } print ''; +print ''; //print dol_get_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); //print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup, '', $resourceid); //print dol_get_fiche_end(); $viewmode = ''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewCal").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewWeek").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewDay").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); //$viewmode .= ''; @@ -536,7 +542,7 @@ $newparam = ''; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { $tmpforcreatebutton = dol_getdate(dol_now(), true); - $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + $newparam .= '&month='.((int) $month).'&year='.((int) $tmpforcreatebutton['year']).'&mode='.urlencode($mode); //$param='month='.$monthshown.'&year='.$year; $hourminsec = '100000'; @@ -554,7 +560,7 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on $s .= 'jQuery(document).ready(function () {'."\n"; $s .= 'jQuery(".check_birthday").click(function() { console.log("Toggle birthdays"); jQuery(".family_birthday").toggle(); });'."\n"; $s .= 'jQuery(".check_holiday").click(function() { console.log("Toggle holidays"); jQuery(".family_holiday").toggle(); });'."\n"; - if ($action == "show_week" || $action == "show_month" || empty($action)) { + if ($mode == "show_week" || $mode == "show_month" || empty($mode)) { // Code to enable drag and drop $s .= 'jQuery( "div.sortable" ).sortable({connectWith: ".sortable", placeholder: "ui-state-highlight", items: "div.movable", receive: function( event, ui ) {'."\n"; // Code to submit form @@ -723,7 +729,7 @@ if ($filtert > 0 || $usergroup > 0) { $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; } //var_dump($day.' '.$month.' '.$year); -if ($action == 'show_day') { +if ($mode == 'show_day') { $sql .= " AND ("; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')"; @@ -901,7 +907,7 @@ if ($showbirthday) { $sql .= ' FROM '.MAIN_DB_PREFIX.'socpeople as sp'; $sql .= ' WHERE (priv=0 OR (priv=1 AND fk_user_creat='.((int) $user->id).'))'; $sql .= " AND sp.entity IN (".getEntity('socpeople').")"; - if ($action == 'show_day') { + if ($mode == 'show_day') { $sql .= ' AND MONTH(birthday) = '.((int) $month); $sql .= ' AND DAY(birthday) = '.((int) $day); } else { @@ -974,12 +980,12 @@ $sql .= " WHERE u.rowid = x.fk_user"; $sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user) $sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved) -if ($action == 'show_day') { +if ($mode == 'show_day') { // Request only leaves for the current selected day $sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time -} elseif ($action == 'show_week') { +} elseif ($mode == 'show_week') { // TODO: Add filter to reduce database request -} elseif ($action == 'show_month') { +} elseif ($mode == 'show_month') { // TODO: Add filter to reduce database request } @@ -1371,11 +1377,11 @@ print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, print $s; -if (empty($action) || $action == 'show_month') { // View by month +if (empty($mode) || $mode == 'show_month') { // View by month $newparam = $param; // newparam is for birthday links $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done - $newparam = preg_replace('/action=show_month&?/i', '', $newparam); - $newparam = preg_replace('/action=show_week&?/i', '', $newparam); + $newparam = preg_replace('/mode=show_month&?/i', '', $newparam); + $newparam = preg_replace('/mode=show_week&?/i', '', $newparam); $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); @@ -1479,12 +1485,12 @@ if (empty($action) || $action == 'show_month') { // View by month print ''; print ''; print ''; -} elseif ($action == 'show_week') { +} elseif ($mode == 'show_week') { // View by week $newparam = $param; // newparam is for birthday links $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done - $newparam = preg_replace('/action=show_month&?/i', '', $newparam); - $newparam = preg_replace('/action=show_week&?/i', '', $newparam); + $newparam = preg_replace('/mode=show_month&?/i', '', $newparam); + $newparam = preg_replace('/mode=show_week&?/i', '', $newparam); $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); @@ -1544,8 +1550,8 @@ if (empty($action) || $action == 'show_month') { // View by month } else // View by day { $newparam = $param; // newparam is for birthday links - $newparam = preg_replace('/action=show_month&?/i', '', $newparam); - $newparam = preg_replace('/action=show_week&?/i', '', $newparam); + $newparam = preg_replace('/mode=show_month&?/i', '', $newparam); + $newparam = preg_replace('/mode=show_week&?/i', '', $newparam); $newparam = preg_replace('/viewday=[0-9]+&?/i', '', $newparam); $newparam .= '&viewday=1'; // Code to show just one day @@ -1661,7 +1667,7 @@ $db->close(); function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $nonew = 0) { global $user, $conf, $langs; - global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form + global $action, $mode, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form global $theme_datacolor; global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused; @@ -1676,7 +1682,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print "\n"; $curtime = dol_mktime(0, 0, 0, $month, $day, $year); - $urltoshow = DOL_URL_ROOT.'/comm/action/index.php?action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year.$newparam; + $urltoshow = DOL_URL_ROOT.'/comm/action/index.php?mode=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year.$newparam; $urltocreate = ''; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; @@ -1829,10 +1835,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } $h = ''; $nowrapontd = 1; - if ($action == 'show_day') { + if ($mode == 'show_day') { $h = 'height: 100%; '; $nowrapontd = 0; } - if ($action == 'show_week') { + if ($mode == 'show_week') { $h = 'height: 100%; '; $nowrapontd = 0; } @@ -2064,11 +2070,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $i++; } else { - print ''.img_picto("all", "1downarrow_selected.png").' ...'; print ' +'.(count($eventarray[$daykey]) - $maxprint); print ''; diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 7a369356b31..225bc8b29fc 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -72,13 +72,13 @@ $linkback .= ''.$langs->trans(" // Link to other agenda views $out = ''; $out .= '
  • '.img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="hideonsmartphone pictoactionview"'); -$out .= ''.$langs->trans("ViewPerUser").''; +$out .= ''.$langs->trans("ViewPerUser").''; $out .= '
  • '.img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="hideonsmartphone pictoactionview"'); -$out .= ''.$langs->trans("ViewCal").''; +$out .= ''.$langs->trans("ViewCal").''; $out .= '
  • '.img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="hideonsmartphone pictoactionview"'); -$out .= ''.$langs->trans("ViewWeek").''; +$out .= ''.$langs->trans("ViewWeek").''; $out .= '
  • '.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); -$out .= ''.$langs->trans("ViewDay").''; +$out .= ''.$langs->trans("ViewDay").''; $linkback .= $out; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 7ece3fdcb28..2ca127256a5 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -45,6 +45,11 @@ $langs->loadLangs(array("users", "companies", "agenda", "commercial", "other", " $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search + +$mode = GETPOST('mode', 'aZ09'); +if (empty($mode) && preg_match('/show_/', $action)) { + $mode = $action; // For backward compatibility +} $resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); $pid = GETPOST("search_projectid", 'int', 3) ?GETPOST("search_projectid", 'int', 3) : GETPOST("projectid", 'int', 3); $search_status = (GETPOST("search_status", 'aZ09') != '') ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); @@ -80,8 +85,8 @@ $dateend_dtend = dol_mktime(23, 59, 59, GETPOST('dateend_dtendmonth', 'int'), GE if ($search_status == '' && !GETPOSTISSET('search_status')) { $search_status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); } -if (empty($action) && !GETPOSTISSET('action')) { - $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +if (empty($mode) && !GETPOSTISSET('mode')) { + $mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); } $filter = GETPOST("search_filter", 'alpha', 3) ?GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); @@ -178,7 +183,7 @@ if ($user->socid && $socid) { */ if (GETPOST('cancel', 'alpha')) { - $action = 'list'; $massaction = ''; + $mode = 'list'; $massaction = ''; } if (GETPOST("viewcal") || GETPOST("viewweek") || GETPOST("viewday")) { @@ -409,7 +414,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; @@ -542,7 +547,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Count total nb of records @@ -641,31 +646,31 @@ $viewyear = is_object($object) ? dol_print_date($object->datep, '%Y') : ''; $viewmonth = is_object($object) ? dol_print_date($object->datep, '%m') : ''; $viewday = is_object($object) ? dol_print_date($object->datep, '%d') : ''; $viewmode = ''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewCal").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewWeek").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewDay").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); //$viewmode .= ''; @@ -696,7 +701,7 @@ $url .= '&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam $newcardbutton = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, '', $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create); -$param .= '&action='.$action; +$param .= '&mode='.$mode; print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1 * $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode); diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 3ad4f15f787..5095d5ac65c 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -43,6 +43,8 @@ if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) { $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW = 3; } +$action = GETPOST('action', 'aZ09'); + $filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); $filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); $usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3); @@ -90,8 +92,7 @@ if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // I $filtert = $user->id; } -//$action=GETPOST('action','alpha'); -$action = 'show_pertype'; +$mode = 'show_pertype'; $resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y"); $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m"); @@ -146,21 +147,21 @@ $end_d = 53; if ($status == '' && !GETPOSTISSET('status')) { $status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); } -if (empty($action) && !GETPOSTISSET('action')) { - $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +if (empty($mode) && !GETPOSTISSET('mode')) { + $mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); } -if (GETPOST('viewcal', 'alpha') && $action != 'show_day' && $action != 'show_week' && $action != 'show_peruser') { - $action = 'show_month'; $day = ''; +if (GETPOST('viewcal', 'alpha') && $mode != 'show_day' && $mode != 'show_week' && $mode != 'show_peruser') { + $mode = 'show_month'; $day = ''; } // View by month -if (GETPOST('viewweek', 'alpha') || $action == 'show_week') { - $action = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); +if (GETPOST('viewweek', 'alpha') || $mode == 'show_week') { + $mode = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); } // View by week -if (GETPOST('viewday', 'alpha') || $action == 'show_day') { - $action = 'show_day'; $day = ($day ? $day : date("d")); +if (GETPOST('viewday', 'alpha') || $mode == 'show_day') { + $mode = 'show_day'; $day = ($day ? $day : date("d")); } // View by day -if (GETPOST('viewyear', 'alpha') || $action == 'show_year') { - $action = 'show_year'; +if (GETPOST('viewyear', 'alpha') || $mode == 'show_year') { + $mode = 'show_year'; } // View by year // Load translation files required by the page @@ -179,7 +180,8 @@ if ($user->socid && $socid) { * Actions */ -if ($action == 'delete_action') { +/* +if ($action == 'delete_action' && $user->rights->agenda->delete) { $event = new ActionComm($db); $event->fetch($actionid); $event->fetch_optionals(); @@ -188,7 +190,7 @@ if ($action == 'delete_action') { $result = $event->delete(); } - +*/ /* @@ -298,8 +300,8 @@ if ($pid) { if ($type) { $param .= "&search_type=".urlencode($type); } -if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month' || $action != 'show_peruser') { - $param .= '&action='.urlencode($action); +if ($mode == 'show_day' || $mode == 'show_week' || $mode == 'show_month' || $mode != 'show_peruser') { + $param .= '&mode='.urlencode($mode); } if ($begin_h != '') { $param .= '&begin_h='.urlencode($begin_h); @@ -375,7 +377,7 @@ if ($conf->use_javascript_ajax) { $s .= 'jQuery("#check_mytasks").click(function() { jQuery(".family_mytasks").toggle(); jQuery(".family_other").toggle(); });'."\n"; $s .= 'jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });'."\n"; $s .= 'jQuery(".family_birthday").toggle();'."\n"; - if ($action == "show_week" || $action == "show_month" || empty($action)) { + if ($mode == "show_week" || $mode == "show_month" || empty($mode)) { $s .= 'jQuery( "td.sortable" ).sortable({connectWith: ".sortable",placeholder: "ui-state-highlight",items: "div:not(.unsortable)", receive: function( event, ui ) {'; } $s .= '});'."\n"; @@ -413,31 +415,31 @@ if ($conf->use_javascript_ajax) { $massactionbutton = ''; $viewmode = ''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewCal").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewWeek").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewDay").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); //$viewmode .= ''; @@ -566,7 +568,7 @@ if ($socid > 0) { if ($filtert > 0 || $usergroup > 0) { $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; } -if ($action == 'show_day') { +if ($mode == 'show_day') { $sql .= " AND ("; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; @@ -750,8 +752,8 @@ if (!is_array($theme_datacolor)) { $newparam = $param; // newparam is for birthday links $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done -$newparam = preg_replace('/action=show_month&?/i', '', $newparam); -$newparam = preg_replace('/action=show_week&?/i', '', $newparam); +$newparam = preg_replace('/mode=show_month&?/i', '', $newparam); +$newparam = preg_replace('/mode=show_week&?/i', '', $newparam); $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); @@ -903,7 +905,7 @@ jQuery(document).ready(function() { else if (ids.indexOf(",") > -1) /* There is several events */ { /* alert(\'several events\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; + url = "'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; window.location.href = url; } else /* One event */ diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 9a81556b405..cc3e63e1610 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -43,6 +43,8 @@ if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) { $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW = 3; } +$action = GETPOST('action', 'aZ09'); + $filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); $filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); $usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3); @@ -90,8 +92,7 @@ if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // I $filtert = $user->id; } -//$action=GETPOST('action','alpha'); -$action = 'show_peruser'; //We use 'show_week' mode +$mode = 'show_peruser'; $resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y"); $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m"); @@ -155,19 +156,19 @@ if ($end_d < $begin_d) { if ($status == '' && !GETPOSTISSET('status')) { $status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); } -if (empty($action) && !GETPOSTISSET('action')) { - $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +if (empty($mode) && !GETPOSTISSET('mode')) { + $mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); } -if (GETPOST('viewcal', 'alpha') && $action != 'show_day' && $action != 'show_week' && $action != 'show_peruser') { - $action = 'show_month'; $day = ''; -} // View by month -if (GETPOST('viewweek', 'alpha') || $action == 'show_week') { - $action = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); -} // View by week -if (GETPOST('viewday', 'alpha') || $action == 'show_day') { - $action = 'show_day'; $day = ($day ? $day : date("d")); -} // View by day +if (GETPOST('viewcal', 'alpha') && $mode != 'show_day' && $mode != 'show_week' && $mode != 'show_peruser') { + $mode = 'show_month'; $day = ''; +} // View by month +if (GETPOST('viewweek', 'alpha') || $mode == 'show_week') { + $mode = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); +} // View by week +if (GETPOST('viewday', 'alpha') || $mode == 'show_day') { + $mode = 'show_day'; $day = ($day ? $day : date("d")); +} // View by day // Load translation files required by the page $langs->loadLangs(array('users', 'agenda', 'other', 'commercial')); @@ -185,7 +186,8 @@ if ($user->socid && $socid) { * Actions */ -if ($action == 'delete_action') { +/* +if ($action == 'delete_action' && $user->rights->agenda->delete) { $event = new ActionComm($db); $event->fetch($actionid); $event->fetch_optionals(); @@ -194,7 +196,7 @@ if ($action == 'delete_action') { $result = $event->delete(); } - +*/ /* @@ -304,8 +306,8 @@ if ($pid) { if ($type) { $param .= "&search_type=".urlencode($type); } -if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month' || $action != 'show_peruser') { - $param .= '&action='.urlencode($action); +if ($mode != 'show_peruser') { + $param .= '&mode='.urlencode($mode); } if ($begin_h != '') { $param .= '&begin_h='.urlencode($begin_h); @@ -385,7 +387,7 @@ if ($conf->use_javascript_ajax) { $s .= 'jQuery("#check_mytasks").click(function() { jQuery(".family_mytasks").toggle(); jQuery(".family_other").toggle(); });'."\n"; $s .= 'jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });'."\n"; $s .= 'jQuery(".family_birthday").toggle();'."\n"; - if ($action == "show_week" || $action == "show_month" || empty($action)) { + if ($mode == "show_week" || $mode == "show_month" || empty($mode)) { $s .= 'jQuery( "td.sortable" ).sortable({connectWith: ".sortable",placeholder: "ui-state-highlight",items: "div:not(.unsortable)", receive: function( event, ui ) {'; } $s .= '});'."\n"; @@ -423,31 +425,31 @@ if ($conf->use_javascript_ajax) { $massactionbutton = ''; $viewmode = ''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("List"), 'object_list', 'class="imgforviewmode pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendarmonth', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewCal").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewWeek").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewDay").''; -$viewmode .= ''; +$viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); //$viewmode .= ''; @@ -593,7 +595,7 @@ if ($socid > 0) { if ($filtert > 0 || $usergroup > 0) { $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; } -if ($action == 'show_day') { +if ($mode == 'show_day') { $sql .= " AND ("; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')"; @@ -779,8 +781,8 @@ if (!is_array($theme_datacolor)) { $newparam = $param; // newparam is for birthday links $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done -$newparam = preg_replace('/action=show_month&?/i', '', $newparam); -$newparam = preg_replace('/action=show_week&?/i', '', $newparam); +$newparam = preg_replace('/mode=show_month&?/i', '', $newparam); +$newparam = preg_replace('/mode=show_week&?/i', '', $newparam); $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); @@ -806,7 +808,7 @@ while ($currentdaytoshow < $lastdaytoshow) { echo ''; echo ''; - if ($canedit && $action == 'show_peruser') { + if ($canedit && $mode == 'show_peruser') { // Filter on hours print img_picto('', 'clock', 'class="fawidth30 inline-block paddingleft"'); print ''.$langs->trans("Hours").''; @@ -1071,7 +1073,7 @@ jQuery(document).ready(function() { else if (ids.indexOf(",") > -1) /* There is several events */ { /* alert(\'several events\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; + url = "'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; window.location.href = url; } else /* One event */ diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 69e83326707..d2528f45dfa 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -183,7 +183,7 @@ function show_array_actions_to_do($max = 5) print '
    '; print ''; print ''; - print ''; + print ''; print ''; $i = 0; @@ -299,7 +299,7 @@ function show_array_last_actions_done($max = 5) print '
    '; print '
    '.$langs->trans("LastActionsToDo", $max).''.$langs->trans("FullList").''.$langs->trans("FullList").'
    '; print ''; - print ''; + print ''; print ''; $i = 0; @@ -479,22 +479,22 @@ function calendars_prepare_head($param) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?action=show_list'.($param ? '&'.$param : ''); + $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?mode=show_list'.($param ? '&'.$param : ''); $head[$h][1] = $langs->trans("ViewList"); $head[$h][2] = 'cardlist'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_month'.($param ? '&'.$param : ''); + $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_month'.($param ? '&'.$param : ''); $head[$h][1] = $langs->trans("ViewCal"); $head[$h][2] = 'cardmonth'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_week'.($param ? '&'.$param : ''); + $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_week'.($param ? '&'.$param : ''); $head[$h][1] = $langs->trans("ViewWeek"); $head[$h][2] = 'cardweek'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_day'.($param ? '&'.$param : ''); + $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?mode=show_day'.($param ? '&'.$param : ''); $head[$h][1] = $langs->trans("ViewDay"); $head[$h][2] = 'cardday'; $h++; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 2b8aad7453c..428e4055adc 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1730,7 +1730,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin if ($donetodo) { $tmp = ''; if (get_class($filterobj) == 'Societe') { - $tmp .= ''; + $tmp .= ''; } $tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : ''); $tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : ''); diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 25da4bdacfc..3599c17887f 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -635,7 +635,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no if ($donetodo) { $tmp = ''; if (get_class($filterobj) == 'Societe') { - $tmp .= ''; + $tmp .= ''; } $tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : ''); $tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : ''); diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 7a593740590..ffd8fde5f1d 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -325,7 +325,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'List', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda', + 'url'=>'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda', 'langs'=>'agenda', 'position'=>110, 'perms'=>'$user->rights->agenda->myactions->read', @@ -339,7 +339,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuToDoMyActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine', + 'url'=>'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine', 'langs'=>'agenda', 'position'=>111, 'perms'=>'$user->rights->agenda->myactions->read', @@ -353,7 +353,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuDoneMyActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine', + 'url'=>'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine', 'langs'=>'agenda', 'position'=>112, 'perms'=>'$user->rights->agenda->myactions->read', @@ -367,7 +367,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuToDoActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', + 'url'=>'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', 'langs'=>'agenda', 'position'=>113, 'perms'=>'$user->rights->agenda->allactions->read', @@ -381,7 +381,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuDoneActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', + 'url'=>'/comm/action/list.php?mode=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', 'langs'=>'agenda', 'position'=>114, 'perms'=>'$user->rights->agenda->allactions->read', diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 9b38a98ec38..01910f71aaf 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -186,7 +186,7 @@ if (!empty($conf->use_javascript_ajax)) { } $nav = ''; -$nav .= '
    '; +$nav .= ''; if ($actioncode || GETPOSTISSET('actioncode')) { $nav .= ''; } diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 7b74283d90a..7e58c75d35f 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -323,18 +323,18 @@ if (!$ret) { print dol_get_fiche_head($head, 'resources', $langs->trans("Action"), -1, 'action'); $linkback = img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"'); - $linkback .= '
    '.$langs->trans("BackToList").''; + $linkback .= ''.$langs->trans("BackToList").''; // Link to other agenda views $out = ''; $out .= '
  • '.img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewPerUser").''; + $out .= ''.$langs->trans("ViewPerUser").''; $out .= '
  • '.img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewCal").''; + $out .= ''.$langs->trans("ViewCal").''; $out .= '
  • '.img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewWeek").''; + $out .= ''.$langs->trans("ViewWeek").''; $out .= '
  • '.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); - $out .= ''.$langs->trans("ViewDay").''; + $out .= ''.$langs->trans("ViewDay").''; $linkback .= $out;
  • '.$langs->trans("LastDoneTasks", $max).''.$langs->trans("FullList").''.$langs->trans("FullList").'