import rt 3.2.2
[freeside.git] / rt / html / index.html
1 <!--
2 % $m->out('--'.'>');
3 % if (0) {
4 %# -->
5 <html><head>
6 <META HTTP-EQUIV=Refresh CONTENT="3; URL=http://bestpractical.com/rt/rt-broken-install.html">
7 <title>Almost there!</title></head>
8 <body>
9
10 <img src="http://www.bestpractical.com/images/unconfigured-rtlogo.jpg">
11 <br><br>
12 <h1>You're almost there!</h1>
13 You haven't yet configured your webserver to run RT.
14
15 You appear to have installed RT's web interface correctly, but haven't yet configured your web
16 server to "run" the RT server which powers the web interface.
17
18 The next step is to edit your webserver's configuration file to instruct it to use
19 RT's <b>mod_perl</b>, <b>fastcgi</b> or <b>speedycgi</b> handler.
20
21 If you need commercial support, please contact us at sales@bestpractical.com.
22
23
24 <!--
25 % }
26
27 %# {{{ BEGIN BPS TAGGED BLOCK
28 %# 
29 %# COPYRIGHT:
30 %#  
31 %# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC 
32 %#                                          <jesse@bestpractical.com>
33 %# 
34 %# (Except where explicitly superseded by other copyright notices)
35 %# 
36 %# 
37 %# LICENSE:
38 %# 
39 %# This work is made available to you under the terms of Version 2 of
40 %# the GNU General Public License. A copy of that license should have
41 %# been provided with this software, but in any event can be snarfed
42 %# from www.gnu.org.
43 %# 
44 %# This work is distributed in the hope that it will be useful, but
45 %# WITHOUT ANY WARRANTY; without even the implied warranty of
46 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
47 %# General Public License for more details.
48 %# 
49 %# You should have received a copy of the GNU General Public License
50 %# along with this program; if not, write to the Free Software
51 %# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
52 %# 
53 %# 
54 %# CONTRIBUTION SUBMISSION POLICY:
55 %# 
56 %# (The following paragraph is not intended to limit the rights granted
57 %# to you to modify and distribute this software under the terms of
58 %# the GNU General Public License and is only of importance to you if
59 %# you choose to contribute your changes and enhancements to the
60 %# community by submitting them to Best Practical Solutions, LLC.)
61 %# 
62 %# By intentionally submitting any modifications, corrections or
63 %# derivatives to this work, or any other work intended for use with
64 %# Request Tracker, to Best Practical Solutions, LLC, you confirm that
65 %# you are the copyright holder for those contributions and you grant
66 %# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
67 %# royalty-free, perpetual, license to use, copy, create derivative
68 %# works based on those contributions, and sublicense and distribute
69 %# those contributions and any derivatives thereof.
70 %# 
71 %# }}} END BPS TAGGED BLOCK
72 <& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &>
73 <& /Elements/Tabs, 
74     current_toptab => '', 
75     Title=>loc("RT at a glance") &>
76 <& /Elements/ListActions, actions => \@results &>    
77 <TABLE BORDER=0 WIDTH=100%>
78 <TR VALIGN=TOP>
79 <TD WIDTH=70% class="boxcontainer">
80 <& /Elements/MyTickets &>
81 <BR>
82 <& /Elements/MyRequests &>
83 <BR>
84 <& /Elements/QuickCreate &>
85 </TD>
86 <TD class="boxcontainer">
87 <& /Elements/Quicksearch &>
88 <BR>
89 <form method=get action="<%$RT::WebPath%>/index.html">
90 <& /Elements/Refresh, Name => 'HomeRefreshInterval', Default => $session {'home_refresh_interval'} &>
91 <div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
92 </form>
93 </TD>
94 </TR>
95 </TABLE>
96 <%init>
97
98 my @results;
99
100 if ($ARGS{'QuickCreate'} ) {
101     my $ticket = RT::Ticket->new($session{'CurrentUser'});
102     my ($tid, $trans, $tmsg) = $ticket->Create(Queue => $ARGS{'Queue'},
103                     Owner => $ARGS{'Owner'},
104                     Subject => $ARGS{'Subject'});
105
106
107     push (@results, $tmsg);
108 }
109
110
111 if ( $ARGS{'q'} ) {
112     my $query = $ARGS{'q'};
113
114    if ( $query =~ m/^\s*(\d+)\s*$/ ) {
115         $m->comp("/Ticket/Display.html" , id=> $1);
116         return();
117     }
118
119     if ($m->comp('/Elements/Callback', _CallbackName => 'SearchPreFilter', 
120                  query => $query, %ARGS)) {
121         return();
122     }
123
124     $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} );
125
126     if ( $query =~ m/\@/ ) {
127         $m->comp("/Search/Results.html", Query => "Requestor = '$query'");
128
129         return();
130     }
131
132     #
133     # Any search on queue name or subject will be for new/open tickets
134     # only.
135     #
136
137     my $status = "Status = 'new' OR Status = 'open'";
138
139     my $queue = RT::Queue->new( $session{'CurrentUser'} );
140     if ( $queue->Load($query) && $queue->Id ) {
141         $m->comp("/Search/Results.html", Query => "Queue = '" . $queue->Id . "' AND ($status)");
142         return();
143     }
144
145     $m->comp("/Search/Results.html", Query => "Subject LIKE '$query' AND ($status)");
146     return();
147
148 }
149
150 if ($ARGS{'HomeRefreshInterval'}) {
151         $session{'home_refresh_interval'} = $ARGS{'HomeRefreshInterval'};
152 }
153
154 </%init>
155
156 %# --></body></html>