ed7543287b
Having to write [% KOHA_VERSION %] for each url is bad because: - It's easily forgettable when adding new <script> or <link> - It prevents grep'ing for the full filename - It violates the DRY principle - If at some point we want to change the "force js and css reload" mechanism, it will be tedious This patch: - adds a Template::Toolkit plugin that generates <script> and <link> tags for JS and CSS files, and inserts automatically the Koha version in the filename - use the new plugin to remove all occurences of [% KOHA_VERSION %] - remove the code that was adding KOHA_VERSION as a template variable Test plan: 1. Apply patch 2. Go to several different pages in Koha (opac and intranet) while checking your browser's dev tools (there should be no 404 for JS and CSS files, and the Koha version should appear in filenames) and the server logs (there should be no "File not found") 3. `git grep KOHA_VERSION` should return nothing 4. prove t/db_dependent/Koha/Template/Plugin/Asset.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
63 lines
2.3 KiB
Text
63 lines
2.3 KiB
Text
[% USE Asset %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Manage staged MARC records › Compare matched records</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<style type="text/css">
|
|
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' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a> › <a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=[% batchid %]">Batch [% batchid %]</a> › Compare matched records
|
|
</div>
|
|
|
|
<div id="doc3">
|
|
<div class="yui-g">
|
|
<div id="col1" class="yui-u first">
|
|
<h1>Original</h1>
|
|
[% IF ( ERROR_FORMATTED1 ) %]
|
|
<div class="dialog alert">
|
|
<p>The biblionumber <em>[% BIBLIONUMBER %]</em> doesn't match any existing record.</p>
|
|
</div>
|
|
[% ELSE %]
|
|
<h2>[% BIBLIOTITLE %]</h2>
|
|
<pre>[% MARC_FORMATTED1 %]</pre>
|
|
[% END %]
|
|
</div>
|
|
<div id="col2" class="yui-u">
|
|
<h1>Imported</h1>
|
|
[% IF ( ERROR_FORMATTED2 ) %]
|
|
<div class="dialog alert">
|
|
<p>The import id number <em>[% IMPORTID %]</em> doesn't match any existing record.</p>
|
|
</div>
|
|
[% ELSE %]
|
|
<h2>[% IMPORTTITLE %]</h2>
|
|
<pre>[% MARC_FORMATTED2 %] </pre>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
|
|
<p><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=[% batchid %]">Return to staged MARC batch [% batchid %]</a></p>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/tools-menu.js") %]
|
|
[% Asset.js("lib/jsdiff/jsdiff.min.js") %]
|
|
<script type="text/javascript">
|
|
$(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' %]
|