@@ -, +, @@ use of Branches template plugin --- C4/Auth.pm | 3 --- circ/set-library.pl | 3 +-- koha-tmpl/intranet-tmpl/prog/en/includes/header.inc | 8 ++++---- .../intranet-tmpl/prog/en/includes/members-toolbar.inc | 2 +- .../intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- .../intranet-tmpl/prog/en/modules/circ/branchoverdues.tt | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt | 3 ++- .../intranet-tmpl/prog/en/modules/circ/set-library.tt | 2 +- .../prog/en/modules/labels/label-edit-batch.tt | 1 - .../intranet-tmpl/prog/en/modules/labels/label-manage.tt | 1 - .../prog/en/modules/patroncards/edit-batch.tt | 1 - .../intranet-tmpl/prog/en/modules/patroncards/manage.tt | 1 - koha-tmpl/opac-tmpl/bootstrap/en/includes/bodytag.inc | 5 +++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- 15 files changed, 18 insertions(+), 24 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -462,7 +462,6 @@ sub get_template_and_user { GoogleJackets => C4::Context->preference("GoogleJackets"), OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), - LoginBranchcode => ( C4::Context->userenv ? C4::Context->userenv->{"branch"} : undef ), LoginFirstname => ( C4::Context->userenv ? C4::Context->userenv->{"firstname"} : "Bel" ), LoginSurname => C4::Context->userenv ? C4::Context->userenv->{"surname"} : "Inconnu", emailaddress => C4::Context->userenv ? C4::Context->userenv->{"emailaddress"} : undef, @@ -490,7 +489,6 @@ sub get_template_and_user { IntranetNav => C4::Context->preference("IntranetNav"), IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"), LibraryName => C4::Context->preference("LibraryName"), - LoginBranchname => ( C4::Context->userenv ? C4::Context->userenv->{"branchname"} : undef ), advancedMARCEditor => C4::Context->preference("advancedMARCEditor"), canreservefromotherbranches => C4::Context->preference('canreservefromotherbranches'), intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), @@ -558,7 +556,6 @@ sub get_template_and_user { opac_name => $opac_name, LibraryName => "" . C4::Context->preference("LibraryName"), LibraryNameTitle => "" . $LibraryNameTitle, - LoginBranchname => C4::Context->userenv ? C4::Context->userenv->{"branchname"} : "", OPACAmazonCoverImages => C4::Context->preference("OPACAmazonCoverImages"), OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"), OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), --- a/circ/set-library.pl +++ a/circ/set-library.pl @@ -49,14 +49,13 @@ my @updated; if ( $branch and my $library = Koha::Libraries->find($branch) ) { if (! $userenv_branch or $userenv_branch ne $branch ) { my $branchname = $library->branchname; - $template->param(LoginBranchname => $branchname); # update template for new branch - $template->param(LoginBranchcode => $branch); # update template for new branch $session->param('branchname', $branchname); # update sesssion in DB $session->param('branch', $branch); # update sesssion in DB $session->flush(); push @updated, { updated_branch => 1, old_branch => $userenv_branch, + new_branch => $branch, }; } # else branch the same, no update } else { --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -77,11 +77,11 @@ | [% IF ( AutoLocation ) %] - [% LoginBranchname | html %] + [% Branches.GetLoggedInBranchname | html %] [% ELSE %] - [% LoginBranchname | html %] + [% Branches.GetLoggedInBranchname | html %] [% Branches.GetLoggedInBranchcode | html %] [% END %] @@ -97,11 +97,11 @@
  • [% IF ( AutoLocation ) %] - [% LoginBranchname | html %] + [% Branches.GetLoggedInBranchname | html %] [% ELSE %] Location:
    - [% LoginBranchname | html %] + [% Branches.GetLoggedInBranchname | html %] [% Branches.GetLoggedInBranchcode | html %] [% END %]
  • --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -120,7 +120,7 @@ - +