From 6b309a04c2e57d0ba79dc15829ce7839efd3e72f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 6 Aug 2009 16:08:36 +0000 Subject: Bug 508713: Remove duplicated code in flag/list.html.tmpl - Patch by Frédéric Buclin r=ghendricks a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/flag/list.html.tmpl | 152 +++++++++++++------------------- 1 file changed, 60 insertions(+), 92 deletions(-) (limited to 'template/en') diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index 1c1a25d4a..5681d0b1c 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -173,52 +173,8 @@ [%# Step 1b: Display UI for setting flag. %] [% IF (!type.flags || type.flags.size == 0) && type.is_active %] - -   - - - - - - - [% IF any_flags_requesteeble %] - - [% IF type.is_requestable && type.is_requesteeble %] - - [% IF Param('usemenuforusers') %] - [% INCLUDE global/userselect.html.tmpl - name => "requestee_type-$type.id" - id => "requestee_type-$type.id" - multiple => type.is_multiplicable * 3 - emptyok => !type.is_multiplicable - value => "" - custom_userlist => type.grant_list - %] - [% ELSE %] - () - [% END %] - - [% END %] - - [% END %] - + + [% PROCESS flag_row first_cell_empty = 1 addl_text = "" %] [% END %] [% END %] @@ -229,53 +185,9 @@
[% separator_displayed = 1 %] [% END %] - - - addl. - - - - - [% IF any_flags_requesteeble %] - - [% IF type.is_requestable && type.is_requesteeble %] - - [% IF Param('usemenuforusers') %] - [% INCLUDE global/userselect.html.tmpl - name => "requestee_type-$type.id" - id => "requestee_type-$type.id" - multiple => type.is_multiplicable * 3 - emptyok => !type.is_multiplicable - value => "" - custom_userlist => type.grant_list - %] - [% ELSE %] - () - [% END %] - - [% END %] - - [% END %] - - [% END %] + [% PROCESS flag_row first_cell_empty = 0 addl_text = "addl." %] + [% END %] [% ELSE %] @@ -289,4 +201,60 @@ [% END %]
[% END %] [% END %] +[% END %] + +[%# Display a table row for unset flags %] + +[% BLOCK flag_row %] + + [% IF first_cell_empty %] +   + + [% ELSE %] + + [% END %] + + [% addl_text FILTER html %] + + + + + + [% IF any_flags_requesteeble %] + + [% IF type.is_requestable && type.is_requesteeble %] + + [% IF Param('usemenuforusers') %] + [% INCLUDE global/userselect.html.tmpl + name => "requestee_type-$type.id" + id => "requestee_type-$type.id" + multiple => type.is_multiplicable * 3 + emptyok => !type.is_multiplicable + value => "" + custom_userlist => type.grant_list + %] + [% ELSE %] + () + [% END %] + + [% END %] + + [% END %] + [% END %] \ No newline at end of file -- cgit v1.2.3-24-g4f1b