Bugzilla – Attachment 46561 Details for
Bug 15550
Authority type pull down in OPAC authority search is empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 15550: Fix authority search and detail at the OPAC
SIGNED-OFFBug-15550-Fix-authority-search-and-detai.patch (text/plain), 3.52 KB, created by
Héctor Eduardo Castro Avalos
on 2016-01-12 20:43:21 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 15550: Fix authority search and detail at the OPAC
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-01-12 20:43:21 UTC
Size:
3.52 KB
patch
obsolete
>From d4e15beaf290347a44313341a36f23568fbdcc14 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Jan 2016 10:21:16 +0000 >Subject: [PATCH] [SIGNED-OFF]Bug 15550: Fix authority search and detail at the > OPAC > >The author of Bug 15381 (me!) has mismatch the objects he was >manipulating and forgotten to update a template. >for the opac-aythorities-home, the variable is named authority_types, >not authtypesloop. >In opac-authoritiesdetail.pl, the $record is a MARC::Record and there is >no authtypecode method. We need to retrieve the authtypecode using >the new Koha::Authorities module. > >Test plan: >Search for authorities at the OPAC and click on the detail link to go to >the detail page. >Without this patch, you will get errors. >With this patch, the errors should have gone and everything should work >as before bug 15381. > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as described. Pull down for choosing the auth_type displayed again >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt | 8 ++++---- > opac/opac-authoritiesdetail.pl | 4 +++- > 2 files changed, 7 insertions(+), 5 deletions(-) > >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 85ecf8d..d3dfcf8 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 >@@ -35,11 +35,11 @@ > <li> > <label for="authtypecode">Authority type: </label> > <select name="authtypecode" id="authtypecode"> >- [% FOREACH authtypesloo IN authtypesloop %] >- [% IF ( authtypesloo.selected ) %] >- <option value="[% authtypesloo.value %]" selected="selected">[% authtypesloo.authtypetext %]</option> >+ [% FOREACH authority_type IN authority_types %] >+ [% IF authority_type.authtypecode == authtypecode %] >+ <option value="[% authority_type.authtypecode%]" selected="selected">[% authority_type.authtypetext %]</option> > [% ELSE %] >- <option value="[% authtypesloo.value %]"> [% authtypesloo.authtypetext %]</option> >+ <option value="[% authority_type.authtypecode%]">[% authority_type.authtypetext %]</option> > [% END %] > [% END %] > </select> >diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl >index b867012..f46c511 100755 >--- a/opac/opac-authoritiesdetail.pl >+++ b/opac/opac-authoritiesdetail.pl >@@ -47,6 +47,7 @@ use CGI qw ( -utf8 ); > use MARC::Record; > use C4::Koha; > >+use Koha::Authorities; > use Koha::Authority::Types; > > my $query = new CGI; >@@ -75,7 +76,8 @@ if ( ! $record ) { > exit; > } > >-my $authtypecode = $record->authtypecode; >+my $authority = Koha::Authorities->find( $authid ); >+my $authtypecode = $authority->authtypecode; > > if ($display_hierarchy){ > $template->{VARS}->{'displayhierarchy'} = $display_hierarchy; >-- >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 15550
:
46516
|
46561
|
46714