From ded0451e9582df33cae6099a2fb72b4ea25076cf Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Jul 2003 13:30:43 +0000 Subject: reverting to vendor branch rt 3.0.4, hopefully --- rt/webrt/Admin/Queues/Create.html | 13 --- rt/webrt/Admin/Queues/GroupRights.html | 103 --------------------- rt/webrt/Admin/Queues/Keywords.html | 114 ----------------------- rt/webrt/Admin/Queues/Modify.html | 137 ---------------------------- rt/webrt/Admin/Queues/People.html | 161 --------------------------------- rt/webrt/Admin/Queues/Scrips.html | 111 ----------------------- rt/webrt/Admin/Queues/Template.html | 68 -------------- rt/webrt/Admin/Queues/Templates.html | 24 ----- rt/webrt/Admin/Queues/UserRights.html | 72 --------------- rt/webrt/Admin/Queues/index.html | 52 ----------- 10 files changed, 855 deletions(-) delete mode 100755 rt/webrt/Admin/Queues/Create.html delete mode 100755 rt/webrt/Admin/Queues/GroupRights.html delete mode 100644 rt/webrt/Admin/Queues/Keywords.html delete mode 100755 rt/webrt/Admin/Queues/Modify.html delete mode 100755 rt/webrt/Admin/Queues/People.html delete mode 100755 rt/webrt/Admin/Queues/Scrips.html delete mode 100755 rt/webrt/Admin/Queues/Template.html delete mode 100755 rt/webrt/Admin/Queues/Templates.html delete mode 100755 rt/webrt/Admin/Queues/UserRights.html delete mode 100755 rt/webrt/Admin/Queues/index.html (limited to 'rt/webrt/Admin/Queues') diff --git a/rt/webrt/Admin/Queues/Create.html b/rt/webrt/Admin/Queues/Create.html deleted file mode 100755 index b39d6590c..000000000 --- a/rt/webrt/Admin/Queues/Create.html +++ /dev/null @@ -1,13 +0,0 @@ -<& /Admin/Elements/Header, Title => 'Create a queue' &> -

Create a queue

- -<& /Admin/Elements/ModifyQueue, QueueObj => $QueueObj &> - -<%INIT> -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Create(Name => "$Name"); - - -<%ARGS> -$Name => undef - diff --git a/rt/webrt/Admin/Queues/GroupRights.html b/rt/webrt/Admin/Queues/GroupRights.html deleted file mode 100755 index a2c669083..000000000 --- a/rt/webrt/Admin/Queues/GroupRights.html +++ /dev/null @@ -1,103 +0,0 @@ -<& /Admin/Elements/Header, Title => 'Modify group rights for queue '. $QueueObj->Name &> -<& /Admin/Elements/QueueTabs, id => $id &> -<& /Elements/ListActions, actions => \@results &> - -
- - - - -<& /Elements/TitleBoxStart, title => 'Modify group rights for queue '.$QueueObj->Name &> - - - -% while (my $GroupObj = $PseudoGroups->Next()) { - - - - - - -% } - - - -% while (my $GroupObj = $Groups->Next()) { - - - - - - -% } - -
Pseudogroups
- <% $GroupObj->Name %> - - <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj, - PrincipalType => 'Group', - QueueObj => $QueueObj, - Scope => 'Queue' &> - -
Groups
- <% $GroupObj->Name %> - - <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj, - PrincipalType => 'Group', - QueueObj => $QueueObj, - Scope => 'Queue' &> - -
- - <& /Elements/TitleBoxEnd &> - <& /Elements/Submit, Caption => "Be sure to save your changes", Reset => 1 &> -
- -<%INIT> - -#Update the acls. -my @results = ProcessACLChanges(\@CheckACL, \%ARGS); - -# {{{ Deal with setting up the display of current rights. - -# {{{ do basic initialization. - -#Define vars used in html above -my ($GroupObj); - -my ($right); - - -if (!defined $id) { - Abort("No Queue defined"); -} - -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($id) || - Abort("Couldn't load queue $id"); - - # Find out which groups we want to display ACL selects for. - my $Groups = new RT::Groups($session{'CurrentUser'}); - #TODO: limit this to non-pseudogroups - $Groups->LimitToReal(); - - - my $PseudoGroups = new RT::Groups($session{'CurrentUser'}); - #TODO: limit this to non-pseudogroups - $PseudoGroups->LimitToPseudo; - - -# }}} - - - # }}} - - - -<%ARGS> -$id => undef -$UserString => undef -$UserOp => undef -$UserField => undef -@CheckACL => undef - diff --git a/rt/webrt/Admin/Queues/Keywords.html b/rt/webrt/Admin/Queues/Keywords.html deleted file mode 100644 index 7809805c5..000000000 --- a/rt/webrt/Admin/Queues/Keywords.html +++ /dev/null @@ -1,114 +0,0 @@ -<& /Admin/Elements/Header, Title => 'Edit keywords' &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->Id &> - -<& /Elements/ListActions, actions => \@actions &> - -<& /Elements/TitleBoxStart, title => $description &> - -

