OpacShowRecentComments => C4::Context->preference("OpacShowRecentComments"),
OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"),
OPACUserCSS => "". C4::Context->preference("OPACUserCSS"),
+ OPACMobileUserCSS => "". C4::Context->preference("OPACMobileUserCSS"),
OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"),
OpacAuthorities => C4::Context->preference("OpacAuthorities"),
OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} .
OpacCloud => C4::Context->preference("OpacCloud"),
OpacKohaUrl => C4::Context->preference("OpacKohaUrl"),
OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"),
+ OpacMainUserBlockMobile => "" . C4::Context->preference("OpacMainUserBlockMobile"),
+ OpacShowFiltersPulldownMobile => C4::Context->preference("OpacShowFiltersPulldownMobile"),
+ OpacShowLibrariesPulldownMobile => C4::Context->preference("OpacShowLibrariesPulldownMobile"),
OpacNav => "" . C4::Context->preference("OpacNav"),
OpacNavRight => "" . C4::Context->preference("OpacNavRight"),
OpacNavBottom => "" . C4::Context->preference("OpacNavBottom"),
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionOverride',0,'Allow staff to check out an item with age restriction.',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('DidYouMeanFromAuthorities','0','Suggest searches based on authority file.','YesNo');
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACMobileUserCSS','','Include the following CSS for the mobile view on all pages in the OPAC:',NULL,'free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacMainUserBlockMobile','','Show the following HTML in its own column on the main page of the OPAC (mobile version):',NULL,'free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowLibrariesPulldownMobile','1','Show the libraries pulldown on the mobile version of the OPAC.',NULL,'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowFiltersPulldownMobile','1','Show the search filters pulldown on the mobile version of the OPAC.',NULL,'YesNo');
"INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToUseWhenPrefill','','Define a list of subfields to use when prefilling items (separated by space)','','Free');
");
print "Upgrade to $DBversion done (Adding PrefillItem and SubfieldsToUseWhenPrefill sysprefs)\n";
+ SetVersion ($DBversion);
}
$DBversion = "3.09.00.036";
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionOverride',0,'Allow staff to check out an item with age restriction.',NULL,'YesNo')");
print "Upgrade to $DBversion done (Add colum agerestriction to biblioitems and deletedbiblioitems, add system preferences AgeRestrictionMarker and AgeRestrictionOverride)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion ="XXX";
+if(C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACMobileUserCSS','','Include the following CSS for the mobile view on all pages in the OPAC:',NULL,'free');");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacMainUserBlockMobile','','Show the following HTML in its own column on the main page of the OPAC (mobile version):',NULL,'free');");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowLibrariesPulldownMobile','1','Show the libraries pulldown on the mobile version of the OPAC.',NULL,'YesNo');");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowFiltersPulldownMobile','1','Show the search filters pulldown on the mobile version of the OPAC.',NULL,'YesNo');");
+ print "Upgrade to $DBversion done (Add OPACMobileUserCSS, OpacMainUserBlockMobile, OpacShowLibrariesPulldownMobile and OpacShowFiltersPulldownMobile sysprefs)\n";
SetVersion($DBversion);
}
- pref: OPACUserCSS
type: textarea
class: code
+ -
+ - "Include the following CSS for the mobile view on all pages in the OPAC:"
+ - pref: OPACMobileUserCSS
+ type: textarea
+ class: code
-
- "Show the following HTML in its own column on the main page of the OPAC:"
- pref: OpacMainUserBlock
type: textarea
class: code
+ -
+ - "Show the following HTML in its own column on the main page of the OPAC (mobile version):"
+ - pref: OpacMainUserBlockMobile
+ type: textarea
+ class: code
+ -
+ - pref: OpacShowLibrariesPulldownMobile
+ choices:
+ yes: Show
+ no: "Don't show"
+ - the libraries pulldown on the mobile version of the OPAC.
+ -
+ - pref: OpacShowFiltersPulldownMobile
+ choices:
+ yes: Show
+ no: "Don't show"
+ - the search filters pulldown on the mobile version of the OPAC.
-
- "Show the following HTML on the left hand column of the main page and patron account on the OPAC (generally navigation links):"
- pref: OpacNav
/* Hidden elements */
+.mobile-hidden,
body#opac-main #login,
body#opac-main #login~div,
body#opac-main #opacnav,
+body#opac-main #opacmainuserblock,
body#opac-main #news,
body#results #facetcontainer,
body#opac-detail #ulactioncontainer>:not(#action),
/* Main */
-body#opac-main #opacmainuserblock {
- padding: 0
-}
-
body#opac-main #container #ctn_lt{
padding: 15px;
}
+body#opac-main #opacmainuserblockmobile {
+ display: block;
+}
+
+
/* Results */
padding-top: 50px;
}
-form.single-library #filters .jqTransformSelectWrapper {
+form#searchform #filters .jqTransformSelectWrapper,
+form#searchform #libraries .jqTransformSelectWrapper {
position: relative;
- width: 100% !important;
left: 0;
top: 0;
border-radius: 3px;
}
form.multi-libraries #filters .jqTransformSelectWrapper{
- position: relative;
width: 49% !important;
float: left;
- top: 0px;
- left: 0px;
- border-radius: 3px;
}
form.multi-libraries #libraries .jqTransformSelectWrapper{
- position: relative;
width: 49% !important;
float: right;
- top: 0px;
- left: 0px;
- border-radius: 3px;
+}
+
+form.single-library #filters .jqTransformSelectWrapper,
+form.multi-libraries.single-field-mobile #filters .jqTransformSelectWrapper,
+form.multi-libraries.single-field-mobile #libraries .jqTransformSelectWrapper{
+ width: 100% !important;
+ float:left;
}
form.multi-libraries .input-wrapper{
box-shadow: 1px 1px 3px 0 #666;
}
+body#opac-main #opacmainuserblockmobile {
+ display: none;
+}
+
.mobile_only {
display : none;
}
<link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<link rel="stylesheet" type="text/css" media="screen and (max-width:700px)" href="[% themelang %]/css/mobile.css" />
+[% IF ( OPACMobileUserCSS ) %]<style type="text/css" media="screen and (max-width:700px)">[% OPACMobileUserCSS %]</style>[% END %]
[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
<!-- yui js -->
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
[% IF ( OpacPublic ) %]
<div id="fluid-offset">
-[% UNLESS ( advsearch ) %]<form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="[% IF ( OpacAddMastheadLibraryPulldown ) %]multi-libraries[% ELSE %]single-library[% END %]">
+[% UNLESS ( advsearch ) %]
+[% IF ( OpacAddMastheadLibraryPulldown ) %]
+ [% IF ( OpacShowFiltersPulldownMobile and not OpacShowLibrariesPulldownMobile ) or ( not OpacShowFiltersPulldownMobile and OpacShowLibrariesPulldownMobile ) %]
+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries single-field-mobile">
+ [% ELSE %]
+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries">
+ [% END %]
+[% ELSE %]
+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="single-library">
+[% END %]
<label for="masthead_search" class="left"> Search
[% UNLESS ( OpacAddMastheadLibraryPulldown ) %]
[% IF ( mylibraryfirst ) %] (in [% mylibraryfirst %] only)[% END %]
[% END %]
</label>
-
- <div id="filters">
+ [% IF ( OpacShowFiltersPulldownMobile ) %]
+ <div id="filters">
+ [% ELSE %]
+ <div id="filters" class="mobile-hidden">
+ [% END %]
<select name="idx" id="masthead_search" class="left">
[% IF ( ms_kw ) %]
<option selected="selected" value="">Library catalog</option>
</div>
[% IF ( OpacAddMastheadLibraryPulldown ) %]
- <div id="libraries">
+ [% IF ( OpacShowLibrariesPulldownMobile ) %]
+ <div id="libraries">
+ [% ELSE %]
+ <div id="libraries" class="mobile-hidden">
+ [% END %]
<select name="limit" id="select_library" class="left">
<option value="">All libraries</option>
[% FOREACH BranchesLoo IN BranchesLoop %]
</form>
[% ELSE %] <!--advsearch -->
-<form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="[% IF ( OpacAddMastheadLibraryPulldown ) %]multi-libraries[% ELSE %]single-library[% END %]">
+ [% IF ( OpacAddMastheadLibraryPulldown ) %]
+ [% IF ( OpacShowFiltersPulldownMobile and not OpacShowLibrariesPulldownMobile ) or ( not OpacShowFiltersPulldownMobile and OpacShowLibrariesPulldownMobile ) %]
+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries single-field-mobile">
+ [% ELSE %]
+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries">
+ [% END %]
+ [% ELSE %]
+ <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="single-library">
+ [% END %]
<label for="masthead_search" class="left"> Search
[% UNLESS ( OpacAddMastheadLibraryPulldown ) %]
[% IF ( mylibraryfirst ) %] (in [% mylibraryfirst %] only)[% END %]
[% END %]
</label>
-
- <div id="filters" class="transparent">
+ [% IF ( OpacShowFiltersPulldownMobile ) %]
+ <div id="filters" class="transparent">
+ [% ELSE %]
+ <div id="filters" class="transparent mobile-hidden">
+ [% END %]
<select name="idx" id="masthead_search" class="left" disabled="disabled">
<option selected="selected" value="">Library Catalog</option>
</select>
</div>
[% IF ( OpacAddMastheadLibraryPulldown ) %]
- <div id="libraries">
+ [% IF ( OpacShowLibrariesPulldownMobile ) %]
+ <div id="libraries">
+ [% ELSE %]
+ <div id="libraries" class="mobile-hidden">
+ [% END %]
<select name="limit" id="select_library" class="left transparent">
<option value="">All Libraries</option>
</select>
display: inline;
}
+body#opac-main #opacmainuserblockmobile {
+ display: none;
+}
+
.mobile_only {
display : none;
}
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% opac_css_override %]" />
[% END %]
<link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
+[% IF ( OPACMobileUserCSS ) %]<style type="text/css" media="screen and (max-width:700px)">[% OPACMobileUserCSS %]</style>[% END %]
[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
<!-- yui js -->
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
[% END %]
[% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock" class="container">[% OpacMainUserBlock %]</div>[% END %]
+ [% IF ( OpacMainUserBlockMobile ) %]<div id="opacmainuserblockmobile" class="container">[% OpacMainUserBlockMobile %]</div>[% END %]
</div>