diff --git a/Breeding.pm.orig b/Breeding.pm
index 2a4ce3c..d00f471 100644
--- a/Breeding.pm.orig
+++ b/Breeding.pm
@@ -364,15 +364,17 @@ sub _add_rowdata {
$row->{date}//= $row->{date2};
$row->{isbn}=_isbn_replace($row->{isbn});
- $row = _add_custom_field_rowdata($row, $record);
-
+ $row = _add_custom_field_rowdata(
+ $row,
+ $record,
+ C4::Context->preference('AdditionalFieldsInZ3950ResultSearch'))
+ if C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
return $row;
}
sub _add_custom_field_rowdata
{
- my ( $row, $record ) = @_;
- my $pref_newtags = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
+ my ( $row, $record, $pref_newtags ) = @_;
my $pref_flavour = C4::Context->preference('MarcFlavour');
$pref_newtags =~ s/^\s+|\s+$//g;
@@ -627,6 +629,13 @@ sub Z3950SearchAuth {
$row_data{heading} = $heading;
$row_data{authid} = $authid;
$row_data{heading_code} = $heading_authtype_code;
+ my $pref_newtags =
+ C4::Context->preference('AdditionalFieldsInZ3950ResultAuthSearch');
+ if ($pref_newtags) {
+ my $row = {};
+ $row = _add_custom_field_rowdata($row, $marcrecord, $pref_newtags);
+ $row_data{row} = $row;
+ }
push( @breeding_loop, \%row_data );
}
else {
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AdditionalFieldsInZ3950ResultAuthSearch', '', 'NULL', 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an auth search Z3950', 'Free')" );
# Always end with this (adjust the bug info)
NewVersion( $DBversion, XXXXX, "Description");
}
diff --git a/cataloguing.pref.orig b/cataloguing.pref
index 575dde1..44a3386 100644
--- a/cataloguing.pref.orig
+++ b/cataloguing.pref
@@ -264,6 +264,10 @@ Cataloging:
- Display the MARC field/subfields
- pref: AdditionalFieldsInZ3950ResultSearch
- " in the 'Additional fields' column of Z39.50 search results (use comma as delimiter e.g.: \"<code>001, 082$ab, 090$ab</code>\")"
+ -
+ - Display the MARC field/subfields in Auth Search
+ - pref: AdditionalFieldsInZ3950ResultAuthSearch
+ - " in the 'Additional fields' column of Z39.50 auth search results (use comma as delimiter e.g.: \"<code>100, 400</code>\")"
-
- When matching on ISSN with the record import tool,
- pref: AggressiveMatchOnISSN
diff --git a/z3950_auth_search.tt.orig b/z3950_auth_search.tt
index 51aa454..c22dad9 100644
--- a/z3950_auth_search.tt.orig
+++ b/z3950_auth_search.tt
@@ -79,6 +79,9 @@
<th>Server</th>
<th>Heading</th>
<th>Authority Type</th>
+ [% IF Koha.Preference('AdditionalFieldsInZ3950ResultAuthSearch') != '' %]
+ <th>Additional Fields</th>
+ [% END %]
<th>Actions</th>
</tr></thead>
<tbody>[% FOREACH breeding_loo IN breeding_loop %]
@@ -87,6 +90,18 @@
<td>[% breeding_loo.server | html %]</td>
<td>[% breeding_loo.heading | html %]</td>
<td>[% breeding_loo.heading_code | html %]</td>
+ [% IF Koha.Preference('AdditionalFieldsInZ3950ResultAuthSearch') != '' %]
+ <td>
+ <dl>
+ [% FOREACH addnumberfield IN breeding_loo.row.addnumberfields %]
+ [% FOREACH string IN breeding_loo.row.$addnumberfield %]
+ <dt>[% addnumberfield | html %]:</dt>
+ <dd>[% string | html %]</dd>
+ [% END %]
+ [% END %]
+ </dl>
+ </td>
+ [% END %]
<td class="actions">
<div class="btn-group dropup">
<a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% breeding_loo.breedingid | html %]" role="button" data-toggle="dropdown" href="#">