diff options
Diffstat (limited to 'template/en/default/admin/keywords/list.html.tmpl')
-rwxr-xr-x | template/en/default/admin/keywords/list.html.tmpl | 88 |
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&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&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&id=%id%" + }, + { + name => "description" + heading => "Description" + }, + { + name => "bug_count" + heading => "Bugs" + align => "right" + }, + { + heading => "Action" + content => "Delete" + contentlink => "editkeywords.cgi?action=delete&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 %] |