Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / elements / header-popup.html
1 <%doc>
2
3 Example:
4
5   <& /elements/header-popup.html,
6        {
7          'title'   => 'Title',
8          'menubar' => \@menubar,
9          'etc'     => '', #included in <BODY> tag, for things like onLoad=
10          'head'    => '', #included before closing </HEAD> tag
11          'nobr'    => 0,  #1 for no <BR><BR> after the title
12        }
13   &>
14
15   #old-style
16   include( '/elements/header.html', 'Title', $menubar, $etc, $head);
17
18 </%doc>
19 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
20 <HTML>
21   <HEAD>
22     <TITLE>
23       <% $title |h %>
24     </TITLE>
25     <!-- per RT, to prevent IE compatibility mode -->
26     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
27     <!-- The X-UA-Compatible <meta> tag above must be very early in <head> -->
28     <META HTTP-Equiv="Cache-Control" Content="no-cache">
29     <META HTTP-Equiv="Pragma" Content="no-cache">
30     <META HTTP-Equiv="Expires" Content="0"> 
31     <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
32     <% $head %>
33   </HEAD>
34   <BODY <% $etc %>>
35     <link href="<%$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet">
36 % if ( $title ) {
37     <FONT SIZE=6>
38       <CENTER><% $title |h %></CENTER>
39     </FONT>
40 % }
41 % unless ( $nobr ) {
42     <BR><!--<BR>-->
43 % }
44 <%init>
45
46 my( $title, $menubar, $etc, $head ) = ( '', '', '', '' );
47 #my( $nobr, $nocss ) = ( 0, 0 );
48 my $nobr = 0;
49 if ( ref($_[0]) ) {
50   my $opt = shift;
51   $title   = $opt->{title};
52   $menubar = $opt->{menubar};
53   $etc     = $opt->{etc};
54   $head    = $opt->{head};
55   $nobr    = $opt->{nobr};
56 #  $nocss   = $opt->{nocss};
57 } else {
58   ($title, $menubar) = ( shift, shift );
59   $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
60   $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
61 }
62 $etc .= ' BGCOLOR="#f8f8f8"' unless $etc =~ /BGCOLOR/i;
63
64 my $conf = new FS::Conf;
65
66 </%init>