From e06f52663e5bec7db2bf165fc7bffa2b495841da Mon Sep 17 00:00:00 2001 From: "jouni%heikniemi.net" <> Date: Mon, 12 Jul 2004 12:06:30 +0000 Subject: Bug 244265: Abstract out the typical admin page table to a separate template. r=vladd, a=justdave --- template/en/default/admin/keywords/list.html.tmpl | 88 ++++++++--------------- 1 file changed, 30 insertions(+), 58 deletions(-) (limited to 'template/en/default/admin/keywords/list.html.tmpl') 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 # Vlad Dascalu + # Jouni Heikniemi #%] [%# 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 %] - - - - - - - -[% END %] - -[% BLOCK table_footer %] -
Edit keyword ...Description[% terms.Bugs %]Action
-[% END %] - -[% PROCESS table_header %] - -[% FOREACH keyword = keywords %] - [% IF !loop.first() && loop.count() % max_table_size == 1 %] - [% PROCESS table_header %] - [% END %] - - - - [% keyword.name FILTER html %] - - - [% IF keyword.description %] - [% keyword.description FILTER html %] - [% ELSE %] - missing - [% END %] - - - [% IF keyword.bug_count %] - [% keyword.bug_count %] - [% ELSE %] - none - [% END %] - - - Delete - - - - [% 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%" + } + ] +%] - - Add a new keyword - Add - +[% PROCESS admin/table.html.tmpl + columns = columns + data = keywords + footer = footer_row +%] -[% PROCESS table_footer %] +

Add a new keyword

[% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b