Browse Source

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 <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Josef Moravec 5 years ago
committed by Martin Renvoize
parent
commit
68a92c02df
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 1
      C4/Breeding.pm
  2. 3
      cataloguing/z3950_search.pl
  3. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt

1
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 );

3
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;

4
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt

@ -30,6 +30,8 @@
<label for="title">Title: </label> <input type="text" id="title" name="title" value="[% title | html %]" /></li>
<li>
<label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" /></li>
<li>
<label for="publicationyear">Publication year: </label> <input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear | html %]" /></li>
<li>
<label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
<li>
@ -88,6 +90,7 @@
You searched for:
[% IF ( title ) %]<em>Title: </em><span class="term">[% title | html %]</span> [% END %]
[% IF ( author ) %]<em>Author: </em><span class="term">[% author | html %]</span> [% END %]
[% IF ( publicationyear ) %]<em>Publication year: </em><span class="term">[% publicationyear | html %]</span> [% END %]
[% IF ( isbn ) %]<em>ISBN: </em><span class="term">[% isbn | html %]</span> [% END %]
[% IF ( issn ) %]<em>ISSN: </em><span class="term">[% issn | html %]</span> [% END %]
[% IF ( lccall ) %]<em>LC call number: </em><span class="term">[% lccall | html %]</span> [% END %]
@ -192,6 +195,7 @@
<input type="hidden" id="controlnumber" name="controlnumber" value="[% controlnumber | html %]" />
<input type="hidden" id="srchany" name="srchany" value="[% srchany | html %]" />
<input type="hidden" id="author" name="author" value="[% author | html %]" />
<input type="hidden" id="publicationyear" name="publicationyear" value="[% publicationyear | html %]" />
<input type="hidden" id="subject" name="subject" value="[% subject | html %]" />
<input type="hidden" id="dewey" name="dewey" value="[% dewey | html %]" />
<input type="hidden" id="stdid" name="stdid" value="[% stdid | html %]" />

Loading…
Cancel
Save