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 $(document).ready(function(){
32 $("#staged-record-matching-rules select").change(function(){
33 var str = $(this).attr("id");
34 $("#reset_"+str).parent().show();
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();
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>
50 <body id="tools_manage-marc-import" class="tools">
51 [% INCLUDE 'header.inc' %]
52 [% INCLUDE 'cat-search.inc' %]
54 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
55 [% IF ( import_batch_id ) %]
57 <a href="[% script_name %]">Manage staged MARC records</a>
58 › Batch [% import_batch_id %]
60 › Manage staged MARC records
64 <div id="doc3" class="yui-t2">
70 <h1>Manage staged MARC records
71 [% IF ( import_batch_id ) %]
72 › Batch [% import_batch_id %]
75 [% IF ( label_batch_msg ) %]
81 <b><p>[% label_batch_msg %]</p></b>
85 [% IF ( did_clean ) %]
86 <div class="dialog message">Cleaned import batch #[% import_batch_id %]</div>
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>
98 [% IF ( batch_info ) %]
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 %]" />
107 [% IF ( rematch_attempted ) %]
108 [% IF ( rematch_failed ) %]
109 <div class="dialog alert">Failed to apply different matching rule</div>
111 <div class="dialog message">Applied different matching rule. Number of records matched now
112 [% num_with_matches %]
116 [% IF ( changed_overlay_action ) %]
117 <div class="dialog message">Changed action if matching record found</div>
119 [% IF ( changed_nomatch_action ) %]
120 <div class="dialog message">Changed action if no match found</div>
122 [% IF ( changed_item_action ) %]
123 <div class="dialog message">Changed item processing option</div>
126 <fieldset class="rows" id="staged-record-matching-rules">
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> [% import_status %]</li>
134 [% IF ( can_commit ) %]<label for="new_matcher_id">Matching rule applied:</label><select name="new_matcher_id" id="new_matcher_id">
135 <option value="">Do not look for matching records</option>
136 [% FOREACH available_matcher IN available_matchers %]
137 [% IF ( available_matcher.selected ) %]
138 <option value="[% available_matcher.matcher_id %]" selected="selected">
139 [% available_matcher.code %] ([% available_matcher.description %])
142 <option value="[% available_matcher.matcher_id %]">
143 [% available_matcher.code %] ([% available_matcher.description %])
147 </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 ) %]
148 [% current_matcher_code %] ([% current_matcher_description %])
150 No matching rule in effect
153 <li>[% IF ( can_commit ) %] <label for="overlay_action">Action if matching record found:</label>
154 [% 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>
156 <li>[% IF ( can_commit ) %]<label for="nomatch_action">Action if no match found:</label>
157 [% 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>
159 <li>[% IF ( can_commit ) %]<label for="item_action">Item processing:</label>
160 [% 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>
162 [% IF ( can_commit ) %]<fieldset class="action"><input type="submit" value="Apply different matching rules" class="button" /></fieldset></form>[% END %]
167 [% IF ( can_commit ) %]
168 <form action="[% script_name %]" method="post">
169 <input type="hidden" name="op" value="commit-batch" />
170 <input type="hidden" name="runinbackground" value="" />
171 <input type="hidden" name="completedJobID" value="" />
172 <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
173 <fieldset class="action">
174 <input type="submit" class="button" name="mainformsubmit" value="Import this batch into the catalog" onclick="return submitBackgroundJob(this.form);" />
176 Add new bibliographic records into this framework:
177 <select name="framework" id="frameworks">
178 <option value="">Default</option>
179 [% FOREACH framework IN frameworks %]
180 <option value="[% framework.value %]">[% framework.label %]</option>
185 <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
186 <div id="jobfailed"></div></div>
188 [% IF ( can_revert ) %]
189 <form action="[% script_name %]" method="post">
190 <input type="hidden" name="op" value="revert-batch" />
191 <input type="hidden" name="runinbackground" value="" />
192 <input type="hidden" name="completedJobID" value="" />
193 <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
194 <fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return submitBackgroundJob(this.form);" /></fieldset>
196 <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
197 <div id="jobfailed"></div></div>
200 [% IF ( did_commit ) %]
201 <div class="dialog message">Completed import of records</div>
203 <tr><td>Number of records added</td><td>[% num_added %]</td></tr>
204 <tr><td>Number of records updated</td><td>[% num_updated %]</td></tr>
205 <tr><td>Number of records ignored</td><td>[% num_ignored %]</td></tr>
206 <tr><td>Number of items added</td><td>[% num_items_added %]</td></tr>
207 <tr><td>Number of items ignored because of duplicate barcode</td><td>[% num_items_errored %]</td></tr>
210 [% IF ( did_revert ) %]
211 <div class="dialog message">Success: Import reversed</div>
213 <tr><td>Number of records deleted</td><td>[% num_deleted %]</td></tr>
214 <tr><td>Number of items deleted</td><td>[% num_items_deleted %]</td></tr>
215 <tr><td>Number of records not deleted due to items on loan</td><td>[% num_errors %]</td></tr>
216 <tr><td>Number of records changed back</td><td>[% num_reverted %]</td></tr>
217 <tr><td>Number of records ignored</td><td>[% num_ignored %]</td></tr>
221 <br style="clear:both;" />
223 [% IF ( batch_list ) %]
227 [% FOREACH page IN pages %]
228 [% IF ( page.current_page ) %]
229 <span class="current">[% page.page_number %]</span>
231 <a class="nav" href="[% page.script_name %]?offset=[% page.offset %]">[% page.page_number %]</a>
248 [% FOREACH batch_lis IN batch_list %]
249 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
250 <td>[% batch_lis.import_batch_id %]</td>
251 <td><a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]">[% batch_lis.file_name %]</a></td>
252 <td>[% batch_lis.comments %]</td>
253 <td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td>
254 <td>[% batch_lis.import_status %]</td>
255 <td>[% batch_lis.upload_timestamp %]</td>
256 <td>[% batch_lis.num_records %]</td>
257 <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>
258 <td>[% IF ( batch_lis.can_clean ) %]
259 <form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" >
260 <input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" />
261 <input type="hidden" name="op" value="clean-batch" />
262 <input type="submit" class="button" value="Clean" onclick="return confirm(_('Clear all reservoir records staged in this batch? This cannot be undone.'));" />
272 [% FOREACH page IN pages %]
273 [% IF ( page.current_page ) %]
274 <span class="current">[% page.page_number %]</span>
276 <a class="nav" href="[% page.script_name %]?offset=[% page.offset %]">[% page.page_number %]</a>
283 [% IF ( record_list ) %]
287 [% FOREACH page IN pages %]
288 [% IF ( page.current_page ) %]
289 <span class="current">[% page.page_number %]</span>
291 <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a>
305 [% FOREACH record_lis IN record_list %]
306 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
307 <td>[% record_lis.record_sequence %]</td>
308 <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>
309 <td>[% record_lis.status %]</td>
310 <td>[% record_lis.overlay_status %]</td>
311 <td>[% IF ( record_lis.final_match_id ) %]
312 [% PROCESS final_match_link record=record_lis %]
316 [% PROCESS match_link record=record_lis %]
322 [% FOREACH page IN pages %]
323 [% IF ( page.current_page ) %]
324 <span class="current">[% page.page_number %]</span>
326 <a class="nav" href="[% page.script_name %]?import_batch_id=[% import_batch_id %]&offset=[% page.offset %]">[% page.page_number %]</a>
332 [% IF ( batch_info ) %]
333 <div class="dialog alert">There are no records in this batch to import.
334 <a href="/cgi-bin/koha/tools/manage-marc-import.pl">Manage staged MARC records</a>.</div>
342 [% INCLUDE 'tools-menu.inc' %]
345 [% INCLUDE 'intranet-bottom.inc' %]