Browse Source

Bug 23856: Split author and ISBN/ISSN out of citation in staged MARC record management

This patch modifies the way data is passed to the staged MARC record
management template, splitting author, ISBN, and ISSN out of the
"citation" variable and passing them separately.

The DataTables configuration for the staged MARC record management page
is modified so that those now-separate variables are conditionally
displayed.

Unrelated minor change: Added a class to the MARC preview modal so that
it displays wider.

To test, apply the patch and view the "Staged MARC management" page for
both batches of bibliographic records and batches of authority records.

In each case the title or authority heading should be displayed as a
link while author, ISBN, and ISSN (if any) should not.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Owen Leonard 5 years ago
committed by Martin Renvoize
parent
commit
12b8c3ac1e
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 17
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
  2. 9
      tools/batch_records_ajax.pl

17
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt

@ -393,7 +393,7 @@
</table>
<div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
@ -474,8 +474,21 @@
var record_details_url = "/cgi-bin/koha/catalogue/detail.pl?biblionumber=";
[% END %]
var additional_details = "";
if( aData['author'] ){
additional_details += " " + aData['author'] + " ";
}
if( aData['isbn'] ){
additional_details += " (" + aData['isbn'] + ") ";
}
if( aData['issn'] ){
additional_details += " (" + aData['issn'] + ") ";
}
$('td:eq(1)', nRow).html(
'<a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=' + aData['import_record_id'] + '&viewas=html" class="previewMARC">' + aData['citation'] + '</a>'
'<a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=' + aData['import_record_id'] + '&viewas=html" class="previewMARC">' + aData['citation'] + '</a> ' + additional_details
);
$('td:eq(2)', nRow).html(

9
tools/batch_records_ajax.pl

@ -68,12 +68,6 @@ my $records =
my @list = ();
foreach my $record (@$records) {
my $citation = $record->{'title'} || $record->{'authorized_heading'};
$citation .= " $record->{'author'}" if $record->{'author'};
$citation .= " (" if $record->{'issn'} or $record->{'isbn'};
$citation .= $record->{'isbn'} if $record->{'isbn'};
$citation .= ", " if $record->{'issn'} and $record->{'isbn'};
$citation .= $record->{'issn'} if $record->{'issn'};
$citation .= ")" if $record->{'issn'} or $record->{'isbn'};
my $match = GetImportRecordMatches( $record->{'import_record_id'}, 1 );
my $match_citation = '';
@ -99,6 +93,9 @@ foreach my $record (@$records) {
DT_RowId => $record->{'import_record_id'},
import_record_id => $record->{'import_record_id'},
citation => $citation,
author => $record->{'author'},
issn => $record->{'issn'},
isbn => $record->{'isbn'},
status => $record->{'status'},
overlay_status => $record->{'overlay_status'},
match_citation => $match_citation,

Loading…
Cancel
Save