Indefero

Indefero Commit Details


Date:2012-04-27 03:31:07 (12 years 7 months ago)
Author:Simon Holywell
Branch:develop
Commit:014d8ca6af9518c30249f966d15c03fc0fe23c39
Parents: 02a99e2f9ce84a77296f28ae5e804f7da87bd053
Message:Change route to remove ability to pass through due status

Changes:

File differences

src/IDF/Views/Issue.php
837837
838838
839839
840
840
841841
842842
843843
844844
845845
846
846
847847
848848
849849
......
853853
854854
855855
856
857
858
859
860
861
856
862857
863858
864859
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';
$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');
src/IDF/conf/urls.php
163163
164164
165165
166
166
167167
168168
169169
'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');
src/IDF/templates/idf/issues/summary.html
111111
112112
113113
114
114
115115
116116
117117
<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>

Archive Download the corresponding diff file

Page rendered in 0.09023s using 13 queries.