View | Details | Raw Unified | Return to bug 8597
Collapse All | Expand All

(-)a/C4/Auth.pm (+4 lines)
Lines 409-414 sub get_template_and_user { Link Here
409
            OpacShowRecentComments    => C4::Context->preference("OpacShowRecentComments"),
409
            OpacShowRecentComments    => C4::Context->preference("OpacShowRecentComments"),
410
            OPACURLOpenInNewWindow    => "" . C4::Context->preference("OPACURLOpenInNewWindow"),
410
            OPACURLOpenInNewWindow    => "" . C4::Context->preference("OPACURLOpenInNewWindow"),
411
            OPACUserCSS               => "". C4::Context->preference("OPACUserCSS"),
411
            OPACUserCSS               => "". C4::Context->preference("OPACUserCSS"),
412
            OPACMobileUserCSS         => "". C4::Context->preference("OPACMobileUserCSS"),
412
            OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"),
413
            OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"),
413
            OpacAuthorities           => C4::Context->preference("OpacAuthorities"),
414
            OpacAuthorities           => C4::Context->preference("OpacAuthorities"),
414
            OPACBaseURL               => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} .
415
            OPACBaseURL               => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} .
Lines 420-425 sub get_template_and_user { Link Here
420
            OpacCloud                 => C4::Context->preference("OpacCloud"),
421
            OpacCloud                 => C4::Context->preference("OpacCloud"),
421
            OpacKohaUrl               => C4::Context->preference("OpacKohaUrl"),
422
            OpacKohaUrl               => C4::Context->preference("OpacKohaUrl"),
422
            OpacMainUserBlock         => "" . C4::Context->preference("OpacMainUserBlock"),
423
            OpacMainUserBlock         => "" . C4::Context->preference("OpacMainUserBlock"),
424
            OpacMainUserBlockMobile   => "" . C4::Context->preference("OpacMainUserBlockMobile"),
425
            OpacShowFiltersPulldownMobile => C4::Context->preference("OpacShowFiltersPulldownMobile"),
426
            OpacShowLibrariesPulldownMobile => C4::Context->preference("OpacShowLibrariesPulldownMobile"),
423
            OpacNav                   => "" . C4::Context->preference("OpacNav"),
427
            OpacNav                   => "" . C4::Context->preference("OpacNav"),
424
            OpacNavRight              => "" . C4::Context->preference("OpacNavRight"),
428
            OpacNavRight              => "" . C4::Context->preference("OpacNavRight"),
425
            OpacNavBottom             => "" . C4::Context->preference("OpacNavBottom"),
429
            OpacNavBottom             => "" . C4::Context->preference("OpacNavBottom"),
(-)a/installer/data/mysql/sysprefs.sql (+4 lines)
Lines 374-376 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
377
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');
378
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');
379
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowLibrariesPulldownMobile','1','Show the libraries pulldown on the mobile version of the OPAC.',NULL,'YesNo');
380
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');
(-)a/installer/data/mysql/updatedatabase.pl (+10 lines)
Lines 5635-5640 if(C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5635
    SetVersion($DBversion);
5635
    SetVersion($DBversion);
5636
}
5636
}
5637
5637
5638
$DBversion ="XXX";
5639
if(C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5640
    $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');");
5641
    $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');");
5642
    $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');");
5643
    $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');");
5644
    print "Upgrade to $DBversion done (Add OPACMobileUserCSS, OpacMainUserBlockMobile, OpacShowLibrariesPulldownMobile and OpacShowFiltersPulldownMobile sysprefs)\n";
5645
    SetVersion($DBversion);
5646
}
5647
5638
=head1 FUNCTIONS
5648
=head1 FUNCTIONS
5639
5649
5640
=head2 TableExists($table)
5650
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+22 lines)
Lines 163-173 OPAC: Link Here
163
              type: textarea
163
              type: textarea
164
              class: code
164
              class: code
165
        -
165
        -
166
            - "Include the following CSS for the mobile view on all pages in the OPAC:"
167
            - pref: OPACMobileUserCSS
168
              type: textarea
