summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-01-01 20:04:52 +0100
committerlpsolit%gmail.com <>2009-01-01 20:04:52 +0100
commit14620dc7279cbbde4236ec4319ed0669f41aa68f (patch)
tree8ce72bb44e436994e701f6f0793408fedccb195b /template/en
parent032b9593468a41cb6911f4f4e3eaebdfa2fb0ad9 (diff)
downloadbugzilla-14620dc7279cbbde4236ec4319ed0669f41aa68f.tar.gz
bugzilla-14620dc7279cbbde4236ec4319ed0669f41aa68f.tar.xz
Bug 471771: editflagtypes.cgi should display the number of flags per type - Patch by Frédéric Buclin <LpSolit@gmail.com> r=justdave a=LpSolit
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/admin/flag-type/list.html.tmpl26
1 files changed, 26 insertions, 0 deletions
diff --git a/template/en/default/admin/flag-type/list.html.tmpl b/template/en/default/admin/flag-type/list.html.tmpl
index d4bba945a..497d3b3d5 100644
--- a/template/en/default/admin/flag-type/list.html.tmpl
+++ b/template/en/default/admin/flag-type/list.html.tmpl
@@ -16,6 +16,7 @@
# Rights Reserved.
#
# Contributor(s): Myk Melez <myk@mozilla.org>
+ # Frédéric Buclin <LpSolit@gmail.com>
#%]
[% PROCESS global/variables.none.tmpl %]
@@ -80,6 +81,11 @@
[% END %]
</select>
</td>
+ <td>
+ <input type="checkbox" id="show_flag_counts" name="show_flag_counts" value="1"
+ [%+ 'checked="checked"' IF show_flag_counts %]>
+ <label for="show_flag_counts">Show flag counts</label>
+ </td>
<td><input type="submit" id="submit" value="Filter"></td>
</tr>
</table>
@@ -114,6 +120,11 @@
<th>Properties</th>
<th>Grant group</th>
<th>Request group</th>
+ [% IF show_flag_counts %]
+ <th>Flags</th>
+ [%# Note to translators: translate the strings in quotes only. %]
+ [% state_desc = {granted = 'granted' denied = 'denied' pending = 'pending'} %]
+ [% END %]
<th>Actions</th>
</tr>
@@ -136,6 +147,21 @@
</td>
<td>[% IF type.grant_group %][% type.grant_group.name FILTER html %][% END %]</td>
<td>[% IF type.request_group %][% type.request_group.name FILTER html %][% END %]</td>
+ [% IF show_flag_counts %]
+ <td>
+ [% FOREACH state = ['granted', 'pending', 'denied'] %]
+ [% bug_list = bug_lists.${type.id}.$state || [] %]
+ [% IF bug_list.size %]
+ <a href="buglist.cgi?bug_id=[% bug_list.unique.nsort.join(",") FILTER html %]">
+ [% bug_list.size FILTER html %] [%+ state_desc.$state FILTER html %]
+ </a>
+ <br>
+ [% ELSE %]
+ 0 [% state_desc.$state FILTER html %]<br>
+ [% END %]
+ [% END %]
+ </td>
+ [% END %]
<td>
<a href="editflagtypes.cgi?action=copy&amp;id=[% type.id %]">Copy</a>
| <a href="editflagtypes.cgi?action=confirmdelete&amp;id=[% type.id %]">Delete</a>