Fix: Minor errors on navigation
This commit is contained in:
parent
6c7442994b
commit
bd4c6bf2e4
@ -58,8 +58,8 @@ if (! $user->rights->agenda->allactions->read || $_GET["filter"]=='mine')
|
|||||||
$filterd=$user->id;
|
$filterd=$user->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$year=isset($_GET["year"])?$_GET["year"]:date("Y");
|
$year=isset($_REQUEST["year"])?$_REQUEST["year"]:date("Y");
|
||||||
$month=isset($_GET["month"])?$_GET["month"]:date("m");
|
$month=isset($_REQUEST["month"])?$_REQUEST["month"]:date("m");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -116,19 +116,28 @@ $max_day_in_prev_month = date("t",dolibarr_mktime(0,0,0,$prev_month,1,$prev_year
|
|||||||
$day = -date("w",dolibarr_mktime(0,0,0,$month,1,$year))+2;
|
$day = -date("w",dolibarr_mktime(0,0,0,$month,1,$year))+2;
|
||||||
if ($day > 1) $day -= 7;
|
if ($day > 1) $day -= 7;
|
||||||
|
|
||||||
|
$title=$langs->trans("DoneAndToDoActions");
|
||||||
|
if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||||
|
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
||||||
|
|
||||||
|
$param='';
|
||||||
|
if ($status) $param="&status=".$status;
|
||||||
|
if ($filter) $param.="&filter=".$filter;
|
||||||
|
if ($filtera) $param.="&filtera=".$filtera;
|
||||||
|
if ($filtert) $param.="&filtert=".$filtert;
|
||||||
|
if ($filterd) $param.="&filterd=".$filterd;
|
||||||
|
if ($time) $param.="&time=".$_REQUEST["time"];
|
||||||
|
if ($socid) $param.="&socid=".$_REQUEST["socid"];
|
||||||
|
if ($_GET["type"]) $param.="&type=".$_REQUEST["type"];
|
||||||
|
|
||||||
// Show navigation bar
|
// Show navigation bar
|
||||||
$param='&userasked='.$filtera.'&usertodo='.$filtert.'&userdone='.$filterd;
|
|
||||||
$nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&region=".$region.$param."\">".img_previous($langs->trans("Previous"))."</a>\n";
|
$nav ="<a href=\"?year=".$prev_year."&month=".$prev_month."&region=".$region.$param."\">".img_previous($langs->trans("Previous"))."</a>\n";
|
||||||
$nav.=" <span id=\"month_name\">".dolibarr_print_date(dolibarr_mktime(0,0,0,$month,1,$year),"%b");
|
$nav.=" <span id=\"month_name\">".dolibarr_print_date(dolibarr_mktime(0,0,0,$month,1,$year),"%b");
|
||||||
$nav.=" $year";
|
$nav.=" $year";
|
||||||
$nav.=" </span>\n";
|
$nav.=" </span>\n";
|
||||||
$nav.="<a href=\"?year=".$next_year."&month=".$next_month."&region=".$region.$param."\">".img_next($langs->trans("Next"))."</a>\n";
|
$nav.="<a href=\"?year=".$next_year."&month=".$next_month."&region=".$region.$param."\">".img_next($langs->trans("Next"))."</a>\n";
|
||||||
|
|
||||||
$title=$langs->trans("DoneAndToDoActions");
|
print_fiche_titre($title,$nav,$_SERVER["PHP_SELF"], $param,$sortfield,$sortorder,'',$num);
|
||||||
if ($status == 'done') $title=$langs->trans("DoneActions");
|
|
||||||
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
|
||||||
|
|
||||||
print_fiche_titre($title,$nav,'');
|
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
if ($canedit)
|
if ($canedit)
|
||||||
@ -136,6 +145,8 @@ if ($canedit)
|
|||||||
print '<form name="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form name="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="status" value="'.$status.'">';
|
print '<input type="hidden" name="status" value="'.$status.'">';
|
||||||
print '<input type="hidden" name="time" value="'.$_REQUEST["time"].'">';
|
print '<input type="hidden" name="time" value="'.$_REQUEST["time"].'">';
|
||||||
|
print '<input type="hidden" name="year" value="'.$year.'">';
|
||||||
|
print '<input type="hidden" name="month" value="'.$month.'">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
@ -160,7 +160,15 @@ if ($resql)
|
|||||||
if ($status == 'done') $title=$langs->trans("DoneActions");
|
if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||||
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
||||||
|
|
||||||
$param="&status=".$status;
|
$param='';
|
||||||
|
if ($status) $param="&status=".$status;
|
||||||
|
if ($filter) $param.="&filter=".$filter;
|
||||||
|
if ($filtera) $param.="&filtera=".$filtera;
|
||||||
|
if ($filtert) $param.="&filtert=".$filtert;
|
||||||
|
if ($filterd) $param.="&filterd=".$filterd;
|
||||||
|
if ($time) $param.="&time=".$_REQUEST["time"];
|
||||||
|
if ($socid) $param.="&socid=".$_REQUEST["socid"];
|
||||||
|
if ($_GET["type"]) $param.="&type=".$_REQUEST["type"];
|
||||||
|
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user