Bugzilla – Attachment 62416 Details for
Bug 18433
Allow to select results to export in item search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18433: Add new subroutine GetDescriptionByKohaField to AuthorisedValues TT plugin
Bug-18433-Add-new-subroutine-GetDescriptionByKohaF.patch (text/plain), 1.49 KB, created by
Jonathan Druart
on 2017-04-19 19:17:43 UTC
(
hide
)
Description:
Bug 18433: Add new subroutine GetDescriptionByKohaField to AuthorisedValues TT plugin
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-04-19 19:17:43 UTC
Size:
1.49 KB
patch
obsolete
>From ee3238fa6bf80f62756019be9c9b0c580bcc2507 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 19 Apr 2017 16:15:36 -0300 >Subject: [PATCH] Bug 18433: Add new subroutine GetDescriptionByKohaField to > AuthorisedValues TT plugin > >To allow quick access to AV description >--- > Koha/Template/Plugin/AuthorisedValues.pm | 19 +++++++++++++------ > 1 file changed, 13 insertions(+), 6 deletions(-) > >diff --git a/Koha/Template/Plugin/AuthorisedValues.pm b/Koha/Template/Plugin/AuthorisedValues.pm >index 603f5a9..0ab30cb 100644 >--- a/Koha/Template/Plugin/AuthorisedValues.pm >+++ b/Koha/Template/Plugin/AuthorisedValues.pm >@@ -69,12 +69,19 @@ sub GetCategories { > ]; > } > >-sub GetCategoryByKohaField { >- my ($self, $kohafield, $frameworkcode) = @_; >- >- my $category = Koha::AuthorisedValueCategories->find_by_koha_field($kohafield, $frameworkcode); >- >- return $category ? $category->category_name : undef; >+sub GetDescriptionByKohaField { >+ my ( $self, $params ) = @_; >+ my $frameworkcode = $params->{frameworkcode} || ''; >+ my $kohafield = $params->{kohafield}; >+ my $authorised_value = $params->{authorised_value}; >+ my $description = Koha::AuthorisedValues->get_description_by_koha_field( >+ { >+ frameworkcode => $frameworkcode, >+ kohafield => $kohafield, >+ authorised_value => $authorised_value >+ } >+ ); >+ return $description ? $description->{lib} : $authorised_value; > } > > 1; >-- >2.9.3
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 18433
:
62170
|
62181
|
62358
|
62388
|
62389
|
62390
|
62415
|
62416
|
62417
|
62449
|
62472
|
95380
|
97479
|
99123
|
99124
|
99159
|
99160
|
99161
|
99162