import of rt 3.0.4
[freeside.git] / rt / html / Elements / Header
1 %# BEGIN LICENSE BLOCK
2 %# 
3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
4 %# 
5 %# (Except where explictly superceded by other copyright notices)
6 %# 
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
10 %# from www.gnu.org.
11 %# 
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 %# General Public License for more details.
16 %# 
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
21 %# 
22 %# 
23 %# END LICENSE BLOCK
24 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
25 <HTML>
26 <HEAD>
27 <TITLE><%$Title%></TITLE>
28 % if ($Refresh > 0) {
29 <META HTTP-EQUIV="REFRESH" CONTENT="<%$Refresh%>">
30 % }
31
32 <link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png">
33 <link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css">
34 </HEAD>
35 <BODY BGCOLOR="<%$BgColor%>"
36 % if ($Focus) {
37 ONLOAD="
38     var tmp = (document.getElementsByName('<% $Focus %>'));
39     if (tmp.length > 0) tmp[tmp.length-1].focus();
40 "
41 % }
42 >
43 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
44   <tr> 
45     <td colspan=2><a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="" width="230" height="50"></a></td>
46     <td>&nbsp;</td>
47     <td>&nbsp;</td>
48     <td width="50%" align="right">
49 % if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) {
50 <SPAN STYLE="display: none"><A HREF="#skipnav"><&|/l&>Skip Menu</&></A> |</SPAN>
51 <A  HREF="<%$RT::WebPath%><% $Prefs %>" ><&|/l&>Preferences</&></A>
52 <& /Elements/Callback, %ARGS &>
53 % unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
54 | <A  HREF="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL && "?URL=".$URL%>"><&|/l&>Logout</&></a>
55 % }
56 <BR>
57 <&|/l, "<b>".$session{'CurrentUser'}->Name."</b>" &>Logged in as [_1]</&>
58 % } else {
59 <&|/l&>Not logged in.</&>
60 % }
61 </font>
62     </td>
63   </tr>
64 </table>
65 <%INIT>
66
67 $r->header_out('Pragma' => 'no-cache');
68 $r->header_out('Cache-control' => 'no-cache');
69 </%INIT>
70
71 <%ARGS>
72 $Prefs => '/User/Prefs.html'
73 $Focus => 'focus'
74 $Title => undef
75 $Code => undef
76 $Refresh => 0
77 $Why => undef
78 $BgColor => '#ffffff'
79 $ShowBar => 1
80 $LoggedIn => 1
81 $URL => undef
82 </%ARGS>