summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-09-19 04:37:11 +0200
committerlpsolit%gmail.com <>2007-09-19 04:37:11 +0200
commitaf4793c884c6f3eb9dff8a79865f6cfa690aa9ec (patch)
treeb6a4dc9b3877bcc8ede8e77a5f2b6b76bff2c9e2 /template/en/default/bug
parentc14f288a695d51b368e84107199843b330e1252b (diff)
downloadbugzilla-af4793c884c6f3eb9dff8a79865f6cfa690aa9ec.tar.gz
bugzilla-af4793c884c6f3eb9dff8a79865f6cfa690aa9ec.tar.xz
Bug 389313: summarize_time.cgi needs some cleanup - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/summarize-time.html.tmpl161
1 files changed, 66 insertions, 95 deletions
diff --git a/template/en/default/bug/summarize-time.html.tmpl b/template/en/default/bug/summarize-time.html.tmpl
index da1159763..a7f90d0a7 100644
--- a/template/en/default/bug/summarize-time.html.tmpl
+++ b/template/en/default/bug/summarize-time.html.tmpl
@@ -11,18 +11,19 @@
# The Original Code is the Bugzilla Bug Tracking System.
#
# Contributor(s): Christian Reis <kiko@async.com.br>
+ # Frédéric Buclin <LpSolit@gmail.com>
#%]
[% USE date %]
-[% PROCESS global/variables.none.tmpl %]
+[% PROCESS "global/field-descs.none.tmpl" %]
[% title = "Time Summary " %]
[% IF do_depends %]
[% title = title _ "for " %]
- [% header = title _ "$terms.Bug $ids.0" FILTER bug_link(ids.0) FILTER none %]
- [% title = title _ "$terms.Bug $ids.0: " %]
- [% header = (header _ " (and $terms.bugs blocking it)") IF do_depends %]
+ [% header = "$terms.Bug $ids.0" FILTER bug_link(ids.0) FILTER none %]
+ [% header = title _ header _ " (and $terms.bugs blocking it)" %]
+ [% title = title _ "$terms.Bug $ids.0" %]
[% ELSE %]
[% title = title _ "($ids.size $terms.bugs selected)" %]
[% header = title %]
@@ -34,48 +35,40 @@
style_urls = ["skins/standard/summarize-time.css"]
%]
-[% IF ids.size == 0 %]
+[% INCLUDE query_form %]
- <p>No [% terms.bugs %] specified or visible.</p>
+[% IF do_report %]
-[% ELSE %]
-
- [% INCLUDE query_form %]
-
- [% IF do_report %]
-
- [% global.grand_total = 0 %]
-
- [% FOREACH workdata = part_list %]
- [% part = parts.shift %]
- <div align="right">
- <h4 style="padding-right: 2em; margin: 0;">
- [% IF part.0 or part.1 %]
- [% part.0 OR "Up" FILTER html %] to [% part.1 OR "now" FILTER html %]
- [% ELSE %]
- Full summary (no period specified)
- [% END %]
- </h4>
- </div>
- [% IF group_by == "number" %]
- [% INCLUDE number_report %]
- [% ELSE %]
- [% INCLUDE owner_report %]
- [% END %]
- [% END %]
+ [% global.grand_total = 0 %]
- [% IF monthly %]
- <h4 style="margin: 0">Total of [% global.grand_total FILTER format("%.2f") %] hours worked</h4>
- <hr noshade size="1">
+ [% FOREACH workdata = part_list %]
+ [%# parts contains date ranges (from, to). %]
+ [% part = parts.shift %]
+ <div align="right">
+ <h4 style="padding-right: 2em; margin: 0;">
+ [% IF part.0 or part.1 %]
+ [% part.0 OR "Up" FILTER html %] to [% part.1 OR "now" FILTER html %]
+ [% ELSE %]
+ Full summary (no period specified)
[% END %]
+ </h4>
+ </div>
+ [% IF group_by == "number" %]
+ [% INCLUDE number_report %]
+ [% ELSE %]
+ [% INCLUDE owner_report %]
+ [% END %]
+ [% END %]
- [% IF null.keys.size > 0 %]
- [% INCLUDE inactive_report %]
- <h4 style="margin: 0">Total of [% null.keys.size %]
- inactive [% terms.bugs %]</h4>
- [% END %]
+ [% IF monthly %]
+ <h4 style="margin: 0">Total of [% global.grand_total FILTER format("%.2f") %] hours worked</h4>
+ <hr noshade size="1">
+ [% END %]
- [% END %]
+ [% IF null.size > 0 %]
+ [% INCLUDE inactive_report %]
+ <h4 style="margin: 0">Total of [% null.size %] inactive [% terms.bugs %]</h4>
+ [% END %]
[% END %]
@@ -88,7 +81,7 @@
#%]
[% BLOCK owner_report %]
- [% global.total = 0 global.bug_count = {} global.owner_count = {}%]
+ [% global.total = 0 global.bug_count = {} global.owner_count = {} %]
<table cellpadding="4" cellspacing="0" width="90%" class="realitems owner">
[% FOREACH owner = workdata.keys.sort %]
[% INCLUDE do_one_owner owner=owner ownerdata=workdata.$owner
@@ -111,19 +104,13 @@
[% bug_id = bugdata.bug_id %]
[% global.bug_count.$bug_id = 1 %]
[% IF detailed %]
- [%# XXX oy what a hack %]
- [% timerow = '<td width="100" align="right" valign="top">' _ bugdata.total_time _ '</td>' %]
- [% INCLUDE bug_header cid=col id=bug_id bug_status=bugdata.bug_status
- short_desc=bugdata.short_desc extra=timerow %]
- [% col = col + 1 %]
+ [% INCLUDE bug_header cid=col id=bug_id bugdata=bugdata extra=1 %]
+ [% col = col + 1 %]
[% END %]
[% subtotal = subtotal + bugdata.total_time %]
[% END %]
<tr>
- <td colspan="3">&nbsp;</td>
- <td align="right">
- <b>Total</b>:
- </td>
+ <td colspan="4" align="right"><b>Total</b>:</td>
<td align="right" class="subtotal" width="100">
<b>[% subtotal FILTER format("%.2f") %]</b></td>
[% global.total = global.total + subtotal %]
@@ -140,13 +127,12 @@
[% global.total = 0 global.owner_count = {} global.bug_count = {} %]
<table cellpadding="4" cellspacing="0" width="90%" class="realitems number">
- [% keys = sort_bug_keys(workdata.keys) %]
- [% FOREACH bug = keys %]
- [% INCLUDE do_one_bug bug=bug bugdata=workdata.$bug
+ [% FOREACH bug = workdata.keys.nsort %]
+ [% INCLUDE do_one_bug id=bug bugdata=workdata.$bug
detailed=detailed %]
[% END %]
- [% additional = "$global.bug_count.size $terms.bugs &amp;
+ [% additional = "$global.bug_count.size $terms.bugs &
$global.owner_count.size developers" %]
[% INCLUDE section_total additional=additional colspan=2 %]
</table>
@@ -154,13 +140,8 @@
[% BLOCK do_one_bug %]
[% subtotal = 0.00 cid = 0 %]
-
- [%# hack apart the ID and summary. Sad. %]
- [% items = bug.split(";") %]
- [% id = items.shift %]
- [% status = items.shift %]
[% global.bug_count.$id = 1 %]
- [% INCLUDE bug_header id=id bug_status=status short_desc=items.join(";") %]
+ [% INCLUDE bug_header id=id %]
[% FOREACH owner = bugdata.sort("login_name") %]
[% work_time = owner.total_time %]
@@ -184,17 +165,21 @@
</td>
<td align="right" class="subtotal" width="100">
<b>[% subtotal FILTER format("%.2f") %]</b>
- </td></tr>
- [% global.total = global.total + subtotal %]
+ </td>
+ </tr>
+ [% global.total = global.total + subtotal %]
[% END %]
[% BLOCK bug_header %]
<tr class="bug_header[% '2' IF cid % 2 %]">
- <td width="10" valign="top">
- [% INCLUDE buglink id=id %]</td>
- <td width="10"><b>[% bug_status FILTER html %]</b></td>
- <td colspan="2">[% short_desc FILTER html %]</td>
- [% extra FILTER none %]
+ <td width="80" valign="top">
+ <b>[% "$terms.Bug $id" FILTER bug_link(id) FILTER none %]</b>
+ </td>
+ <td width="100"><b>[% get_status(bugs.$id.bug_status) FILTER html %]</b></td>
+ <td colspan="2">[% bugs.$id.short_desc FILTER html %]</td>
+ [% IF extra %]
+ <td align="right" valign="top">[% bugdata.total_time FILTER html %]</td>
+ [% END %]
</tr>
[% END %]
@@ -203,9 +188,8 @@
<h3>Inactive [% terms.bugs %]</h3>
<table cellpadding="4" cellspacing="0" width="90%" class="zeroitems">
[% cid = 0 %]
- [% FOREACH bug_id = null.keys.nsort %]
- [% INCLUDE bug_header id=bug_id bug_status=null.$bug_id.1
- short_desc=null.$bug_id.0 cid=cid %]
+ [% FOREACH bug_id = null.nsort %]
+ [% INCLUDE bug_header id=bug_id cid=cid %]
[% cid = cid + 1 %]
[% END %]
</table>
@@ -213,20 +197,18 @@
[% BLOCK section_total %]
- [% IF global.total > 0 %]
+ [% IF global.total > 0 %]
<tr class="section_total">
- <td align="left" width="10">
- <b>Totals</b></td>
- <td colspan="[% colspan FILTER none %]" align="right"><b>[% additional FILTER none %]</b></td>
- <td align="right">&nbsp;&nbsp;
- <b>[% global.total FILTER format("%.2f") %]</b>
- </td></tr>
- [% ELSE %]
- <tr><td>
- No time allocated during the specified period.
- </td></tr>
- [% END %]
- [% global.grand_total = global.grand_total + global.total %]
+ <td><b>Totals</b></td>
+ <td colspan="[% colspan FILTER html %]" align="right"><b>[% additional FILTER html %]</b></td>
+ <td align="right"><b>[% global.total FILTER format("%.2f") %]</b></td>
+ </tr>
+ [% ELSE %]
+ <tr>
+ <td>No time allocated during the specified period.</td>
+ </tr>
+ [% END %]
+ [% global.grand_total = global.grand_total + global.total %]
[% END %]
[%#
@@ -301,20 +283,9 @@
</tr></table>
</form>
-<script type="application/x-javascript">
+<script type="text/javascript">
<!--
document.forms['summary'].start_date.focus()
//--></script>
<hr noshade size=1>
[% END %]
-
-[%#
- #
- # Utility
- #
- #%]
-
-[% BLOCK buglink %]
- <a href="show_bug.cgi?id=[% id FILTER url_quote %]"><b>[% terms.Bug %]&nbsp;[% id FILTER html %]</b></a>
-[% END %]
-