Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt
Katrin Fischer b19128eca1
Bug 33016: Change breadcrumbs and page title on MARC diff view to cataloging
Some remaining to dos of us moving the staged import tools from
tools to cataloging.

To test:
* Export a record from your Koha catalog
* Import it using the staged MARC import tool, matching on biblionumber
  (the diff view is only visible if the record matched an existing one)
* View the staged records
* Click on the 'Diff' link
* Verify that the page title and breadcrumbs still read 'Tools'
* Apply patch
* Not these should read 'Cataloging'

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-24 16:44:58 -03:00

90 lines
2.8 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Compare matched records &rsaquo; Manage staged MARC records &rsaquo; Cataloging &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
<style>
ins { background-color: #e6ffe6; }
del { background-color: #ffe6e6; }
#col1 ins, #col2 del { display: none; }
pre { padding: 10px; overflow: scroll; }
</style>
</head>
<body id="tools_compare-marc-import" class="tools">
[% INCLUDE 'header.inc' %]
[% WRAPPER 'sub-header.inc' %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
</li>
<li>
<a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>
</li>
<li>
<a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=[% batchid | uri %]">Batch [% batchid | html %]</a>
</li>
<li>
<a href="#" aria-current="page">
Compare matched records
</a>
</li>
</ol>
</nav>
[% END %]
<div class="main container-fluid">
<div class="row">
<main>
<h1>Compare matched records</h1>
<div id="col1" class="col-sm-6">
<h2>Original</h2>
[% IF ( ERROR_FORMATTED1 ) %]
<div class="dialog alert">
<p>The record id <em>[% RECORDID | html %]</em> doesn't match any existing record.</p>
</div>
[% ELSE %]
<h2>[% RECORDTITLE | html %]</h2>
<pre>[% MARC_FORMATTED1 | html %]</pre>
[% END %]
</div>
<div id="col2" class="col-sm-6">
<h2>Imported</h2>
[% IF ( ERROR_FORMATTED2 ) %]
<div class="dialog alert">
<p>The import id number <em>[% IMPORTID | html %]</em> doesn't match any existing record.</p>
</div>
[% ELSE %]
<h2>[% IMPORTTITLE | html %]</h2>
<pre>[% MARC_FORMATTED2 | html %] </pre>
[% END %]
</div>
</div>
<p><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=[% batchid | uri %]">Return to staged MARC batch [% batchid | html %]</a></p>
</main>
</div>
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% Asset.js("lib/jsdiff/jsdiff.min.js") | $raw %]
<script>
$(document).ready(function(){
var diff1 = $("#col1 pre").text();
var diff2 = $("#col2 pre").text();
var diffs = diffString(diff1,diff2);
$("#col1 pre,#col2 pre").html(diffs);
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]