169
              class: code
170
        -
166
            - "Show the following HTML in its own column on the main page of the OPAC:"
171
            - "Show the following HTML in its own column on the main page of the OPAC:"
167
            - pref: OpacMainUserBlock
172
            - pref: OpacMainUserBlock
168
              type: textarea
173
              type: textarea
169
              class: code
174
              class: code
170
        -
175
        -
176
            - "Show the following HTML in its own column on the main page of the OPAC (mobile version):"
177
            - pref: OpacMainUserBlockMobile
178
              type: textarea
179
              class: code
180
        -
181
            - pref: OpacShowLibrariesPulldownMobile
182
              choices:
183
                  yes: Show
184
                  no: "Don't show"
185
            - the libraries pulldown on the mobile version of the OPAC.
186
        -
187
            - pref: OpacShowFiltersPulldownMobile
188
              choices:
189
                  yes: Show
190
                  no: "Don't show"
191
            - the search filters pulldown on the mobile version of the OPAC.
192
        -
171
            - "Show the following HTML on the left hand column of the main page and patron account on the OPAC (generally navigation links):"
193
            - "Show the following HTML on the left hand column of the main page and patron account on the OPAC (generally navigation links):"
172
            - pref: OpacNav
194
            - pref: OpacNav
173
              type: textarea
195
              type: textarea
(-)a/koha-tmpl/opac-tmpl/ccsr/en/css/mobile.css (-14 / +16 lines)
Lines 5-13 Link Here
5
5
6
/* Hidden elements */
6
/* Hidden elements */
7
7
8
.mobile-hidden,
8
body#opac-main #login,
9
body#opac-main #login,
9
body#opac-main #login~div,
10
body#opac-main #login~div,
10
body#opac-main #opacnav,
11
body#opac-main #opacnav,
12
body#opac-main #opacmainuserblock,
11
body#opac-main #news,
13
body#opac-main #news,
12
body#results #facetcontainer,
14
body#results #facetcontainer,
13
body#opac-detail #ulactioncontainer>:not(#action),
15
body#opac-detail #ulactioncontainer>:not(#action),
Lines 99-112 body#results #breadcrumbs>*{ Link Here
99
101
100
/* Main */
102
/* Main */
101
103
102
body#opac-main #opacmainuserblock {
103
    padding: 0
104
}
105
106
body#opac-main #container #ctn_lt{
104
body#opac-main #container #ctn_lt{
107
    padding: 15px;
105
    padding: 15px;
108
}
106
}
109
107
108
body#opac-main #opacmainuserblockmobile {
109
    display: block;
110
}
111
112
110
113
111
/* Results */
114
/* Results */
112
115
Lines 257-286 form#searchform { Link Here
257
    padding-top: 50px;
260
    padding-top: 50px;
258
}
261
}
259
262
260
form.single-library #filters .jqTransformSelectWrapper {
263
form#searchform #filters .jqTransformSelectWrapper,
264
form#searchform #libraries .jqTransformSelectWrapper {
261
    position: relative;
265
    position: relative;
262
    width: 100% !important;
263
    left: 0;
266
    left: 0;
264
    top: 0;
267
    top: 0;
265
    border-radius: 3px;
268
    border-radius: 3px;
266
}
269
}
267
270
268
form.multi-libraries #filters .jqTransformSelectWrapper{
271
form.multi-libraries #filters .jqTransformSelectWrapper{
269
    position: relative;
270
    width: 49% !important;
272
    width: 49% !important;
271
    float: left;
273
    float: left;
272
    top: 0px;
273
    left: 0px;
274
    border-radius: 3px;
275
}
274
}
276
275
277
form.multi-libraries #libraries .jqTransformSelectWrapper{
276
form.multi-libraries #libraries .jqTransformSelectWrapper{
278
    position: relative;
279
    width: 49% !important;
277
    width: 49% !important;
280
    float: right;
278
    float: right;
281
    top: 0px;
279
}
282
    left: 0px;
280
283
    border-radius: 3px;
