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 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>
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>
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>
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>
218 [% IF ( did_commit ) %]
219 <div class="dialog message">Completed import of records</div>
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>
228 [% IF ( did_revert ) %]
229 <div class="dialog message">Success: Import reversed</div>
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>
239 <br style="clear:both;" />
241 [% IF ( batch_list ) %]
245 [% FOREACH page IN pages %]
246 [% IF ( page.current_page ) %]
247 <span class="current">[% page.page_number %]</span>
249 <a class="nav" href="[% page.script_name %]?offset=[% page.offset %]">[% page.page_number %]</a>
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>
273 [% IF ( batch_lis.import_status == 'cleaned' ) %]
275 [% ELSIF ( batch_lis.import_status == 'imported' ) %]
277 [% ELSIF ( batch_lis.import_status == 'importing' ) %]
279 [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
281 [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
283 [% ELSIF ( batch_lis.import_status == 'staged' ) %]
286 [% batch_lis.import_status %]
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 %]&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);" />
306 [% FOREACH page IN pages %]
307 [% IF ( page.current_page ) %]
308 <span class="current">[% page.page_number %]</span>
310 <a class="nav" href="[% page.script_name %]?offset=[% page.offset %]">[% page.page_number %]</a>
317 [% IF ( record_list ) %]
321 [% FOREACH page IN pages %]
322 [% IF ( page.current_page ) %]
323 <span class="current">[% page.page_number %]</span>
325 <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a>
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 %]
350 [% PROCESS match_link record=record_lis %]
356 [% FOREACH page IN pages %]
357 [% IF ( page.current_page ) %]
358 <span class="current">[% page.page_number %]</span>
360 <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a>
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>
376 [% INCLUDE 'tools-menu.inc' %]
379 [% INCLUDE 'intranet-bottom.inc' %]