X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fheader.html;h=8da91ef49df6e880add162fa315b79fb4f52ab3b;hb=19145f5b2abf31e5105920516c48ac685c15c513;hp=9502ba46b830511f4d90376649e39da16af411bf;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html index 9502ba46b..8da91ef49 100644 --- a/httemplate/elements/header.html +++ b/httemplate/elements/header.html @@ -1,8 +1,30 @@ +<%doc> + +Example: + + include( '/elements/header.html', + { + 'title' => 'Title', + 'menubar' => \@menubar, + 'etc' => '', #included in tag, for things like onLoad= + 'head' => '', #included before closing tag + 'nobr' => 0, #1 for no

after the title + } + ); + + #old-style + include( '/elements/header.html', 'Title', $menubar, $etc, $head); + + + +%# +%# above is what RT declares, should we switch now? hopefully no glitches result +%# or just fuck it, XHTML died anyway, HTML 5 or bust? - <% $title %> + <% $title |h %> @@ -10,71 +32,55 @@ <% include('menu.html', 'freeside_baseurl' => $fsurl, 'position' => $menu_position, - ) + 'nocss' => $nocss, + ) |n %> + <% include('init_overlib.html') |n %> + - <% $head %> + <% $head |n %> - <% $etc %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0"> + <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0"> - - + - - - -
freeside - <% $conf->config('company_name') || 'ExampleCo' %> + freeside + <% $company_name || 'ExampleCo' %> Logged in as <% getotaker %> 
Preferences 
-
- - - - -% if ( $conf->config('ticket_system') eq 'RT_Internal' ) { -% eval "use RT;"; - - - -% } - - - -
- - Freeside v<% $FS::VERSION %>
- ">Documentation
-
-
- - RT v<% $RT::VERSION %>
-
Documentation
-
-
- +
Logged in as <% getotaker %> 
Preferences +% if ( $conf->config("ticket_system") +% && FS::TicketSystem->access_right(\%session, 'ModifySelf') ) { + | Ticketing preferences +% } +
@@ -88,9 +94,16 @@ input.fsblackbutton { border-left-color:#cccccc; border-right-color:#aaaaaa; border-bottom-color:#aaaaaa; + font-family: Arial, Verdana, Helvetica, sans-serif; font-weight:bold; padding-left:12px; padding-right:12px; + padding-top:0px; + padding-bottom:0px; + margin-left:0px; + margin-right:0px; + margin-top:2px; + margin-bottom:0px; overflow:visible; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666') } @@ -103,38 +116,76 @@ input.fsblackbuttonselected { border-left-color:#cccccc; border-right-color:#aaaaaa; border-bottom-color:#aaaaaa; + font-family: Arial, Verdana, Helvetica, sans-serif; font-weight:bold; padding-left:12px; padding-right:12px; + padding-top:0px; + padding-bottom:0px; + margin-left:0px; + margin-right:0px; + margin-top:2px; + margin-bottom:0px; overflow:visible; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079') } + +input.fstext { + border: 2px inset #eee; + /*border-top-color:#aaaaaa; + border-left-color:#aaaaaa; + border-right-color:#cccccc; + border-bottom-color:#cccccc; + */ + vertical-align:bottom; + text-align:right; + font-family: Arial,Verdana,Helvetica,sans-serif; + padding-left: 0px; + padding-right: 0px; + padding-top: 0px; + padding-bottom: 0px; + margin-left:0px; + margin-right:0px; + margin-top:0px; + margin-bottom:1px; +} + - + % if ( $menu_position eq 'top' ) { - + + + - - @@ -143,50 +194,55 @@ input.fsblackbuttonselected { - - @@ -220,6 +276,15 @@ input.fsblackbuttonselected {
+
+ + + + + + +
<% include('/elements/about_freeside.html') |n %><% include('/elements/about_rt.html') |n %>
+
+
+
-
- +% if ( $curuser->access_right('List customers') ) { + +
+ Advanced +
+% }
-
-
- Advanced - -
+
+% if ( $conf->exists('address2-search') ) { +
+ + +
+ +
+% }
-% if ( $FS::CurrentUser::CurrentUser->access_right('View invoices') ) { - +% if ( $curuser->access_right('View invoices') ) {
- -% if ( $FS::CurrentUser::CurrentUser->access_right('List invoices') ) { - - Advanced -% } - -
- + +% if ( $curuser->access_right('List invoices') ) { + Adv\ +% } +
+
% } -
+% if ( $curuser->access_right('View customer services') ) {
-
- Advanced - +
+ Advanced +
+% }
+ % if ( $conf->config("ticket_system") ) {
-
- Advanced - +
+ Advanced +
% }
+ + + + + + +
<% include('/elements/about_freeside.html') |n %>
<% include('/elements/about_rt.html') |n %>
+ @@ -228,19 +293,58 @@ input.fsblackbuttonselected { - <% $title %> + <% $title |h %> +% unless ( $nobr ) {

+% } + <% $menubar !~ /^\s*$/ ? "$menubar

" : '' %> <%init> -my($title, $menubar) = ( shift, shift ); -my $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc. -my $head = @_ ? shift : ''; #$head is for things that go in the section +my( $title, $menubar, $etc, $head ) = ( '', '', '', '' ); +my( $nobr, $nocss ) = ( 0, 0 ); +if ( ref($_[0]) ) { + my $opt = shift; + $title = $opt->{title}; + $menubar = $opt->{menubar}; + $etc = $opt->{etc}; + $head = $opt->{head}; + $nobr = $opt->{nobr}; + $nocss = $opt->{nocss}; +} else { + ($title, $menubar) = ( shift, shift ); + $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc. + $head = @_ ? shift : ''; #$head is for things that go in the section +} + my $conf = new FS::Conf; -my $menu_position = $FS::CurrentUser::CurrentUser->option('menu_position') - || 'left'; +my $curuser = $FS::CurrentUser::CurrentUser; + +my $menu_position = $curuser->option('menu_position') + || 'top'; #new default for 1.9 + +my $company_name; +my @agentnums = $curuser->agentnums; +if ( scalar(@agentnums) == 1 ) { + $company_name = $conf->config('company_name', $agentnums[0] ); +} else { + $company_name = $conf->config('company_name'); +} + +my $cust_width = 288; #251 #ok for IE, slightly bigger for windows firefox +my $cust_label = '(cust #, name, company'; +if ( $conf->exists('address1-search') ) { + $cust_label .= ', address'; + $cust_width += 64; +} +$cust_label .= ' or contact phone)'; + +my $address2_label = '(Unit #)'; +my $inv_label = '(inv #)'; +my $svc_label = '(user, email, ip, mac, domain or service phone)'; +my $ticketing_label = '(ticket #, subject, email or fulltext:text)';