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/index.html | 87 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 24 deletions(-) (limited to 'rt/html/index.html') diff --git a/rt/html/index.html b/rt/html/index.html index af95a655c..04d48ece6 100644 --- a/rt/html/index.html +++ b/rt/html/index.html @@ -1,15 +1,14 @@ -<& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &> - + Almost there! - -

+ +

You're almost there!

You haven't yet configured your webserver to run RT. @@ -17,7 +16,7 @@ You appear to have installed RT's web interface correctly, but haven't yet confi server to "run" the RT server which powers the web interface. The next step is to edit your webserver's configuration file to instruct it to use -RT's mod_perl, FastCGI or SpeedyCGI handler. +RT's mod_perl, fastcgi or speedycgi handler. If you need commercial support, please contact us at sales@bestpractical.com. @@ -29,7 +28,7 @@ If you need commercial support, please contact us at sales@bestpractical.com. %# %# 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) @@ -49,9 +48,7 @@ If you need commercial support, please contact us at sales@bestpractical.com. %# %# 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: @@ -72,13 +69,30 @@ If you need commercial support, please contact us at sales@bestpractical.com. %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +<& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &> <& /Elements/Tabs, current_toptab => '', - Title=>loc("RT at a glance"), - actions => $actions, - &> + Title=>loc("RT at a glance") &> <& /Elements/ListActions, actions => \@results &> -<& /Elements/MyRT &> + + + + + +
+<& /Elements/MyTickets &> +
+<& /Elements/MyRequests &> +
+<& /Elements/QuickCreate &> +
+<& /Elements/Quicksearch &> +
+
+<& /Elements/Refresh, Name => 'HomeRefreshInterval', Default => $session {'home_refresh_interval'} &> +
+
+
<%init> my @results; @@ -87,7 +101,6 @@ if ($ARGS{'QuickCreate'} ) { my $ticket = RT::Ticket->new($session{'CurrentUser'}); my ($tid, $trans, $tmsg) = $ticket->Create(Queue => $ARGS{'Queue'}, Owner => $ARGS{'Owner'}, - Requestor => $session{'CurrentUser'}->UserObj->EmailAddress, Subject => $ARGS{'Subject'}); @@ -96,22 +109,48 @@ if ($ARGS{'QuickCreate'} ) { if ( $ARGS{'q'} ) { - RT::Interface::Web::Redirect($RT::WebURL."Search/Simple.html?q=".$m->interp->apply_escapes($ARGS{q})); + my $query = $ARGS{'q'}; + + if ( $query =~ m/^\s*(\d+)\s*$/ ) { + $m->comp("/Ticket/Display.html" , id=> $1); + return(); + } + + if ($m->comp('/Elements/Callback', _CallbackName => 'SearchPreFilter', + query => $query, %ARGS)) { + return(); + } + + $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} ); + + if ( $query =~ m/\@/ ) { + $m->comp("/Search/Results.html", Query => "Requestor = '$query'"); + + return(); + } + + # + # Any search on queue name or subject will be for new/open tickets + # only. + # + + my $status = "Status = 'new' OR Status = 'open'"; + + my $queue = RT::Queue->new( $session{'CurrentUser'} ); + if ( $queue->Load($query) && $queue->Id ) { + $m->comp("/Search/Results.html", Query => "Queue = '" . $queue->Id . "' AND ($status)"); + return(); + } + + $m->comp("/Search/Results.html", Query => "Subject LIKE '$query' AND ($status)"); + return(); + } if ($ARGS{'HomeRefreshInterval'}) { $session{'home_refresh_interval'} = $ARGS{'HomeRefreshInterval'}; } -my $actions; -if ($session{'CurrentUser'}->HasRight(Right => 'ModifySelf', Object => $RT::System)) { - $actions = { - A => { title => loc('Edit'), - path => 'Prefs/MyRT.html', - }, - }; -} - %# --> -- cgit v1.2.1