From 4a90171a8b71d09ded693aa3006727e21a40339b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 5 Nov 2020 17:36:49 +0000 Subject: [PATCH] Bug 24223: (follow-up) Make logged-in user's branchcode available to template This patch makes a couple of corrections for problems I discovered while working on Bug 24224: The variables required for correct display of news items by branch and language were not consistently available to the templates. In opac-readingrecord.pl, the "lang" variable was being overwritten. On this and other pages the logged-in patron's brachcode was not made available. I've corrected instances of KohaNews.get() to use the globally-available "logged_in_user.branchcode" instead. To test, apply the patch and follow the original test plan, with the addition of instances of the OpacNav additional contents item which have a specific library selected. Confirm that such items are correctly displayed according to the logged-in user's home library. If there is no logged-in user the library-specific OpacNav should not display. --- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc | 4 ++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt | 2 +- .../bootstrap/en/modules/opac-authoritiessearchresultlist.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-issue-note.tt | 2 +- .../bootstrap/en/modules/opac-memberentry-update-submitted.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 2 +- .../bootstrap/en/modules/opac-recordedbooks-search.tt | 2 +- .../bootstrap/en/modules/opac-registration-email-sent.tt | 2 +- .../bootstrap/en/modules/opac-registration-invalid.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-routing-lists.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-search-history.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt | 2 ++ koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt | 2 +- opac/opac-readingrecord.pl | 2 -- 42 files changed, 45 insertions(+), 41 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc index b03cf6c537..9840ff83bd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead-sci.inc @@ -3,7 +3,11 @@ [% USE AdditionalContents %] [% PROCESS 'html_helpers.inc' %] [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] +<<<<<<< HEAD [% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => branchcode, blocktitle => 0 ) %] +======= +[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] +>>>>>>> Bug 24223: (follow-up) Make logged-in user's branchcode available to template
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt index 13f76df5e5..73df14851f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt @@ -1,5 +1,5 @@ [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] An error has occurred › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt index 814aa2aa27..b2c4b0ee1d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt @@ -1,5 +1,5 @@ [% USE Koha %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( GetAvailability ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt index 94d789ebd0..37f7c44251 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt @@ -1,5 +1,5 @@ [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your payment [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt index 194e3be211..65e8b6805f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt @@ -3,7 +3,7 @@ [% USE Koha %] [% USE KohaNews %] [% PROCESS 'opac-authorities.inc' %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] <title>Entry [% authtypetext | html %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt index 53666b33f9..234976da92 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt @@ -3,7 +3,7 @@ [% USE Koha %] [% USE KohaNews %] [% PROCESS 'opac-authorities.inc' %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] [% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %] › Authority search › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt index 1b89b414a6..3f0a3aff9f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Authority search › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt index df1d56f330..3095823322 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt @@ -1,7 +1,7 @@ [% USE raw %] [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% PROCESS 'opac-authorities.inc' %] [% PROCESS 'authorities-search-results.inc' %] [% BLOCK pagination %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt index 0dd6e0fb2a..a9b99adb5f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt @@ -2,7 +2,7 @@ [% USE Asset %] [% USE raw %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Browse our catalog › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt index 4cf65d2653..8340010adc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Browse our catalog › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt index 0b6c2d2147..7b45e6c934 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Discharge › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt index 25e1adc98b..07cd84ed5d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% IF ( fullpage ) %] [% INCLUDE 'doc-head-open.inc' %] Download list [% shelf.shelfname | html %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog[% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt index 3dbaa0706f..ce6789447e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt @@ -2,7 +2,7 @@ [% USE KohaDates %] [% USE Branches %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Full subscription history for [% bibliotitle | html %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt index 5c7833ce6c..87a4c92f10 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -3,7 +3,7 @@ [% USE KohaDates %] [% USE Branches %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Your interlibrary loan requests › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt index 99360fbccb..0ea9f18b23 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Images for: [% INCLUDE 'biblio-title-head.inc' %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-issue-note.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-issue-note.tt index 320a93f3f4..bb529055e0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-issue-note.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-issue-note.tt @@ -2,7 +2,7 @@ [% USE KohaDates %] [% USE Branches %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Editing issue note for [% title | html %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry-update-submitted.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry-update-submitted.tt index 29cba12d48..afbd46d474 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry-update-submitted.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry-update-submitted.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Updates submitted › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 70d5f38b59..e9e2dd92cc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -7,7 +7,7 @@ [% USE KohaDates %] [% USE Math %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% SET userupdateview = 1 %] [% BLOCK streetnumber %] [% UNLESS hidden.defined('streetnumber') %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt index e54d9eac1e..6f6771f802 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Your messaging settings › [% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt index 31f8c18576..1140eb7f57 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt @@ -2,7 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] OverDrive search for '[% q | html %]' › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt index c9b1fdfdd2..da3bfd7e23 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt @@ -2,7 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Change your password › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt index 4241c7ceee..0bff7e36c4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt @@ -1,7 +1,7 @@ [% USE Koha %] [% USE Categories %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Forgotten password recovery › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt index 7f1d64f2d5..a947d3099b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-patron-consent.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% SET consentview = 1 %] [% INCLUDE 'doc-head-open.inc' %] Your consents › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt index 6d02b38be6..49eec4c495 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Your privacy management › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt index 32af755636..19d15bc924 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt @@ -2,7 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] RecordedBooks search for '[% q | html %]' › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt index 5b677fd275..b76b62ce13 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Please confirm your registration › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt index fe0d34551a..ba594f7686 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt index 4fe072df08..3a29ed9761 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reportproblem.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Report a problem › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt index 61ed5b197e..e0cbe45e19 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt @@ -1,7 +1,7 @@ [% USE raw %] [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] [% IF RestrictedPageTitle %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-routing-lists.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-routing-lists.tt index af7db5e8a9..71e493b667 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-routing-lists.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-routing-lists.tt @@ -3,7 +3,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] <title>Your routing lists › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt index eb8e3d7927..43bc130204 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt @@ -3,7 +3,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Your search history › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt index 4c9da46ca8..8f764a1f98 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Issues for a subscription › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt index 717b7f3727..42fe3d3a95 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Share a list › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index a2a7245e9f..0080ed5539 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -2,7 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% SET PRIVATE = 1 %] [% SET PUBLIC = 2 %] [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt index dad505368a..d5e12c82d4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt @@ -1,7 +1,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Recent comments › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt index 61d2934c4c..78736b450e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt @@ -2,7 +2,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Tags › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt index b3cc6662af..101b5d18de 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Subject cloud › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt index 5b2295979b..fb96d0b662 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt @@ -3,7 +3,7 @@ [% USE AuthorisedValues %] [% USE ItemTypes %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] Most popular titles › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalogMost popular titles [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index ce7d3146d9..cee3a1c93d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -6,7 +6,7 @@ [% USE ItemTypes %] [% USE Price %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt index 70f55d7c7c..06c9752456 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -20,6 +20,8 @@ (There was a problem checking in this item, please see library staff for assistance) [% END %] [% END %] +[% PROCESS 'html_helpers.inc' %] +[% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] Self check-in › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt index ee414f3cae..44a1387ece 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% USE KohaNews %] -[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacNav = KohaNews.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %] [% IF (render=='standalone') %] [% INCLUDE 'doc-head-open.inc' %] Search suggestions diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index 3652d000c7..925407d4eb 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -56,8 +56,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $borr = Koha::Patrons->find( $borrowernumber )->unblessed; -$template->param(%{$borr}); - my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; # get the record -- 2.20.1