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 257-271 Link Here
257
                                                [% END # /ms_value %]
258
                                                [% END # /ms_value %]
258
                                            </div> <!-- /.col -->
259
                                            </div> <!-- /.col -->
259
260
260
                                            [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
261
                                            [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 && AllPublicBranches.size > 1 ) %]
261
                                                <div class="col-sm col-md-3 col-lg-2 order-3 order-sm-4">
262
                                                <div class="col-sm col-md-3 col-lg-2 order-3 order-sm-4">
262
                                                    <select name="limit" id="select_library" class="form-select">
263
                                                    <select name="limit" id="select_library" class="form-select">
263
                                                        <option value="">All libraries</option>
264
                                                        <option value="">All libraries</option>
264
265
265
                                                        [% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %]
266
                                                        [% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %]
266
267
267
                                                        [% FOREACH library IN Branches.all( selected => opac_name ) %]
268
                                                        [% FOREACH library IN AllPublicBranches %]
268
                                                            [% NEXT UNLESS library.public %]
269
                                                            [% IF library.selected %]
269
                                                            [% IF library.selected %]
270
                                                                <option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option>
270
                                                                <option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option>
271
                                                            [% ELSE %]
271
                                                            [% ELSE %]
Lines 370-379 Link Here
370
                            </li>
370
                            </li>
371
                        [% END %]
371
                        [% END %]
372
                    [% END %]
372
                    [% END %]
373
                    [% IF ( Koha.Preference('OPACShowLibraries') ) %]
373
                    [% IF ( Koha.Preference('OPACShowLibraries') && AllPublicBranches.size > 0 ) %]
374
                        <li class="nav-item">
374
                        <li class="nav-item">
375
                            <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
375
                            <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
376
                                [% IF ( singleBranchMode ) %]
376
                                [% IF ( singleBranchMode || AllPublicBranches.size == 1 ) %]
377
                                    <span>Library</span>
377
                                    <span>Library</span>
378
                                [% ELSE %]
378
                                [% ELSE %]
379
                                    <span>Libraries</span>
379
                                    <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 14-19 Link Here
14
</head>
14
</head>
15
[% INCLUDE 'bodytag.inc' bodyid='advsearch' bodyclass='scrollto' %]
15
[% INCLUDE 'bodytag.inc' bodyid='advsearch' bodyclass='scrollto' %]
16
[% INCLUDE 'masthead.inc' %]
16
[% INCLUDE 'masthead.inc' %]
17
[% SET AllPublicBranches = Branches.all(  search_params => { public => 1 } ) %]
18
17
<form id="advsearch_form" action="/cgi-bin/koha/opac-search.pl" method="get">
19
<form id="advsearch_form" action="/cgi-bin/koha/opac-search.pl" method="get">
18
    <input type="hidden" name="advsearch" value="1"/>
20
    <input type="hidden" name="advsearch" value="1"/>
19
    <div class="main">
21
    <div class="main">
Lines 232-258 Link Here
232
                            <!-- AVAILABILITY LIMITS -->
234
                            <!-- AVAILABILITY LIMITS -->
233
                            <div id="location" class="advsearch_limit">
235
                            <div id="location" class="advsearch_limit">
234
                                <fieldset>
236
                                <fieldset>
235
                                    <label for="branchloop">Location and availability:</label>
237
                                    [% IF AllPublicBranches.size > 1 %]
236
                                    <select class="form-select" name="limit" id="branchloop">
238
                                        <label for="branchloop">Location and availability:</label>
237
                                    <option value="">All libraries</option>
239
                                    [% ELSE %]
238
                                    [% FOREACH BranchesLoo IN Branches.all( selected => opac_name ) %]
240
                                        <label for="branchloop">Availability:</label>
239
                                        [% NEXT UNLESS BranchesLoo.public %]
240
                                        [% IF BranchesLoo.selected %]
241
                                            <option value="branch:[% BranchesLoo.branchcode | html %]" selected="selected">[% BranchesLoo.branchname | html %]</option>
242
                                        [% ELSE %]
243
                                            <option value="branch:[% BranchesLoo.branchcode | html %]">[% BranchesLoo.branchname | html %]</option>
244
                                        [% END %]
245
                                    [% END %]
241
                                    [% END %]
246
                                    </select>
242
247
                                    [% IF search_groups %]
243
                                    [% IF AllPublicBranches.size > 1 %]
248
                                        <p>OR</p>
244
                                        <select class="form-select" name="limit" id="branchloop">
249
                                        <label for="categoryloop">Groups of libraries</label>
245
                                        <option value="">All libraries</option>
250
                                        <select class="form-select" name="limit" id="categoryloop">
246
                                        [% FOREACH BranchesLoo IN AllPublicBranches %]
251
                                            <option value=""> -- none -- </option>
247
                                            [% IF BranchesLoo.selected %]
252
                                            [% FOREACH sg IN search_groups %]
248
                                                <option value="branch:[% BranchesLoo.branchcode | html %]" selected="selected">[% BranchesLoo.branchname | html %]</option>
253
                                                <option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
249
                                            [% ELSE %]
250
                                                <option value="branch:[% BranchesLoo.branchcode | html %]">[% BranchesLoo.branchname | html %]</option>
254
                                            [% END %]
251
                                            [% END %]
252
                                        [% END %]
255
                                        </select>
253
                                        </select>
254
                                        [% IF search_groups %]
255
                                            <p>OR</p>
256
                                            <label for="categoryloop">Groups of libraries</label>
257
                                            <select class="form-select" name="limit" id="categoryloop">
258
                                                <option value=""> -- none -- </option>
259
                                                [% FOREACH sg IN search_groups %]
260
                                                    <option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
261
                                                [% END %]
262
                                            </select>
263
                                        [% END %]
256
                                    [% END %]
264
                                    [% END %]
257
                                    <div style="margin-top:.4em">
265
                                    <div style="margin-top:.4em">
258
                                        <label for="available-items"><input type="checkbox" id="available-items" name="limit" value="available" /> Only items currently available for loan or reference</label>
266
                                        <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