summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/flag/list.html.tmpl152
1 files changed, 60 insertions, 92 deletions
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 %]
- <tr>
- <td>&nbsp;</td>
- <td>
- <label title="[% type.description FILTER html %]"
- for="flag_type-[% type.id %]">
- [%- type.name FILTER html FILTER no_break %]</label>
- </td>
- <td>
- <select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
- title="[% type.description FILTER html %]"
- [% " disabled=\"disabled\"" UNLESS (type.is_requestable && user.can_request_flag(type)) || user.can_set_flag(type) %]
- onchange="toggleRequesteeField(this);"
- class="flag_select">
- <option value="X"></option>
- [% IF type.is_requestable && user.can_request_flag(type) %]
- <option value="?">?</option>
- [% END %]
- [% IF user.can_set_flag(type) %]
- <option value="+">+</option>
- <option value="-">-</option>
- [% END %]
- </select>
- </td>
- [% IF any_flags_requesteeble %]
- <td>
- [% IF type.is_requestable && type.is_requesteeble %]
- <span style="white-space: nowrap;">
- [% 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 %]
- (<input type="text" size="30" maxlength="255"
- id="requestee_type-[% type.id %]"
- name="requestee_type-[% type.id %]">)
- [% END %]
- </span>
- [% END %]
- </td>
- [% END %]
- </tr>
+
+ [% PROCESS flag_row first_cell_empty = 1 addl_text = "" %]
[% END %]
[% END %]
@@ -229,53 +185,9 @@
<tr><td colspan="3"><hr></td></tr>
[% separator_displayed = 1 %]
[% END %]
- <tr>
- <td colspan="2">
- addl. <label title="[% type.description FILTER html %]"
- for="flag_type-[% type.id %]">
- [%- type.name FILTER html FILTER no_break %]</label>
- </td>
- <td>
- <select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
- title="[% type.description FILTER html %]"
- [% " disabled=\"disabled\"" UNLESS (type.is_requestable && user.can_request_flag(type)) || user.can_set_flag(type) %]
- onchange="toggleRequesteeField(this);"
- class="flag_select">
- <option value="X"></option>
- [% IF type.is_requestable && user.can_request_flag(type) %]
- <option value="?">?</option>
- [% END %]
- [% IF user.can_set_flag(type) %]
- <option value="+">+</option>
- <option value="-">-</option>
- [% END %]
- </select>
- </td>
- [% IF any_flags_requesteeble %]
- <td>
- [% IF type.is_requestable && type.is_requesteeble %]
- <span style="white-space: nowrap;">
- [% 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 %]
- (<input type="text" size="30" maxlength="255"
- id="requestee_type-[% type.id %]"
- name="requestee_type-[% type.id %]">)
- [% END %]
- </span>
- [% END %]
- </td>
- [% END %]
- </tr>
- [% END %]
+ [% PROCESS flag_row first_cell_empty = 0 addl_text = "addl." %]
+ [% END %]
</table>
[% ELSE %]
@@ -289,4 +201,60 @@
[% END %]<br>
[% END %]
[% END %]
+[% END %]
+
+[%# Display a table row for unset flags %]
+
+[% BLOCK flag_row %]
+ <tr>
+ [% IF first_cell_empty %]
+ <td>&nbsp;</td>
+ <td>
+ [% ELSE %]
+ <td colspan="2">
+ [% END %]
+
+ [% addl_text FILTER html %]
+ <label title="[% type.description FILTER html %]" for="flag_type-[% type.id %]">
+ [%- type.name FILTER html FILTER no_break %]</label>
+ </td>
+ <td>
+ <select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
+ title="[% type.description FILTER html %]"
+ [% " disabled=\"disabled\"" UNLESS (type.is_requestable && user.can_request_flag(type)) || user.can_set_flag(type) %]
+ onchange="toggleRequesteeField(this);"
+ class="flag_select">
+ <option value="X"></option>
+ [% IF type.is_requestable && user.can_request_flag(type) %]
+ <option value="?">?</option>
+ [% END %]
+ [% IF user.can_set_flag(type) %]
+ <option value="+">+</option>
+ <option value="-">-</option>
+ [% END %]
+ </select>
+ </td>
+ [% IF any_flags_requesteeble %]
+ <td>
+ [% IF type.is_requestable && type.is_requesteeble %]
+ <span style="white-space: nowrap;">
+ [% 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 %]
+ (<input type="text" size="30" maxlength="255"
+ id="requestee_type-[% type.id %]"
+ name="requestee_type-[% type.id %]">)
+ [% END %]
+ </span>
+ [% END %]
+ </td>
+ [% END %]
+ </tr>
[% END %] \ No newline at end of file