patch for feature 2952 - v3
[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_UNLESS name="batch_list" -->
47    <!-- TMPL_UNLESS name="batch_info" -->
48      <span class="problem">No records have been staged.</span>
49      <a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a>.
50    <!-- /TMPL_UNLESS -->
51 <!-- /TMPL_UNLESS -->
52
53 <!-- TMPL_IF name="batch_info" -->
54 <fieldset class="rows">
55   <ol>
56     <li><span class="label">File name</span> <!-- TMPL_VAR name="file_name" --></li>
57     <li><span class="label">Comments</span> <!-- TMPL_IF NAME="comments" --><!-- TMPL_VAR name="comments" -->(none)<!-- /TMPL_IF --></li>
58     <li><span class="label">Staged</span> <!-- TMPL_VAR name="upload_timestamp" --></li>
59     <li><span class="label">Status</span> <!-- TMPL_VAR name="import_status" --></li>
60     <li><span class="label">Matching rule applied</span> 
61 <!-- TMPL_IF name="current_matcher_id" -->
62   <!-- TMPL_VAR name="current_matcher_code" --> (<!-- TMPL_VAR name="current_matcher_description" -->)
63 <!-- TMPL_ELSE -->
64   No matching rule in effect
65 <!-- /TMPL_IF -->
66     </li>
67     <li><span class="label">Action if matching record found</span> <!-- TMPL_VAR NAME="overlay_action" --></li>
68     <li><span class="label">Action if no match found</span> <!-- TMPL_VAR NAME="nomatch_action" --></li>
69     <li><span class="label">Item processing</span> <!-- TMPL_VAR NAME="item_action" --></li>
70   </ol>
71 </fieldset>
72
73 <!-- TMPL_IF name="can_commit" -->
74 <div id="matchingrules">
75   <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
76   <fieldset class="rows">
77     <input type="hidden" name="op" value="redo-matching" />
78     <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
79     <input type="hidden" name="current_matcher_id" value="<!-- TMPL_VAR name="current_matcher_id" -->" />
80     <ol>
81     <li><label for name="new_matcher_id">New matching rule</label>
82     <select name="new_matcher_id" id="new_matcher_id">
83        <option value="">Do not look for matching records</option> 
84        <!-- TMPL_LOOP name="available_matchers" -->
85           <!-- TMPL_IF name="selected" -->
86           <option value="<!-- TMPL_VAR name="matcher_id" -->" selected="selected">
87              <!-- TMPL_VAR name="code" --> (<!-- TMPL_VAR name="description" -->)
88           </option>
89           <!-- TMPL_ELSE -->
90           <option value="<!-- TMPL_VAR name="matcher_id" -->">
91             <!-- TMPL_VAR name="code" --> (<!-- TMPL_VAR name="description" -->)
92           </option>
93           <!-- /TMPL_IF -->
94        <!-- /TMPL_LOOP -->
95     </select>
96     </li>
97     <li><label for="overlay_action">Action if matching record found</label>
98      <!-- TMPL_INCLUDE NAME="tools-overlay-action.inc" -->
99     </li>
100     <li><label for="overlay_action">Action if no match found</label>
101      <!-- TMPL_INCLUDE NAME="tools-nomatch-action.inc" -->
102     </li>
103     <li><label for="overlay_action">Item processing</label>
104      <!-- TMPL_INCLUDE NAME="tools-item-action.inc" -->
105     </li>
106     </ol>
107     <fieldset class="action"><input type="submit" class="button" value="Apply different matching rule" /></fieldset>
108     </fieldset>
109   </form>
110   <!-- TMPL_IF name="rematch_attempted" -->
111     <!-- TMPL_IF name="rematch_failed" -->
112       <div class="dialog alert">Failed to apply different matching rule</div>
113     <!-- TMPL_ELSE -->
114       <div class="dialog message">Applied different matching rule.  Number of records matched now
115        <!-- TMPL_VAR name="num_with_matches" -->
116       </div>
117     <!-- /TMPL_IF -->
118   <!-- /TMPL_IF -->
119   <!-- TMPL_IF name="changed_overlay_action" -->
120       <div class="dialog message">Changed action if matching record found</div>
121   <!-- /TMPL_IF -->
122   <!-- TMPL_IF name="changed_nomatch_action" -->
123       <div class="dialog message">Changed action if no match found</div>
124   <!-- /TMPL_IF -->
125   <!-- TMPL_IF name="changed_item_action" -->
126       <div class="dialog message">Changed item processing option</div>
127   <!-- /TMPL_IF -->
128 </div>
129 <!-- /TMPL_IF -->
130 <div>
131   <!-- TMPL_IF name="can_commit" -->
132   <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
133     <input type="hidden" name="op" value="commit-batch" />
134     <input type="hidden" name="runinbackground" value="" />
135     <input type="hidden" name="completedJobID" value="" />
136     <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
137     <fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Import into catalog" onclick="return submitBackgroundJob(this.form);" /></fieldset>
138   </form>
139   <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
140      <div id="jobfailed"></div></div>
141   <!-- /TMPL_IF -->
142   <!-- TMPL_IF name="can_revert" -->
143   <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
144     <input type="hidden" name="op" value="revert-batch" />
145     <input type="hidden" name="runinbackground" value="" />
146     <input type="hidden" name="completedJobID" value="" />
147     <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
148     <fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return submitBackgroundJob(this.form);" /></fieldset>
149   </form>
150   <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
151      <div id="jobfailed"></div></div>
152   <!-- /TMPL_IF -->
153 </div>
154   <!-- TMPL_IF name="did_commit" -->
155   <div class="dialog message">Completed import of records</div>
156   <table>
157   <tr><td>Number of records added</td><td><!-- TMPL_VAR name="num_added" --></td></tr>
158   <tr><td>Number of records updated</td><td><!-- TMPL_VAR name="num_updated" --></td></tr>
159   <tr><td>Number of records ignored</td><td><!-- TMPL_VAR name="num_ignored" --></td></tr>
160   <tr><td>Number of items added</td><td><!-- TMPL_VAR name="num_items_added" --></td></tr>
161   <tr><td>Number of items ignored because of duplicate barcode</td><td><!-- TMPL_VAR name="num_items_errored" --></td></tr>
162   </table>
163   <!-- /TMPL_IF -->
164   <!-- TMPL_IF name="did_revert" -->
165   <div class="dialog message">Undid import of records</div>
166   <table>
167   <tr><td>Number of records deleted</td><td><!-- TMPL_VAR name="num_deleted" --></td></tr>
168   <tr><td>Number of items deleted</td><td><!-- TMPL_VAR name="num_items_deleted" --></td></tr>
169   <tr><td>Number of records not deleted due to items on loan</td><td><!-- TMPL_VAR name="num_errors" --></td></tr>
170   <tr><td>Number of records changed back</td><td><!-- TMPL_VAR name="num_reverted" --></td></tr>
171   <tr><td>Number of records ignored</td><td><!-- TMPL_VAR name="num_ignored" --></td></tr>
172   </table>
173   <!-- /TMPL_IF -->
174 <!-- /TMPL_IF -->
175 <br style="clear:both;" />
176
177 <!-- TMPL_IF name="batch_list" -->
178   <!-- TMPL_IF name="pages" -->
179 <div class="pages">
180 Page 
181     <!-- TMPL_LOOP name="pages" -->
182       <!-- TMPL_IF name="current_page" -->
183       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
184       <!-- TMPL_ELSE -->
185       <a class="nav" href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
186       <!-- /TMPL_IF -->
187     <!-- /TMPL_LOOP -->
188 </div>
189   <!-- /TMPL_IF -->
190 <table>
191   <tr>
192     <th>#</th>
193     <th>File name</th>
194     <th>Comments</th>
195     <th>Status</th>
196     <th>Staged</th>
197     <th># Bibs</th>
198     <th># Items</th>
199   </tr>
200   <!-- TMPL_LOOP name="batch_list" -->
201   <tr>
202     <td><!-- TMPL_VAR name="import_batch_id" --></td>
203     <td><a href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->"><!-- TMPL_VAR name="file_name" --></a></td>
204     <td><!-- TMPL_VAR name="comments" --></td>
205     <td><!-- TMPL_VAR name="import_status" --></td>
206     <td><!-- TMPL_VAR name="upload_timestamp" --></td>
207     <td><!-- TMPL_VAR name="num_biblios" --></td>
208     <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>
209   </tr>
210   <!-- /TMPL_LOOP -->
211 </table>
212   <!-- TMPL_IF name="pages" -->
213 <div class="pages">
214 Page 
215     <!-- TMPL_LOOP name="pages" -->
216       <!-- TMPL_IF name="current_page" -->
217       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
218       <!-- TMPL_ELSE -->
219       <a class="nav" href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
220       <!-- /TMPL_IF -->
221     <!-- /TMPL_LOOP -->
222 </div>
223   <!-- /TMPL_IF -->
224 <!-- /TMPL_IF -->
225
226 <!-- TMPL_IF name="biblio_list" -->
227   <!-- TMPL_IF name="pages" -->
228 <div class="pages">
229 Page 
230     <!-- TMPL_LOOP name="pages" -->
231       <!-- TMPL_IF name="current_page" -->
232       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
233       <!-- TMPL_ELSE -->
234       <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>
235       <!-- /TMPL_IF -->
236     <!-- /TMPL_LOOP -->
237 </div>
238   <!-- /TMPL_IF -->
239 <table>
240   <tr>
241     <th>#</th>
242     <th>Citation</th>
243     <th>Status</th>
244     <th>Match?</th>
245     <th>Bib</th>
246
247   </tr>
248   <!-- TMPL_LOOP name="biblio_list" -->
249   <tr>
250     <td><!-- TMPL_VAR name="record_sequence"--></td>
251     <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>
252     <td><!-- TMPL_VAR name="status"--></td>
253     <td><!-- TMPL_VAR name="overlay_status"--></td>
254     <td align="center"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name='final_match_biblionumber' -->"><!-- TMPL_VAR name="final_match_biblionumber"--></a></td>
255 +
256   </tr>
257     <!-- TMPL_IF name="match_biblionumber" -->
258     <tr>
259       <td />
260       <td class="highlight" colspan="3">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>
261     </tr>
262     <!-- /TMPL_IF -->
263   <!-- /TMPL_LOOP -->
264 </table>
265   <!-- TMPL_IF name="pages" -->
266 <div class="pages">
267 Page 
268     <!-- TMPL_LOOP name="pages" -->
269       <!-- TMPL_IF name="current_page" -->
270       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
271       <!-- TMPL_ELSE -->
272       <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>
273       <!-- /TMPL_IF -->
274     <!-- /TMPL_LOOP -->
275 </div>
276   <!-- /TMPL_IF -->
277 <!-- TMPL_ELSE -->
278   <!-- TMPL_IF name="batch_info" -->
279     <div class="dialog alert">There are no records in this batch to import.
280     <a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div>
281
282   <!-- /TMPL_IF -->
283 <!-- /TMPL_IF -->
284
285 </div>
286 </div>
287 <div class="yui-b">
288 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
289 </div>
290 </div>
291 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->