From 9c68254528b6f2c7d8c1921b452fa56064783782 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 2 Mar 2008 04:06:06 +0000 Subject: import rt 3.4.6 --- rt/html/SelfService/Attachment/dhandler | 6 +- rt/html/SelfService/Closed.html | 15 ++--- rt/html/SelfService/Create.html | 92 ++++++++++++++-------------- rt/html/SelfService/CreateTicketInQueue.html | 6 +- rt/html/SelfService/Display.html | 63 ++++++++----------- rt/html/SelfService/Elements/GotoTicket | 8 +-- rt/html/SelfService/Elements/Header | 6 +- rt/html/SelfService/Elements/MyRequests | 67 ++++++++++---------- rt/html/SelfService/Elements/Tabs | 34 ++-------- rt/html/SelfService/Error.html | 16 +++-- rt/html/SelfService/Prefs.html | 18 +++--- rt/html/SelfService/Update.html | 36 +++++------ rt/html/SelfService/index.html | 14 ++--- 13 files changed, 158 insertions(+), 223 deletions(-) (limited to 'rt/html/SelfService') diff --git a/rt/html/SelfService/Attachment/dhandler b/rt/html/SelfService/Attachment/dhandler index e7d59e63c..f953c2486 100644 --- a/rt/html/SelfService/Attachment/dhandler +++ b/rt/html/SelfService/Attachment/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/SelfService/Closed.html b/rt/html/SelfService/Closed.html index 766b0bc4f..2d49a6897 100644 --- a/rt/html/SelfService/Closed.html +++ b/rt/html/SelfService/Closed.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,10 +45,5 @@ %# END BPS TAGGED BLOCK }}} <& /SelfService/Elements/Header, Title => loc('Closed tickets') &> -<& /SelfService/Elements/MyRequests, status => ['rejected', 'resolved'], - friendly_status => loc('closed'), - BaseURL => $RT::WebPath . "/SelfService/Closed.html?", - Page => $Page &> -<%ARGS> -$Page => 1 - +<& /SelfService/Elements/MyRequests, status => ['rejected', 'resolved'], friendly_status => +loc('closed') &> diff --git a/rt/html/SelfService/Create.html b/rt/html/SelfService/Create.html index f66961db8..bfa7534eb 100644 --- a/rt/html/SelfService/Create.html +++ b/rt/html/SelfService/Create.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,67 +45,67 @@ %# END BPS TAGGED BLOCK }}} <& Elements/Header, Title => loc("Create a ticket") &> -
- + + - - - + +
+ + + - - - + + + - - - - + + + + - - - - + + + + - - + + + - - - - - + + + + - -
<&|/l&>Queue: - - <%$queue_obj->Name%> (<%$queue_obj->Description%>) -
+ + <%$queue_obj->Name%> (<%$queue_obj->Description%>) +
<&|/l&>Requestors: - - -
+ + +
<&|/l&>Cc: - - -
+ + +
<&|/l&>Subject: - - -
+ +
<& /Ticket/Elements/EditCustomFields, QueueObj => $queue_obj &>
+ <&|/l&>Attach file: - - -
-<&|/l&>Describe the issue below:
+
+ +
+<&|/l&>Describe the issue below:
<& /Elements/MessageBox &> -
+
<& /Elements/Submit, Label => loc("Create ticket")&> -
+ <%args> $Queue => undef diff --git a/rt/html/SelfService/CreateTicketInQueue.html b/rt/html/SelfService/CreateTicketInQueue.html index fd7e42664..5e8973610 100755 --- a/rt/html/SelfService/CreateTicketInQueue.html +++ b/rt/html/SelfService/CreateTicketInQueue.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/SelfService/Display.html b/rt/html/SelfService/Display.html index 0410e1b48..f7140df02 100644 --- a/rt/html/SelfService/Display.html +++ b/rt/html/SelfService/Display.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,25 +47,25 @@ <& /Elements/ListActions, actions => \@results &> - - - + +
- <&| /Widgets/TitleBox, title => loc('The Basics'), + + + - + - -
+ <& /Elements/TitleBoxStart, title => loc('The Basics'), title_class=> 'inverse', color => "#993333" &> <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> - - - <&| /Widgets/TitleBox, title => loc("Dates"), + <& /Elements/TitleBoxEnd &> + + <& /Elements/TitleBoxStart, title => loc("Dates"), title_class=> 'inverse', color => "#663366" &> <& /Ticket/Elements/ShowDates, Ticket => $Ticket, UpdatedLink => 0 &> - -
+ <& /Elements/TitleBoxEnd &> +
@@ -160,6 +158,15 @@ if ( $id[0] eq 'new' ) { Why => loc( "Couldn't load ticket '[_1]'", $id ) ); $m->abort(); } + } + + # }}} + + unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) { + $m->comp( 'Error.html', + Why => loc("No permission to display that ticket") ); + $m->abort(); + } my ( $code, $msg ); @@ -176,8 +183,7 @@ if ( $id[0] eq 'new' ) { if ( $session{'Attachments'} - || ( defined $ARGS{'UpdateContent'} - && $ARGS{'UpdateContent'} ne '' + || ( $ARGS{'UpdateContent'} ne '' && $ARGS{'UpdateContent'} ne "-- \n" . $session{'CurrentUser'}->UserObj->Signature ) ) @@ -200,27 +206,6 @@ if ( $id[0] eq 'new' ) { # }}} - } - - # This code does automatic redirection if any updates happen. - - unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) { - $m->comp( 'Error.html', - Why => loc("No permission to display that ticket") ); - $m->abort(); - } - - if (@results) { - # We've done something, so we need to clear the decks to avoid - # resubmission on refresh. - # But we need to store Actions somewhere too, so we don't lose them. - $session{"Actions"} = \@results; - RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id=" - . $Ticket->id); - } else { - @results = @{ delete $session{"Actions"} || [] }; - } - my $Transactions = $Ticket->Transactions; my $attachments = diff --git a/rt/html/SelfService/Elements/GotoTicket b/rt/html/SelfService/Elements/GotoTicket index 5eac306e9..50efaa24e 100644 --- a/rt/html/SelfService/Elements/GotoTicket +++ b/rt/html/SelfService/Elements/GotoTicket @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,4 +43,4 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
 
