diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index dc2b1e0b04..73c32babac 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -2593,6 +2593,28 @@ modules: columnname: spent tools: + manage-marc-import: + records-table: + columns: + - + columnname: import_record_id + - + columnname: citation + - + columnname: status + - + columnname: overlay_status + - + columnname: match_details + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: match_score_breakdown + is_hidden: 1 + - + columnname: diff + - + columnname: matched batch_patron_modification: borrowerst: columns: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 6c4a49fe40..c838603b1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -2,6 +2,7 @@ [% USE Koha %] [% USE Asset %] [% USE KohaDates %] +[% USE TablesSettings %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -423,13 +424,14 @@ - - - - - - - + + + + + + + +
#CitationStatusMatch typeMatch detailsDiffRecord#CitationStatusMatch typeMatch detailsScore breakdownDiffRecord
@@ -482,6 +484,7 @@ }); if (import_batch_id) { + var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'manage-marc-import', 'records-table', 'json' ) | $raw %]; $("#records-table").kohaTable({ autoWidth: false, searching: false, @@ -497,7 +500,7 @@ bKohaAjaxSVC: true, pagingType: "full_numbers", dom: '<"top pager"iflp>rt<"bottom pager"flp><"clear">', - columns: [{ data: "import_record_id" }, { data: "citation" }, { data: "status" }, { data: "overlay_status" }, { data: null, defaultContent: "" }, { data: null, defaultContent: "" }, { data: "matched" }], + columns: [{ data: "import_record_id" }, { data: "citation" }, { data: "status" }, { data: "overlay_status" }, { data: null, defaultContent: "" }, { data: null, defaultContent: "" }, { data: null, defaultContent: "" }, { data: "matched" }], rowCallback: function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { var record_details_url = record_type == "auth" ? "/cgi-bin/koha/authorities/detail.pl?authid=" : "/cgi-bin/koha/catalogue/detail.pl?biblionumber="; var record_edit_url = record_type == "auth" ? "/cgi-bin/koha/authorities/authorities.pl?authid=" : "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber="; @@ -539,6 +542,7 @@ var any_checked = 0; $("td:eq(4)", nRow).html(''); $("td:eq(5)", nRow).html(''); + $("td:eq(6)", nRow).html(''); var checked = ""; var disabled = ""; if (aData["status"] == "imported" || aData["status"] == "ignored") { @@ -588,7 +592,16 @@ match_option + matching_msg.format(item.candidate_match_id, item.score, '' + match_citation + "") ); - $("td:eq(5) ul", nRow).append('
  • ' + _("View") + "
  • "); + var score_breakdown = ""; + if (item.composite_scores && Object.keys(item.composite_scores).length > 0) { + score_breakdown = Object.entries(item.composite_scores) + .map(function (e) { + return e[0] + ":" + e[1]; + }) + .join(", "); + } + $("td:eq(5) ul", nRow).append("
  • " + (score_breakdown || item.score) + "
  • "); + $("td:eq(6) ul", nRow).append('
  • ' + _("View") + "
  • "); checked = ""; }); if (!any_checked) { @@ -607,19 +620,20 @@ "" ); $("td:eq(5) ul", nRow).prepend("
  •  
  • "); + $("td:eq(6) ul", nRow).prepend("
  •  
  • "); } if (aData["diff_url"]) { - $("td:eq(5)", nRow).html('' + _("View") + ""); + $("td:eq(6)", nRow).html('' + _("View") + ""); } if (aData["matched"]) { let buttons = ' ' + _("View") + " "; if (Koha.permissions.CAN_user_editcatalogue_edit_catalogue) { buttons += ' ' + _("Edit") + ""; } - $("td:eq(6)", nRow).html(buttons); + $("td:eq(7)", nRow).html(buttons); } }, - }); + }, table_settings); $("#revert_batch_form").on("submit", function () { return confirm(_("Are you sure you want to undo the import of this batch into the catalog?")); });