<META HTTP-Equiv="Cache-Control" Content="no-cache">
<META HTTP-Equiv="Pragma" Content="no-cache">
<META HTTP-Equiv="Expires" Content="0">
+% if ( $mobile ) {
+ <META NAME="viewport" content="width=device-width height=device-height user-scalable=yes">
+% }
<% include('menu.html', 'freeside_baseurl' => $fsurl,
'position' => $menu_position,
'nocss' => $nocss,
+ 'mobile' => $mobile,
) |n
%>
<TR>
+% if ( $mobile ) {
+
+ <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
+ <SCRIPT TYPE="text/javascript">
+ document.write(myBar.toString());
+ </SCRIPT>
+ </TD>
+ <TD STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079;width:auto" BGCOLOR="#cccccc">
+ <% include('searchbar-combined.html') |n %>
+ </TD>
+
+% } else {
+
<TD COLSPAN="7" WIDTH="100%" STYLE="padding:1px 0px 0px 0px;border-top: 1px solid #7e0079" BGCOLOR="#cccccc">
<SCRIPT TYPE="text/javascript">
document.write(myBar);
<TD COLSPAN=1 BGCOLOR="#cccccc" ALIGN="right" STYLE="padding-left:2px;padding-right:2px">
<% include('searchbar-ticket.html') |n %>
</TD>
+% }
</TR>
</TABLE>
my( $title, $menubar, $etc, $head ) = ( '', '', '', '' );
my( $nobr, $nocss ) = ( 0, 0 );
+
+my $mobile;
+
if ( ref($_[0]) ) {
my $opt = shift;
$title = $opt->{title};
$head = $opt->{head};
$nobr = $opt->{nobr};
$nocss = $opt->{nocss};
+ $mobile = $opt->{mobile};
} else {
($title, $menubar) = ( shift, shift );
$etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
my $menu_position = $curuser->option('menu_position')
|| 'top'; #new default for 1.9
+if ( !defined($mobile) ) {
+ $mobile = $curuser->option('mobile_menu',1) && FS::UI::Web::is_mobile();
+}
+if ( $cgi->param('mobile') =~ /^(\d)$/ ) { # allow client to override
+ $mobile = $1;
+}
+
my $company_name;
my @agentnums = $curuser->agentnums;
if ( scalar(@agentnums) == 1 ) {
} else {
$company_name = $conf->config('company_name');
}
-
</%init>