From 160be29a0dc62e79a4fb95d2ab8c0c7e5996760e Mon Sep 17 00:00:00 2001 From: cvs2git Date: Mon, 12 Aug 2002 06:17:10 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'BESTPRACTICAL'. --- rt/webrt/SelfService/Attachment/dhandler | 27 ----- rt/webrt/SelfService/Closed.html | 4 - rt/webrt/SelfService/Create.html | 63 ---------- rt/webrt/SelfService/Display.html | 190 ------------------------------- rt/webrt/SelfService/Elements/GotoTicket | 1 - rt/webrt/SelfService/Elements/Header | 55 --------- rt/webrt/SelfService/Elements/MyRequests | 41 ------- rt/webrt/SelfService/Elements/Tabs | 49 -------- rt/webrt/SelfService/Error.html | 22 ---- rt/webrt/SelfService/Prefs.html | 51 --------- rt/webrt/SelfService/Update.html | 40 ------- rt/webrt/SelfService/index.html | 3 - 12 files changed, 546 deletions(-) delete mode 100644 rt/webrt/SelfService/Attachment/dhandler delete mode 100644 rt/webrt/SelfService/Closed.html delete mode 100755 rt/webrt/SelfService/Create.html delete mode 100755 rt/webrt/SelfService/Display.html delete mode 100755 rt/webrt/SelfService/Elements/GotoTicket delete mode 100755 rt/webrt/SelfService/Elements/Header delete mode 100644 rt/webrt/SelfService/Elements/MyRequests delete mode 100644 rt/webrt/SelfService/Elements/Tabs delete mode 100755 rt/webrt/SelfService/Error.html delete mode 100755 rt/webrt/SelfService/Prefs.html delete mode 100755 rt/webrt/SelfService/Update.html delete mode 100644 rt/webrt/SelfService/index.html (limited to 'rt/webrt/SelfService') diff --git a/rt/webrt/SelfService/Attachment/dhandler b/rt/webrt/SelfService/Attachment/dhandler deleted file mode 100644 index 0d646cc0b..000000000 --- a/rt/webrt/SelfService/Attachment/dhandler +++ /dev/null @@ -1,27 +0,0 @@ -<%perl> - my ($ticket, $trans,$attach, $filename); - my $arg = $m->dhandler_arg; # get rest of path - if ($arg =~ '^(\d+)/(\d+)') { - $trans = $1; - $attach = $2; - } - else { - Abort("Corrupted attachment URL."); - } - my $AttachmentObj = new RT::Attachment($session{'CurrentUser'}); - $AttachmentObj->Load($attach) || Abort("Attachment '$attach' could not be loaded"); - - - unless ($AttachmentObj->id) { - Abort("Bad attachment id. Couldn't find attachment '$attach'\n"); - } - unless ($AttachmentObj->TransactionId() == $trans ) { - Abort("Bad transaction number for attachment. $trans should be".$AttachmentObj->TransactionId() ."\n"); - - } - my $content_type = $AttachmentObj->ContentType || 'text/plain'; - SetContentType($content_type); - $m->out($AttachmentObj->Content); - $m->abort; - - diff --git a/rt/webrt/SelfService/Closed.html b/rt/webrt/SelfService/Closed.html deleted file mode 100644 index a35936092..000000000 --- a/rt/webrt/SelfService/Closed.html +++ /dev/null @@ -1,4 +0,0 @@ -<& /SelfService/Elements/Header, title => 'RT Self Service / Closed Tickets' &> - -<& /SelfService/Elements/MyRequests, status => ['resolved'], friendly_status => -'closed' &> diff --git a/rt/webrt/SelfService/Create.html b/rt/webrt/SelfService/Create.html deleted file mode 100755 index 60110cb5a..000000000 --- a/rt/webrt/SelfService/Create.html +++ /dev/null @@ -1,63 +0,0 @@ -%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/SelfService/Attic/Create.html,v 1.1 2002-08-12 06:17:09 ivan Exp $ -%# Copyright 1996-2001 Jesse Vincent - -<& Elements/Header, Title => "Create a request" &> - - -
- -<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => "Create a new ticket" &> - - - - - - - - - - - - - - - - - - - - - - - - - -
-Queue: - -<& /Elements/SelectNewTicketQueue, Verbose => 'True' &> -
-Requestors: - - -
-Cc: - - -
-Subject: - - -
-Attach file: - - -
-Describe the issue below:
-<& /Elements/MessageBox &> -
-<& /Elements/TitleBoxEnd &> -<& /Elements/Submit, Label => "Create ticket"&> - - -
diff --git a/rt/webrt/SelfService/Display.html b/rt/webrt/SelfService/Display.html deleted file mode 100755 index 2d44f148e..000000000 --- a/rt/webrt/SelfService/Display.html +++ /dev/null @@ -1,190 +0,0 @@ -%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/SelfService/Attic/Display.html,v 1.1 2002-08-12 06:17:09 ivan Exp $ -%# Copyright 1996-2001 Jesse Vincent - -<& /SelfService/Elements/Header, Title => 'Display ticket #'.$Ticket->id &> - - -<& /Elements/ListActions, actions => \@results &> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -% if ($Ticket->TimeWorked) { - - - - -% } - -% my $selects = $Ticket->QueueObj->KeywordSelects; -% while (my $select = $selects->Next) { - - - - - - - - -
- Ticket Id - - <%$Ticket->Id%> -
- Requestors - - <%$Ticket->RequestorsAsString%> -
- Cc - - <%$Ticket->CcAsString%> -
- Status - - <%$Ticket->Status%> -
- Queue - - <%$Ticket->QueueObj->Name%> (<%$Ticket->QueueObj->Description%>) -
- Priority - - <%$Ticket->Priority %> -
- Worked - - <%$Ticket->TimeWorked %> minutes -
- <%$select->Name%> - -% my $object_keywords = $Ticket->KeywordsObj($select->id); -% while (my $keyword = $object_keywords->Next) { - <%$keyword->KeywordObj->RelativePath($select->KeywordObj)%> -% } -%} -
- -% my ($i); -%while (my $Transaction = $Transactions->Next) { -% $i++; -% if ($Transactions->IsLast) { - -% } - <& /Ticket/Elements/ShowTransaction, Transaction => $Transaction, - RowNum => $i, - Ticket => $Ticket &> - -%} -
- - -<%INIT> - -my ($field, @results); - -# {{{ Load the ticket -#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 @id = (ref $id eq 'ARRAY') ? @{$id} : ($id); - - -my $Ticket = new RT::Ticket($session{'CurrentUser'}); -if ($id[0] eq 'new') { - # {{{ Create a new ticket - - my $Queue = new RT::Queue($session{'CurrentUser'}); - unless ($Queue->Load($ARGS{'Queue'})) { - $m->comp('Error.html', Why => 'Queue not found'); - $m->abort; - } - - unless ($Queue->CurrentUserHasRight('CreateTicket')) { - $m->comp('Error.html', Why => 'You have no permission to create tickets in that queue.'); - $m->abort; - } - - my @Requestors = split(/,/,$ARGS{'Requestors'}); - my @Cc = split(/,/,$ARGS{'Cc'}); - - - my $MIMEObj = MakeMIMEEntity ( Subject => $ARGS{'Subject'}, - From => $ARGS{'From'}, - Cc => $ARGS{'Cc'}, - Body => $ARGS{'Content'}, - AttachmentFieldName => 'Attach'); - - #TODO in Create_Details.html: priorities and due-date - my ($id, $Trans, $ErrMsg)= $Ticket->Create(Queue=>$ARGS{Queue}, - Requestor=> \@Requestors, - Cc => \@Cc, - Subject=>$ARGS{Subject}, - MIMEObj => $MIMEObj - ); - unless ($id && $Trans) { - $m->comp('Error.html', Why => $ErrMsg); - $m->abort(); - } - - push(@results, $ErrMsg); - - # }}} -} -else { - unless ($Ticket->Load($id[0])) { - $m->comp('Error.html', Why =>"Couldn't load ticket '$id'"); - $m->abort(); - } -} -# }}} - -unless ($session{'CurrentUser'}->HasQueueRight ( TicketObj => $Ticket, - Right => 'ShowTicket')) { - $m->comp('Error.html', Why => "No permission to display that ticket"); - $m->abort(); -} - -my ($code, $msg); - -#Update the status -if ((defined $ARGS{'Status'}) and - ($ARGS{'Status'} ne $Ticket->Status)) { - ($code, $msg) = $Ticket->SetStatus($ARGS{'Status'}); - push @results, "$msg"; -} - -ProcessUpdateMessage(ARGSRef=>\%ARGS, Actions=>\@results, TicketObj=>$Ticket); - -my $Transactions = $Ticket->Transactions; - - - - -<%ARGS> -$id => undef - diff --git a/rt/webrt/SelfService/Elements/GotoTicket b/rt/webrt/SelfService/Elements/GotoTicket deleted file mode 100755 index 0c0c8b67a..000000000 --- a/rt/webrt/SelfService/Elements/GotoTicket +++ /dev/null @@ -1 +0,0 @@ -
 
