Bugzilla – Attachment 74299 Details for
Bug 20400
Add routing list tab to the patron account in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20400: Display new tab in OPAC only for patrons with routing lists
Bug-20400-Display-new-tab-in-OPAC-only-for-patrons.patch (text/plain), 2.67 KB, created by
Katrin Fischer
on 2018-04-17 06:36:31 UTC
(
hide
)
Description:
Bug 20400: Display new tab in OPAC only for patrons with routing lists
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-04-17 06:36:31 UTC
Size:
2.67 KB
patch
obsolete
>From 8f7ec17ae0ab14b62b86f0841959c250f0584b7e Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 20 Mar 2018 23:08:58 +0000 >Subject: [PATCH] Bug 20400: Display new tab in OPAC only for patrons with > routing lists > >The visibility of the routing list tab in the OPAC depends >on the system preference RoutingSerials and the existence >of routing list entries for the patron. > >Some libraries only offer routing lists to certain user groups and >would not want it generally visible. As there are currently no >actions you can perform from the list, this appears to be a >reasonable behaviour. > >See test plan in first patch. >--- > C4/Auth.pm | 3 ++- > koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 13c4652..0661031 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -238,12 +238,12 @@ sub get_template_and_user { > } > > my $borrowernumber; >+ my $patron; > if ($user) { > > # It's possible for $user to be the borrowernumber if they don't have a > # userid defined (and are logging in through some other method, such > # as SSL certs against an email address) >- my $patron; > $borrowernumber = getborrowernumber($user) if defined($user); > if ( !defined($borrowernumber) && defined($user) ) { > $patron = Koha::Patrons->find( $user ); >@@ -610,6 +610,7 @@ sub get_template_and_user { > PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), > PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), > useDischarge => C4::Context->preference('useDischarge'), >+ routing_lists_exist => ( $patron and $patron->get_routinglists ), > ); > > $template->param( OpacPublic => '1' ) if ( $user || C4::Context->preference("OpacPublic") ); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index 0e8c5bd..5914f04 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -96,7 +96,7 @@ > <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=1">your lists</a></li> > [% END %] > >- [% IF Koha.Preference( 'RoutingSerials' ) == 1 %] >+ [% IF Koha.Preference( 'RoutingSerials' ) && routing_lists_exist %] > [% IF ( routinglistsview ) %] > <li class="active"> > [% ELSE %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20400
:
72973
|
72974
|
73115
|
73116
|
73117
|
73118
|
73121
|
73122
|
73123
|
73124
|
74291
|
74292
|
74293
|
74294
|
74295
|
74296
|
74297
|
74298
|
74299
|
74300
|
74402
|
74588
|
74589
|
74590
|
74592
|
74593
|
74632
|
74633
|
74634
|
74635
|
74636
|
74637
|
74662
|
74664
|
74666