+[% USE raw %]
+[% USE Asset %]
[% SET footerjs = 1 %]
[% PROCESS 'merge-record.inc' %]
[% INCLUDE 'cataloging-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › Merging records</div>
-<div id="doc" class="yui-t7">
-
-<div id="bd">
- <div id="yui-main">
-
+<div class="main container-fluid">
+ <div class="row">
+ <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
<h1>Merging records</h1>
[% IF ( result ) %]
[% FOREACH error IN errors %]
<div class="dialog alert">
[% IF error.code == 'CANNOT_MOVE' %]
- The following items could not be moved from the old record to the new one: [% error.value %]
+ The following items could not be moved from the old record to the new one: [% error.value | html %]
[% ELSE %]
- [% error %]
+ [% error | html %]
[% END %]
<br />
Therefore, the record to be merged has not been deleted.
[% END %]
[% ELSE %]
- <p>The merge was successful. <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% ref_biblionumber %]">Click here to see the merged record.</a></p>
+ <p>The merge was successful. <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% ref_biblionumber | uri %]">Click here to see the merged record.</a></p>
<h3>Report</h3>
<table>
<thead>
[% ELSE %]
[% header = tag _ '$' _ code %]
[% END %]
- <th>[% header %]</th>
+ <th>[% header | html %]</th>
[% END %]
</tr>
</thead>
[% FOREACH record IN report_records %]
<tr>
<td>
- [% record.biblionumber %]
+ [% record.biblionumber | html %]
[% IF loop.first %]
(record kept)
[% END %]
[% values = record.fields.$key %]
[% IF values %]
[% FOREACH value IN record.fields.$key %]
- [% value %]
+ [% value | html %]
[% UNLESS loop.last %]<br />[% END %]
[% END %]
[% END %]
[% FOREACH record IN records %]
<li class="radio">
[% IF loop.first %]
- <input type="radio" value="[% record.biblionumber %]" checked="checked" id="ref_biblionumber[% record.biblionumber %]" name="ref_biblionumber" onclick="changeFramework('[% record.frameworkcode %]')" />
+ <input type="radio" value="[% record.biblionumber | html %]" checked="checked" id="ref_biblionumber[% record.biblionumber | html %]" name="ref_biblionumber" onclick="changeFramework('[% record.frameworkcode | html %]')" />
[% ELSE %]
- <input type="radio" value="[% record.biblionumber %]" id="ref_biblionumber[% record.biblionumber %]" name="ref_biblionumber" onclick="changeFramework('[% record.frameworkcode %]')" />
+ <input type="radio" value="[% record.biblionumber | html %]" id="ref_biblionumber[% record.biblionumber | html %]" name="ref_biblionumber" onclick="changeFramework('[% record.frameworkcode | html %]')" />
[% END %]
- <label for="ref_biblionumber[% record.biblionumber %]">
- [% record.data.title %]
+ <label for="ref_biblionumber[% record.biblionumber | html %]">
+ [% record.data.title | html %]
[% FOREACH subtitle IN record.subtitles %]
- [% subtitle.subfield %]
+ [% subtitle.subfield | html %]
[% END %]
- ([% record.biblionumber %]) <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% record.biblionumber %]" class="previewData">View MARC</a>
+ ([% record.biblionumber | uri %]) <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% record.biblionumber | uri %]" class="previewData">View MARC</a>
</label>
</li>
[% END %]
<select name="frameworkcode" id="frameworkcode">
<option value="">Default</option>
[% FOREACH framework IN frameworks %]
- <option value="[% framework.frameworkcode %]">[% framework.frameworktext %]</option>
+ <option value="[% framework.frameworkcode | html %]">[% framework.frameworktext | html %]</option>
[% END %]
</select>
</li>
</ol>
[% FOREACH record IN records %]
- <input type="hidden" name="biblionumber" value="[% record.biblionumber %]" />
+ <input type="hidden" name="biblionumber" value="[% record.biblionumber | html %]" />
[% END %]
<fieldset class="action">
<input type="submit" value="Next" />
<h3 id="dataPreviewLabel">Preview</h3>
</div>
<div class="modal-body">
- <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
+ <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
[% IF ( errors.size ) %]
<div class="dialog alert">
[% FOREACH error IN errors %]
- <p>[% error %]</p>
+ <p>[% error | html %]</p>
[% END %]
</div>
[% ELSE %]
<form id="mergeform" action="/cgi-bin/koha/cataloguing/merge.pl" method="post" onsubmit="return mergeformsubmit()">
<div class="yui-g">
-<div class="yui-u first">
+<div class="col-sm-6">
[% PROCESS mergesource sourcerecords=records %]
</div>
-<div class="yui-u">
+<div class="col-sm-6">
[% PROCESS mergetarget %]
-</div> <!-- .yui-u -->
+</div> <!-- .col-sm-6 -->
-<input type="hidden" name="ref_biblionumber" value="[% ref_biblionumber %]" />
+<input type="hidden" name="ref_biblionumber" value="[% ref_biblionumber | html %]" />
[% FOREACH record IN records %]
- <input type="hidden" name="biblionumber" value="[% record.recordid %]" />
+ <input type="hidden" name="biblionumber" value="[% record.recordid | html %]" />
[% END %]
-<input type="hidden" name="frameworkcode" value="[% framework %]" />
+<input type="hidden" name="frameworkcode" value="[% framework | html %]" />
<fieldset class="action">
<input type="submit" name="merge" value="Merge" />
<label for="report_fields">Fields to display in report:</label>
- <input type="text" name="report_fields" id="report_fields" value="[% MergeReportFields %]" />
+ <input type="text" name="report_fields" id="report_fields" value="[% MergeReportFields | html %]" />
<span class="hint">(Example: "001,245ab,600")
</fieldset>
</div>
</div>
</div>
-</div>
[% MACRO jsinclude BLOCK %]
- <script type="text/javascript" src="[% interface %]/[% theme %]/js/merge-record.js"></script>
+ [% Asset.js("js/merge-record.js") | $raw %]
[% INCLUDE 'merge-record-strings.inc' %]
<script type="text/javascript">
[% UNLESS (result) %]
$("#dataPreview .modal-body").load(page + " div");
$('#dataPreview').modal({show:true});
});
- $("#dataPreview").on("hidden", function(){
+ $("#dataPreview").on("hidden.bs.modal", function(){
$("#dataPreviewLabel").html("");
- $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
+ $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
});
});
[% ELSE %]
$(document).ready(function(){
tagslib = [];
- $.getJSON("/cgi-bin/koha/cataloguing/merge_ajax.pl", {frameworkcode : "[% framework %]" }, function(json) {
+ $.getJSON("/cgi-bin/koha/cataloguing/merge_ajax.pl", {frameworkcode : "[% framework | html %]" }, function(json) {
tagslib = json;
rebuild_target($("#tabs"), $("#resultul"));
});
// Check all checkboxes in first tab, and uncheck all others to avoid
// inconsistencies from a page refresh.
- $('#tabs div#tabrecord[% ref_biblionumber %]').find('input[type="checkbox"]').prop('checked', true);
- $('#tabs > div:not("#tabrecord[% ref_biblionumber %]")').find('input[type="checkbox"]').prop('checked', false);
+ $('#tabs div#tabrecord[% ref_biblionumber | html %]').find('input[type="checkbox"]').prop('checked', true);
+ $('#tabs > div:not("#tabrecord[% ref_biblionumber | html %]")').find('input[type="checkbox"]').prop('checked', false);
//Set focus to cataloging search
$("input[name=q]:eq(0)").focus();