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