summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/keywords
diff options
context:
space:
mode:
authorjouni%heikniemi.net <>2004-07-12 14:06:30 +0200
committerjouni%heikniemi.net <>2004-07-12 14:06:30 +0200
commite06f52663e5bec7db2bf165fc7bffa2b495841da (patch)
tree96b3717d9ec179a880879c6635d588c2b0c1bd40 /template/en/default/admin/keywords
parentabdd4eba8b321e66d9a86d2d3592893f69632618 (diff)
downloadbugzilla-e06f52663e5bec7db2bf165fc7bffa2b495841da.tar.gz
bugzilla-e06f52663e5bec7db2bf165fc7bffa2b495841da.tar.xz
Bug 244265: Abstract out the typical admin page table to a separate template. r=vladd, a=justdave
Diffstat (limited to 'template/en/default/admin/keywords')
-rwxr-xr-xtemplate/en/default/admin/keywords/list.html.tmpl88
1 files changed, 30 insertions, 58 deletions
diff --git a/template/en/default/admin/keywords/list.html.tmpl b/template/en/default/admin/keywords/list.html.tmpl
index d73e529e3..fbfc92142 100755
--- a/template/en/default/admin/keywords/list.html.tmpl
+++ b/template/en/default/admin/keywords/list.html.tmpl
@@ -18,13 +18,12 @@
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Vlad Dascalu <jocuri@softhome.net>
+ # Jouni Heikniemi <jouni@heikniemi.net>
#%]
[%# INTERFACE:
- # max_table_size: number. Determines the maximum number of
- # rows in each keywords table.
# keywords: array with keyword objects having the properties:
- # - keyword_id: number. The ID of the keyword.
+ # - id: number. The ID of the keyword.
# - name: string. The name of the keyword.
# - description: string. The description of the keyword.
# - bug_count: number. The number of bugs with the keyword.
@@ -36,62 +35,35 @@
title = "Select keyword"
%]
-[% max_table_size = 50 %]
-
-[% BLOCK table_header %]
- <table border="1" cellpadding="4" cellspacing="0">
- <tr bgcolor="#6666FF">
- <th align="left">Edit keyword ...</th>
- <th align="left">Description</th>
- <th align="left">[% terms.Bugs %]</th>
- <th align="left">Action</th>
- </tr>
-[% END %]
-
-[% BLOCK table_footer %]
- </table>
-[% END %]
-
-[% PROCESS table_header %]
-
-[% FOREACH keyword = keywords %]
- [% IF !loop.first() && loop.count() % max_table_size == 1 %]
- [% PROCESS table_header %]
- [% END %]
-
- <tr>
- <th valign="top">
- <a href="editkeywords.cgi?action=edit&amp;id=[% keyword.id %]">[% keyword.name FILTER html %]</a>
- </th>
- <td valign="top">
- [% IF keyword.description %]
- [% keyword.description FILTER html %]
- [% ELSE %]
- <font color="red">missing</font>
- [% END %]
- </td>
- <td valign="top" align="right">
- [% IF keyword.bug_count %]
- [% keyword.bug_count %]
- [% ELSE %]
- none
- [% END %]
- </td>
- <th valign="top">
- <a href="editkeywords.cgi?action=delete&amp;id=[% keyword.id %]">Delete</a>
- </th>
- </tr>
-
- [% IF !loop.last() && loop.count() % max_table_size == 0 %]
- [% PROCESS table_footer %]
- [% END %]
-[% END %]
+[% columns = [
+ {
+ name => "name"
+ heading => "Edit keyword..."
+ contentlink => "editkeywords.cgi?action=edit&amp;id=%id%"
+ },
+ {
+ name => "description"
+ heading => "Description"
+ },
+ {
+ name => "bug_count"
+ heading => "Bugs"
+ align => "right"
+ },
+ {
+ heading => "Action"
+ content => "Delete"
+ contentlink => "editkeywords.cgi?action=delete&amp;id=%id%"
+ }
+ ]
+%]
- <tr>
- <td valign="top" colspan="3">Add a new keyword</td>
- <td><a href="editkeywords.cgi?action=add">Add</a></td>
- </tr>
+[% PROCESS admin/table.html.tmpl
+ columns = columns
+ data = keywords
+ footer = footer_row
+%]
-[% PROCESS table_footer %]
+<p><a href="editkeywords.cgi?action=add">Add a new keyword</a></p>
[% PROCESS global/footer.html.tmpl %]