Bugzilla – Attachment 120139 Details for
Bug 28166
Optionally add MARC fields to authority search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patches Breeding.pm, cataloguing.pref, z3950_auth_search.tt
bug_28166.patch (text/plain), 4.38 KB, created by
Mark Hofstetter
on 2021-04-23 20:24:15 UTC
(
hide
)
Description:
patches Breeding.pm, cataloguing.pref, z3950_auth_search.tt
Filename:
MIME Type:
Creator:
Mark Hofstetter
Created:
2021-04-23 20:24:15 UTC
Size:
4.38 KB
patch
obsolete
>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="#">
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 28166
:
120139
|
120154
|
120155
|
148749
|
148755
|
148778
|
150590
|
150594
|
150595
|
150596
|
150601
|
153431
|
156166
|
156167
|
156550
|
156551
|
157646
|
157647