diff options
author | ivan <ivan> | 2009-06-16 03:29:26 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-06-16 03:29:26 +0000 |
commit | 8588f3c0bfbcbeb58dd25a57b5ea375cec00279a (patch) | |
tree | ea03db9ff9d411800aa04813c995ddccfdaa7544 /httemplate/elements/menubar.html | |
parent | c7d6edd92281d39e6eb59656a5b79faf8454973d (diff) |
basic customer view tabs, RT#5586
Diffstat (limited to 'httemplate/elements/menubar.html')
-rw-r--r-- | httemplate/elements/menubar.html | 119 |
1 files changed, 109 insertions, 10 deletions
diff --git a/httemplate/elements/menubar.html b/httemplate/elements/menubar.html index ec6c13fea..4d2700cc5 100644 --- a/httemplate/elements/menubar.html +++ b/httemplate/elements/menubar.html @@ -1,10 +1,109 @@ -% -% my($item, $url, @html); -% while (@_) { -% ($item, $url) = splice(@_,0,2); -% next if $item =~ /^\s*Main\s+Menu\s*$/i; -% push @html, qq!<A HREF="$url">$item</A>!; -% } -% - -<% join(' | ', @html) %> +<%doc> + +Example: + + include( '/elements/menubar.html', + + #options hashref (optional) + { 'newstyle' => 1, #may become the default at some point + }, + + #menubar entries (required) + 'label' => $url, + 'label2' => $url2, + #etc. + + ); + +</%doc> +%if ( $opt->{'newstyle'} ) { + +% #false laziness w/header.html... shouldn't these just go in freeside.css? + + <style type="text/css"> + a.fsblackbutton { + background-color:#333333; + color: #ffffff; + border:1px solid; + border-top-color:#cccccc; + border-left-color:#cccccc; + border-right-color:#aaaaaa; + border-bottom-color:#aaaaaa; + /*font-weight:bold;*/ + /*padding-left:12px; + padding-right:12px;*/ + padding-left:4px; + padding-right:4px; + text-decoration:none; + overflow:visible; + filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666') + } + + a.fsblackbuttonselected { + background-color:#7e0079; + color: #ffffff; + border:1px solid; + border-top-color:#cccccc; + border-left-color:#cccccc; + border-right-color:#aaaaaa; + border-bottom-color:#aaaaaa; + /*font-weight:bold;*/ + /*padding-left:12px; + padding-right:12px;*/ + padding-left:4px; + padding-right:4px; + text-decoration:none; + overflow:visible; + filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079') + } + </style> + + <TABLE BGCOLOR="#000000" BORDER=0 CELLSPACING=0 CELLPADDING=4> + <TR> + <TD STYLE="background-image:url(<%$fsurl%>images/gray-black-side.png); background-repeat:repeat-y;padding-left:0px"> + + </TD> + <TD> + <% join(' ', @html ) %> + </TD> + <TD STYLE="background-image:url(<%$fsurl%>images/black-gray-side.png); background-repeat:repeat-y;padding-right:0px"> + + </TD> + </TR> + </TABLE> + +%} else { + + <% join(' | ', @html) %> + +%} +<%init> + +my $opt = ref($_[0]) ? shift : {}; + +my $url_base = $opt->{'url_base'}; + +my @html; +while (@_) { + + my ($item, $url) = splice(@_,0,2); + next if $item =~ /^\s*Main\s+Menu\s*$/i; + + my $style = ''; + if ( $opt->{'newstyle'} ) { + + my $dclass = $item eq $opt->{'selected'} + ? 'fsblackbuttonselected' + : 'fsblackbutton'; + + $style = + qq( CLASS="$dclass" ). + qq( onMouseOver="this.className='fsblackbuttonselected'; return true;" ). + qq( onMouseOut="this.className='$dclass'; return true;" ); + } + + push @html, qq!<A HREF="$url_base$url" $style>$item</A>!; + +} + +</%init> |