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