Global Keyword Selections

-<& /Admin/Elements/ListGlobalKeywordSelects &> -
- -
- - -% if ($KeywordSelects->Count > 0 ) { - - -

Queue Keyword Selections

- - -% while (my $keywordselect = $KeywordSelects->Next ) { - - - - -% } -
Delete
<& /Admin/Elements/SelectKeywordSelect, KeywordSelect => $keywordselect &>
-% } - -Add a keyword selection to this queue: -%my $ks = new RT::KeywordSelect($session{'CurrentUser'}); - - -<& /Elements/TitleBoxEnd &> -<& /Elements/Submit &> - -
-<%init> -my (@actions); - - - -my $KeywordSelects = new RT::KeywordSelects ($session{'CurrentUser'}); -unless ($id =~ /^\d+$/) { - Abort("$id isn't a valid Queue id."); -} - -unless ($KeywordSelects->LimitToQueue($id)) { - Abort("Couldn't load KeywordSelects."); -} - -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($id); - -my $description = "Modify Keyword selections for queue '". $QueueObj->Name ."'"; - - - -# {{{ if we're trying to create a new keyword select - -if ($ARGS{'KeywordSelect-new-Name'}) { - my $NewKeywordSelect = new RT::KeywordSelect($session{'CurrentUser'}); - - my ($retval, $msg) = $NewKeywordSelect->Create ( Keyword => $ARGS{'KeywordSelect-new-Keyword'}, - ObjectField => 'Queue', - ObjectType => 'Ticket', - ObjectValue => $QueueObj->Id, - Name => $ARGS{'KeywordSelect-new-Name'}, - Single => $ARGS{'KeywordSelect-new-Single'}, - Depth => $ARGS{'KeywordSelect-new-Depth'} - ); - push (@actions, $msg); -} -# }}} -# {{{ if we're trying to delete the keywordselect -foreach my $key (keys %ARGS) { - if ($key =~ /^KeywordSelect-(\d+)-Delete$/) { - my $id = $1; - my $keywordselect = new RT::KeywordSelect($session{'CurrentUser'}); - $keywordselect->Load($id) || push @actions, "Couldn't load keywordSelect"; - my ($val, $msg) = $keywordselect->SetDisabled(1); - if ($val) { - push @actions, 'KeywordSelect disabled.'; - } - else { - push @actions, $msg; - } - } -} -# }}} -# {{{ if we're modifying keyword selects -my @fields = qw(Name Keyword Single Depth); - -while (my $ks = $KeywordSelects->Next) { - foreach my $field (@fields) { - if (defined ($ARGS{"KeywordSelect-".$ks->Id."-".$field}) && - ($ARGS{"KeywordSelect-".$ks->Id."-".$field} ne $ks->$field())) { - - my $method = "Set$field"; - my ($val, $msg) = $ks->$method($ARGS{"KeywordSelect-".$ks->Id."-".$field}); - push @actions, "Keyword Select ". $ks->Name."/$field:".$msg; - } - } -} -# }}} - - - -<%ARGS> -$id => undef #some identifier that a Queue could - - diff --git a/rt/webrt/Admin/Queues/Modify.html b/rt/webrt/Admin/Queues/Modify.html deleted file mode 100755 index 7a200df92..000000000 --- a/rt/webrt/Admin/Queues/Modify.html +++ /dev/null @@ -1,137 +0,0 @@ -<& /Admin/Elements/Header, Title => 'Admin/Queue/Basics' &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->id &> -<& /Elements/ListActions, actions => \@results &> - - - -<& /Elements/TitleBoxStart, title => $title &> - - -
-%if ($Create ) { - -% } else { - -% } - - - - - - - - - - - - - - - - - - - - - - -
-Queue Name: -
-Description:
-Correspondence Address: - - -
(If left blank, will default to <%$RT::CorrespondAddress%> -
- -Comment Address: - -
(If left blank, will default to <%$RT::CommentAddress%> -
-Priority starts at: - - -Over time, priority moves toward: - -
-Requests should be due in: - - days. -
- -> Enabled (Unchecking this box disables this queue)
-
-<& /Elements/TitleBoxEnd &> -<& /Elements/Submit &> -
- - - -<%INIT> - -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -my ($title, @results, $Disabled, $EnabledChecked); - -if ($Create) { - $title = "Create a queue"; -} - -else { - if ($id eq 'new') { - my ($val, $msg) = $QueueObj->Create(Name => $Name); - if ($val == 0 ) { - Abort("Could not create queue: $msg"); - } - else { - push @results, $msg; - } - } - else { - $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort("Couldn't load queue '$Name'"); - } - $title = 'Editing Configuration for queue '.$QueueObj->Name; - -} -if ($QueueObj->Id()) { -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, 'Enabled status '. $msg; -} - -unless ($QueueObj->Disabled()) { - $EnabledChecked ="CHECKED"; -} - - - -<%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 - diff --git a/rt/webrt/Admin/Queues/People.html b/rt/webrt/Admin/Queues/People.html deleted file mode 100755 index b495400ed..000000000 --- a/rt/webrt/Admin/Queues/People.html +++ /dev/null @@ -1,161 +0,0 @@ -<& /Elements/Header, Title => 'Modify people related to queue ' . $QueueObj->Name &> -<& /Admin/Elements/QueueTabs, id => $id &> - -<& /Elements/ListActions, actions => \@results &> - - -
- -<& /Elements/TitleBoxStart, title => 'Modify watchers for queue \''.$QueueObj->Name ."'", width => "100%" &> - - - - - - - -
- -

Current watchers

-(Check box to delete)

- - -Cc: - -
    - -%# Print out a placeholder if there are none. -%if ($cc->Count == 0 ) { -
  • none -% } - -%while (my $watcher=$cc->Next) { -
  • - -%# account -%if ($watcher->IsUser) { - -<%$watcher->OwnerObj->RealName%>: -%} else { -Email address: -%} -<%$watcher->Email%> -%} -
- - -Administrative Cc: -
    -%# Print out a placeholder if there are none. -%if ($admincc->Count == 0 ) { -
  • none -% } - -%while (my $watcher=$admincc->Next) { -
  • -%# account -%if ($watcher->IsUser) { - -<%$watcher->OwnerObj->RealName%>: -%} else { -Email address: -%} -<%$watcher->Email%> -%} -
-
-

New watchers

-Find people whose
-<& /Elements/SelectUsers &> - -
-Add new watchers:
- -% if ($msg) { -<%$msg%> -% } elsif ($Users) { -
    -% while (my $u = $Users->Next ) { -
  • <&/Elements/SelectWatcherType, Scope=>'queue', Name => "WatcherTypeUser".$u->Id &> <%$u->Name%> -(<%$u->RealName%>) -% } -
-% } - -
- - - - - -<& /Elements/TitleBoxEnd &> -<& /Elements/Submit, Label => 'Save Changes', Caption => "If you've updated anything above, be sure to" &> -
- -<%INIT> - -my ($field, @results, $User, $Users, $watcher, $key, $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("Couldn't load queue '$id'"); -# }}} - -# {{{ Delete deletable watchers - -foreach $key (keys %ARGS) { - if (($key =~ /^DelWatcher(\d*)$/) and - ($ARGS{$key})) { - $RT::Logger->debug("Deleting watcher $1\n"); - my ($code, $msg) = $QueueObj->DeleteWatcher($1); - - push @results, $msg; - } -} -# }}} - -# {{{ Add new watchers -foreach $key (keys %ARGS) { - #They're in this order because otherwise $1 gets clobbered :/ - if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and - ($key =~ /^WatcherTypeUser(\d*)$/) ) { - $RT::Logger->debug("Adding a watcher $1 to ".$ARGS{$key}."\n"); - my ($code, $msg) = - $QueueObj->AddWatcher(Type => $ARGS{$key}, - Owner => $1); - push @results, $msg; - } -} - -# }}} - - - -my $admincc = $QueueObj->AdminCc; -my $cc = $QueueObj->Cc; - - -if (!$ARGS{'UserString'}) { -$msg = "No users selected."; - } -else { - $Users = new RT::Users($session{'CurrentUser'}); - $Users->Limit(FIELD => $ARGS{'UserField'}, - VALUE => $ARGS{'UserString'}, - OPERATOR => $ARGS{'UserOp'}); - } - - -<%ARGS> -$UserField => 'Name' -$UserOp => '=' -$UserString => undef -$Type => undef -$id => undef - - diff --git a/rt/webrt/Admin/Queues/Scrips.html b/rt/webrt/Admin/Queues/Scrips.html deleted file mode 100755 index 95b8c4378..000000000 --- a/rt/webrt/Admin/Queues/Scrips.html +++ /dev/null @@ -1,111 +0,0 @@ -<& /Admin/Elements/Header, Title => 'Edit scrips' &> -<& /Admin/Elements/QueueTabs, id => $QueueObj->Id &> - -<& /Elements/ListActions, actions => \@actions &> - -<& /Elements/TitleBoxStart, title => $description &> - -

Global Scrips

-<& /Admin/Elements/ListGlobalScrips &> -
-
- > -

Queue Scrips

-% if ($Scrips->Count > 0 ) { - - - - -% while (my $scrip = $Scrips->Next ) { - - - - -% } -
Delete - -
- - -<% $scrip->ConditionObj->Name %> -<% $scrip->ActionObj->Name %> with template -<% $scrip->TemplateObj->Name %> -
-% } -
-

Add a scrip to this queue

-Condition: <& /Admin/Elements/SelectScripCondition, Name => 'NewScripCondition' &> - Action: <& /Admin/Elements/SelectScripAction, Name => 'NewScripAction' &> - Template: <& /Admin/Elements/SelectTemplate, Name => 'NewScripTemplate', DefaultQueue => $id &> - -<& /Elements/TitleBoxEnd &> -<& /Elements/Submit &> -
-<%init> -my (@actions, $description); - -my $Scrips = new RT::Scrips ($session{'CurrentUser'}); -unless ($id =~ /^\d+$/) { - Abort("$id isn't a valid Queue id."); -} - -unless ($Scrips->LimitToQueue($id)) { - Abort("Couldn't load Scrips."); - } - -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($id); - -if ($QueueObj->id) { - $description = "Modify scrips for queue '". $QueueObj->Name ."'"; -} -else { - $description = "Modify global scrips"; -} - - -if ($NewScripAction and $NewScripCondition) { - my $NewScrip = new RT::Scrip($session{'CurrentUser'}); - - my ($retval, $msg) = $NewScrip->Create ( ScripAction => $NewScripAction, - ScripCondition => $NewScripCondition, - Stage => 'TransactionCreate', - Queue => $id, - Template => $NewScripTemplate); - if (defined $retval) { - push @actions, $msg; - } - else { - push @actions, $msg; - } -} - -# {{{ deal with modifying and deleting existing scrips -my ($key ); -foreach $key (keys %ARGS) { - # {{{ if we're trying to delete the scrip - if ($key =~ /^DeleteScrip-(\d+)/) { - my $id = $1; - my $scrip = new RT::Scrip($session{'CurrentUser'}); - $scrip->Load($id); - my ($retval, $msg) = $scrip->Delete; - if ($retval) { - push @actions, 'Scrip deleted'; - } - else { - push @actions, $msg; - } - } - # }}} - - -} -# }}} - - -<%ARGS> -$NewScripCondition => undef -$NewScripAction => undef -$NewScripTemplate => undef -$id => undef #some identifier that a Queue could - diff --git a/rt/webrt/Admin/Queues/Template.html b/rt/webrt/Admin/Queues/Template.html deleted file mode 100755 index 61ee418a6..000000000 --- a/rt/webrt/Admin/Queues/Template.html +++ /dev/null @@ -1,68 +0,0 @@ -<& /Admin/Elements/Header, title => "Modify template ".$TemplateObj->id&> -<& /Admin/Elements/QueueTabs, id => $Queue &> -<& /Elements/ListActions, actions => \@results &> - -<& /Elements/TitleBoxStart, title => $title &> - -
-%if ($create ) { - -% } else { - -% } - -%# hang onto the queue id - - - -Name:
-Description:
- - - -<& /Elements/TitleBoxEnd&> -<&/Elements/Submit&> -
- - - -<%INIT> - -my $TemplateObj = new RT::Template($session{'CurrentUser'}); -my ($title, @results); - -if ($create) { - $title = "Create a template"; -} - -else { - if ($template eq 'new') { - my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name); - Abort("Could not create template: $msg") unless ($val); - push @results, $msg; - $title = 'Created template ' . $TemplateObj->Name(); - } - else { - $TemplateObj->Load($template) || Abort('No Template'); - $title = 'Editing template ' . $TemplateObj->Name(); - } - - -} -if ($TemplateObj->Id()) { - $Queue = $TemplateObj->Queue; - - my @attribs = qw( Description Content Queue Name); - my @aresults = UpdateRecordObject( AttributesRef => \@attribs, - Object => $TemplateObj, - ARGSRef => \%ARGS); - push @results, @aresults; -} - -<%ARGS> -$Queue => undef -$template => undef -$create => undef -$Name => undef - diff --git a/rt/webrt/Admin/Queues/Templates.html b/rt/webrt/Admin/Queues/Templates.html deleted file mode 100755 index 218d41dc9..000000000 --- a/rt/webrt/Admin/Queues/Templates.html +++ /dev/null @@ -1,24 +0,0 @@ -<& /Admin/Elements/Header, Title => 'Edit templates for '.$Queue->Name &> -<& /Admin/Elements/QueueTabs, id => $Queue->id &> - -<& /Elements/TitleBoxStart, title => 'Edit templates for '.$Queue->Name &> -