summaryrefslogtreecommitdiff
path: root/rt/html/Admin/Groups
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html/Admin/Groups')
-rw-r--r--rt/html/Admin/Groups/CustomFields.html6
-rw-r--r--rt/html/Admin/Groups/GroupRights.html48
-rw-r--r--rt/html/Admin/Groups/History.html8
-rw-r--r--rt/html/Admin/Groups/Members.html78
-rw-r--r--rt/html/Admin/Groups/Modify.html54
-rw-r--r--rt/html/Admin/Groups/UserRights.html32
-rw-r--r--rt/html/Admin/Groups/index.html38
7 files changed, 146 insertions, 118 deletions
diff --git a/rt/html/Admin/Groups/CustomFields.html b/rt/html/Admin/Groups/CustomFields.html
index c2336b0..8ffa54a 100644
--- a/rt/html/Admin/Groups/CustomFields.html
+++ b/rt/html/Admin/Groups/CustomFields.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Admin/Groups/GroupRights.html b/rt/html/Admin/Groups/GroupRights.html
index d95bdae..b81b6a9 100644
--- a/rt/html/Admin/Groups/GroupRights.html
+++ b/rt/html/Admin/Groups/GroupRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,50 +52,50 @@
Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>">
+ <form method="post" action="GroupRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
-<& /Elements/TitleBoxStart, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
+<&| /Widgets/TitleBox, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<h1><&|/l&>System groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToSystemInternalGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% loc($Group->Type) %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
PrincipalType => 'Group',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
+<table>
% $Groups = RT::Groups->new($session{'CurrentUser'});
% $Groups->LimitToUserDefinedGroups();
% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $Group->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
PrincipalType => 'Group',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
-</TABLE>
+</table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Groups/History.html b/rt/html/Admin/Groups/History.html
index 40dab46..ee1d553 100644
--- a/rt/html/Admin/Groups/History.html
+++ b/rt/html/Admin/Groups/History.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -52,7 +54,7 @@
<& /Ticket/Elements/ShowHistory,
Ticket => $GroupObj,
- ShowHeaderModes => 0,
+ ShowDisplayModes => 0,
&>
<%INIT>
diff --git a/rt/html/Admin/Groups/Members.html b/rt/html/Admin/Groups/Members.html
index fd25b2d..77c3fb0 100644
--- a/rt/html/Admin/Groups/Members.html
+++ b/rt/html/Admin/Groups/Members.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,36 +52,37 @@
<& /Elements/ListActions, actions => \@results &>
-<& /Elements/TitleBoxStart, title => loc('Editing membership for group [_1]', $Group->Name) &>
+<&| /Widgets/TitleBox, title => loc('Editing membership for group [_1]', $Group->Name) &>
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Members.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
-<TABLE WIDTH="100%">
-<TR>
-<TD>
+<form action="<%$RT::WebPath%>/Admin/Groups/Members.html" method="post">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
+<table width="100%">
+<tr>
+<td>
<h3><&|/l&>Current members</&></h3>
-</TD>
-<TD>
+</td>
+<td>
<h3><&|/l&>Add members</&></h3>
-</TD>
-</TR>
+</td>
+</tr>
-<TR>
-<TD VALIGN=TOP>
+<tr>
+<td valign="top">
% if ($Group->MembersObj->Count == 0 ) {
-<i><&|/l&>(No members)</&></i>
+<em><&|/l&>(No members)</&></em>
% } else {
-<i><&|/l&>(Check box to delete)</&></i>
-<br>
-<br>
+<em><&|/l&>(Check box to delete)</&></em>
+<br />
+<br />
<&|/l&>Users</&>
-% my $UserMembers = $Group->MembersObj;
-% $UserMembers->LimitToUsers();
-<UL>
-% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
-<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
+% my $Users = $Group->UserMembersObj;
+% $Users->OrderBy( FIELD => $UserOrderBy, ORDER => $UserOrder );
+<ul>
+% while (my $user = $Users->Next()) {
+% $UsersSeen{$user->id} = 1 if $SkipSeenUsers;
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$user->PrincipalObj->Id%>" value="1" />
+<%$user->Name%> (<%$user->RealName%>)
% }
</ul>
<&|/l&>Groups</&>
@@ -87,18 +90,20 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+% $GroupsSeen{$member->MemberId} = 1 if $SkipSeenGroups;
+<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%>
% }
+</ul>
% }
-</UL>
-</TD>
-<TD VALIGN=TOP>
-<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group &>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
+</td>
+<td valign="top">
+<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group,
+ SkipUsers => \%UsersSeen, SkipGroups => \%GroupsSeen &>
+</td>
+</tr>
+</table>
+</&>
<& /Elements/Submit, Label => loc('Modify Members'), Reset => 1 &>
</form>
@@ -146,6 +151,9 @@ foreach my $member (@AddMembers) {
push (@results, $msg);
}
+my %UsersSeen;
+my %GroupsSeen;
+$GroupsSeen{$Group->id} = 1; # can't be a member of ourself
</%INIT>
@@ -153,4 +161,8 @@ foreach my $member (@AddMembers) {
$AddMembersUsers => undef
$AddMembersGroups => undef
$id => undef
+$UserOrderBy => 'Name'
+$UserOrder => 'ASC'
+$SkipSeenUsers => 1
+$SkipSeenGroups => 1
</%ARGS>
diff --git a/rt/html/Admin/Groups/Modify.html b/rt/html/Admin/Groups/Modify.html
index 94c0203..f3c13fe 100644
--- a/rt/html/Admin/Groups/Modify.html
+++ b/rt/html/Admin/Groups/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -53,38 +55,42 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<form action="<%$RT::WebPath%>/Admin/Groups/Modify.html" method="post" enctype="multipart/form-data">
%unless ($Group->Id) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+<input type="hidden" class="hidden" name="id" value="new" />
% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
+<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" />
% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
+<table>
+<tr><td align="right">
<&|/l&>Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR>
+</td>
+<td><input name="Name" value="<%$Group->Name%>" /></td>
+</tr>
+<tr>
+<td align="right">
+<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description%>" size="60" /></td>
+</tr>
% my $CFs = $Group->CustomFields;
% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
+<tr valign="top"><td align="right">
<% $CF->Name %>:
-</TD><TD>
-<& /Elements/EditCustomField, CustomField => $CF, Object => $Group &>
-</TD></TR>
+</td><td>
+<& /Elements/EditCustomField, CustomField => $CF,
+ Object => $Group,
+ ($Create ? (NamePrefix => 'Object-RT::Group--CustomField-')
+ : () )&>
+</td></tr>
% }
-<TR>
-<TD COLSPAN=2>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
-</TR>
+<tr>
+<td colspan="2">
+<input type="hidden" class="hidden" name="SetEnabled" value="1" />
+<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this group)</&><br />
+</td>
+</tr>
<& /Elements/Callback, GroupObj => $Group, results => \@results, %ARGS &>
-</TABLE>
+</table>
<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
</form>
<%INIT>
diff --git a/rt/html/Admin/Groups/UserRights.html b/rt/html/Admin/Groups/UserRights.html
index 5237b15..b77edb0 100644
--- a/rt/html/Admin/Groups/UserRights.html
+++ b/rt/html/Admin/Groups/UserRights.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -50,32 +52,32 @@
Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>">
+ <form method="post" action="UserRights.html">
+ <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
-<& /Elements/TitleBoxStart, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
+<&| /Widgets/TitleBox, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
-<TABLE>
+<table>
% while (my $Member = $Users->Next()) {
% my $UserObj = $Member->MemberObj->Object();
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
+ <tr align="right">
+ <td valign="top">
<% $UserObj->Name %>
- </TD>
- <TD>
+ </td>
+ <td>
<& /Admin/Elements/SelectRights, PrincipalId => $Member->MemberObj->Id,
PrincipalType => 'User',
Object => $GroupObj &>
- </TD>
- </TR>
+ </td>
+ </tr>
% }
- </TABLE>
+ </table>
- <& /Elements/TitleBoxEnd &>
+ </&>
<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
- </FORM>
+ </form>
<%INIT>
diff --git a/rt/html/Admin/Groups/index.html b/rt/html/Admin/Groups/index.html
index 50857e5..384092b 100644
--- a/rt/html/Admin/Groups/index.html
+++ b/rt/html/Admin/Groups/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,31 +49,31 @@
<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/',
current_subtab => 'Admin/Groups/',
Title => $title &>
-<%$caption%>:<BR> <UL>
+<%$caption%>:<br /> <ul>
%if ($Groups->Count == 0) {
-<LI> <i><&|/l&>No groups matching search criteria found.</&></i>
+<li> <em><&|/l&>No groups matching search criteria found.</&></em>
% }
%my @ids;
%while ( my $Group = $Groups->Next) {
% push @ids, $Group->Id;
-<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR>
+<li><a href="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><br />
%}
-</UL>
+</ul>
%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
+<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br />
%}
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<input type="checkbox" name="FindDisabledGroups" value="1"> <&|/l&>Include disabled groups in listing.</&>
-<BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Groups/index.html">
+<input type="checkbox" class="checkbox" name="FindDisabledGroups" value="1" /> <&|/l&>Include disabled groups in listing.</&>
+<br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
+<br /><br />
+<form method="post" action="<% $RT::WebPath %>/Admin/Groups/index.html">
+<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><br />
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
$Groups->LimitToUserDefinedGroups();