diff --git a/rt/webrt/SelfService/Elements/Header b/rt/webrt/SelfService/Elements/Header deleted file mode 100755 index ecf58f461..000000000 --- a/rt/webrt/SelfService/Elements/Header +++ /dev/null @@ -1,55 +0,0 @@ - - - -<%$Title%> -% if ($Code) { - -% } - - - - - - - - - - -
- RT - - - -<%$Title%> - - - - -% if ($session{'CurrentUser'} ) { -Signed in as <%$session{'CurrentUser'}->Name%>.
-% if ($session{'CurrentUser'}->HasSystemRight('ModifySelf')) { -[Preferences] -% } -% unless ($RT::WebExternalAuth) { - [Logout] -% } -% } else { -Not logged in. -% } -
-
- -
-<& /SelfService/Elements/Tabs &> - -<%ARGS> -$Title => '' -$Code => undef -$Why => undef -$BgColor => '#ffffff' - -<%INIT> -$Title = "RT/$RT::rtname: ".$Title; - - diff --git a/rt/webrt/SelfService/Elements/MyRequests b/rt/webrt/SelfService/Elements/MyRequests deleted file mode 100644 index ce268d58d..000000000 --- a/rt/webrt/SelfService/Elements/MyRequests +++ /dev/null @@ -1,41 +0,0 @@ -<& /Elements/TitleBoxStart, title => "Your $friendly_status requests" &> - - - - - - - - -% while (my $Ticket = $MyTickets->Next) { - - - - -% } -
SubjectStatusOwner 
-<%$Ticket->Id%>: <%$Ticket->Subject%> - -<%$Ticket->Status%> - -<%$Ticket->OwnerObj->Name%> - -[Details] -
-<& /Elements/TitleBoxEnd &> - - -<%INIT> -my $MyTickets; -$MyTickets = new RT::Tickets ($session{'CurrentUser'}); -$MyTickets->LimitRequestor(VALUE => $session{'CurrentUser'}->EmailAddress); - -foreach my $status (@status) { - - $MyTickets->LimitStatus(VALUE => $status); -} - -<%ARGS> -$friendly_status => 'open' -@status => ('open', 'new', 'stalled') - diff --git a/rt/webrt/SelfService/Elements/Tabs b/rt/webrt/SelfService/Elements/Tabs deleted file mode 100644 index d689d8a72..000000000 --- a/rt/webrt/SelfService/Elements/Tabs +++ /dev/null @@ -1,49 +0,0 @@ - - -% foreach $tab (sort keys %{$tabs}) { - -%} - -% if ($actions) { - - -%} - -
-[{'path'}%>"><% $tabs->{"$tab"}->{'title'}%>] - - -% foreach my $action (sort keys %{$actions}) { - -% } - -
- -% if ($actions->{"$action"}->{'html'}) { -<%$actions->{"$action"}->{'html'} |n%> -% } else { -<% $actions->{$action}->{'title'}%> -% } - -
-
-
-<%INIT> -my ($tab); -my $tabs = { A => { title => 'Open requests', - path => 'SelfService/', - }, - B => { title => 'Closed requests', - path => 'SelfService/Closed.html', - }, - C => { title => 'New request', - path => 'SelfService/Create.html' - } - }; -my $actions = { - B => { html => $m->scomp('GotoTicket') - } - }; - - - diff --git a/rt/webrt/SelfService/Error.html b/rt/webrt/SelfService/Error.html deleted file mode 100755 index 19b79e68b..000000000 --- a/rt/webrt/SelfService/Error.html +++ /dev/null @@ -1,22 +0,0 @@ -<& /SelfService/Elements/Header, Title => 'Error' &> -<& /Elements/TitleBoxStart, title => $Title &> -<%$Why%> -
- -<%$Details%> - -<& /Elements/TitleBoxEnd &> - - - - -<%args> -$Code => undef -$Details => undef -$Title => "RT Error" -$Why => "the calling component did not specify why" - - -<%INIT> -$RT::Logger->error("WebRT: $Why ($Details)"); - diff --git a/rt/webrt/SelfService/Prefs.html b/rt/webrt/SelfService/Prefs.html deleted file mode 100755 index 9c614e9fd..000000000 --- a/rt/webrt/SelfService/Prefs.html +++ /dev/null @@ -1,51 +0,0 @@ -<& /SelfService/Elements/Header, title => 'Preferences' &> - -<& /Elements/ListActions, actions => \@results &> -
- -% unless ($RT::WebExternalAuth) { -<& /Elements/TitleBoxStart, title => 'Change password' &> -New password: -Confirm: -<& /Elements/TitleBoxEnd &> -
-% } -<& /Elements/TitleBoxStart, title => 'Signature' &> - - -
-
-<& /Elements/TitleBoxEnd &> -<& /Elements/Submit &> -
- - -<%INIT> -my @results; - -if ($NewPass1) { - if ($NewPass1 ne $NewPass2) { - push (@results, "Passwords did not match."); - } - else { - my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetPassword($NewPass1); - push (@results, "Password: ".$msg); - } -} -if ($Signature) { - $Signature =~ s/(\r\n|\r)/\n/g; - if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) { - my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature($Signature); - push (@results, "Signature: ".$msg); - } -} -#A hack to make sure that session gets rewritten. - -$session{'i'}++; - - -<%ARGS> -$Signature => undef -$NewPass1 => undef -$NewPass2 => undef - diff --git a/rt/webrt/SelfService/Update.html b/rt/webrt/SelfService/Update.html deleted file mode 100755 index 17f1618a3..000000000 --- a/rt/webrt/SelfService/Update.html +++ /dev/null @@ -1,40 +0,0 @@ -<& /SelfService/Elements/Header, Title => 'Update ticket #'.$Ticket->id &> - - -
- -Status: -<& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &> - - -Subject:
-Attach:
-<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &> -
- - -<& /Elements/Submit &> -
- - - -<%INIT> - -my $Ticket = LoadTicket($id); - -my $title = "Update ticket #" . $Ticket->id; - -$DefaultStatus = $Ticket->Status() unless ($DefaultStatus); - - -Abort("No permission to view update ticket") - unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') or - $Ticket->CurrentUserHasRight('ModifyTicket') ); - - - -<%ARGS> -$id => undef -$Action => undef -$DefaultStatus => undef - diff --git a/rt/webrt/SelfService/index.html b/rt/webrt/SelfService/index.html deleted file mode 100644 index a377d8cff..000000000 --- a/rt/webrt/SelfService/index.html +++ /dev/null @@ -1,3 +0,0 @@ -<& /SelfService/Elements/Header, title => 'Self Service' &> - -<& /SelfService/Elements/MyRequests &> -- cgit v1.2.1