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>
9 [% IF ( record_lis.match_id ) %]
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>
20 [% INCLUDE 'doc-head-open.inc' %]
21 <title>Koha › Tools › Manage staged MARC records
22 [% IF ( import_batch_id ) %]
23 › Batch [% import_batch_id %]
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">
31 var MSG_CONFIRM_CLEAN = _("Clear all reservoir records staged in this batch? This cannot be undone.");
33 $(document).ready(function(){
34 $("#staged-record-matching-rules select").change(function(){
35 var str = $(this).attr("id");
36 $("#reset_"+str).parent().show();
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();
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>
52 <body id="tools_manage-marc-import" class="tools">
53 [% INCLUDE 'header.inc' %]
54 [% INCLUDE 'cat-search.inc' %]
56 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
57 [% IF ( import_batch_id ) %]
59 <a href="[% script_name %]">Manage staged MARC records</a>
60 › Batch [% import_batch_id %]
62 › Manage staged MARC records
66 <div id="doc3" class="yui-t2">
72 <h1>Manage staged MARC records
73 [% IF ( import_batch_id ) %]
74 › Batch [% import_batch_id %]
77 [% IF ( label_batch_msg ) %]
83 <b><p>[% label_batch_msg %]</p></b>
87 [% IF ( did_clean ) %]
88 <div class="dialog message">Cleaned import batch #[% import_batch_id %]</div>
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>
100 [% IF ( batch_info ) %]
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 %]" />
109 [% IF ( rematch_attempted ) %]
110 [% IF ( rematch_failed ) %]
111 <div class="dialog alert">Failed to apply different matching rule</div>
113 <div class="dialog message">Applied different matching rule. Number of records matched now
114 [% num_with_matches %]
118 [% IF ( changed_overlay_action ) %]
119 <div class="dialog message">Changed action if matching record found</div>
121 [% IF ( changed_nomatch_action ) %]
122 <div class="dialog message">Changed action if no match found</div>
124 [% IF ( changed_item_action ) %]
125 <div class="dialog message">Changed item processing option</div>
128 <fieldset class="rows" id="staged-record-matching-rules">
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' ) %]
137 [% ELSIF ( import_status == 'imported' ) %]
139 [% ELSIF ( import_status == 'importing' ) %]
141 [% ELSIF ( import_status == 'reverted' ) %]
143 [% ELSIF ( import_status == 'reverting' ) %]
145 [% ELSIF ( import_status == 'staged' ) %]
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 %])
160 <option value="[% available_matcher.matcher_id %]">
161 [% available_matcher.code %] ([% available_matcher.description %])
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 %])
168 No matching rule in effect
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>
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>
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>
180 [% IF ( can_commit ) %]<fieldset class="action"><input type="submit" value="Apply different matching rules" class="button" /></fieldset></form>[% END %]
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);" />
194 [% IF ( record_type != 'auth' ) %]
195 Add new bibliographic records into this framework:
196 <select name="framework" id="frameworks">
197 <option value="">Default</option>
198 [% FOREACH framework IN frameworks %]
199 <option value="[% framework.value %]">[% framework.label %]</option>
205 <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
206 <div id="jobfailed"></div></div>
208 [% IF ( can_revert ) %]
209 <form action="[% script_name %]" method="post">
210 <input type="hidden" name="op" value="revert-batch" />
211 <input type="hidden" name="runinbackground" value="" />
212 <input type="hidden" name="completedJobID" value="" />
213 <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
214 <fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return submitBackgroundJob(this.form);" /></fieldset>
216 <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
217 <div id="jobfailed"></div></div>
220 [% IF ( did_commit ) %]
221 <div class="dialog message">Completed import of records</div>
223 <tr><td>Number of records added</td><td>[% num_added %]</td></tr>
224 <tr><td>Number of records updated</td><td>[% num_updated %]</td></tr>
225 <tr><td>Number of records ignored</td><td>[% num_ignored %]</td></tr>
226 <tr><td>Number of items added</td><td>[% num_items_added %]</td></tr>
227 <tr><td>Number of items ignored because of duplicate barcode</td><td>[% num_items_errored %]</td></tr>
230 [% IF ( did_revert ) %]
231 <div class="dialog message">Success: Import reversed</div>
233 <tr><td>Number of records deleted</td><td>[% num_deleted %]</td></tr>
234 <tr><td>Number of items deleted</td><td>[% num_items_deleted %]</td></tr>
235 <tr><td>Number of records not deleted due to items on loan</td><td>[% num_errors %]</td></tr>
236 <tr><td>Number of records changed back</td><td>[% num_reverted %]</td></tr>
237 <tr><td>Number of records ignored</td><td>[% num_ignored %]</td></tr>
241 <br style="clear:both;" />
243 [% IF ( batch_list ) %]
247 [% FOREACH page IN pages %]
248 [% IF ( page.current_page ) %]
249 <span class="current">[% page.page_number %]</span>
251 <a class="nav" href="[% page.script_name %]?offset=[% page.offset %]">[% page.page_number %]</a>
268 [% FOREACH batch_lis IN batch_list %]
269 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
270 <td>[% batch_lis.import_batch_id %]</td>
271 <td><a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]">[% batch_lis.file_name %]</a></td>
272 <td>[% batch_lis.comments %]</td>
273 <td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td>
275 [% IF ( batch_lis.import_status == 'cleaned' ) %]
277 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
279 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
281 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
283 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
285 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
288 [% batch_lis.import_status %]
291 <td>[% batch_lis.upload_timestamp %]</td>
292 <td>[% batch_lis.num_records %]</td>
293 <td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&op=create_labels">(Create label batch)</a>[% END %]</td>
294 <td>[% IF ( batch_lis.can_clean ) %]
295 <form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" >
296 <input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" />
297 <input type="hidden" name="op" value="clean-batch" />
298 <input type="submit" class="button" value="Clean" onclick="return confirm(MSG_CONFIRM_CLEAN);" />
308 [% FOREACH page IN pages %]
309 [% IF ( page.current_page ) %]
310 <span class="current">[% page.page_number %]</span>
312 <a class="nav" href="[% page.script_name %]?offset=[% page.offset %]">[% page.page_number %]</a>
319 [% IF ( record_list ) %]
323 [% FOREACH page IN pages %]
324 [% IF ( page.current_page ) %]
325 <span class="current">[% page.page_number %]</span>
327 <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a>
341 [% FOREACH record_lis IN record_list %]
342 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
343 <td>[% record_lis.record_sequence %]</td>
344 <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>
345 <td>[% record_lis.status %]</td>
346 <td>[% record_lis.overlay_status %]</td>
347 <td>[% IF ( record_lis.final_match_id ) %]
348 [% PROCESS final_match_link record=record_lis %]
352 [% PROCESS match_link record=record_lis %]
358 [% FOREACH page IN pages %]
359 [% IF ( page.current_page ) %]
360 <span class="current">[% page.page_number %]</span>
362 <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a>
368 [% IF ( batch_info ) %]
369 <div class="dialog alert">There are no records in this batch to import.
370 <a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div>
378 [% INCLUDE 'tools-menu.inc' %]
381 [% INCLUDE 'intranet-bottom.inc' %]