summaryrefslogtreecommitdiff
path: root/rt/share/html/SelfService/Elements
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/SelfService/Elements')
-rwxr-xr-xrt/share/html/SelfService/Elements/GotoTicket6
-rwxr-xr-xrt/share/html/SelfService/Elements/Header6
-rwxr-xr-xrt/share/html/SelfService/Elements/MyRequests24
-rw-r--r--[-rwxr-xr-x]rt/share/html/SelfService/Elements/SearchArticle (renamed from rt/share/html/SelfService/Elements/Tabs)70
4 files changed, 18 insertions, 88 deletions
diff --git a/rt/share/html/SelfService/Elements/GotoTicket b/rt/share/html/SelfService/Elements/GotoTicket
index 45fc4d9a9..28bc81b82 100755
--- a/rt/share/html/SelfService/Elements/GotoTicket
+++ b/rt/share/html/SelfService/Elements/GotoTicket
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -45,6 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get('WebPath') %>/SelfService/Display.html" method="get" id="GotoTicket">
-<input type="submit" class="button" value="<&|/l&>Goto ticket</&>" />&nbsp;<input size="4" name="id" />
+<form action="<% RT->Config->Get('WebPath') %>/SelfService/Display.html" method="get" id="GotoTicket" name="GotoTicket">
+<input size="4" name="id" value="<&|/l&>Goto Ticket</&>..." onfocus="if (this.value=='<&|/l&>Goto Ticket</&>...') this.value=''" />
</form>
diff --git a/rt/share/html/SelfService/Elements/Header b/rt/share/html/SelfService/Elements/Header
index dc59ecb5e..7cbc0ad96 100755
--- a/rt/share/html/SelfService/Elements/Header
+++ b/rt/share/html/SelfService/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -45,5 +45,5 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, %ARGS, Prefs => '/SelfService/Prefs.html' &>
-<& /SelfService/Elements/Tabs, %ARGS &>
+<& /Elements/Header, %ARGS &>
+<& /Elements/Tabs &>
diff --git a/rt/share/html/SelfService/Elements/MyRequests b/rt/share/html/SelfService/Elements/MyRequests
index 8bca07607..76accfc9b 100755
--- a/rt/share/html/SelfService/Elements/MyRequests
+++ b/rt/share/html/SelfService/Elements/MyRequests
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -45,42 +45,34 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => $title &>
+<&| /Widgets/TitleBox, title => $title &>
<& /Elements/CollectionList, Title => $title,
Format => $Format,
Query => $Query,
Order => @Order,
OrderBy => @OrderBy,
BaseURL => $BaseURL,
- GenericQueryArgs => $GenericQueryArgs,
- AllowSorting => $AllowSorting,
+ AllowSorting => 1,
Class => 'RT::Tickets',
Rows => $Rows,
Page => $Page &>
</&>
<%INIT>
+my $title = loc("My [_1] tickets", $friendly_status);
my $id = $session{'CurrentUser'}->id;
-my $Query = "( "
- . join( ' OR ', map "$_.id = $id", @roles )
- . ")";
+my $Query = "( Watcher.id = $id )";
if ( @status ) {
- $Query .= " AND ( "
- . join( ' OR ', map "Status = '$_'", @status )
- . " )";
+ @status = map {s/(['\\])/\\$1/g; "Status = '$_'"} @status;
+ $Query .= " AND ( " . join(' OR ', @status ) . " )";
}
my $Format = RT->Config->Get('DefaultSelfServiceSearchResultFormat');
-
</%INIT>
<%ARGS>
$friendly_status => loc('open')
-$title => loc("My [_1] tickets", $friendly_status)
-@roles => ('Watcher')
-@status => RT::Queue->ActiveStatusArray()
+@status => ()
$BaseURL => undef
$Page => 1
-$GenericQueryArgs => undef
-$AllowSorting => 1
@Order => ('ASC')
@OrderBy => ('Created')
$Rows => 50
diff --git a/rt/share/html/SelfService/Elements/Tabs b/rt/share/html/SelfService/Elements/SearchArticle
index eb4cba80c..d547127b5 100755..100644
--- a/rt/share/html/SelfService/Elements/Tabs
+++ b/rt/share/html/SelfService/Elements/SearchArticle
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -45,69 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% $m->callback( %ARGS, tabs => $tabs, actions => $actions );
-<& /Elements/PageLayout,
- current_toptab => $current_toptab,
- current_tab => $current_tab,
- toptabs => $tabs,
- topactions => $actions,
- title => $Title
-&>
-<a name="skipnav" id="skipnav" accesskey="8"></a>
-<%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;
-} else {
-$Title = loc("RT Self Service");
-
-}
-my ($tab);
-my $tabs = { A => { title => loc('Open tickets'),
- path => 'SelfService/',
- },
- B => { title => loc('Closed tickets'),
- path => 'SelfService/Closed.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'),
- path => 'SelfService/Prefs.html'
- };
-}
-
-my $actions = {
- B => { html => $m->scomp('GotoTicket')
- }
- };
-</%INIT>
-<%ARGS>
-$Title => undef
-$current_toptab => undef
-$current_tab => undef
-</%ARGS>
+<form action="<% RT->Config->Get('WebPath') %>/SelfService/Article/Search.html" id="ArticleSearch">
+<input size="4" name="Articles_Content" value="<&|/l&>Search Articles</&>..." onfocus="if (this.value=='<&|/l&>Search Articles</&>...') this.value=''" />
+</form>