Bugzilla – Attachment 142247 Details for
Bug 31421
Library limitation on patron category breaks patron search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31421: Add a limited option to template plugin
Bug-31421-Add-a-limited-option-to-template-plugin.patch (text/plain), 1.66 KB, created by
Nick Clemens (kidclamp)
on 2022-10-20 14:15:00 UTC
(
hide
)
Description:
Bug 31421: Add a limited option to template plugin
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-10-20 14:15:00 UTC
Size:
1.66 KB
patch
obsolete
>From e44a03f4dfb062bd3aecc417954bcb105042caa3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 20 Oct 2022 14:13:37 +0000 >Subject: [PATCH] Bug 31421: Add a limited option to template plugin > >This adds a specific 'limited' routine to the Categories plugin, and uses >it for the new patron dropdowns > >To test: >1 - Limit a patron category to some branches >2 - Sign in not at one of those >3 - Confirm the new patron dropdowns don't include the category >--- > Koha/Template/Plugin/Categories.pm | 5 +++++ > koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/Koha/Template/Plugin/Categories.pm b/Koha/Template/Plugin/Categories.pm >index 198690406c..836811793d 100644 >--- a/Koha/Template/Plugin/Categories.pm >+++ b/Koha/Template/Plugin/Categories.pm >@@ -28,6 +28,11 @@ sub all { > return Koha::Patron::Categories->search($params); > } > >+sub limited { >+ my ( $self, $params ) = @_; >+ return Koha::Patron::Categories->search_with_library_limits($params); >+} >+ > sub GetName { > my ( $self, $categorycode ) = @_; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >index 4626a406c9..e26c5e676d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >@@ -1,7 +1,7 @@ > [% INCLUDE 'blocking_errors.inc' %] > [% USE Categories %] > [% USE Koha %] >-[% SET categories = Categories.all %] >+[% SET categories = Categories.limited %] > > [% UNLESS ( no_add ) %] > <div id="toolbar" class="btn-toolbar"> >-- >2.30.2
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 31421
:
141468
|
141479
|
142247
|
142332
|
142705
|
142706
|
142707