From 68a92c02dfbafa9eea73516cb29ba5e6a311a730 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Fri, 30 Nov 2018 09:06:22 +0000 Subject: [PATCH] Bug 21921: Add date publication year to biblio Z39.50 search form Test plan: 1) Apply the patch 2) Have a Z39.50 endpoint with attr 31 defined - Library of Congress supports this 3) Try to find some biblio records through Z39.50 using the new field "Publication year" Signed-off-by: Michal Denar Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- C4/Breeding.pm | 1 + cataloguing/z3950_search.pl | 3 +++ .../intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index a93189c13f..5d2f49b5a2 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -258,6 +258,7 @@ sub _bib_build_query { controlnumber => '@attr 1=12 "#term" ', srchany => '@attr 1=1016 "#term" ', stdid => '@attr 1=1007 "#term" ', + publicationyear => '@attr 1=31 "#term" ' }; return _build_query( $pars, $qry_build ); diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index dcc2581c02..e4fce45597 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -42,6 +42,7 @@ my $dewey = $input->param('dewey'); my $controlnumber = $input->param('controlnumber'); my $stdid = $input->param('stdid'); my $srchany = $input->param('srchany'); +my $publicationyear = $input->param('publicationyear'); my $op = $input->param('op')||''; my $page = $input->param('current_page') || 1; @@ -68,6 +69,7 @@ $template->param( biblionumber => $biblionumber, dewey => $dewey, subject => $subject, + publicationyear => $publicationyear, ); if ( $op ne "do_search" ) { @@ -111,6 +113,7 @@ my $pars= { controlnumber => $controlnumber, stdid => $stdid, srchany => $srchany, + publicationyear => $publicationyear, }; Z3950Search($pars, $template); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index e020742167..0029dc2551 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -30,6 +30,8 @@
  • +
  • +
  • @@ -88,6 +90,7 @@ You searched for: [% IF ( title ) %]Title: [% title | html %] [% END %] [% IF ( author ) %]Author: [% author | html %] [% END %] + [% IF ( publicationyear ) %]Publication year: [% publicationyear | html %] [% END %] [% IF ( isbn ) %]ISBN: [% isbn | html %] [% END %] [% IF ( issn ) %]ISSN: [% issn | html %] [% END %] [% IF ( lccall ) %]LC call number: [% lccall | html %] [% END %] @@ -192,6 +195,7 @@ + -- 2.39.5