1 [% PROCESS 'merge-record.inc' %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Cataloging › Merging records</title>
4 [% INCLUDE 'greybox.inc' %]
5 [% INCLUDE 'doc-head-close.inc' %]
6 <style type="text/css">
7 div.record ul, div.record li { float:none; display:block; }
8 div#result { margin-top: 1em; }
9 /* We use this style "against" the li ui-tabs-nav style automatically applied */
11 <script type="text/javascript">
14 // When submiting the form
15 function mergeformsubmit() {
16 $("ul#ulrecord1").remove();
17 $("ul#ulrecord2").remove();
20 $(document).ready(function(){
21 // Getting marc structure via ajax
23 $.getJSON("/cgi-bin/koha/authorities/merge_ajax.pl", {frameworkcode : "[% framework %]" }, function(json) {
30 function changeFramework(fw) {
31 $("#Frameworks").val(fw);
37 <body id="auth_merge" class="cat">
38 [% INCLUDE 'header.inc' %]
39 [% INCLUDE 'authorities-search.inc' %]
40 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a> › Merging records</div>
42 <div id="doc" class="yui-t7">
48 <h1>Merging records</h1>
52 [% FOREACH error IN errors %]
53 <div class="dialog alert">
55 [% IF error.code == 'CANNOT_MOVE' %]
56 The following items could not be moved from the old record to the new one: [% error.value %]
57 [% ELSIF error.code == 'FRAMEWORK_NOT_SELECTED' %]
58 No framework has been selected. Please select a framework for merging.
63 <br />Therefore, the record to be merged has not been deleted.</div>
67 <script type="text/javascript">window.location.href="/cgi-bin/koha/authorities/detail.pl?authid=[% recordid1 %]"</script>
68 <p>The merging was successful. <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% recordid1 %]">Click here to see the merged record.</a></p>
73 [% IF ( choosereference ) %]
74 <p>Please choose which record will be the reference for the merge. The record chosen as reference will be kept, and the other will be deleted.</p>
75 <form id="mergeform" action="/cgi-bin/koha/authorities/merge.pl" method="post">
76 <fieldset class="rows">
77 <legend>Merge reference</legend>
79 <li class="radio"><input type="radio" value="[% recordid1 %]" checked="checked" id="mergereference1" name="mergereference" onclick="changeFramework('[% frameworkcode1 %]')" /><label for="mergereference1">[% title1 %] [% FOREACH subtitl1 IN subtitle1 %] [% subtitl1.subfield %][% END %] (<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% recordid1 %]" title="MARC" rel="gb_page_center[600,500]">[% recordid1 %]</a>)</label></li>
80 <li class="radio"><input type="radio" value="[% recordid2 %]" id="mergereference2" name="mergereference" onclick="changeFramework('[% frameworkcode2 %]')" /><label for="mergereference2">[% title2 %] [% FOREACH subtitl2 IN subtitle2 %] [% subtitl2.subfield %][% END %] (<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% recordid2 %]" title="MARC" rel="gb_page_center[600,500]">[% recordid2 %]</a>)</label></li>
82 [% IF frameworkselect %]
83 <li><label for="frameworkcode">Using framework:</label>
84 <select name="frameworkcode" id="frameworkcode">
85 <option value="Default">Default</option>
86 [% FOREACH frameworkcodeloo IN frameworkselect %]
87 [% IF ( frameworkcodeloo.selected ) %]
88 <option value="[% frameworkcodeloo.value %]" selected="selected">
90 <option value="[% frameworkcodeloo.value %]">
92 [% frameworkcodeloo.frameworktext %]
99 <input type="hidden" name="authid" value="[% recordid1 %]" />
100 <input type="hidden" name="authid" value="[% recordid2 %]" />
101 <fieldset class="action"><input type="submit" value="Next" /></fieldset>
106 <div class="dialog alert">
107 [% FOREACH error IN errors %]
109 [% IF error.code == 'WRONG_COUNT' %]
110 Number of records provided for merging: [% error.value %]. Currently only 2 records can be merged at a time.
119 <form id="mergeform" action="/cgi-bin/koha/authorities/merge.pl" method="post" onsubmit="return mergeformsubmit()">
122 <div class="yui-u first">
123 [% PROCESS mergesource %]
126 [% PROCESS mergetarget %]
127 </div> <!-- .yui-u -->
129 <input type="hidden" name="recordid1" value="[% recordid1 %]" />
130 <input type="hidden" name="recordid2" value="[% recordid2 %]" />
131 <input type="hidden" name="mergereference" value="[% mergereference %]" />
132 <input type="hidden" name="frameworkcode" value="[% framework %]" />
134 <fieldset class="action"><input type="submit" name="merge" value="Merge" /></fieldset>
145 [% INCLUDE 'intranet-bottom.inc' %]