+
 
diff --git a/rt/html/SelfService/Elements/Header b/rt/html/SelfService/Elements/Header index f248292e2..c7e6a9167 100644 --- a/rt/html/SelfService/Elements/Header +++ b/rt/html/SelfService/Elements/Header @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/SelfService/Elements/MyRequests b/rt/html/SelfService/Elements/MyRequests index 41f6b09b1..2df8ce842 100644 --- a/rt/html/SelfService/Elements/MyRequests +++ b/rt/html/SelfService/Elements/MyRequests @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,40 +43,43 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<&| /Widgets/TitleBox, title => $title &> -<& /Elements/TicketList, Title => $title, - Format => @Format, - Query => $Query, - Order => $Order, - OrderBy => $OrderBy, - BaseURL => $BaseURL, - Page => $Page &> - +<& /Elements/TitleBoxStart, title => $title &> + + + + + + + +% while (my $Ticket = $MyTickets->Next) { + + + +% } +
<&|/l&>Subject<&|/l&>Status<&|/l&>Owner
+<%$Ticket->Id%>: <%$Ticket->Subject%> + +<%loc($Ticket->Status)%> + +<%$Ticket->OwnerObj->Name%> +
+<& /Elements/TitleBoxEnd &> + <%INIT> -my $id = $session{'CurrentUser'}->id; -my $Query = "( " - . join( ' OR ', map "$_.id = $id", @roles ) - . ")"; -if ( @status ) { - $Query .= " AND ( " - . join( ' OR ', map "Status = '$_'", @status ) - . " )"; +$title ||= loc("My [_1] tickets", $friendly_status); +my $MyTickets; +$MyTickets = new RT::Tickets ($session{'CurrentUser'}); +$MyTickets->LimitWatcher(TYPE => 'Requestor', VALUE => $session{'CurrentUser'}->EmailAddress); +$MyTickets->OrderBy(FIELD => 'id', ORDER => 'ASC'); + +foreach my $status (@status) { + + $MyTickets->LimitStatus(VALUE => $status); } -my $Order = "ASC"; -my $OrderBy = "Created"; -my @Format = qq{ - '__id__/TITLE:#', - '__Subject__/TITLE:Subject', - Status, - Requestors, - OwnerName}; <%ARGS> +$title => undef $friendly_status => loc('open') -$title => loc("My [_1] tickets", $friendly_status) -@roles => ('Watcher') @status => ('open', 'new', 'stalled') -$BaseURL => undef -$Page => 1 diff --git a/rt/html/SelfService/Elements/Tabs b/rt/html/SelfService/Elements/Tabs index 80f4ce4cd..802fd6525 100644 --- a/rt/html/SelfService/Elements/Tabs +++ b/rt/html/SelfService/Elements/Tabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -54,18 +52,6 @@ &> <%INIT> -my $queues = RT::Queues->new($session{'CurrentUser'}); -$queues->UnLimit; - -my $queue_count = 0; -my $queue_id = 1; - -while (my $queue = $queues->Next) { - next unless $queue->CurrentUserHasRight('CreateTicket'); - $queue_id = $queue->id; - $queue_count++; - last if ($queue_count > 1); -} if ($Title) { $Title = loc ("RT Self Service") . " / " . $Title; @@ -79,19 +65,11 @@ my $tabs = { A => { title => loc('Open tickets'), }, B => { title => loc('Closed tickets'), path => 'SelfService/Closed.html', - } + }, + C => { title => loc('New ticket'), + path => 'SelfService/CreateTicketInQueue.html' + } }; - -if ($queue_count > 1) { - $tabs->{C} = { title => loc('New ticket'), - path => 'SelfService/CreateTicketInQueue.html' - }; -} else { - $tabs->{C} = { title => loc('New ticket'), - path => 'SelfService/Create.html?Queue=' . $queue_id - }; -} - if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { $tabs->{Z} = { title => loc('Preferences'), diff --git a/rt/html/SelfService/Error.html b/rt/html/SelfService/Error.html index 81a483d39..8ac9f81ea 100644 --- a/rt/html/SelfService/Error.html +++ b/rt/html/SelfService/Error.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,15 +45,15 @@ %# END BPS TAGGED BLOCK }}} <& /SelfService/Elements/Header, Title => loc('Error') &>

<%loc('Error')%>

-<&| /Widgets/TitleBox, title => $Title &> +<& /Elements/TitleBoxStart, title => $Title &> <%$Why%> -
- +
+ <%$Details%> - +<& /Elements/TitleBoxEnd &> - + <%args> diff --git a/rt/html/SelfService/Prefs.html b/rt/html/SelfService/Prefs.html index 0cd3756c3..3913203fb 100644 --- a/rt/html/SelfService/Prefs.html +++ b/rt/html/SelfService/Prefs.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -48,14 +46,14 @@ <& /SelfService/Elements/Header, Title => loc('Preferences') &> <& /Elements/ListActions, actions => \@results &> -
+ % unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { -<&| /Widgets/TitleBox, title => loc('Change password') &> -<&|/l&>New password: -<&|/l&>Confirm: - -
+<& /Elements/TitleBoxStart, title => loc('Change password') &> +<&|/l&>New password: +<&|/l&>Confirm: +<& /Elements/TitleBoxEnd &> +
% } <& /Elements/Submit, Label => loc('Save Changes') &>
diff --git a/rt/html/SelfService/Update.html b/rt/html/SelfService/Update.html index b10716f9a..816a610aa 100644 --- a/rt/html/SelfService/Update.html +++ b/rt/html/SelfService/Update.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -50,9 +48,9 @@ &> -
- - + + + % if (exists $session{'Attachments'}) { - - + - + + % } # end of if
@@ -67,30 +65,30 @@ <&|/l&>Subject - +
+ <&|/l&>Attached file - - <&|/l&>Check box to delete
+
+ <&|/l&>Check box to delete
% foreach my $attach_name (keys %{$session{'Attachments'}}) { - <%$attach_name%>
+ <%$attach_name%>
% } # end of foreach -
<&|/l&>Attach - - + +
@@ -99,11 +97,11 @@ Name => "UpdateContent", QuoteTransaction => $ARGS{QuoteTransaction} &> -
+
<& /Elements/Submit &> -
+ diff --git a/rt/html/SelfService/index.html b/rt/html/SelfService/index.html index c4a9577ab..f3ccb8555 100644 --- a/rt/html/SelfService/index.html +++ b/rt/html/SelfService/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,9 +22,7 @@ %# %# 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., 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. +%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,10 +43,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /SelfService/Elements/Header, Title => loc('Open Tickets') &> +<& /SelfService/Elements/Header, Title => undef &> -<& /SelfService/Elements/MyRequests, BaseURL => $RT::WebPath . "/SelfService/?", - Page => $Page &> -<%ARGS> -$Page => 1 - +<& /SelfService/Elements/MyRequests &> -- cgit v1.2.1