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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-5 / +5 lines)
Lines 16-21 Link Here
16
[% SET OpacMoreSearches = AdditionalContents.get( location => "OpacMoreSearches", lang => lang, library => branchcode || default_branch ) %]
16
[% SET OpacMoreSearches = AdditionalContents.get( location => "OpacMoreSearches", lang => lang, library => branchcode || default_branch ) %]
17
[% SET CookieConsentBar = AdditionalContents.get( location => "CookieConsentBar", lang => lang, library => branchcode || default_branch ) %]
17
[% SET CookieConsentBar = AdditionalContents.get( location => "CookieConsentBar", lang => lang, library => branchcode || default_branch ) %]
18
[% SET CookieConsentPopup = AdditionalContents.get( location => "CookieConsentPopup", lang => lang, library => branchcode || default_branch ) %]
18
[% SET CookieConsentPopup = AdditionalContents.get( location => "CookieConsentPopup", lang => lang, library => branchcode || default_branch ) %]
19
[% SET AllPublicBranches = Branches.all(  search_params => { public => 1 }, selected => opac_name ) %]
19
20
20
<button id="scrolltocontent">Skip to main content</button>
21
<button id="scrolltocontent">Skip to main content</button>
21
<div id="wrapper">
22
<div id="wrapper">
Lines 251-265 Link Here
251
                                                [% END # /ms_value %]
252
                                                [% END # /ms_value %]
252
                                            </div> <!-- /.col -->
253
                                            </div> <!-- /.col -->
253
254
254
                                            [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
255
                                            [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 && AllPublicBranches.size > 1 ) %]
255
                                                <div class="col-sm col-md-3 col-lg-2 order-3 order-sm-4">
256
                                                <div class="col-sm col-md-3 col-lg-2 order-3 order-sm-4">
256
                                                    <select name="limit" id="select_library" class="form-control">
257
                                                    <select name="limit" id="select_library" class="form-control">
257
                                                        <option value="">All libraries</option>
258
                                                        <option value="">All libraries</option>
258
259
259
                                                        [% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %]
260
                                                        [% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %]
260
261
261
                                                        [% FOREACH library IN Branches.all( selected => opac_name ) %]
262
                                                        [% FOREACH library IN AllPublicBranches %]
262
                                                            [% NEXT UNLESS library.public %]
263
                                                            [% IF library.selected %]
263
                                                            [% IF library.selected %]
264
                                                                <option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option>
264
                                                                <option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option>
265
                                                            [% ELSE %]
265
                                                            [% ELSE %]
Lines 364-373 Link Here
364
                            </li>
364
                            </li>
365
                        [% END %]
365
                        [% END %]
366
                    [% END %]
366
                    [% END %]
367
                    [% IF ( Koha.Preference('OPACShowLibraries') ) %]
367
                    [% IF ( Koha.Preference('OPACShowLibraries') && AllPublicBranches.size > 0 ) %]
368
                        <li class="nav-item">
368
                        <li class="nav-item">
369
                            <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
369
                            <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
370
                                [% IF ( singleBranchMode ) %]
370
                                [% IF ( singleBranchMode || AllPublicBranches.size == 1 ) %]
371
                                    <span>Library</span>
371
                                    <span>Library</span>
372
                                [% ELSE %]
372
                                [% ELSE %]
373
                                    <span>Libraries</span>
373
                                    <span>Libraries</span>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc (-6 / +9 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% PROCESS 'html_helpers.inc' %]
3
[% PROCESS 'html_helpers.inc' %]
4
[% SET AllPublicBranches = Branches.all(  search_params => { public => 1 }, selected => branch ) %]
4
5
5
<div id="search-facets">
6
<div id="search-facets">
6
    <form method="get" action="/cgi-bin/koha/opac-topissues.pl">
7
    <form method="get" action="/cgi-bin/koha/opac-topissues.pl">
Lines 17-28 Link Here
17
                                [% IF ( limit == 100 ) %]<option value ="100" selected="selected">100 titles</option>[% ELSE %]<option value="100">100 titles</option>[% END %]
18
                                [% IF ( limit == 100 ) %]<option value ="100" selected="selected">100 titles</option>[% ELSE %]<option value="100">100 titles</option>[% END %]
18
                            </select></li>
19
                            </select></li>
19
20
20
                [% IF Branches.all.size > 1 %]
21
                [% IF AllPublicBranches.size > 1 %]
21
                <li><label for="branch">From: </label>
22
                    <li>
22
                            <select name="branch" id="branch">
23
                        <label for="branch">From: </label>
23
                                <option value="">All libraries</option>
24
                        <select name="branch" id="branch">
24
                                [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
25
                            <option value="">All libraries</option>
25
                            </select></li>
26
                            [% PROCESS options_for_libraries libraries => AllPublicBranches %]
27
                        </select>
28
                    </li>
26
                [% END %]
29
                [% END %]
27
30
28
                [% OpacAdvancedSearchTypes = Koha.Preference('OpacAdvancedSearchTypes').split('\|') %]
31
                [% OpacAdvancedSearchTypes = Koha.Preference('OpacAdvancedSearchTypes').split('\|') %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-18 / +26 lines)
Lines 9-14 Link Here
9
</head>
9
</head>
10
[% INCLUDE 'bodytag.inc' bodyid='advsearch' bodyclass='scrollto' %]
10
[% INCLUDE 'bodytag.inc' bodyid='advsearch' bodyclass='scrollto' %]
11
[% INCLUDE 'masthead.inc' %]
11
[% INCLUDE 'masthead.inc' %]
12
[% SET AllPublicBranches = Branches.all(  search_params => { public => 1 } ) %]
13
12
<form id="advsearch_form" action="/cgi-bin/koha/opac-search.pl" method="get">
14
<form id="advsearch_form" action="/cgi-bin/koha/opac-search.pl" method="get">
13
    <input type="hidden" name="advsearch" value="1"/>
15
    <input type="hidden" name="advsearch" value="1"/>
14
    <div class="main">
16
    <div class="main">
Lines 227-253 Link Here
227
                            <!-- AVAILABILITY LIMITS -->
229
                            <!-- AVAILABILITY LIMITS -->
228
                            <div id="location" class="advsearch_limit">
230
                            <div id="location" class="advsearch_limit">
229
                                <fieldset>
231
                                <fieldset>
230
                                    <label for="branchloop">Location and availability:</label>
232
                                    [% IF AllPublicBranches.size > 1 %]
231
                                    <select name="limit" id="branchloop">
233
                                        <label for="branchloop">Location and availability:</label>
232
                                    <option value="">All libraries</option>
234
                                    [% ELSE %]
233
                                    [% FOREACH BranchesLoo IN Branches.all( selected => opac_name ) %]
235
                                        <label for="branchloop">Availability:</label>
234
                                        [% NEXT UNLESS BranchesLoo.public %]
235
                                        [% IF BranchesLoo.selected %]
236
                                            <option value="branch:[% BranchesLoo.branchcode | html %]" selected="selected">[% BranchesLoo.branchname | html %]</option>
237
                                        [% ELSE %]
238
                                            <option value="branch:[% BranchesLoo.branchcode | html %]">[% BranchesLoo.branchname | html %]</option>
239
                                        [% END %]
240
                                    [% END %]
236
                                    [% END %]
241
                                    </select>
237
242
                                    [% IF search_groups %]
238
                                    [% IF AllPublicBranches.size > 1 %]
243
                                        <p>OR</p>
239
                                        <select name="limit" id="branchloop">
244
                                        <label for="categoryloop">Groups of libraries</label>
240
                                        <option value="">All libraries</option>
245
                                        <select name="limit" id="categoryloop">
241
                                        [% FOREACH BranchesLoo IN AllPublicBranches %]
246
                                            <option value=""> -- none -- </option>
242
                                            [% IF BranchesLoo.selected %]
247
                                            [% FOREACH sg IN search_groups %]
243
                                                <option value="branch:[% BranchesLoo.branchcode | html %]" selected="selected">[% BranchesLoo.branchname | html %]</option>
248
                                                <option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
244
                                            [% ELSE %]
245
                                                <option value="branch:[% BranchesLoo.branchcode | html %]">[% BranchesLoo.branchname | html %]</option>
249
                                            [% END %]
246
                                            [% END %]
247
                                        [% END %]
250
                                        </select>
248
                                        </select>
249
                                        [% IF search_groups %]
250
                                            <p>OR</p>
251
                                            <label for="categoryloop">Groups of libraries</label>
252
                                            <select name="limit" id="categoryloop">
253
                                                <option value=""> -- none -- </option>
254
                                                [% FOREACH sg IN search_groups %]
255
                                                    <option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
256
                                                [% END %]
257
                                            </select>
258
                                        [% END %]
251
                                    [% END %]
259
                                    [% END %]
252
                                    <div style="margin-top:.4em">
260
                                    <div style="margin-top:.4em">
253
                                        <label for="available-items"><input type="checkbox" id="available-items" name="limit" value="available" /> Only items currently available for loan or reference</label>
261
                                        <label for="available-items"><input type="checkbox" id="available-items" name="limit" value="available" /> Only items currently available for loan or reference</label>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-2 / +3 lines)
Lines 12-17 Link Here
12
[% SET OpacNavRight = AdditionalContents.get( location => "OpacNavRight", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
12
[% SET OpacNavRight = AdditionalContents.get( location => "OpacNavRight", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
13
[% SET OpacMainUserBlock = AdditionalContents.get( location => "OpacMainUserBlock", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
13
[% SET OpacMainUserBlock = AdditionalContents.get( location => "OpacMainUserBlock", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
14
[% SET OpacLoginInstructions = AdditionalContents.get( location => "OpacLoginInstructions", lang => lang, library => branchcode || default_branch ) %]
14
[% SET OpacLoginInstructions = AdditionalContents.get( location => "OpacLoginInstructions", lang => lang, library => branchcode || default_branch ) %]
15
[% SET AllPublicBranches = Branches.all(  search_params => { public => 1 }, selected => branchcode ) %]
15
[% INCLUDE 'doc-head-open.inc' %]
16
[% INCLUDE 'doc-head-open.inc' %]
16
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
17
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
17
<link rel="canonical" href="[% OPACBaseURL | url %]/" />
18
<link rel="canonical" href="[% OPACBaseURL | url %]/" />
Lines 64-70 Link Here
64
65
65
        <h1 class="sr-only">Koha home</h1>
66
        <h1 class="sr-only">Koha home</h1>
66
67
67
        [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
68
        [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) && AllPublicBranches.size > 1 %]
68
            [% UNLESS news_id %]
69
            [% UNLESS news_id %]
69
                <form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl">
70
                <form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl">
70
                    <legend class="sr-only">News</legend>
71
                    <legend class="sr-only">News</legend>
Lines 75-81 Link Here
75
                        [% ELSE %]
76
                        [% ELSE %]
76
                            <option value="">System-wide only</option>
77
                            <option value="">System-wide only</option>
77
                        [% END %]
78
                        [% END %]
78
                        [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
79
                        [% PROCESS options_for_libraries libraries => AllPublicBranches %]
79
                    </select>
80
                    </select>
80
                </form>
81
                </form>
81
            [% END %]
82
            [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt (-11 / +14 lines)
Lines 16-21 Link Here
16
[% INCLUDE 'masthead.inc' %]
16
[% INCLUDE 'masthead.inc' %]
17
17
18
[% SET disclaimer = AdditionalContents.get( location => "ArticleRequestsDisclaimerText", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
18
[% SET disclaimer = AdditionalContents.get( location => "ArticleRequestsDisclaimerText", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
19
[% SET AllPublicBranches = Branches.all(  search_params => { public => 1 } ) %]
19
20
20
<div class="main">
21
<div class="main">
21
    [% WRAPPER breadcrumbs %]
22
    [% WRAPPER breadcrumbs %]
Lines 163-180 Link Here
163
                                        </select>
164
                                        </select>
164
                                    </li>
165
                                    </li>
165
166
166
                                    <li>
167
                                    [% IF AllPublicBranches.size > 1 %]
167
                                        <label for="branchcode">Pickup library:</label>
168
                                        <li>
168
                                        <select name="branchcode" id="branchcode" required="required">
169
                                            <label for="branchcode">Pickup library:</label>
169
                                            [% FOREACH b IN Branches.all %]
170
                                            <select name="branchcode" id="branchcode" required="required">
170
                                                [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
171
                                                [% FOREACH b IN AllPublicBranches %]
171
                                                    <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
172
                                                    [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
172
                                                [% ELSE %]
173
                                                        <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
173
                                                    <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
174
                                                    [% ELSE %]
175
                                                        <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
176
                                                    [% END %]
174
                                                [% END %]
177
                                                [% END %]
175
                                            [% END %]
178
                                            </select>
176
                                        </select>
179
                                        </li>
177
                                    </li>
180
                                    [% END %]
178
                                </ul>
181
                                </ul>
179
                            </fieldset>
182
                            </fieldset>
180
183
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-4 / +4 lines)
Lines 8-13 Link Here
8
[% SET opacsuggestion = AdditionalContents.get( location => "OpacSuggestioninstructions", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
8
[% SET opacsuggestion = AdditionalContents.get( location => "OpacSuggestioninstructions", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
9
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
9
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
10
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
10
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
11
[% SET AllPublicBranches = Branches.all(  search_params => { public => 1 }, selected => logged_in_user.branchcode ) %]
11
[% INCLUDE 'doc-head-open.inc' %]
12
[% INCLUDE 'doc-head-open.inc' %]
12
<title>[% IF ( op_add_form ) %]Enter a new purchase suggestion[% END %]
13
<title>[% IF ( op_add_form ) %]Enter a new purchase suggestion[% END %]
13
[% IF ( op_else ) %]Purchase suggestions[% END %] &rsaquo;
14
[% IF ( op_else ) %]Purchase suggestions[% END %] &rsaquo;
Lines 219-237 Link Here
219
                                            [% END %]
220
                                            [% END %]
220
                                            </li>
221
                                            </li>
221
                                        [% END %]
222
                                        [% END %]
222
                                        [% UNLESS ( branchcode_hidden )%]
223
                                        [% UNLESS ( branchcode_hidden || AllPublicBranches.size < 2 )%]
223
                                            <li>
224
                                            <li>
224
                                                [% IF ( branchcode_required ) %]
225
                                                [% IF ( branchcode_required ) %]
225
                                                    <label for="branch" class="required">Library:</label>
226
                                                    <label for="branch" class="required">Library:</label>
226
                                                    <select name="branchcode" id="branch" required="required">
227
                                                    <select name="branchcode" id="branch" required="required">
227
                                                        <option value=""></option>
228
                                                        <option value=""></option>
228
                                                        [% PROCESS options_for_libraries libraries => Branches.all( selected => logged_in_user.branchcode ) %]
229
                                                        [% PROCESS options_for_libraries libraries => AllPublicBranches %]
229
                                                    </select>
230
                                                    </select>
230
                                                    <div class="required_label required">Required</div>
231
                                                    <div class="required_label required">Required</div>
231
                                                [% ELSE %]
232
                                                [% ELSE %]
232
                                                    <label for="branch">Library:</label>
233
                                                    <label for="branch">Library:</label>
233
                                                    <select name="branchcode" id="branch">
234
                                                    <select name="branchcode" id="branch">
234
                                                        [% PROCESS options_for_libraries libraries => Branches.all( selected => logged_in_user.branchcode ) %]
235
                                                        [% PROCESS options_for_libraries libraries => AllPublicBranches %]
235
                                                    </select>
236
                                                    </select>
236
                                                [% END %]
237
                                                [% END %]
237
                                            </li>
238
                                            </li>
238
- 

Return to bug 36742