no need for FS calendar buttons in RT 4.2
[freeside.git] / rt / share / html / index.html
1 <!DOCTYPE html>
2 <!--
3 % $m->out('--'.'>');
4 % $m->comp('/Elements/Header', Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'}||RT->Config->Get('HomePageRefreshInterval', $session{'CurrentUser'}), SkipDoctype => 1 );
5 % if (0) {
6 %# -->
7 <html><head>
8 <meta http-equiv="refresh" content="30; url=http://bestpractical.com/rt/rt-broken-install.html">
9 <title>Almost there!</title></head>
10 <body>
11
12 <img src="http://www.bestpractical.com/images/unconfigured-rtlogo.jpg" />
13 <br /><br />
14 <h1>You're almost there!</h1>
15 You haven't yet configured your webserver to run RT.
16
17 You appear to have installed RT's web interface correctly, but haven't yet configured your web
18 server to "run" the RT server which powers the web interface.
19
20 The next step is to edit your webserver's configuration file to instruct it to use
21 RT's <strong>mod_perl</strong> or <strong>FastCGI</strong> handler.
22
23 If you need commercial support, please contact us at sales@bestpractical.com.
24
25
26 <!--
27 % }
28
29 %# BEGIN BPS TAGGED BLOCK {{{
30 %#
31 %# COPYRIGHT:
32 %#
33 %# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
34 %#                                          <sales@bestpractical.com>
35 %#
36 %# (Except where explicitly superseded by other copyright notices)
37 %#
38 %#
39 %# LICENSE:
40 %#
41 %# This work is made available to you under the terms of Version 2 of
42 %# the GNU General Public License. A copy of that license should have
43 %# been provided with this software, but in any event can be snarfed
44 %# from www.gnu.org.
45 %#
46 %# This work is distributed in the hope that it will be useful, but
47 %# WITHOUT ANY WARRANTY; without even the implied warranty of
48 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
49 %# General Public License for more details.
50 %#
51 %# You should have received a copy of the GNU General Public License
52 %# along with this program; if not, write to the Free Software
53 %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
54 %# 02110-1301 or visit their web page on the internet at
55 %# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
56 %#
57 %#
58 %# CONTRIBUTION SUBMISSION POLICY:
59 %#
60 %# (The following paragraph is not intended to limit the rights granted
61 %# to you to modify and distribute this software under the terms of
62 %# the GNU General Public License and is only of importance to you if
63 %# you choose to contribute your changes and enhancements to the
64 %# community by submitting them to Best Practical Solutions, LLC.)
65 %#
66 %# By intentionally submitting any modifications, corrections or
67 %# derivatives to this work, or any other work intended for use with
68 %# Request Tracker, to Best Practical Solutions, LLC, you confirm that
69 %# you are the copyright holder for those contributions and you grant
70 %# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
71 %# royalty-free, perpetual, license to use, copy, create derivative
72 %# works based on those contributions, and sublicense and distribute
73 %# those contributions and any derivatives thereof.
74 %#
75 %# END BPS TAGGED BLOCK }}}
76 <& /Elements/Tabs &>
77 <& /Elements/ListActions, actions => \@results &>    
78 <& /Elements/MyRT &>
79 <%init>
80
81 if ( RT::Interface::Web->MobileClient()) {
82     RT::Interface::Web::Redirect(RT->Config->Get('WebURL') ."m/");
83     $m->abort();
84 }
85
86 my @results;
87 my $skip_create = 0;
88
89 $m->callback( ARGSRef => \%ARGS, results => \@results, CallbackName => 'Initial', 
90               skip_create => \$skip_create );
91
92 if ( $ARGS{'QuickCreate'} ) {
93
94    ProcessAttachments(ARGSRef => \%ARGS);
95
96     my $QueueObj = RT::Queue->new($session{'CurrentUser'});
97     $QueueObj->Load($ARGS{Queue}) or Abort(loc("Queue could not be loaded."));
98     
99     my $CFs = $QueueObj->TicketCustomFields();
100     
101     my ($ValidCFs, @msg) = $m->comp(
102         '/Elements/ValidateCustomFields',
103         CustomFields        => $CFs,
104         ARGSRef             => \%ARGS,
105         ValidateUnsubmitted => 1,
106     );
107
108
109     my $created;
110     if ( $ValidCFs && !$skip_create ) {
111         my ($t, $msg) = CreateTicket( 
112                           Queue => $ARGS{'Queue'},
113                           Owner => $ARGS{'Owner'},
114                           Status => $ARGS{'Status'},
115                           # yes! it's Requestors, not Requestor
116                           Requestors => $ARGS{'Requestors'},
117                           Content => $ARGS{'Content'},
118                           Subject => $ARGS{'Subject'},
119                           Token   => $ARGS{'Token'},
120                         );
121         push @results, $msg;
122
123         if ( $t && $t->Id ) {
124             $created = 1;
125             if ( RT->Config->Get('DisplayTicketAfterQuickCreate', $session{'CurrentUser'}) ) {
126                 MaybeRedirectForResults(
127                     Actions   => \@results,
128                     Path      => '/Ticket/Display.html',
129                     Arguments => { id => $t->Id },
130                 );
131             }
132         }
133     }
134     elsif ( !$ValidCFs ) {
135         push @results, loc("Can't quickly create ticket in queue [_1] because custom fields are required.  Please finish by using the normal ticket creation page.", $QueueObj->Name);
136         push @results, @msg;
137
138         MaybeRedirectForResults(
139             Actions     => \@results,
140             Path        => "/Ticket/Create.html",
141             Arguments   => {
142                 (map { $_ => $ARGS{$_} } qw(Queue Owner Status Content Subject)),
143                 Requestors => $ARGS{Requestors},
144                 # From is set above when CFs are OK, but not here since we're
145                 # not calling CreateTicket() directly.  The proper place to set
146                 # a default for From, if desired in the future, is in
147                 # CreateTicket() itself, or at least /Ticket/Display.html
148                 # (which processes /Ticket/Create.html).  From is rarely used
149                 # overall.
150             },
151         );
152     }
153
154     $session{QuickCreate} = \%ARGS unless $created;
155
156     MaybeRedirectForResults(
157         Actions   => \@results,
158         Path      => '/',
159     );
160 }
161
162
163 if ( $ARGS{'q'} ) {
164     RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Search/Simple.html?q=".$m->interp->apply_escapes($ARGS{q}, 'u'));
165 }
166
167 </%init>
168
169 %# --></body></html>