summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/groups
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-03-06 11:54:07 +0100
committermkanat%bugzilla.org <>2007-03-06 11:54:07 +0100
commitfd5be728fcf18479146aab4d52254c3475124154 (patch)
tree716b8f177abb39fb8dc8dbd0c8eb5b7f75f199bf /template/en/default/admin/groups
parentb1a24eebebdab3a6fbae9bd8fd99736e130da0a9 (diff)
downloadbugzilla-fd5be728fcf18479146aab4d52254c3475124154.tar.gz
bugzilla-fd5be728fcf18479146aab4d52254c3475124154.tar.xz
Bug 354627: Improve the UI for adding/removing inheritance in editgroups.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org r=LpSolit, a=LpSolit
Diffstat (limited to 'template/en/default/admin/groups')
-rw-r--r--template/en/default/admin/groups/confirm-remove.html.tmpl66
-rw-r--r--template/en/default/admin/groups/edit.html.tmpl306
-rw-r--r--template/en/default/admin/groups/remove.html.tmpl31
3 files changed, 231 insertions, 172 deletions
diff --git a/template/en/default/admin/groups/confirm-remove.html.tmpl b/template/en/default/admin/groups/confirm-remove.html.tmpl
new file mode 100644
index 000000000..7c8df2701
--- /dev/null
+++ b/template/en/default/admin/groups/confirm-remove.html.tmpl
@@ -0,0 +1,66 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave@syndicomm.com>
+ # Joel Peshkin <bugreport@peshkin.net>
+ # Jacob Steenhagen <jake@bugzilla.org>
+ # Vlad Dascalu <jocuri@softhome.net>
+ # Max Kanat-Alexander <mkanat@bugzilla.org>
+ #%]
+
+[%# INTERFACE:
+ # group: The Bugzilla::Group being changed.
+ # regexp: the regexp according to which the update is performed.
+ #%]
+
+[% IF regexp %]
+ [% title = "Confirm: Remove Explicit Members in the Regular Expression?" %]
+[% ELSE %]
+ [% title = "Confirm: Remove All Explicit Members?" %]
+[% END %]
+
+[% PROCESS global/header.html.tmpl %]
+
+[% IF regexp %]
+ <p>This option will remove all users from '[% group.name FILTER html %]'
+ whose login names match the regular expression:
+ '[% regexp FILTER html %]'</p>
+[% ELSE %]
+ <p>This option will remove all explicitly defined users
+ from '[% group.name FILTER html %].'</p>
+[% END %]
+
+<p>Generally, you will only need to do this when upgrading groups
+ created with [% terms.Bugzilla %] versions 2.16 and prior. Use
+ this option with <b>extreme care</b> and consult the documentation
+ for further information.
+</p>
+
+<form method="post" action="editgroups.cgi">
+ <input type="hidden" name="group_id" value="[% group.id FILTER html %]">
+ <input type="hidden" name="regexp" value="[% regexp FILTER html %]">
+ <input type="hidden" name="action" value="remove_regexp">
+
+ <input name="token" type="hidden" value="[% token FILTER html %]">
+ <input name="confirm" type="submit" value="Confirm">
+ <p>Or <a href="editgroups.cgi">return to the Edit Groups page</a>.</p>
+</form>
+
+<p>Back to the <a href="editgroups.cgi">group list</a>.</p>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl
index 6f333f5c3..89dd66ce6 100644
--- a/template/en/default/admin/groups/edit.html.tmpl
+++ b/template/en/default/admin/groups/edit.html.tmpl
@@ -20,51 +20,45 @@
# Joel Peshkin <bugreport@peshkin.net>
# Jacob Steenhagen <jake@bugzilla.org>
# Vlad Dascalu <jocuri@softhome.net>
+ # Max Kanat-Alexander <mkanat@bugzilla.org>
#%]
[%# INTERFACE:
- # group_id: number. The group ID.
- # name: string. The name of the group. [grantor]
- # description: string. The description of the group.
- # regexp: string. The regular expression for the users of the group.
- # isactive: boolean int. Shows if the group is still active.
- # isbuggroup: boolean int. Is 1 if this is a bug group.
- # groups: array with group objects having the properties:
- # - grpid: number. The ID of the group.
- # - grpname: string. The name of the group. [member]
- # - grpdesc: string. The description of the group.
- # - grpmember: boolean int. Is 1 if members of the group are to inherit
- # membership in the group being edited.
- # - blessmember: boolean int. Is 1 if members of the group are to be able
- # to bless users into the group being edited.
- # - membercansee: boolean int. Is 1 if the members of the group are to
- # be aware of the group being edited and its members.
+ # group - A Bugzilla::Group representing the group being edited.
+ # *_current - Arrays of Bugzilla::Group objects that show the current
+ # values for this group, as far as grants.
+ # *_available - Arrays of Bugzilla::Group objects that show the current
+ # available values for each grant.
#%]
[% title = BLOCK %]Change Group: [% name FILTER html %][% END %]
[% PROCESS global/header.html.tmpl
- title = title
- style = "tr.odd_row {
- background: #e9e9e9;
- }
- .permissions th {
- background: #000000;
- color: #ffffff;
- }
- "
+ style = "
+ .grant_table { border-collapse: collapse; }
+ .grant_table td, .grant_table th {
+ padding-left: .5em;
+ }
+ .grant_table td.one, .grant_table th.one {
+ border-right: 1px solid black;
+ padding-right: .5em;
+ }
+ "
%]
<form method="post" action="editgroups.cgi">
+ <input type="hidden" name="action" value="postchanges">
+ <input type="hidden" name="group_id" value="[% group.id FILTER html %]">
+
<table border="1" cellpadding="4">
<tr>
<th>Group:</th>
<td>
- [% IF isbuggroup %]
- <input type="hidden" name="oldname" value="[% name FILTER html %]">
- <input type="text" name="name" size="60" value="[% name FILTER html %]">
+ [% IF group.is_bug_group %]
+ <input type="text" name="name" size="60"
+ value="[% group.name FILTER html %]">
[% ELSE %]
- [% name FILTER html %]
+ [% group.name FILTER html %]
[% END %]
</td>
</tr>
@@ -72,11 +66,11 @@
<tr>
<th>Description:</th>
<td>
- [% IF isbuggroup %]
- <input type="hidden" name="olddesc" value="[% description FILTER html %]">
- <input type="text" name="desc" size="70" value="[% description FILTER html %]">
+ [% IF group.is_bug_group %]
+ <input type="text" name="desc" size="70"
+ value="[% group.description FILTER html %]">
[% ELSE %]
- [% description FILTER html %]
+ [% group.description FILTER html %]
[% END %]
</td>
</tr>
@@ -84,143 +78,157 @@
<tr>
<th>User Regexp:</th>
<td>
- <input type="hidden" name="oldregexp" value="[% regexp FILTER html %]">
- <input type="text" name="regexp" size="40" value="[% regexp FILTER html %]">
+ <input type="text" name="regexp" size="40"
+ value="[% group.user_regexp FILTER html %]">
</td>
</tr>
- [% IF isbuggroup %]
+ [% IF group.is_bug_group %]
<tr>
<th>Use For [% terms.Bugs %]:</th>
<td>
- <input type="checkbox" name="isactive" value="1" [% (isactive == 1) ? "checked" : "" %]>
- <input type="hidden" name="oldisactive" value="[% isactive FILTER html %]">
+ <input type="checkbox" name="isactive"
+ value="1" [% 'checked="checked"' IF group.is_active %]>
</td>
</tr>
[% END %]
</table>
- <p>Users become members of this group in one of three ways:</p>
- <ul>
- <li> by being explicity included when the user is edited.
- <li> by matching the user regexp above.
- <li> by being a member of one of the groups included in this group
- by checking the boxes below.
- </ul>
-
- [% usevisibility = Param('usevisibilitygroups') %]
-
- <h4>Group Permissions</h4>
- <table class="permissions" cellspacing="0" cellpadding="2">
- <tr>
- [% IF usevisibility %]
- <th>
- Visible
- </th>
- [% END %]
- <th>
- Grant
- </th>
- <th>
- Inherit
- </th>
- <th>
- Group
- </th>
- <th>
- Description
- </th>
+ <h4>Group Permissions</h4>
+
+ <table class="grant_table">
+ <tr>
+ <th class="one">Groups That Are a Member of This Group<br>
+ (&quot;Users in <var>X</var> are automatically in
+ [%+ group.name FILTER html %]&quot;)</th>
+ <th>Groups That This Group Is a Member Of<br>
+ (&quot;If you are in [% group.name FILTER html %], you are
+ automatically also in...&quot;)</th>
+ </tr>
+ <tr>
+ <td class="one">
+ [% PROCESS select_pair name = "members" size = 10
+ items_available = members_available
+ items_current = members_current %]
+ </td>
+
+ <td>[% PROCESS select_pair name = "member_of" size = 10
+ items_available = member_of_available
+ items_current = member_of_current %]</td>
</tr>
- [% row = 0 %]
- [% FOREACH group = groups %]
- [% row = row + 1 %]
- <tr [% 'class="odd_row"' IF row % 2 %]>
- [% IF usevisibility %]
- <td align="center">
- <input type="checkbox" name="cansee-[% group.grpid FILTER none %]"
- [% group.membercansee ? "checked " : "" %]value="1">
- <input type="hidden" name="oldcansee-[% group.grpid FILTER none %]"
- value="[% group.membercansee FILTER none %]">
- </td>
- [% END %]
- [% IF group_id != group.grpid %]
- <td align="center">
- <input type="checkbox" name="bless-[% group.grpid FILTER html %]" [% group.blessmember ? "checked " : "" %]value="1">
- <input type="hidden" name="oldbless-[% group.grpid FILTER html %]" value="[% group.blessmember FILTER html %]">
- </td>
- <td align="center">
- <input type="checkbox" name="grp-[% group.grpid FILTER html %]" [% group.grpmember ? "checked " : "" %]value="1">
- <input type="hidden" name="oldgrp-[% group.grpid FILTER html %]" value="[% group.grpmember FILTER html %]">
- </td>
- <td align="left" class="groupname">
- <a href="[% "editgroups.cgi?action=changeform&group=${group.grpid}" FILTER html %]">
- [% group.grpnam FILTER html %]
- </a>
- </td>
- [% ELSE %]
- <td>
- <input type="hidden" name="oldbless-[% group.grpid FILTER html %]" value="0">
- </td>
- <td>
- <input type="hidden" name="oldgrp-[% group.grpid FILTER html %]" value="0">
- </td>
- <td align="left" class="groupname">
- <em>
- [% group.grpnam FILTER html %]
- </em>
- </td>
- [% END %]
- <td align="left" class="groupdesc">[% group.grpdesc FILTER html_light %]</td>
- </tr>
- [% END %]
</table>
- <input type="submit" id="update" value="Save Changes">
- <br>
- <dl>
- [% IF usevisibility %]
- <dt>Visibility:</dt>
- <dd>
- Members of the selected groups can be aware of the
- "[% name FILTER html %]" group
- </dd>
- [% END %]
- <dt>Grant:</dt>
- <dd>
- Members of the selected groups can grant membership to the
- "[% name FILTER html %]" group
- </dd>
- <dt>Inherit:</dt>
- <dd>
- Members of the selected groups are automatically members of the
- "[% name FILTER html %]" group
- </dd>
- </dl>
- <table width="76%" border="0">
+ <table class="grant_table">
<tr>
- <td>
- <h4>Conversion of groups created with [% terms.Bugzilla %]
- versions 2.16 and prior:</h4>
-
- <ul>
- <li>Remove all explicit memberships from this group:
- <input name="remove_explicit_members" type="submit" id="remove_explicit_members" value="Remove Memberships">
- </li>
-
- <li>Remove all explicit memberships that are included in the above
- regular expression:
- <input name="remove_explicit_members_regexp" type="submit" id="remove_explicit_members_regexp" value="Remove memberships included in regular expression">
- </li>
- </ul>
+ <th class="one">
+ Groups That Can Grant Membership in This Group<br>
+ (&quot;Users in <var>X</var> can add other users to
+ [%+ group.name FILTER html %]&quot;)
+
+ </th>
+ <th>Groups That This Group Can Grant Membership In<br>
+ (&quot;Users in [% group.name FILTER html %] can add users to...&quot;)
+ </th>
+ </tr>
+ <tr>
+ <td class="one">
+ [% PROCESS select_pair name = "bless_from" size = 10
+ items_available = bless_from_available
+ items_current = bless_from_current %]
+ </td>
+ <td>[% PROCESS select_pair name = "bless_to" size = 10
+ items_available = bless_to_available
+ items_current = bless_to_current %]
</td>
</tr>
- </table>
+ <table>
- <input type="hidden" name="action" value="postchanges">
- <input type="hidden" name="group" value="[% group_id FILTER html %]">
+ [% IF Param('usevisibilitygroups') %]
+ <table class="grant_table">
+ <tr>
+ <th class="one">
+ Groups That Can See This Group<br>
+ (&quot;Users in <var>X</var> can see users in
+ [%+ group.name FILTER html %]&quot;)
+ </th>
+ <th>Groups That This Group Can See<br>
+ (&quot;Users in [% group.name FILTER html %] can see users in...&quot;)
+ </th>
+ </tr>
+ <tr>
+ <td class="one">
+ [% PROCESS select_pair name = "visible_from" size = 10
+ items_available = visible_from_available
+ items_current = visible_from_current %]
+ </td>
+ <td>[% PROCESS select_pair name = "visible_to_me" size = 10
+ items_available = visible_to_me_available
+ items_current = visible_to_me_current %]
+ </td>
+ </tr>
+ <table>
+ [% END %]
+
+ <input type="submit" value="Update Group">
<input type="hidden" name="token" value="[% token FILTER html %]">
</form>
+
+<h4>Mass Remove</h4>
+
+<p>You can use this form to do mass-removal of users from groups.
+ This is often very useful if you upgraded from [% terms.Bugzilla %]
+ 2.16.</p>
+<table<tr><td>
+<form method="post" action="editgroups.cgi">
+ <fieldset>
+ <legend>Remove all explict memberships from users whose login names
+ match the following regular expression:</legend>
+ <input type="text" size="20" name="regexp">
+ <input type="submit" value="Remove Memberships">
+
+ <p>If you leave the field blank, all explicit memberships in
+ this group will be removed.</p>
+
+ <input type="hidden" name="action" value="confirm_remove">
+ <input type="hidden" name="group_id" value="[% group.id FILTER html %]">
+ </fieldset>
+</form>
+</td></tr></table>
+
<p>Back to the <a href="editgroups.cgi">group list</a>.</p>
[% PROCESS global/footer.html.tmpl %]
+
+[% BLOCK select_pair %]
+ <table class="select_pair">
+ <tr>
+ <th><label for="[% "${name}_add" FILTER html %]">Add<br>
+ (select to add)</label></th>
+ <th><label for="[% "${name}_remove" FILTER html %]">Current<br>
+ (select to remove)</label></th>
+ </tr>
+ <tr>
+ <td>
+ <select multiple="multiple" size="[% size FILTER html %]"
+ name="[% "${name}_add" FILTER html %]"
+ id="[% "${name}_add" FILTER html %]">
+ [% FOREACH item = items_available %]
+ <option value="[% item.id FILTER html %]">
+ [% item.name FILTER html %]</option>
+ [% END %]
+ </select>
+ </td>
+ <td>
+ <select multiple="multiple" size="[% size FILTER html %]"
+ name="[% "${name}_remove" FILTER html %]"
+ id="[% "${name}_remove" FILTER html %]">
+ [% FOREACH item = items_current %]
+ <option value="[% item.id FILTER html %]">
+ [% item.name FILTER html %]</option>
+ [% END %]
+ </select>
+ </td>
+ </tr>
+ </table>
+[% END %]
diff --git a/template/en/default/admin/groups/remove.html.tmpl b/template/en/default/admin/groups/remove.html.tmpl
index 8c41333e4..fc7613359 100644
--- a/template/en/default/admin/groups/remove.html.tmpl
+++ b/template/en/default/admin/groups/remove.html.tmpl
@@ -20,36 +20,21 @@
# Joel Peshkin <bugreport@peshkin.net>
# Jacob Steenhagen <jake@bugzilla.org>
# Vlad Dascalu <jocuri@softhome.net>
+ # Max Kanat-Alexander <mkanat@bugzilla.org>
#%]
[%# INTERFACE:
- # remove_all: boolean int. Is 1 if the action was remove_all,
- # and 0 if the action was remove_all_regexp.
- # name: string. The place where removal is performed.
- # regexp: string. The regexp according to which the removal is performed.
- # users: array with group objects having the properties:
- # - login: string. The login which is removed.
+ # group: The Bugzilla::Group being modified.
+ # regexp: string. The regexp according to which the removal was performed.
+ # users: Array of Bugzilla::User objects who were removed from this group.
#%]
-[% IF remove_all %]
- [% title = BLOCK %]
- Removing All Explicit Group Memberships from '[% name FILTER html %]'
- [% END %]
-[% ELSE %]
- [% title = BLOCK %]
- Removing All Explicit Group Memberships Matching Group RegExp from '[% name FILTER html %]'
- [% END %]
-[% END %]
-
-[% PROCESS global/header.html.tmpl %]
+[% PROCESS global/header.html.tmpl
+ title = "Removing Explicit Group Membership" %]
-[% IF remove_all %]
- <p><b>Removing explicit membership</b></p>
-[% ELSE %]
- <p><b>Removing explicit memberships of users matching
- '[% regexp FILTER html %]'...</b></p>
-[% END %]
+<p><b>Removing explicit memberships[% IF regexp %] of users matching
+ '[% regexp FILTER html %]'[% END %]...</b></p>
[% FOREACH user = users %]
[% user.login FILTER html %] removed<br>