summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--template/en/default/admin/products/groupcontrol/edit.html.tmpl219
1 files changed, 106 insertions, 113 deletions
diff --git a/template/en/default/admin/products/groupcontrol/edit.html.tmpl b/template/en/default/admin/products/groupcontrol/edit.html.tmpl
index cd738960e..889647e7e 100644
--- a/template/en/default/admin/products/groupcontrol/edit.html.tmpl
+++ b/template/en/default/admin/products/groupcontrol/edit.html.tmpl
@@ -13,122 +13,115 @@
title = title
%]
-<form method="post" action="editproducts.cgi">
- <input type="hidden" name="action" value="updategroupcontrols">
- <input type="hidden" name="product" value="[% product.name FILTER html %]">
- <input type="hidden" name="token" value="[% token FILTER html %]">
+[% display_headers = 1 %]
+[% FOREACH group = product.group_controls(1).values.sort("name") %]
+ [% NEXT UNLESS group.group.isactive OR group.bug_count %]
+ [% IF display_headers %]
+ [% display_headers = 0 %]
+ <form method="post" action="editproducts.cgi">
+ <input type="hidden" name="action" value="updategroupcontrols">
+ <input type="hidden" name="product" value="[% product.name FILTER html %]">
+ <input type="hidden" name="token" value="[% token FILTER html %]">
- <table id="form" cellspacing="0" cellpadding="4" border="1">
- <tr bgcolor="#6666ff">
- <th>Group</th>
- <th>Entry</th>
- <th>MemberControl</th>
- <th>OtherControl</th>
- <th>Canedit</th>
- <th>editcomponents</th>
- <th>canconfirm</th>
- <th>editbugs</th>
- <th>[% terms.Bugs %]</th>
- </tr>
- [% FOREACH group = product.group_controls(1).values.sort("name") %]
- [% IF !group.group.isactive AND group.bug_count %]
- <tr bgcolor="#bbbbbb">
- <td>
- [% group.group.name FILTER html %]
- </td>
- <td align="center" colspan=7>
- Disabled
- </td>
- <td>
- [% group.bug_count FILTER html %]
- </td>
- <tr>
- [% ELSIF group.group.is_active %]
- <tr>
- <td>
- [% group.group.name FILTER html %]
- </td>
- <td>
- <input type=checkbox value=1 name=entry_[% group.id %]
- [% " checked=\"checked\"" IF group.entry %]>
- </td>
- <td>
- <select name="membercontrol_[% group.id %]">
- <option value=[% constants.CONTROLMAPNA %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPNA %]
- >NA
- </option>
- <option value=[% constants.CONTROLMAPSHOWN %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPSHOWN %]
- >Shown
- </option>
- <option value=[% constants.CONTROLMAPDEFAULT %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPDEFAULT %]
- >Default
- </option>
- <option value=[% constants.CONTROLMAPMANDATORY %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPMANDATORY %]
- >Mandatory
- </option>
- </select>
- </td>
- <td>
- <select name="othercontrol_[% group.id %]">
- <option value=[% constants.CONTROLMAPNA %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPNA %]
- >NA
- </option>
- <option value=[% constants.CONTROLMAPSHOWN %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPSHOWN %]
- >Shown
- </option>
- <option value=[% constants.CONTROLMAPDEFAULT %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPDEFAULT %]
- >Default
- </option>
- <option value=[% constants.CONTROLMAPMANDATORY %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPMANDATORY %]
- >Mandatory
- </option>
- </select>
- </td>
- <td>
- <input type=checkbox value=1 name=canedit_[% group.id %]
- [% " checked=\"checked\"" IF group.canedit %]>
- </td>
- <td>
- <input type=checkbox value=1 name=editcomponents_[% group.id %]
- [% " checked=\"checked\"" IF group.editcomponents %]>
- </td>
- <td>
- <input type=checkbox value=1 name=canconfirm_[% group.id %]
- [% " checked=\"checked\"" IF group.canconfirm %]>
- </td>
- <td>
- <input type=checkbox value=1 name=editbugs_[% group.id %]
- [% " checked=\"checked\"" IF group.editbugs %]>
- </td>
- <td>
- [% group.bug_count || 0 FILTER html %]
- </td>
+ <table id="form" cellspacing="0" cellpadding="4" border="1">
+ <tr bgcolor="#6666ff">
+ <th>Group</th>
+ <th>Entry</th>
+ <th>MemberControl</th>
+ <th>OtherControl</th>
+ <th>Canedit</th>
+ <th>editcomponents</th>
+ <th>canconfirm</th>
+ <th>editbugs</th>
+ <th>[% terms.Bugs %]</th>
</tr>
- [% END %]
- [% END %]
-
- </table>
- <br>
- <input type=submit name="submit" value="submit">
- <br>
-</form>
+ [% END %]
+ [% IF !group.group.isactive %]
+ <tr bgcolor="#bbbbbb">
+ <td>[% group.group.name FILTER html %]</td>
+ <td align="center" colspan="7">Disabled</td>
+ <td>[% group.bug_count FILTER html %]</td>
+ </tr>
+ [% ELSE %]
+ <tr>
+ <td>[% group.group.name FILTER html %]</td>
+ <td>
+ <input type=checkbox value=1 name=entry_[% group.id %]
+ [% " checked='checked'" IF group.entry %]>
+ </td>
+ <td>
+ <select name="membercontrol_[% group.id %]">
+ <option value=[% constants.CONTROLMAPNA %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPNA %]
+ >NA
+ </option>
+ <option value=[% constants.CONTROLMAPSHOWN %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPSHOWN %]
+ >Shown
+ </option>
+ <option value=[% constants.CONTROLMAPDEFAULT %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPDEFAULT %]
+ >Default
+ </option>
+ <option value=[% constants.CONTROLMAPMANDATORY %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPMANDATORY %]
+ >Mandatory
+ </option>
+ </select>
+ </td>
+ <td>
+ <select name="othercontrol_[% group.id %]">
+ <option value=[% constants.CONTROLMAPNA %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPNA %]
+ >NA
+ </option>
+ <option value=[% constants.CONTROLMAPSHOWN %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPSHOWN %]
+ >Shown
+ </option>
+ <option value=[% constants.CONTROLMAPDEFAULT %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPDEFAULT %]
+ >Default
+ </option>
+ <option value=[% constants.CONTROLMAPMANDATORY %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPMANDATORY %]
+ >Mandatory
+ </option>
+ </select>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=canedit_[% group.id %]
+ [% " checked='checked'" IF group.canedit %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=editcomponents_[% group.id %]
+ [% " checked='checked'" IF group.editcomponents %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=canconfirm_[% group.id %]
+ [% " checked='checked'" IF group.canconfirm %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=editbugs_[% group.id %]
+ [% " checked='checked'" IF group.editbugs %]>
+ </td>
+ <td>[% group.bug_count || 0 FILTER html %]</td>
+ </tr>
+ [% END %]
+[% END %]
+[% IF display_headers %]
+ <p>No groups are available for products.
+ [% IF user.in_group('creategroups') %]
+ <a href="editgroups.cgi?action=add">Create a new group</a>
+ [% END %]
+ </p>
+[% ELSE %]
+ </table>
+ <br>
+ <input type=submit name="submit" value="submit">
+ </form>
+[% END %]
<p>
These settings control the relationship of the groups to this