point 1.9 to 1.9 documentation
[freeside.git] / httemplate / elements / header.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <HTML>
3   <HEAD>
4     <TITLE>
5       <% $title %>
6     </TITLE>
7     <META HTTP-Equiv="Cache-Control" Content="no-cache">
8     <META HTTP-Equiv="Pragma" Content="no-cache">
9     <META HTTP-Equiv="Expires" Content="0"> 
10
11     <% include('menu.html', 'freeside_baseurl' => $fsurl,
12                             'position'         => $menu_position,
13               )
14     %>
15
16     <SCRIPT TYPE="text/javascript">
17       function clearhint_search_cust (what) {
18         if ( what.value == '(cust #, name, company or phone)' )
19           what.value = '';
20       }
21
22       function clearhint_search_invoice (what) {
23         if ( what.value == '(inv #)' )
24           what.value = '';
25       }
26
27       function clearhint_search_svc (what) {
28         if ( what.value == '(user, user@domain or domain)' )
29           what.value = '';
30       }
31
32       function clearhint_search_ticket (what) {
33         if ( what.value == '(ticket # or subject string)' )
34           what.value = '';
35       }
36     </SCRIPT>
37
38     <% $head %>
39
40   </HEAD>
41   <BODY <% $menu_position eq 'left' ? qq( BACKGROUND="${fsurl}images/background-cheat.png" ) : ' BGCOLOR="#e8e8e8" ' %> <% $etc %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0">
42     <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0; padding-right:4">
43       <tr>
44         <td rowspan=2 BGCOLOR="#ffffff"><IMG BORDER=0 ALT="freeside" SRC="<%$fsurl%>images/small-logo.png"></td>
45         <td align=left rowspan=2 BGCOLOR="#ffffff"> <!-- valign="top" -->
46           <font size=6><% $conf->config('company_name') || 'ExampleCo' %></font>
47         </td>
48         <td align=right valign=top BGCOLOR="#ffffff"><FONT SIZE="-1">Logged in as <b><% getotaker %>&nbsp;</b><br></FONT><FONT SIZE="-2"><a href="<%$fsurl%>pref/pref.html">Preferences</a>&nbsp;<BR></FONT>
49         </td>
50       </tr>
51       <tr>
52         <td align=right valign=bottom BGCOLOR="#ffffff">
53   
54           <table>
55             <tr>
56               <td align=right BGCOLOR="#ffffff">
57                 <FONT SIZE="-2">
58                  <A HREF="http://www.sisd.com/freeside">Freeside</A>&nbsp;v<% $FS::VERSION %><BR>
59                  <A HREF="<% $conf->config('support-key') ? "http://www.sisd.com/mediawiki/index.php/Supported:Documentation" : "http://www.sisd.com/mediawiki/index.php/Freeside:1.9:Documentation" %>">Documentation</A><BR>
60                 </FONT>
61               </td>
62 % if ( $conf->config('ticket_system') eq 'RT_Internal' ) { 
63 % eval "use RT;"; 
64
65                 <td bgcolor=#000000></td>
66                 <td align=left>
67                   <FONT SIZE="-2">
68                    <A HREF="http://www.bestpractical.com/rt">RT<A>&nbsp;v<% $RT::VERSION %><BR>
69                    <A HREF="http://wiki.bestpractical.com/">Documentation</A><BR>
70                   </FONT>
71                 </td>
72 % } 
73
74   
75             </tr>
76           </table>
77   
78         </td>
79       </tr>
80     </table>
81
82 <style type="text/css">
83 input.fsblackbutton {
84          background-color:#333333;
85          color: #ffffff;
86          border:1px solid;
87          border-top-color:#cccccc;
88          border-left-color:#cccccc;
89          border-right-color:#aaaaaa;
90          border-bottom-color:#aaaaaa;
91          font-weight:bold;
92          padding-left:12px;
93          padding-right:12px;
94          overflow:visible;
95          filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666')
96 }
97
98 input.fsblackbuttonselected {
99          background-color:#7e0079;
100          color: #ffffff;
101          border:1px solid;
102          border-top-color:#cccccc;
103          border-left-color:#cccccc;
104          border-right-color:#aaaaaa;
105          border-bottom-color:#aaaaaa;
106          font-weight:bold;
107          padding-left:12px;
108          padding-right:12px;
109          overflow:visible;
110          filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
111 }
112 </style>
113
114     <TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
115       <TR>
116         <TD COLSPAN=5 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD>
117       </TR>
118
119 % if ( $menu_position eq 'top' ) {
120
121       <TR>
122
123         <TD COLSPAN="5" WIDTH="100%" STYLE="padding:0">
124           <SCRIPT TYPE="text/javascript">
125             document.write(myBar);
126           </SCRIPT>
127         </TD>
128
129       </TR>
130
131       <TR>
132         <TD COLSPAN="5" WIDTH="100%" HEIGHT="2px" STYLE="padding:0" BGCOLOR="#000000">
133         </TD>
134       </TR>
135       
136       <TR>
137         <TD COLSPAN="5" WIDTH="100%" HEIGHT="4px" STYLE="padding:0" BGCOLOR="#000000">
138         </TD>
139       </TR>
140
141 % }
142
143       <TR>
144
145         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
146           <FORM ACTION="<%$fsurl%>edit/cust_main.cgi" METHOD="GET" STYLE="margin:0">
147             <INPUT TYPE="submit" VALUE="New customer" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="vertical-align:bottom">
148           </FORM>
149         </TD>
150
151         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
152           <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
153             <INPUT NAME="search_cust" TYPE="text" VALUE="(cust #, name, company or phone)" SIZE="28" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="vertical-align:bottom;text-align:right"><BR>
154             <A NOTYET="<%$fsurl%>search/cust_main.html" STYLE="color: #000000; font-size: 70%">Advanced</A>
155             <INPUT TYPE="submit" VALUE="Search customers" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
156           </FORM>
157         </TD>
158
159         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
160 % if ( $FS::CurrentUser::CurrentUser->access_right('View invoices') ) { 
161
162             <FORM ACTION="<%$fsurl%>search/cust_bill.html" METHOD="GET" STYLE="margin:0;display:inline">
163               <INPUT NAME="invnum" TYPE="text" VALUE="(inv #)" SIZE="4" onFocus="clearhint_search_invoice(this);" onClick="clearhint_search_invoice(this);" STYLE="vertical-align:bottom;text-align:right;margin-bottom:1px">
164 % if ( $FS::CurrentUser::CurrentUser->access_right('List invoices') ) { 
165
166                 <A HREF="<%$fsurl%>search/report_cust_bill.html" STYLE="color: #ffffff; font-size: 70%">Advanced</A>
167 % } 
168
169               <BR>
170               <INPUT TYPE="submit" VALUE="Search invoices" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
171             </FORM>
172 % } 
173
174         </TD>
175
176         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
177           <FORM ACTION="<%$fsurl%>search/cust_svc.html" METHOD="GET" STYLE="margin:0">
178             <INPUT NAME="search_svc" TYPE="text" VALUE="(user, user@domain or domain)" SIZE="26" onFocus="clearhint_search_svc(this);" onClick="clearhint_search_svc(this);" STYLE="vertical-align:bottom;text-align:right"><BR>
179             <A NOTYET="<%$fsurl%>search/svc_Smarter.html" STYLE="color: #000000; font-size: 70%">Advanced</A>
180             <INPUT TYPE="submit" VALUE="Search services" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
181           </FORM>
182         </TD>
183
184         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right" STYLE="padding-right:4px">
185 % if ( $conf->config("ticket_system") ) { 
186           <FORM ACTION="<% FS::TicketSystem->baseurl %>index.html" METHOD="GET" STYLE="margin:0">
187             <INPUT NAME="q" TYPE="text" VALUE="(ticket # or subject string)" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="vertical-align:bottom;text-align:right"><BR>
188             <A HREF="<% FS::TicketSystem->baseurl %>Search/Build.html" STYLE="color: #ffffff; font-size: 70%">Advanced</A>
189             <INPUT TYPE="submit" VALUE="Search tickets" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%;padding-left:2px;padding-right:2px">
190           </FORM>
191 % }
192         </TD>
193
194       </TR>
195     </TABLE>
196
197     <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING=0 CELLPADDING=4>
198
199       <TR>
200
201 % if ( $menu_position eq 'left' ) {
202
203         <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD>
204         <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-corner.png"></TD>
205
206 % }
207
208         <TD STYLE="padding:0" WIDTH="100%"><IMG BORDER=0 ALT="" SRC="<%$fsurl%>images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD>
209
210       </TR>
211
212       <TR HEIGHT="100%">
213
214 % if ( $menu_position eq 'left' ) {
215
216         <TD BGCOLOR="#000000" ALIGN="left" HEIGHT="100%" WIDTH="154" VALIGN="top" ALIGN="right">
217           <SCRIPT TYPE="text/javascript">
218             document.write(myBar);
219           </SCRIPT>
220           <BR>
221           <IMG SRC="<%$fsurl%>images/32clear.gif" HEIGHT="1" WIDTH="154">
222
223         </TD>
224         <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>
225
226 % }
227
228         <TD BGCOLOR="#e8e8e8" HEIGHT="100%" VALIGN="top"> <!-- WIDTH="100%"> -->
229
230           <FONT SIZE=6>
231             <% $title %>
232           </FONT>
233
234           <BR><BR>
235           <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %>
236 <%init>
237
238 my($title, $menubar) = ( shift, shift );
239 my $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
240 my $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
241 my $conf = new FS::Conf;
242
243 my $menu_position = $FS::CurrentUser::CurrentUser->option('menu_position')
244                     || 'left';
245
246 </%init>