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