move most of the crap on the "main menu" to the sidebar
[freeside.git] / httemplate / elements / header.html
1 <%
2   my($title, $menubar) = ( shift, shift );
3   my $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
4   my $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
5   my $conf = new FS::Conf;
6 %>
7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8 <HTML>
9   <HEAD>
10     <TITLE>
11       <%= $title %>
12     </TITLE>
13     <META HTTP-Equiv="Cache-Control" Content="no-cache">
14     <META HTTP-Equiv="Pragma" Content="no-cache">
15     <META HTTP-Equiv="Expires" Content="0"> 
16
17     <%= include('menu.html', 'freeside_baseurl' => $fsurl ) %>
18
19     <SCRIPT TYPE="text/javascript">
20       function clearhint_search_cust (what) {
21         if ( what.value = '(cust #, name or company)' )
22           what.value = '';
23       }
24     </SCRIPT>
25
26     <SCRIPT TYPE="text/javascript">
27       function clearhint_search_ticket (what) {
28         if ( what.value = '(ticket # or subject string)' )
29           what.value = '';
30       }
31     </SCRIPT>
32
33     <%= $head %>
34
35   </HEAD>
36   <BODY BACKGROUND="<%=$fsurl%>images/background-cheat.png" <%= $etc %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0">
37     <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
38       <tr>
39         <td rowspan=2 BGCOLOR="#ffffff">
40           <IMG BORDER=0 ALT="freeside" SRC="<%=$fsurl%>images/small-logo.png">
41         </td>
42         <td align=left rowspan=2 BGCOLOR="#ffffff"> <!-- valign="top" -->
43           <font size=6><%= $conf->config('company_name') || 'ExampleCo' %></font>
44         </td>
45         <td align=right valign=top BGCOLOR="#ffffff">Logged in as <b><%= getotaker %>&nbsp</b><br><FONT SIZE="-2"><a href="<%=$fsurl%>pref/XXXwritethis">Preferences</a>&nbsp;<BR><BR></FONT>
46         </td>
47       </tr>
48       <tr>
49         <td align=right valign=bottom BGCOLOR="#ffffff">
50   
51           <table>
52             <tr>
53               <td align=right BGCOLOR="#ffffff">
54                 <FONT SIZE="-2">
55                  <A HREF="http://www.sisd.com/freeside">Freeside</A>&nbsp;v<%= $FS::VERSION %><BR>
56                  <A HREF="<%= $fsurl %>docs/">Documentation</A><BR>
57                 </FONT>
58               </td>
59               <% if ( $conf->config('ticket_system') eq 'RT_Internal' ) { %>
60               <% eval "use RT;"; %>
61                 <td bgcolor=#000000></td>
62                 <td align=left>
63                   <FONT SIZE="-2">
64                    <A HREF="http://www.bestpractical.com/rt">RT<A>&nbsp;v<%= $RT::VERSION %><BR>
65                    <A HREF="http://wiki.bestpractical.com/">Documentation</A><BR>
66                   </FONT>
67                 </td>
68               <% } %>
69   
70             </tr>
71           </table>
72   
73         </td>
74       </tr>
75     </table>
76
77     <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=4>
78       <TR>
79         <TD COLSPAN=4 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
80       </TR>
81       <TR>
82         <TD COLSPAN=1 BGCOLOR="#000000" WIDTH="154">
83         </TD>
84         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
85           <FORM ACTION="<%=$fsurl%>edit/cust_main.cgi" METHOD="GET" STYLE="margin:0">
86             <INPUT TYPE="submit" VALUE="New customer">
87           </FORM>
88         </TD>
89         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
90           <FORM ACTION="<%=$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
91             <INPUT NAME="search_cust" TYPE="text" VALUE="(cust #, name or company)" SIZE="23" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="text-align:right">
92             <INPUT TYPE="submit" VALUE="Search customers">
93           </FORM>
94         </TD>
95         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
96           <FORM ACTION="<%=$fsurl%>rt/index.html" METHOD="GET" STYLE="margin:0">
97             <INPUT NAME="q" TYPE="text" VALUE="(ticket # or subject string)" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="text-align:right">
98             <INPUT TYPE="submit" VALUE="Search tickets">
99           </FORM>
100         </TD>
101       </TR>
102     </TABLE>
103     <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
104       <TR>
105         <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
106         <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-corner.png"></TD>
107         <TD STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
108       </TR>
109       <TR HEIGHT="100%">
110         <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
111           <SCRIPT TYPE="text/javascript">
112             document.write(myBar);
113           </SCRIPT>
114           <BR>
115           <IMG SRC="<%=$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
116
117         </TD>
118         <TD STYLE="padding:0" HEIGHT="100%" WIDTH=13 VALIGN="top"><IMG WIDTH="13" HEIGHT="100%" BORDER=0 ALT="" SRC="<%=$fsurl%>images/black-gray-side.png"></TD>
119         <TD BGCOLOR="#e8e8e8" HEIGHT="100%"> <!-- WIDTH="100%"> -->
120
121           <FONT SIZE=6>
122             <%= $title %>
123           </FONT>
124
125           <BR><BR>
126           <%= $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>