+[% BLOCK final_match_link %]
+ [% IF ( record.record_type == 'biblio' ) %]
+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record.final_match_id %]">[% record.final_match_id %]</a>
+ [% ELSIF ( record.record_type == 'auth' ) %]
+ <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% record.final_match_id %]">[% record.final_match_id %]</a>
+ [% END %]
+[% END %]
+[% BLOCK match_link %]
+ [% IF ( record_lis.match_id ) %]
+ <tr>
+ <td />
+ [% IF ( record.record_type == 'biblio' ) %]
+ <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>
+ [% ELSIF ( record.record_type == 'auth' ) %]
+ <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>
+ [% END %]
+ </tr>
+ [% END %]
+[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Manage staged MARC records
[% IF ( import_batch_id ) %]
<script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script>
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
+var MSG_CONFIRM_CLEAN = _("Clear all reservoir records staged in this batch? This cannot be undone.");
+
$(document).ready(function(){
$("#staged-record-matching-rules select").change(function(){
var str = $(this).attr("id");
<style type="text/css">
#jobpanel,#jobstatus,#jobfailed { display : none; }
#jobstatus { margin:.4em; }
- #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>
+ #jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('[% interface %]/[% theme %]/img/progress.png') -300px 0px no-repeat; } span.change-status { font-style:italic; color:#666; display:none; }</style>
</head>
<body id="tools_manage-marc-import" class="tools">
[% INCLUDE 'header.inc' %]
<fieldset class="rows" id="staged-record-matching-rules">
<ol>
<li><span class="label">File name:</span> [% file_name %]</li>
- <li><span class="label">Comments:</span> [% IF ( comments ) %][% comments %](none)[% END %]</li>
+ <li><span class="label">Comments:</span> [% IF ( comments ) %][% comments %][% ELSE %](none)[% END %]</li>
+ <li><span class="label">Type:</span> [% IF ( record_type == 'auth' ) %]Authority records[% ELSE %]Bibliographic records[% END %]</li>
<li><span class="label">Staged:</span> [% upload_timestamp %]</li>
- <li><span class="label">Status:</span> [% import_status %]</li>
- <li>
+ <li><span class="label">Status:</span>
+ [% IF ( import_status == 'cleaned' ) %]
+ Cleaned
+ [% ELSIF ( import_status == 'imported' ) %]
+ Imported
+ [% ELSIF ( import_status == 'importing' ) %]
+ Importing
+ [% ELSIF ( import_status == 'reverted' ) %]
+ Reverted
+ [% ELSIF ( import_status == 'reverting' ) %]
+ Reverting
+ [% ELSIF ( import_status == 'staged' ) %]
+ Staged
+ [% ELSE %]
+ [% import_status %]
+ [% END %]
+ </li>
+ <li>
[% IF ( can_commit ) %]<label for="new_matcher_id">Matching rule applied:</label><select name="new_matcher_id" id="new_matcher_id">
<option value="">Do not look for matching records</option>
[% FOREACH available_matcher IN available_matchers %]
<fieldset class="action">
<input type="submit" class="button" name="mainformsubmit" value="Import this batch into the catalog" onclick="return submitBackgroundJob(this.form);" />
<br/>
+ [% IF ( record_type != 'auth' ) %]
Add new bibliographic records into this framework:
<select name="framework" id="frameworks">
<option value="">Default</option>
<option value="[% framework.value %]">[% framework.label %]</option>
[% END %]
</select>
+ [% END %]
</fieldset>
</form>
<div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
</table>
[% END %]
[% IF ( did_revert ) %]
- <div class="dialog message">Undid import of records</div>
+ <div class="dialog message">Success: Import reversed</div>
<table>
<tr><td>Number of records deleted</td><td>[% num_deleted %]</td></tr>
<tr><td>Number of items deleted</td><td>[% num_items_deleted %]</td></tr>
<th>#</th>
<th>File name</th>
<th>Comments</th>
+ <th>Type</th>
<th>Status</th>
<th>Staged</th>
- <th># Bibs</th>
+ <th># Records</th>
<th># Items</th>
<th>Action</th>
</tr>
<td>[% batch_lis.import_batch_id %]</td>
<td><a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]">[% batch_lis.file_name %]</a></td>
<td>[% batch_lis.comments %]</td>
- <td>[% batch_lis.import_status %]</td>
+ <td>[% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %]</td>
+ <td>
+ [% IF ( batch_lis.import_status == 'cleaned' ) %]
+ Cleaned
+ [% ELSIF ( batch_lis.import_status == 'imported' ) %]
+ Imported
+ [% ELSIF ( batch_lis.import_status == 'importing' ) %]
+ Importing
+ [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
+ Reverted
+ [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
+ Reverting
+ [% ELSIF ( batch_lis.import_status == 'staged' ) %]
+ Staged
+ [% ELSE %]
+ [% batch_lis.import_status %]
+ [% END %]
+ </td>
<td>[% batch_lis.upload_timestamp %]</td>
- <td>[% batch_lis.num_biblios %]</td>
+ <td>[% batch_lis.num_records %]</td>
<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>
<td>[% IF ( batch_lis.can_clean ) %]
<form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" >
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" />
<input type="hidden" name="op" value="clean-batch" />
- <input type="submit" class="button" value="Clean" onclick="return confirm(_('Clear all reservoir records staged in this batch? This cannot be undone.'));" />
+ <input type="submit" class="button" value="Clean" onclick="return confirm(MSG_CONFIRM_CLEAN);" />
</form>
[% END %]
</td>
[% END %]
[% END %]
-[% IF ( biblio_list ) %]
+[% IF ( record_list ) %]
[% IF ( pages ) %]
<div class="pages">
Page
<th>Citation</th>
<th>Status</th>
<th>Match?</th>
- <th>Bib</th>
+ <th>Record</th>
</tr>
- [% FOREACH biblio_lis IN biblio_list %]
+ [% FOREACH record_lis IN record_list %]
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
- <td>[% biblio_lis.record_sequence %]</td>
- <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio_lis.import_record_id %]" rel="gb_page_center[600,500]">[% biblio_lis.citation %]</a></td>
- <td>[% biblio_lis.status %]</td>
- <td>[% biblio_lis.overlay_status %]</td>
- <td>[% IF ( biblio_lis.final_match_biblionumber ) %]
- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_lis.final_match_biblionumber %]">[% biblio_lis.final_match_biblionumber %]</a>
+ <td>[% record_lis.record_sequence %]</td>
+ <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>
+ <td>[% record_lis.status %]</td>
+ <td>[% record_lis.overlay_status %]</td>
+ <td>[% IF ( record_lis.final_match_id ) %]
+ [% PROCESS final_match_link record=record_lis %]
[% END %]
</td>
</tr>
- [% IF ( biblio_lis.match_biblionumber ) %]
- <tr>
- <td />
- <td class="highlight" colspan="4">Matches biblio [% biblio_lis.match_biblionumber %] (score = [% biblio_lis.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_lis.match_biblionumber %]">[% biblio_lis.match_citation %]</a></td>
- </tr>
- [% END %]
+ [% PROCESS match_link record=record_lis %]
[% END %]
</table>
[% IF ( pages ) %]