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.html46
-rw-r--r--rt/html/Admin/Groups/GroupRights.html6
-rw-r--r--rt/html/Admin/Groups/History.html66
-rw-r--r--rt/html/Admin/Groups/Members.html10
-rw-r--r--rt/html/Admin/Groups/Modify.html26
-rw-r--r--rt/html/Admin/Groups/UserRights.html6
-rw-r--r--rt/html/Admin/Groups/index.html54
7 files changed, 184 insertions, 30 deletions
diff --git a/rt/html/Admin/Groups/CustomFields.html b/rt/html/Admin/Groups/CustomFields.html
new file mode 100644
index 000000000..c2336b042
--- /dev/null
+++ b/rt/html/Admin/Groups/CustomFields.html
@@ -0,0 +1,46 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# 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.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/Elements/ObjectCustomFields, %ARGS, ObjectType => 'RT::Group' &>
diff --git a/rt/html/Admin/Groups/GroupRights.html b/rt/html/Admin/Groups/GroupRights.html
index 55e2a6530..d95bdae07 100644
--- a/rt/html/Admin/Groups/GroupRights.html
+++ b/rt/html/Admin/Groups/GroupRights.html
@@ -1,8 +1,8 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<& /Admin/Elements/GroupTabs,
GroupObj => $GroupObj,
diff --git a/rt/html/Admin/Groups/History.html b/rt/html/Admin/Groups/History.html
new file mode 100644
index 000000000..40dab46e9
--- /dev/null
+++ b/rt/html/Admin/Groups/History.html
@@ -0,0 +1,66 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# <jesse@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# 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.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/GroupTabs,
+ id => $id,
+ GroupObj => $GroupObj,
+ current_subtab => $current_tab,
+ Title => $title &>
+
+<& /Ticket/Elements/ShowHistory,
+ Ticket => $GroupObj,
+ ShowHeaderModes => 0,
+&>
+
+<%INIT>
+my $current_tab = 'Admin/Groups/History.html?id='.$id;
+my $GroupObj = new RT::Group($session{'CurrentUser'});
+$GroupObj->Load($id) || Abort("Couldn't load group '$id'");
+my $title = loc("History of the group [_1]", $GroupObj->Name);
+</%INIT>
+<%ARGS>
+$id => undef
+</%ARGS>
diff --git a/rt/html/Admin/Groups/Members.html b/rt/html/Admin/Groups/Members.html
index 779df9567..fd25b2d7f 100644
--- a/rt/html/Admin/Groups/Members.html
+++ b/rt/html/Admin/Groups/Members.html
@@ -1,8 +1,8 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => "RT/Admin/Edit the group ". $Group->Name &>
<& /Admin/Elements/GroupTabs, GroupObj => $Group,
current_tab => 'Admin/Groups/Members.html?id='.$id,
@@ -78,7 +78,7 @@
% $UserMembers->LimitToUsers();
<UL>
% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
% }
</ul>
@@ -87,7 +87,7 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
<%$member->MemberObj->Object->Name%>
% }
% }
diff --git a/rt/html/Admin/Groups/Modify.html b/rt/html/Admin/Groups/Modify.html
index 0140a57e1..94c0203b1 100644
--- a/rt/html/Admin/Groups/Modify.html
+++ b/rt/html/Admin/Groups/Modify.html
@@ -1,8 +1,8 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GroupTabs,
@@ -53,7 +53,7 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST>
+<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
%unless ($Group->Id) {
<INPUT TYPE=HIDDEN NAME=id VALUE="new">
@@ -65,16 +65,27 @@
<&|/l&>Name</&>:
</TD>
<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR><TR>
+</TR>
+<TR>
<TD ALIGN=RIGHT>
<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR><TR>
+</TR>
+% my $CFs = $Group->CustomFields;
+% while (my $CF = $CFs->Next) {
+<TR VALIGN="TOP"><TD ALIGN="RIGHT">
+<% $CF->Name %>:
+</TD><TD>
+<& /Elements/EditCustomField, CustomField => $CF, Object => $Group &>
+</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>
+<& /Elements/Callback, GroupObj => $Group, results => \@results, %ARGS &>
</TABLE>
-<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
</form>
<%INIT>
@@ -124,6 +135,7 @@ if ($id) {
Object => $Group,
ARGSRef => \%ARGS );
push (@results,@fieldresults);
+ push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $Group );
}
#we're asking about enabled on the web page but really care about disabled.
diff --git a/rt/html/Admin/Groups/UserRights.html b/rt/html/Admin/Groups/UserRights.html
index 3f17baa41..5237b1578 100644
--- a/rt/html/Admin/Groups/UserRights.html
+++ b/rt/html/Admin/Groups/UserRights.html
@@ -1,8 +1,8 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
<& /Admin/Elements/GroupTabs,
GroupObj => $GroupObj,
diff --git a/rt/html/Admin/Groups/index.html b/rt/html/Admin/Groups/index.html
index 7c2cd504c..073440696 100644
--- a/rt/html/Admin/Groups/index.html
+++ b/rt/html/Admin/Groups/index.html
@@ -1,8 +1,8 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,36 +42,66 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/',
current_subtab => 'Admin/Groups/',
Title => $title &>
-
-
-<UL>
+<%$caption%>:<BR> <UL>
+%if ($Groups->Count == 0) {
+<LI> <i><&|/l&>No groups matching search criteria found.</&></i>
+% }
+%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>
%}
</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>
+%}
<br><br>
<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<input type="checkbox" name="FindDisabledGroups"> <&|/l&>Include disabled groups in listing.</&>
+<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">
+<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><BR>
+<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
+</FORM>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
-
-if ($FindDisabledGroups) {
- $Groups->{'find_disabled_rows'} = 1;
-}
-
$Groups->LimitToUserDefinedGroups();
my $title = loc('Select a group');
+my $caption;
+if (length $GroupString) {
+ $caption = loc("Groups matching search criteria");
+ if ($GroupField =~ /^CustomField-(\d+)/) {
+ $Groups->LimitCustomField(
+ CUSTOMFIELD => $1,
+ OPERATOR => $GroupOp,
+ VALUE => $GroupString,
+ );
+ }
+ else {
+ $Groups->Limit(
+ FIELD => $GroupField,
+ OPERATOR => $GroupOp,
+ VALUE => $GroupString,
+ );
+ }
+}
+else {
+ $caption = loc("User-defined groups");
+}
</%INIT>
<%ARGS>
+$GroupString => undef
+$GroupOp => '='
+$GroupField => 'Name'
$FindDisabledGroups => 0
</%ARGS>