Merge remote branch 'kc/new/enh/bug_5548' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / manage-marc-import.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Tools &rsaquo; Manage Staged MARC Records
3 <!-- TMPL_IF name="import_batch_id" -->
4  &rsaquo; Batch <!-- TMPL_VAR name="import_batch_id" -->
5 <!-- /TMPL_IF -->
6 </title>
7 <!-- TMPL_INCLUDE NAME="greybox.inc" -->
8 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
9 <!-- TMPL_INCLUDE NAME="background-job.inc" -->
10 <script type="text/JavaScript" language="JavaScript">
11 //<![CDATA[
12 $(document).ready(function(){
13   $("#staged-record-matching-rules select").change(function(){
14       var str = $(this).attr("id");
15       $("#reset_"+str).parent().show();
16   });
17   $("a.reset").click(function(){
18       var str = $(this).attr("id");
19       str = str.replace("reset_","")
20       $("#"+str+" option[selected='selected']").attr("selected","selected");
21       $(this).parent().hide();
22   });
23 });
24 //]]>
25 </script>
26 <style type="text/css">
27         #jobpanel,#jobstatus,#jobfailed { display : none; }
28         #jobstatus { margin:.4em; }
29         #jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; } span.change-status { font-style:italic; color:#666; display:none; }</style>
30 </head>
31 <body>
32 <!-- TMPL_INCLUDE NAME="header.inc" -->
33 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
34
35 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> 
36 <!-- TMPL_IF name="import_batch_id" -->
37  &rsaquo;
38  <a href="<!-- TMPL_VAR name="script_name"-->">Manage Staged MARC Records</a>
39  &rsaquo; Batch <!-- TMPL_VAR name="import_batch_id" -->
40 <!-- TMPL_ELSE -->
41  &rsaquo; Manage Staged MARC Records
42 <!-- /TMPL_IF -->
43 </div>
44
45 <div id="doc3" class="yui-t2">
46    
47    <div id="bd">
48         <div id="yui-main">
49         <div class="yui-b">
50
51 <h1>Manage Staged MARC Records
52 <!-- TMPL_IF name="import_batch_id" -->
53  &rsaquo; Batch <!-- TMPL_VAR name="import_batch_id" -->
54 <!-- /TMPL_IF -->
55 </h1>
56 <!-- TMPL_IF name="label_batch_msg" -->
57 <!-- TMPL_IF name="alert" -->
58 <div class="alert">
59 <!-- TMPL_ELSE -->
60 <div class="dialog">
61 <!-- /TMPL_IF -->
62 <b><p><!-- TMPL_VAR name="label_batch_msg" --></p></b>
63 </div>
64 <!-- /TMPL_IF -->
65
66 <!-- TMPL_IF name="did_clean" -->
67   <div class="dialog message">Cleaned import batch #<!-- TMPL_VAR name="import_batch_id" --></div>
68 <!-- /TMPL_IF -->
69
70 <!-- TMPL_UNLESS name="batch_list" -->
71    <!-- TMPL_UNLESS name="batch_info" -->
72    <div class="dialog message">
73      <p>No records have been staged.</p>
74      <p><a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a>.</p>
75    </div>
76    <!-- /TMPL_UNLESS -->
77 <!-- /TMPL_UNLESS -->
78
79 <!-- TMPL_IF name="batch_info" -->
80
81 <!-- TMPL_IF name="can_commit" -->
82 <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
83 <input type="hidden" name="op" value="redo-matching" />
84 <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
85 <input type="hidden" name="current_matcher_id" value="<!-- TMPL_VAR name="current_matcher_id" -->" />
86 <!-- /TMPL_IF -->
87
88   <!-- TMPL_IF name="rematch_attempted" -->
89     <!-- TMPL_IF name="rematch_failed" -->
90       <div class="dialog alert">Failed to apply different matching rule</div>
91     <!-- TMPL_ELSE -->
92       <div class="dialog message">Applied different matching rule.  Number of records matched now
93        <!-- TMPL_VAR name="num_with_matches" -->
94       </div>
95     <!-- /TMPL_IF -->
96   <!-- /TMPL_IF -->
97   <!-- TMPL_IF name="changed_overlay_action" -->
98       <div class="dialog message">Changed action if matching record found</div>
99   <!-- /TMPL_IF -->
100   <!-- TMPL_IF name="changed_nomatch_action" -->
101       <div class="dialog message">Changed action if no match found</div>
102   <!-- /TMPL_IF -->
103   <!-- TMPL_IF name="changed_item_action" -->
104       <div class="dialog message">Changed item processing option</div>
105   <!-- /TMPL_IF -->
106
107 <fieldset class="rows" id="staged-record-matching-rules">
108   <ol>
109     <li><span class="label">File name:</span> <!-- TMPL_VAR name="file_name" --></li>
110     <li><span class="label">Comments:</span> <!-- TMPL_IF NAME="comments" --><!-- TMPL_VAR name="comments" -->(none)<!-- /TMPL_IF --></li>
111     <li><span class="label">Staged:</span> <!-- TMPL_VAR name="upload_timestamp" --></li>
112     <li><span class="label">Status:</span> <!-- TMPL_VAR name="import_status" --></li>
113     <li> 
114 <!-- TMPL_IF NAME="can_commit" --><label for="new_matcher_id">Matching rule applied:</label><select name="new_matcher_id" id="new_matcher_id">
115        <option value="">Do not look for matching records</option> 
116        <!-- TMPL_LOOP name="available_matchers" -->
117           <!-- TMPL_IF name="selected" -->
118           <option value="<!-- TMPL_VAR name="matcher_id" -->" selected="selected">
119              <!-- TMPL_VAR name="code" --> (<!-- TMPL_VAR name="description" -->)
120           </option>
121           <!-- TMPL_ELSE -->
122           <option value="<!-- TMPL_VAR name="matcher_id" -->">
123             <!-- TMPL_VAR name="code" --> (<!-- TMPL_VAR name="description" -->)
124           </option>
125           <!-- /TMPL_IF -->
126        <!-- /TMPL_LOOP -->
127     </select> <span class="change-status">Changed. <a href="#" class="reset" id="reset_new_matcher_id">Reset</a></span><!-- TMPL_ELSE --><span class="label">Matching rule applied</span><!-- TMPL_IF name="current_matcher_id" -->
128   <!-- TMPL_VAR name="current_matcher_code" --> (<!-- TMPL_VAR name="current_matcher_description" -->)
129 <!-- TMPL_ELSE -->
130   No matching rule in effect
131 <!-- /TMPL_IF --><!-- /TMPL_IF -->
132     </li>
133     <li><!-- TMPL_IF NAME="can_commit" --> <label for="overlay_action">Action if matching record found:</label>
134      <!-- TMPL_INCLUDE NAME="tools-overlay-action.inc" --> <span class="change-status">Changed. <a href="#" class="reset" id="reset_overlay_action">Reset</a></span><!-- TMPL_ELSE --><span class="label">Action if matching record found:</span><!-- TMPL_VAR NAME="overlay_action" --><!-- /TMPL_IF --></li>
135      
136     <li><!-- TMPL_IF NAME="can_commit" --><label for="nomatch_action">Action if no match found:</label>
137      <!-- TMPL_INCLUDE NAME="tools-nomatch-action.inc" --> <span class="change-status">Changed. <a href="#" class="reset" id="reset_nomatch_action">Reset</a></span><!-- TMPL_ELSE --><span class="label">Action if no match found:</span><!-- TMPL_VAR NAME="nomatch_action" --><!-- /TMPL_IF --></li>
138     
139     <li><!-- TMPL_IF NAME="can_commit" --><label for="item_action">Item processing:</label>
140      <!-- TMPL_INCLUDE NAME="tools-item-action.inc" --> <span class="change-status">Changed. <a href="#" class="reset" id="reset_item_action">Reset</a></span><!-- TMPL_ELSE --><span class="label">Item processing:</span><!-- TMPL_VAR NAME="item_action" --><!-- /TMPL_IF --></li>
141   </ol>
142 <!-- TMPL_IF NAME="can_commit" --><fieldset class="action"><input type="submit" value="Apply different matching rules" class="button" /></fieldset></form><!-- /TMPL_IF -->
143 </fieldset>
144
145
146 <div>
147   <!-- TMPL_IF name="can_commit" -->
148   <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
149     <input type="hidden" name="op" value="commit-batch" />
150     <input type="hidden" name="runinbackground" value="" />
151     <input type="hidden" name="completedJobID" value="" />
152     <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
153     <fieldset class="action">
154     <input type="submit" class="button" name="mainformsubmit" value="Import this batch into the catalog" onclick="return submitBackgroundJob(this.form);" />
155     <br/>
156     Add new bibliographic records into this framework:
157     <select name="framework" id="frameworks">
158       <option value="">Default</option>
159       <!-- TMPL_LOOP NAME="frameworks" -->
160       <option value="<!-- TMPL_VAR NAME="value"-->" <!-- TMPL_VAR NAME="selected" -->>
161       <!-- TMPL_VAR NAME="label" -->
162       </option>
163       <!-- /TMPL_LOOP -->
164     </select>
165     </fieldset>
166   </form>
167   <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
168      <div id="jobfailed"></div></div>
169   <!-- /TMPL_IF -->
170   <!-- TMPL_IF name="can_revert" -->
171   <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
172     <input type="hidden" name="op" value="revert-batch" />
173     <input type="hidden" name="runinbackground" value="" />
174     <input type="hidden" name="completedJobID" value="" />
175     <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
176     <fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return submitBackgroundJob(this.form);" /></fieldset>
177   </form>
178   <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
179      <div id="jobfailed"></div></div>
180   <!-- /TMPL_IF -->
181 </div>
182   <!-- TMPL_IF name="did_commit" -->
183   <div class="dialog message">Completed import of records</div>
184   <table>
185   <tr><td>Number of records added</td><td><!-- TMPL_VAR name="num_added" --></td></tr>
186   <tr><td>Number of records updated</td><td><!-- TMPL_VAR name="num_updated" --></td></tr>
187   <tr><td>Number of records ignored</td><td><!-- TMPL_VAR name="num_ignored" --></td></tr>
188   <tr><td>Number of items added</td><td><!-- TMPL_VAR name="num_items_added" --></td></tr>
189   <tr><td>Number of items ignored because of duplicate barcode</td><td><!-- TMPL_VAR name="num_items_errored" --></td></tr>
190   </table>
191   <!-- /TMPL_IF -->
192   <!-- TMPL_IF name="did_revert" -->
193   <div class="dialog message">Undid import of records</div>
194   <table>
195   <tr><td>Number of records deleted</td><td><!-- TMPL_VAR name="num_deleted" --></td></tr>
196   <tr><td>Number of items deleted</td><td><!-- TMPL_VAR name="num_items_deleted" --></td></tr>
197   <tr><td>Number of records not deleted due to items on loan</td><td><!-- TMPL_VAR name="num_errors" --></td></tr>
198   <tr><td>Number of records changed back</td><td><!-- TMPL_VAR name="num_reverted" --></td></tr>
199   <tr><td>Number of records ignored</td><td><!-- TMPL_VAR name="num_ignored" --></td></tr>
200   </table>
201   <!-- /TMPL_IF -->
202 <!-- /TMPL_IF -->
203 <br style="clear:both;" />
204
205 <!-- TMPL_IF name="batch_list" -->
206   <!-- TMPL_IF name="pages" -->
207 <div class="pages">
208 Page 
209     <!-- TMPL_LOOP name="pages" -->
210       <!-- TMPL_IF name="current_page" -->
211       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
212       <!-- TMPL_ELSE -->
213       <a class="nav" href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
214       <!-- /TMPL_IF -->
215     <!-- /TMPL_LOOP -->
216 </div>
217   <!-- /TMPL_IF -->
218 <table>
219   <tr>
220     <th>#</th>
221     <th>File name</th>
222     <th>Comments</th>
223     <th>Status</th>
224     <th>Staged</th>
225     <th># Bibs</th>
226     <th># Items</th>
227     <th>Action</th>
228   </tr>
229   <!-- TMPL_LOOP name="batch_list" -->
230   <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
231     <td><!-- TMPL_VAR name="import_batch_id" --></td>
232     <td><a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->"><!-- TMPL_VAR name="file_name" --></a></td>
233     <td><!-- TMPL_VAR name="comments" --></td>
234     <td><!-- TMPL_VAR name="import_status" --></td>
235     <td><!-- TMPL_VAR name="upload_timestamp" --></td>
236     <td><!-- TMPL_VAR name="num_biblios" --></td>
237     <td><!-- TMPL_VAR name="num_items" --><!-- TMPL_IF NAME="num_items" --> <a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;op=create_labels">(Create Label Batch)</a><!-- /TMPL_IF --></td>
238     <td><!-- TMPL_IF name="can_clean" -->
239           <form method="post" action="<!-- TMPL_VAR name="script_name" -->" name="clean_batch_<!-- TMPL_VAR name='import_batch_id'-->" id="clean_batch_<!-- TMPL_VAR name='import_batch_id'-->" >
240             <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
241             <input type="hidden" name="op" value="clean-batch" />
242             <input type="submit" class="button" value="Clean" onclick="return confirm(_('Clear all reservoir records staged in this batch?  This cannot be undone.'));" />
243           </form>
244         <!-- /TMPL_IF -->
245     </td>
246   </tr>
247   <!-- /TMPL_LOOP -->
248 </table>
249   <!-- TMPL_IF name="pages" -->
250 <div class="pages">
251 Page 
252     <!-- TMPL_LOOP name="pages" -->
253       <!-- TMPL_IF name="current_page" -->
254       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
255       <!-- TMPL_ELSE -->
256       <a class="nav" href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
257       <!-- /TMPL_IF -->
258     <!-- /TMPL_LOOP -->
259 </div>
260   <!-- /TMPL_IF -->
261 <!-- /TMPL_IF -->
262
263 <!-- TMPL_IF name="biblio_list" -->
264   <!-- TMPL_IF name="pages" -->
265 <div class="pages">
266 Page 
267     <!-- TMPL_LOOP name="pages" -->
268       <!-- TMPL_IF name="current_page" -->
269       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
270       <!-- TMPL_ELSE -->
271       <a class="nav" href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
272       <!-- /TMPL_IF -->
273     <!-- /TMPL_LOOP -->
274 </div>
275   <!-- /TMPL_IF -->
276 <table>
277   <tr>
278     <th>#</th>
279     <th>Citation</th>
280     <th>Status</th>
281     <th>Match?</th>
282     <th>Bib</th>
283
284   </tr>
285   <!-- TMPL_LOOP name="biblio_list" -->
286   <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
287     <td><!-- TMPL_VAR name="record_sequence"--></td>
288     <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR name='import_record_id' -->" rel="gb_page_center[600,500]"><!-- TMPL_VAR name="citation"--></a></td>
289     <td><!-- TMPL_VAR name="status"--></td>
290     <td><!-- TMPL_VAR name="overlay_status"--></td>
291     <td><!-- TMPL_IF name="final_match_biblionumber" -->
292         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name='final_match_biblionumber' -->"><!-- TMPL_VAR name="final_match_biblionumber"--></a>
293         <!-- /TMPL_IF -->
294     </td>
295   </tr>
296     <!-- TMPL_IF name="match_biblionumber" -->
297     <tr>
298       <td />
299       <td class="highlight" colspan="4">Matches biblio <!-- TMPL_VAR name="match_biblionumber" --> (score = <!-- TMPL_VAR name="match_score" -->): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="match_biblionumber" -->"><!-- TMPL_VAR name="match_citation" --></a></td>
300     </tr>
301     <!-- /TMPL_IF -->
302   <!-- /TMPL_LOOP -->
303 </table>
304   <!-- TMPL_IF name="pages" -->
305 <div class="pages">
306 Page 
307     <!-- TMPL_LOOP name="pages" -->
308       <!-- TMPL_IF name="current_page" -->
309       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
310       <!-- TMPL_ELSE -->
311       <a class="nav" href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
312       <!-- /TMPL_IF -->
313     <!-- /TMPL_LOOP -->
314 </div>
315   <!-- /TMPL_IF -->
316 <!-- TMPL_ELSE -->
317   <!-- TMPL_IF name="batch_info" -->
318     <div class="dialog alert">There are no records in this batch to import.
319     <a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div>
320
321   <!-- /TMPL_IF -->
322 <!-- /TMPL_IF -->
323
324 </div>
325 </div>
326 <div class="yui-b">
327 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
328 </div>
329 </div>
330 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->