281
form.single-library #filters .jqTransformSelectWrapper,
282
form.multi-libraries.single-field-mobile #filters .jqTransformSelectWrapper,
283
form.multi-libraries.single-field-mobile #libraries .jqTransformSelectWrapper{
284
    width: 100% !important;
285
    float:left;
284
}
286
}
285
287
286
form.multi-libraries .input-wrapper{
288
form.multi-libraries .input-wrapper{
(-)a/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc (+1 lines)
Lines 22-27 Link Here
22
<link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
22
<link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
23
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
23
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
24
<link rel="stylesheet" type="text/css" media="screen and (max-width:700px)" href="[% themelang %]/css/mobile.css" />
24
<link rel="stylesheet" type="text/css" media="screen and (max-width:700px)" href="[% themelang %]/css/mobile.css" />
25
[% IF ( OPACMobileUserCSS ) %]<style type="text/css" media="screen and (max-width:700px)">[% OPACMobileUserCSS %]</style>[% END %]
25
[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
26
[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
26
<!-- yui js --> 
27
<!-- yui js --> 
27
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> 
28
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> 
(-)a/koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc (-9 / +42 lines)
Lines 84-97 Link Here
84
84
85
[% IF ( OpacPublic ) %]
85
[% IF ( OpacPublic ) %]
86
<div id="fluid-offset">
86
<div id="fluid-offset">
87
[% 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 %]">
87
88
    <label for="masthead_search" class="left"> Search 
88
89
[% UNLESS ( advsearch ) %]
90
[% IF ( OpacAddMastheadLibraryPulldown ) %]
91
    [% IF ( OpacShowFiltersPulldownMobile and not OpacShowLibrariesPulldownMobile ) or ( not OpacShowFiltersPulldownMobile and OpacShowLibrariesPulldownMobile ) %]
92
        <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries single-field-mobile">
93
    [% ELSE %]
94
        <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries">
95
    [% END %]
96
[% ELSE %]
97
    <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="single-library">
98
[% END %]
99
    <label for="masthead_search" class="left"> Search
89
    [% UNLESS ( OpacAddMastheadLibraryPulldown ) %]
100
    [% UNLESS ( OpacAddMastheadLibraryPulldown ) %]
90
            [% IF ( mylibraryfirst ) %] (in [% mylibraryfirst %] only)[% END %]
101
            [% IF ( mylibraryfirst ) %] (in [% mylibraryfirst %] only)[% END %]
91
    [% END %]
102
    [% END %]
92
    </label>
103
    </label>
93
104
    [% IF ( OpacShowFiltersPulldownMobile ) %]
94
    <div id="filters">
105
        <div id="filters">
106
    [% ELSE %]
107
        <div id="filters" class="mobile-hidden">
108
    [% END %]
95
    <select name="idx" id="masthead_search" class="left">
109
    <select name="idx" id="masthead_search" class="left">
96
    [% IF ( ms_kw ) %]
110
    [% IF ( ms_kw ) %]
97
        <option selected="selected" value="">Library catalog</option>
111
        <option selected="selected" value="">Library catalog</option>
Lines 139-145 Link Here
139
</div>
153
</div>
140
154
141
   [% IF ( OpacAddMastheadLibraryPulldown ) %]
155
   [% IF ( OpacAddMastheadLibraryPulldown ) %]
142
    <div id="libraries">
156
        [% IF ( OpacShowLibrariesPulldownMobile ) %]
157
            <div id="libraries">
158
        [% ELSE %]
159
            <div id="libraries" class="mobile-hidden">
160
        [% END %]
143
      <select name="limit" id="select_library" class="left">
161
      <select name="limit" id="select_library" class="left">
144
         <option value="">All libraries</option>
162
         <option value="">All libraries</option>
145
         [% FOREACH BranchesLoo IN BranchesLoop %]
163
         [% FOREACH BranchesLoo IN BranchesLoop %]
Lines 168-181 Link Here
168
186
169
    </form>
187
    </form>
170
[% ELSE %] <!--advsearch -->
188
[% ELSE %] <!--advsearch -->
171
<form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="[% IF ( OpacAddMastheadLibraryPulldown ) %]multi-libraries[% ELSE %]single-library[% END %]">
189
    [% IF ( OpacAddMastheadLibraryPulldown ) %]
190
        [% IF ( OpacShowFiltersPulldownMobile and not OpacShowLibrariesPulldownMobile ) or ( not OpacShowFiltersPulldownMobile and OpacShowLibrariesPulldownMobile ) %]
191
            <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries single-field-mobile">
192
        [% ELSE %]
193
            <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="multi-libraries">
194
        [% END %]
195
    [% ELSE %]
196
        <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="single-library">
197
    [% END %]
172
    <label for="masthead_search" class="left"> Search
198
    <label for="masthead_search" class="left"> Search
173
    [% UNLESS ( OpacAddMastheadLibraryPulldown ) %]
199
    [% UNLESS ( OpacAddMastheadLibraryPulldown ) %]
174
            [% IF ( mylibraryfirst ) %] (in [% mylibraryfirst %] only)[% END %]
200
            [% IF ( mylibraryfirst ) %] (in [% mylibraryfirst %] only)[% END %]
175
    [% END %]
201
    [% END %]
176
    </label>
202
    </label>
177
203
    [% IF ( OpacShowFiltersPulldownMobile ) %]
178
    <div id="filters" class="transparent">
204
        <div id="filters" class="transparent">
205
    [% ELSE %]
206
        <div id="filters" class="transparent mobile-hidden">
207
    [% END %]
179
        <select name="idx" id="masthead_search" class="left" disabled="disabled">
208
        <select name="idx" id="masthead_search" class="left" disabled="disabled">
180
            <option selected="selected" value="">Library Catalog</option>
209
            <option selected="selected" value="">Library Catalog</option>
181
        </select>
210
        </select>
Lines 186-192 Link Here
186
</div>
215
</div>
187
216
188
   [% IF ( OpacAddMastheadLibraryPulldown ) %]
217
   [% IF ( OpacAddMastheadLibraryPulldown ) %]
189
        <div id="libraries">
218
        [% IF ( OpacShowLibrariesPulldownMobile ) %]
219
            <div id="libraries">
220
        [% ELSE %]
221
            <div id="libraries" class="mobile-hidden">
222
        [% END %]
190
          <select name="limit" id="select_library" class="left transparent">
223
          <select name="limit" id="select_library" class="left transparent">
191
             <option value="">All Libraries</option>
224
             <option value="">All Libraries</option>
192
          </select>
225
          </select>
(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (+4 lines)
Lines 2620-2625 ul.ui-tabs-nav li { Link Here
2620
    box-shadow: 1px 1px 3px 0 #666;
2620
    box-shadow: 1px 1px 3px 0 #666;
2621
}
2621
}
2622
2622
2623
body#opac-main #opacmainuserblockmobile {
2624
    display: none;
2625
}
2626
2623
.mobile_only {
2627
.mobile_only {
2624
   display : none;
2628
   display : none;
2625
}
2629
}
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc (+1 lines)
Lines 20-25 Link Here
20
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% opac_css_override %]" />
20
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% opac_css_override %]" />
21
[% END %]
21
[% END %]
22
<link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
22
<link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
23
[% IF ( OPACMobileUserCSS ) %]<style type="text/css" media="screen and (max-width:700px)">[% OPACMobileUserCSS %]</style>[% END %]
23
[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
24
[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
24
<!-- yui js --> 
25
<!-- yui js --> 
25
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> 
26
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> 
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt (-1 / +1 lines)
Lines 37-42 Link Here
37
[% END %]
37
[% END %]
38
38
39
	[% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock" class="container">[% OpacMainUserBlock %]</div>[% END %]
39
	[% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock" class="container">[% OpacMainUserBlock %]</div>[% END %]
40
	[% IF ( OpacMainUserBlockMobile ) %]<div id="opacmainuserblockmobile" class="container">[% OpacMainUserBlockMobile %]</div>[% END %]
40
41
41
</div>
42
</div>
42
		
43
		
43
- 

Return to bug 8597