Bug 11359: Add the borrower's cardnumber and phonenumber to the branch overdues report
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / merge.tt
1 [% PROCESS 'merge-record.inc' %]
2
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Cataloging &rsaquo; Merging records</title>
5 [% INCLUDE 'greybox.inc' %]
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% themelang %]/js/merge-record.js"></script>
8 [% INCLUDE 'merge-record-strings.inc' %]
9 <style type="text/css">
10 div.record ul, div.record li { float:none; display:block; }
11 div#result { margin-top: 1em; }
12 /* We use this style "against" the li ui-tabs-nav style automatically applied */
13 </style>
14 <script type="text/javascript">
15 //<![CDATA[
16
17     // When submiting the form
18     function mergeformsubmit() {
19             $("ul#ulrecord1").remove();
20             $("ul#ulrecord2").remove();
21 }
22
23 $(document).ready(function(){
24     // Getting marc structure via ajax
25     tagslib = [];
26     $.getJSON("/cgi-bin/koha/cataloguing/merge_ajax.pl", {frameworkcode : "[% framework %]" }, function(json) {
27         tagslib = json;
28     });
29
30     // Creating tabs
31     $("#tabs").tabs();
32 });
33
34
35 function changeFramework(fw) {
36     $("#Frameworks").val(fw);
37 }
38
39 //]]>
40 </script>
41 </head>
42 <body id="cat_merge" class="cat">
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'cataloging-search.inc' %]
45 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>  &rsaquo; Merging records</div>
46
47 <div id="doc" class="yui-t7">
48
49 <div id="bd">
50         <div id="yui-main">
51
52
53 <h1>Merging records</h1>
54 [% IF ( result ) %]
55     [% IF ( errors ) %]
56
57         [% FOREACH error IN errors %]
58             <div class="dialog alert">
59
60                 [% IF error.code == 'CANNOT_MOVE' %]
61                     The following items could not be moved from the old record to the new one: [% error.value %]
62                 [% ELSE %]
63                     [% error %]
64                 [% END %]
65
66             <br />Therefore, the record to be merged has not been deleted.</div>
67         [% END %]
68
69     [% ELSE %]
70         <script type="text/javascript">window.location.href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblio1 %]"</script>
71         <p>The merging was successful. <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblio1 %]">Click here to see the merged record.</a></p>
72     [% END %]
73
74 [% ELSE %]
75
76 [% IF ( choosereference ) %]
77 <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>
78 <form id="mergeform" action="/cgi-bin/koha/cataloguing/merge.pl" method="post">
79     <fieldset class="rows">
80         <legend>Merge reference</legend>
81         <ol>
82         <li class="radio"><input type="radio" value="[% biblio1 %]" 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=[% biblio1 %]" title="MARC" rel="gb_page_center[600,500]">[% biblio1 %]</a>)</label></li>
83         <li class="radio"><input type="radio" value="[% biblio2 %]" 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=[% biblio2 %]" title="MARC" rel="gb_page_center[600,500]">[% biblio2 %]</a>)</label></li>
84
85     [% IF frameworkselect %]
86           <li><label for="frameworkcode">Using framework:</label>
87                       <select name="frameworkcode" id="frameworkcode">
88                                       <option value="Default">Default</option>
89                                       [% FOREACH frameworkcodeloo IN frameworkselect %]
90                                           [% IF ( frameworkcodeloo.selected ) %]
91                                               <option value="[% frameworkcodeloo.value %]" selected="selected">
92                                           [% ELSE %]
93                                               <option value="[% frameworkcodeloo.value %]">
94                                           [% END %]
95                                            [% frameworkcodeloo.frameworktext %]
96                                            </option>
97                                       [% END %]
98                       </select></li>
99     [% END %]
100 </ol>
101
102         <input type="hidden" name="biblionumber" value="[% biblio1 %]" />
103         <input type="hidden" name="biblionumber" value="[% biblio2 %]" />
104         <fieldset class="action"><input type="submit" value="Next" /></fieldset>
105     </fieldset>
106 </form>
107 [% ELSE %]
108 [% IF ( errors ) %]
109     <div class="dialog alert">
110         [% FOREACH error IN errors %]
111             <p>
112                 [% IF error.code == 'WRONG_COUNT' %]
113                     Number of records provided for merging: [% error.value %]. Currently only 2 records can be merged at a time.
114                 [% ELSE %]
115                     [% error %]
116                 [% END %]
117
118             </p>
119         [% END %]
120     </div>
121 [% ELSE %]
122 <form id="mergeform" action="/cgi-bin/koha/cataloguing/merge.pl" method="post" onsubmit="return mergeformsubmit()">
123
124 <div class="yui-g">
125 <div class="yui-u first">
126 [% PROCESS mergesource recordid1=biblio1 recordid2=biblio2 %]
127 </div>
128 <div class="yui-u">
129 [% PROCESS mergetarget %]
130 </div> <!-- .yui-u -->
131
132 <input type="hidden" name="biblio1" value="[% biblio1 %]" />
133 <input type="hidden" name="biblio2" value="[% biblio2 %]" />
134 <input type="hidden" name="mergereference" value="[% mergereference %]" />
135 <input type="hidden" name="frameworkcode" value="[% framework %]" />
136
137 <fieldset class="action"><input type="submit" name="merge" value="Merge" /></fieldset>
138 </div>
139 </form>
140 [% END %]
141 [% END %]
142 [% END %]
143
144 </div>
145 </div>
146 </div>
147
148 [% INCLUDE 'intranet-bottom.inc' %]