Change route to remove ability to pass through due status
This commit is contained in:
parent
02a99e2f9c
commit
014d8ca6af
@ -837,13 +837,13 @@ class IDF_Views_Issue
|
||||
public function listOverdue($request, $match)
|
||||
{
|
||||
$prj = $request->project;
|
||||
$status = $match[2];
|
||||
$status = __('Overdue');
|
||||
|
||||
$title = sprintf(__('%s %s Issues'), (string) $prj, (string) $status);
|
||||
// Get stats about the issues
|
||||
$open = $prj->getIssueCountByStatus('open');
|
||||
$closed = $prj->getIssueCountByStatus('closed');
|
||||
$overdue = $prj->getIssueCountByDueDate('overdue');
|
||||
$overdue = $prj->getIssueCountByDueDate();
|
||||
// Paginator to paginate the issues
|
||||
$pag = new Pluf_Paginator(new IDF_Issue());
|
||||
$pag->class = 'recent-issues';
|
||||
@ -853,12 +853,7 @@ class IDF_Views_Issue
|
||||
$pag->summary = __('This table shows the overdue issues.');
|
||||
$otags = $prj->getTagIdsByStatus('open');
|
||||
if (count($otags) == 0) $otags[] = 0;
|
||||
if ('Undue' == $status) {
|
||||
$where = 'AND due_dtime >= NOW()';
|
||||
} else {
|
||||
$where = 'AND due_dtime < NOW()';
|
||||
}
|
||||
$pag->forced_where = new Pluf_SQL('project=%s ' . $where . ' AND status IN ('.implode(', ', $otags).')', array($prj->id));
|
||||
$pag->forced_where = new Pluf_SQL('project=%s AND due_dtime < NOW() AND status IN ('.implode(', ', $otags).')', array($prj->id));
|
||||
$pag->action = array('IDF_Views_Issue::listOverdue', array($prj->shortname, $status));
|
||||
$pag->sort_order = array('due_dtime', 'DESC'); // will be reverted
|
||||
$pag->sort_reverse_order = array('due_dtime');
|
||||
|
@ -163,7 +163,7 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/status/(\w+)/$#',
|
||||
'model' => 'IDF_Views_Issue',
|
||||
'method' => 'listStatus');
|
||||
|
||||
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/due/(\w+)/$#',
|
||||
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/due/overdue/$#',
|
||||
'base' => $base,
|
||||
'model' => 'IDF_Views_Issue',
|
||||
'method' => 'listOverdue');
|
||||
|
@ -111,7 +111,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="name">
|
||||
{aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, 'Overdue', 'due')}
|
||||
{aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, 'overdue', 'due')}
|
||||
<a href="{$url}">{blocktrans}Overdue{/blocktrans}</a>
|
||||
</td>
|
||||
<td class="count">{$duedateStatistics[0]}</td>
|
||||
|
Loading…
Reference in New Issue
Block a user