Indefero

Indefero Commit Details


Date:2012-04-26 11:18:35 (12 years 7 months ago)
Author:Simon Holywell
Branch:develop
Commit:d348c45c56d4ac8d0297c370d83dbce5419ed44a
Parents: 53f6133899fe58285dd8a779aa9cfd417696e498
Message:simplify the code in IDF_Views_Issue a little

Changes:

File differences

src/IDF/Views/Issue.php
127127
128128
129129
130
131
130
132131
133132
134
133
135134
136135
137136
// Issue due date statistics
$overdue = $prj->getIssueCountByDueDate('overdue');
$undue = $prj->getIssueCountByDueDate('undue');
$combined_opened = $overdue + $undue;
$combined_opened = $overdue + $opened;
$duedateStatistics = array();
if($combined_opened > 0) {
$duedateStatistics['Overdue'] = array($overdue, (int)(100 * $overdue / $combined_opened), 'Overdue');
$duedateStatistics = array($overdue, (int)(100 * $overdue / $combined_opened));
}
// Issue class tag statistics
src/IDF/templates/idf/issues/summary.html
109109
110110
111111
112
113112
114113
115
116
117
118
114
115
119116
120
117
121118
122119
123120
124
121
125122
126123
127
124
128125
129126
130127
131128
132129
133
134130
135131
136132
<h2>{blocktrans}Unresolved: By Due Date{/blocktrans}</h2>
<table class='issue-summary'>
<tbody>
{foreach $duedateStatistics as $key => $value}
<tr>
<td class="name">
{if !empty($value[2])}
{aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, $value[2], 'due')}
<a href="{$url}">{$key}</a>
{else}{$key}{/if}
{aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, 'Overdue', 'due')}
<a href="{$url}">{blocktrans}Overdue{/blocktrans}</a>
</td>
<td class="count">{$value[0]}</td>
<td class="count">{$duedateStatistics[0]}</td>
<td class="graph">
<table class='graph'>
<tbody><tr>
<td style="width:{$value[1] * 0.8 + 1}%" class="graph-color" valign="center">
<td style="width:{$duedateStatistics[1] * 0.8 + 1}%" class="graph-color" valign="center">
<div class="colour-bar"></div>
</td>
<td class="graph-percent">{$value[1]}%</td>
<td class="graph-percent">{$duedateStatistics[1]}%</td>
</tr>
</tbody>
</table>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>

Archive Download the corresponding diff file

Page rendered in 0.11917s using 111 queries.