summaryrefslogtreecommitdiff
path: root/rt/html/Admin/Queues
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html/Admin/Queues')
-rw-r--r--rt/html/Admin/Queues/CustomField.html60
-rw-r--r--rt/html/Admin/Queues/CustomFields.html48
-rw-r--r--rt/html/Admin/Queues/GroupRights.html110
-rw-r--r--rt/html/Admin/Queues/Modify.html163
-rw-r--r--rt/html/Admin/Queues/People.html186
-rw-r--r--rt/html/Admin/Queues/Scrip.html67
-rw-r--r--rt/html/Admin/Queues/Scrips.html63
-rw-r--r--rt/html/Admin/Queues/Template.html101
-rw-r--r--rt/html/Admin/Queues/Templates.html57
-rw-r--r--rt/html/Admin/Queues/UserRights.html90
-rw-r--r--rt/html/Admin/Queues/index.html61
11 files changed, 1006 insertions, 0 deletions
diff --git a/rt/html/Admin/Queues/CustomField.html b/rt/html/Admin/Queues/CustomField.html
new file mode 100644
index 0000000..2515c3e
--- /dev/null
+++ b/rt/html/Admin/Queues/CustomField.html
@@ -0,0 +1,60 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
+ QueueObj => $QueueObj,
+ current_tab => 'Admin/Queues/CustomFields.html?id='.$QueueObj->id,
+ current_subtab => $current_subtab,
+ subtabs => $subtabs,
+ Title => $title &>
+
+<& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
+
+<%INIT>
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($Queue);
+
+my ($title, $current_subtab);
+
+unless($QueueObj->id) {
+ Abort(loc("Queue [_1] not found", $Queue));
+}
+if ($CustomField) {
+ $title = loc('Modify a CustomField for queue [_1]', $QueueObj->Name());
+}else {
+ $current_subtab = "Admin/Queues/CustomField.html?create=1&Queue=".$QueueObj->id;
+ $title = loc('Create a CustomField for queue [_1]', $QueueObj->Name());
+}
+
+my $subtabs = {
+ A => { title => loc('New custom field'),
+ path => "Admin/Queues/CustomField.html?create=1&Queue=".$QueueObj->id
+ }
+ };
+
+</%INIT>
+<%ARGS>
+$CustomField => undef
+$Queue => undef
+</%ARGS>
diff --git a/rt/html/Admin/Queues/CustomFields.html b/rt/html/Admin/Queues/CustomFields.html
new file mode 100644
index 0000000..78c6c27
--- /dev/null
+++ b/rt/html/Admin/Queues/CustomFields.html
@@ -0,0 +1,48 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/QueueTabs, id => $Queue->id,
+ current_tab => 'Admin/Queues/CustomFields.html?id='.$id,
+ QueueObj => $Queue,
+ subtabs => $subtabs,
+ Title => $title
+ &>
+
+<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &>
+<%INIT>
+my $Queue = new RT::Queue($session{'CurrentUser'});
+$Queue->Load($id);
+my $CustomFields = RT::CustomFields->new($RT::SystemUser);
+$CustomFields->LimitToQueue($Queue->Id);
+my $subtabs = {
+ A => { title => loc('New custom field'),
+ path => "Admin/Queues/CustomField.html?create=1&Queue=".$id,
+ }
+ };
+
+my $title= loc('Edit Custom Fields for [_1]', $Queue->Name);
+</%INIT>
+<%ARGS>
+$id => undef
+</%ARGS>
diff --git a/rt/html/Admin/Queues/GroupRights.html b/rt/html/Admin/Queues/GroupRights.html
new file mode 100644
index 0000000..a1ac709
--- /dev/null
+++ b/rt/html/Admin/Queues/GroupRights.html
@@ -0,0 +1,110 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
+<& /Admin/Elements/QueueTabs, id => $id,
+ QueueObj => $QueueObj,
+ current_tab => $current_tab,
+ Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
+<& /Elements/ListActions, actions => \@results &>
+
+ <FORM METHOD=POST ACTION="GroupRights.html">
+ <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
+
+
+<h1><&|/l&>System groups</&></h1>
+<TABLE>
+<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
+% $Groups = RT::Groups->new($session{'CurrentUser'});
+% $Groups->LimitToSystemInternalGroups();
+% while (my $Group = $Groups->Next()) {
+ <TR ALIGN=RIGHT>
+ <TD VALIGN=TOP>
+ <% loc($Group->Type) %>
+ </TD>
+ <TD>
+ <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
+ Object => $QueueObj &>
+ </TD>
+ </TR>
+% }
+</TABLE>
+<h1><&|/l&>Roles</&></h1>
+<TABLE>
+% $Groups = RT::Groups->new($session{'CurrentUser'});
+% $Groups->LimitToRolesForQueue($QueueObj->Id);
+% while (my $Group = $Groups->Next()) {
+ <TR ALIGN=RIGHT>
+ <TD VALIGN=TOP>
+ <% loc($Group->Type) %>
+ </TD>
+ <TD>
+ <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
+ Object => $QueueObj &>
+ </TD>
+ </TR>
+% }
+</TABLE>
+<h1><&|/l&>User defined groups</&></h1>
+<TABLE>
+% $Groups = RT::Groups->new($session{'CurrentUser'});
+% $Groups->LimitToUserDefinedGroups();
+% while (my $Group = $Groups->Next()) {
+ <TR ALIGN=RIGHT>
+ <TD VALIGN=TOP>
+ <% $Group->Name %>
+ </TD>
+ <TD>
+ <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
+ Object => $QueueObj &>
+ </TD>
+ </TR>
+% }
+</TABLE>
+
+ <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+
+ </FORM>
+
+<%INIT>
+
+ #Update the acls.
+ my @results = ProcessACLChanges(\%ARGS);
+
+
+if (!defined $id) {
+ Abort(loc("No Queue defined"));
+}
+
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+$QueueObj->Load($id) || Abort(loc("Couldn't load queue [_1]",$id));
+
+my $Groups;
+my $current_tab;
+$current_tab = 'Admin/Queues/GroupRights.html?id='.$QueueObj->id;
+
+</%INIT>
+
+<%ARGS>
+$id => undef
+</%ARGS>
diff --git a/rt/html/Admin/Queues/Modify.html b/rt/html/Admin/Queues/Modify.html
new file mode 100644
index 0000000..46608eb
--- /dev/null
+++ b/rt/html/Admin/Queues/Modify.html
@@ -0,0 +1,163 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => loc('Admin/Queue/Basics') &>
+<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
+ QueueObj => $QueueObj,
+ current_tab => $current_tab,
+ Title => loc('Admin/Queue/Basics') &>
+<& /Elements/ListActions, actions => \@results &>
+
+
+
+<FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST>
+%if ($Create ) {
+<INPUT TYPE=HIDDEN NAME=id VALUE="new">
+% } else {
+<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
+% }
+
+<TABLE>
+<TR><TD ALIGN=RIGHT>
+<&|/l&>Queue Name</&>:
+</TD>
+<TD><INPUT name="Name" value="<% ($Create) ? "" : $QueueObj->Name %>"></TD>
+</TR><TR>
+<TD ALIGN=RIGHT>
+<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<% ($Create) ? "" : $QueueObj->Description %>" size=60></TD></TR>
+<TR>
+<TD ALIGN=RIGHT>
+<&|/l&>Correspondence Address</&>:
+</TD><TD>
+<INPUT name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>">
+<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1]</&></i></font>
+</TD>
+<TD ALIGN=RIGHT>
+
+<&|/l&>Comment Address</&>: </TD><TD>
+<INPUT NAME="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>">
+<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1]</&></i></font>
+</TD>
+</TR><TR>
+
+<TD ALIGN=RIGHT>
+<&|/l&>Priority starts at</&>:
+</TD><TD><INPUT NAME="InitialPriority" value="<% ($Create) ? "" : $QueueObj->InitialPriority %>">
+</TD>
+<TD ALIGN=RIGHT>
+<&|/l&>Over time, priority moves toward</&>:
+</TD><TD><INPUT NAME="FinalPriority" value="<% ($Create) ? "" : $QueueObj->FinalPriority %>">
+</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT>
+<&|/l&>Requests should be due in</&>:
+</TD><TD>
+<INPUT NAME="DefaultDueIn" VALUE="<% ($Create) ? "" : $QueueObj->DefaultDueIn%>"> <&|/l&>days</&>.
+</TD>
+</TR>
+<TR>
+<TD>
+</TD>
+<TD COLSPAN=4><INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
+<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this queue)</&><BR>
+<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
+</TD>
+</TR>
+
+</TABLE>
+<& /Elements/Submit &>
+</form>
+
+
+
+<%INIT>
+my $current_tab;
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($id);
+my ($title, @results, $Disabled, $EnabledChecked);
+$EnabledChecked = "CHECKED";
+
+if ($Create) {
+ $current_tab = 'Admin/Queues/Modify.html?Create=1';
+ $title = loc("Create a queue");
+} else {
+ if ($id eq 'new') {
+ my ($val, $msg) = $QueueObj->Create(Name => $Name);
+ delete $session{'create_in_queues'};
+ if ($val == 0 ) {
+ Abort("$msg");
+ }
+ else {
+ push @results, $msg;
+ }
+ }
+ else {
+ $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort("Couldn't load queue '$Name'");
+ }
+ $title = loc('Editing Configuration for queue [_1]', $QueueObj->Name);
+
+ $current_tab = 'Admin/Queues/Modify.html?id='.$QueueObj->id;
+}
+if ($QueueObj->Id()) {
+ delete $session{'create_in_queues'};
+my @attribs= qw(Description CorrespondAddress CommentAddress Name
+ InitialPriority FinalPriority DefaultDueIn);
+
+ @results = UpdateRecordObject( AttributesRef => \@attribs,
+ Object => $QueueObj,
+ ARGSRef => \%ARGS);
+
+ #we're asking about enabled on the web page but really care about disabled.
+ if ($Enabled == 1) {
+ $Disabled = 0;
+ }
+ else {
+ $Disabled = 1;
+ }
+ if ( ($SetEnabled) and ( $Disabled != $QueueObj->Disabled) ) {
+ my ($code, $msg) = $QueueObj->SetDisabled($Disabled);
+ push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
+ }
+
+ if ($QueueObj->Disabled()) {
+ $EnabledChecked ="";
+ }
+}
+</%INIT>
+
+
+<%ARGS>
+$id => undef
+$result => undef
+$Name => undef
+$Create => undef
+$Description => undef
+$CorrespondAddress => undef
+$CommentAddress => undef
+$InitialPriority => undef
+$FinalPriority => undef
+$DefaultDueIn => undef
+$SetEnabled => undef
+$Enabled => undef
+</%ARGS>
diff --git a/rt/html/Admin/Queues/People.html b/rt/html/Admin/Queues/People.html
new file mode 100644
index 0000000..e0a7345
--- /dev/null
+++ b/rt/html/Admin/Queues/People.html
@@ -0,0 +1,186 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Elements/Header, Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &>
+<& /Admin/Elements/QueueTabs, id => $id,
+ QueueObj => $QueueObj,
+ current_tab => $current_tab,
+ Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &>
+
+<& /Elements/ListActions, actions => \@results &>
+
+
+<FORM METHOD=POST ACTION="People.html">
+<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
+
+<TABLE WIDTH=100%>
+<TR>
+<TD VALIGN=TOP >
+
+<h3><&|/l&>Current watchers</&></h3>
+
+
+<&|/l&>Cc</&>:
+
+<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->Cc &>
+
+<&|/l&>Administrative Cc</&>:
+
+<& /Admin/Elements/EditQueueWatchers, QueueObj => $QueueObj, Watchers => $QueueObj->AdminCc &>
+
+
+</TD>
+<TD VALIGN=TOP>
+<h3><&|/l&>New watchers</&></h3>
+
+<&|/l&>Find people whose</&><BR>
+<& /Elements/SelectUsers &>
+<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
+<BR>
+<&|/l&>Find group whose</&><BR>
+<& /Elements/SelectGroups &>
+<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
+
+<p>
+<&|/l&>Add new watchers</&>:<br>
+<p>
+<b><&|/l&>Users</&></b>
+% if ($user_msg) {
+<br>
+<i><%$user_msg%></i>
+% } elsif ($Users) {
+<ul>
+% while (my $u = $Users->Next ) {
+<li><&/Elements/SelectWatcherType, Scope=>'queue', Name =>
+"Queue-AddWatcher-Principal-".$u->PrincipalId &> <%$u->Name%>
+(<%$u->RealName%>)
+% }
+</ul>
+% }
+
+<p>
+<b><&|/l&>Groups</&></b>
+
+% if ($group_msg) {
+<br>
+<i><%$group_msg%></i>
+% } elsif ($Groups) {
+<ul>
+% while (my $g = $Groups->Next ) {
+<li><&/Elements/SelectWatcherType, Scope=>'queue', Name =>
+"Queue-AddWatcher-Principal-".$g->PrincipalId &> <%$g->Name%>
+(<%$g->Description%>)
+% }
+</ul>
+% }
+
+</TD>
+</TR>
+</TABLE>
+
+
+
+
+<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), Reset => 1 &>
+</form>
+
+<%INIT>
+
+my $current_tab;
+my ($field, @results, $User, $Users, $Groups, $watcher, $user_msg, $group_msg);
+
+# {{{ Load the queue
+#If we get handed two ids, mason will make them an array. bleck.
+# We want teh first one. Just because there's no other sensible way
+# to deal
+
+
+
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($id) || Abort(loc("Couldn't load queue", $id));
+# }}}
+
+# {{{ Delete deletable watchers
+
+foreach my $key (keys %ARGS) {
+ my $id = $QueueObj->Id;
+
+ if (($key =~ /^Queue-$id-DelWatcher-Type-(.*?)-Principal-(\d*)$/)) {;
+ my ($code, $msg) = $QueueObj->DeleteWatcher(Type => $1,
+ PrincipalId => $2);
+ push @results, $msg;
+ }
+}
+# }}}
+
+# {{{ Add new watchers
+foreach my $key (keys %ARGS) {
+ #They're in this order because otherwise $1 gets clobbered :/
+ if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and
+ ($key =~ /^Queue-AddWatcher-Principal-(\d*)$/) ) {
+ $RT::Logger->debug("Adding a watcher $1 to ".$ARGS{$key}."\n");
+ my ($code, $msg) = $QueueObj->AddWatcher(Type => $ARGS{$key},
+ PrincipalId => $1);
+ push @results, $msg;
+ }
+}
+
+# }}}
+
+
+
+if (!length $ARGS{'UserString'}) {
+$user_msg = loc("No principals selected.");
+ }
+else {
+ $Users = new RT::Users($session{'CurrentUser'});
+ $Users->Limit(FIELD => $ARGS{'UserField'},
+ VALUE => $ARGS{'UserString'},
+ OPERATOR => $ARGS{'UserOp'});
+ }
+
+if (!length $ARGS{'GroupString'}) {
+$group_msg = loc("No principals selected.");
+ }
+else {
+$Groups = new RT::Groups($session{'CurrentUser'});
+$Groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined');
+$Groups->Limit(FIELD => $ARGS{'GroupField'},
+ VALUE => $ARGS{'GroupString'},
+ OPERATOR => $ARGS{'GroupOp'});
+ }
+
+$current_tab = 'Admin/Queues/People.html?id='.$QueueObj->id;
+</%INIT>
+
+<%ARGS>
+$UserField => 'Name'
+$UserOp => '='
+$UserString => undef
+$GroupField => 'Name'
+$GroupOp => '='
+$GroupString => undef
+$Type => undef
+$id => undef
+</%ARGS>
+
diff --git a/rt/html/Admin/Queues/Scrip.html b/rt/html/Admin/Queues/Scrip.html
new file mode 100644
index 0000000..edbfcd6
--- /dev/null
+++ b/rt/html/Admin/Queues/Scrip.html
@@ -0,0 +1,67 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
+ QueueObj => $QueueObj,
+ current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id,
+ current_subtab => $current_subtab,
+ subtabs => $subtabs,
+ Title => $title &>
+
+<& /Admin/Elements/EditScrip, title => $title, %ARGS &>
+<%init>
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($Queue);
+
+my ($title, $current_subtab);
+my $subtabs = {
+ A => { title => loc('Select scrip'),
+ path => "Admin/Queues/Scrips.html?id=".$QueueObj->id,
+ },
+ B => { title => loc('New scrip'),
+ path => "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id,
+ separator => 1,
+ },
+ };
+
+unless($QueueObj->id) {
+ Abort(loc("Queue [_1] not found",$id));
+}
+if ($id) {
+ $current_subtab = "Admin/Queues/Scrip.html?id=".$id."&Queue=".$QueueObj->id;
+ $title = loc("Modify a scrip for queue [_1]", $QueueObj->Name);
+ $subtabs->{"C"} = { title => loc("Scrip #[_1]",$QueueObj->id),
+ path => "Admin/Queues/Scrip.html?id=$id&Queue=".$QueueObj->id };
+} else {
+ $current_subtab = "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id;
+ $title = loc("Create a scrip for queue [_1]", $QueueObj->Name);
+}
+
+
+</%init>
+
+<%ARGS>
+$id => undef
+$Queue => undef
+</%ARGS>
diff --git a/rt/html/Admin/Queues/Scrips.html b/rt/html/Admin/Queues/Scrips.html
new file mode 100644
index 0000000..60b2831
--- /dev/null
+++ b/rt/html/Admin/Queues/Scrips.html
@@ -0,0 +1,63 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
+ QueueObj => $QueueObj,
+ current_tab => 'Admin/Queues/Scrips.html?id='.$id,
+ current_subtab => 'Admin/Queues/Scrips.html?id='.$id,
+ subtabs => $subtabs,
+ Title => $title &>
+
+% if (!$QueueObj->Disabled) { # Global scrips does not apply to disabled queues
+<h2><&|/l&>Scrips which apply to all queues</&></h2>
+<& /Admin/Elements/ListGlobalScrips &>
+<BR>
+% }
+<& /Admin/Elements/EditScrips, title => $title, %ARGS &>
+<%init>
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($id);
+
+my $title;
+
+if ($QueueObj->id) {
+ $title = loc("Modify scrips for queue [_1]", $QueueObj->Name);
+} else {
+ Abort(loc("Queue [_1] not found",$id));
+}
+
+my $subtabs = {
+ A => { title => loc('Select scrip'),
+ path => "Admin/Queues/Scrips.html?id=".$id,
+ },
+ B => { title => loc('New scrip'),
+ path => "Admin/Queues/Scrip.html?create=1&Queue=".$id,
+ separator => 1,
+ }
+ };
+</%init>
+
+<%ARGS>
+$id => undef #some identifier that a Queue could
+</%ARGS>
diff --git a/rt/html/Admin/Queues/Template.html b/rt/html/Admin/Queues/Template.html
new file mode 100644
index 0000000..994de61
--- /dev/null
+++ b/rt/html/Admin/Queues/Template.html
@@ -0,0 +1,101 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/QueueTabs, id => $Queue,
+ QueueObj => $TemplateObj->QueueObj,
+ current_tab => 'Admin/Queues/Templates.html?id='.$Queue,
+ current_subtab => $current_subtab,
+ subtabs => $subtabs,
+ Title => $title &>
+<& /Elements/ListActions, actions => \@results &>
+
+<FORM METHOD=POST ACTION="Template.html">
+%if ($Create ) {
+<INPUT TYPE=HIDDEN NAME="Template" VALUE="new">
+% } else {
+<INPUT TYPE=HIDDEN NAME="Template" VALUE="<%$TemplateObj->Id%>">
+% }
+
+%# hang onto the queue id
+<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
+<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description =>
+$TemplateObj->Description, Content => $TemplateObj->Content &>
+<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+</FORM>
+
+
+<%INIT>
+
+my $TemplateObj = new RT::Template($session{'CurrentUser'});
+my ($title, @results, $current_subtab);
+
+my $subtabs = {
+ A => { title => loc('Select template'),
+ path => "Admin/Queues/Templates.html?id=$Queue"
+ },
+ B => { title => loc('New template'),
+ path => "Admin/Queues/Template.html?Create=1&Queue=$Queue",
+ separator => 1,
+ }
+ };
+
+if ($Create) {
+ $title = loc("Create a template");
+ $current_subtab = "Admin/Queues/Template.html?create=1&Queue=".$Queue;
+}
+
+else {
+ if ($Template eq 'new') {
+ my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name);
+ Abort(loc("Could not create template: [_1]", $msg)) unless ($val);
+ push @results, $msg;
+ }
+ else {
+ $TemplateObj->Load($Template) || Abort(loc('No Template'));
+ }
+ $title = loc('Modify template [_1]', loc($TemplateObj->Name()));
+
+
+}
+if ($TemplateObj->Id()) {
+ $Queue = $TemplateObj->Queue;
+
+ my @attribs = qw( Description Content Queue Name);
+ my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
+ Object => $TemplateObj,
+ ARGSRef => \%ARGS);
+ $current_subtab = "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id();
+ $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()),
+ path => "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id(),
+ };
+ push @results, @aresults;
+}
+
+</%INIT>
+<%ARGS>
+$Queue => undef
+$Template => undef
+$Create => undef
+$Name => undef
+</%ARGS>
diff --git a/rt/html/Admin/Queues/Templates.html b/rt/html/Admin/Queues/Templates.html
new file mode 100644
index 0000000..98bdf24
--- /dev/null
+++ b/rt/html/Admin/Queues/Templates.html
@@ -0,0 +1,57 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
+ current_tab => 'Admin/Queues/Templates.html?id='.$id,
+ current_subtab => 'Admin/Queues/Templates.html?id='.$id,
+ QueueObj => $QueueObj,
+ subtabs => $subtabs,
+ Title => $title &>
+
+<& /Admin/Elements/EditTemplates, title => $title, %ARGS &>
+
+<%INIT>
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($id);
+
+my ($title, $current_subtab);
+
+if ($QueueObj->id) {
+ $title = loc("Edit Templates for queue [_1]", $QueueObj->Name);
+} else {
+ Abort(loc("Queue [_1] not found",$id));
+}
+my $subtabs = {
+ A => { title => loc('Select template'),
+ path => "Admin/Queues/Templates.html?id=".$id,
+ },
+ B => { title => loc('New template'),
+ path => "Admin/Queues/Template.html?Create=1&Queue=".$id,
+ }
+ };
+
+</%INIT>
+<%ARGS>
+$id => undef #some identifier that a Queue could
+</%ARGS>
diff --git a/rt/html/Admin/Queues/UserRights.html b/rt/html/Admin/Queues/UserRights.html
new file mode 100644
index 0000000..aeb55c7
--- /dev/null
+++ b/rt/html/Admin/Queues/UserRights.html
@@ -0,0 +1,90 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
+<& /Admin/Elements/QueueTabs, id => $id,
+ QueueObj => $QueueObj,
+ current_tab => $current_tab,
+ Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
+<& /Elements/ListActions, actions => \@results &>
+
+ <FORM METHOD=POST ACTION="UserRights.html">
+ <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
+
+
+<TABLE>
+<& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
+% while (my $Member = $Users->Next()) {
+% my $UserObj = $Member->MemberObj->Object();
+% my $group = RT::Group->new($session{'CurrentUser'});
+% $group->LoadACLEquivalenceGroup($Member->MemberObj);
+ <TR ALIGN=RIGHT>
+ <TD VALIGN=TOP>
+ <% $UserObj->Name %>
+ </TD>
+ <TD>
+ <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId,
+ Object => $QueueObj &>
+ </TD>
+ </TR>
+% }
+ </TABLE>
+
+ <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+
+ </FORM>
+
+<%INIT>
+
+ #Update the acls.
+ my @results = ProcessACLChanges(\%ARGS);
+
+# {{{ Deal with setting up the display of current rights.
+
+
+
+if (!defined $id) {
+ Abort(loc("No Queue defined"));
+}
+
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+$QueueObj->Load($id) || Abort(loc("Couldn't load queue [_1]",$id));
+
+# Find out which users we want to display ACL selects for
+my $Privileged = RT::Group->new($session{'CurrentUser'});
+$Privileged->LoadSystemInternalGroup('Privileged');
+my $Users = $Privileged->MembersObj();
+
+
+
+# }}}
+my $current_tab;
+$current_tab = 'Admin/Queues/UserRights.html?id='.$QueueObj->id;
+</%INIT>
+
+<%ARGS>
+$id => undef
+$UserString => undef
+$UserOp => undef
+$UserField => undef
+</%ARGS>
diff --git a/rt/html/Admin/Queues/index.html b/rt/html/Admin/Queues/index.html
new file mode 100644
index 0000000..f733c25
--- /dev/null
+++ b/rt/html/Admin/Queues/index.html
@@ -0,0 +1,61 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Admin/Elements/Header, Title => loc("Admin queues") &>
+<& /Admin/Elements/QueueTabs, current_tab => 'Admin/Queues/',
+ current_subtab => 'Admin/Queues/',
+ Title => loc("Admin queues") &>
+
+
+
+<%$caption%>:<BR>
+<UL>
+%if ($queues->Count == 0) {
+<LI> <i><&|/l&>No queues matching search criteria found.</&></i>
+% }
+%while ( $queue = $queues->Next) {
+<LI><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></LI>
+%}
+</UL>
+<BR>
+<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/">
+<input type="checkbox" name="FindDisabledQueues"> <&|/l&>Include disabled queues in listing.</&>
+<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
+</FORM>
+
+<%INIT>
+my ($queue, $caption);
+my $queues = new RT::Queues($session{'CurrentUser'});
+$queues->UnLimit();
+
+if ($FindDisabledQueues) {
+ $caption = loc("All Queues");
+ $queues->{'find_disabled_rows'} = 1;
+} else {
+ $caption = loc("Enabled Queues");
+}
+
+</%INIT>
+<%ARGS>
+$FindDisabledQueues => 0
+</%ARGS>