fix A/R report
[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       <% encode_entities($title) || $title_noescape |n %>
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 %   unless ( $no_jquery ) {
32       <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
33 %     if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
34       <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
35 %     }
36 %   }
37     <SCRIPT SRC="<% $fsurl %>elements/topreload.js"></SCRIPT>
38     <% $head |n %>
39   </HEAD>
40   <BODY <% $etc |n %>>
41 %   if ($m->notes('inline_stylesheet')) { # for email delivery
42     <style type="text/css">
43     <& /elements/freeside.css &>
44     </style>
45 %   } else {
46     <link href="<%$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet">
47 %   }
48 % if ( $title || $title_noescape ) {
49     <FONT SIZE=6>
50       <CENTER><% encode_entities($title) || $title_noescape |n %></CENTER>
51     </FONT>
52 % }
53 % unless ( $nobr ) {
54     <BR><!--<BR>-->
55 % }
56 <%init>
57
58 my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' );
59 my( $nobr, $no_jquery ) = ( 0, 0 );
60 if ( ref($_[0]) ) {
61   my $opt = shift;
62   $title          = $opt->{title};
63   $title_noescape = $opt->{title_noescape};
64   $menubar        = $opt->{menubar};
65   $etc            = $opt->{etc};
66   $head           = $opt->{head};
67   $nobr           = $opt->{nobr};
68   #$nocss          = $opt->{nocss};
69   $no_jquery      = $opt->{no_jquery};
70 } else {
71   ($title, $menubar) = ( shift, shift );
72   $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
73   $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
74 }
75 $etc .= ' BGCOLOR="#f8f8f8"' unless $etc =~ /BGCOLOR/i;
76
77 my $conf = new FS::Conf;
78
79 </%init>