Main Koha release repository
https://koha-community.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
8.0 KiB
206 lines
8.0 KiB
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Stage MARC records for import</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE 'file-upload.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script>
|
|
<style type="text/css">
|
|
#uploadpanel,#fileuploadstatus,#fileuploadfailed,#jobpanel,#jobstatus,#jobfailed { display : none; }
|
|
#fileuploadstatus,#jobstatus { margin:.4em; }
|
|
#fileuploadprogress,#jobprogress{ width:150px;height:10px;border:1px solid #666;background:url('[% interface %]/[% theme %]/img/progress.png') -300px 0px no-repeat; }</style>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
$("#processfile").hide();
|
|
$("#record_type").change(function() {
|
|
if ($(this).val() == 'auth') {
|
|
$('#items').hide();
|
|
} else {
|
|
$('#items').show();
|
|
}
|
|
});
|
|
});
|
|
function CheckForm(f) {
|
|
if ($("#fileToUpload").value == '') {
|
|
alert(_("Please upload a file first."));
|
|
} else {
|
|
return submitBackgroundJob(f);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="tools_stage-marc-import" class="tools">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( uploadmarc ) %]<a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC records for import</a> › Upload Results[% ELSE %]Stage MARC records for import[% END %]</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Stage MARC records for import</h1>
|
|
[% IF ( uploadmarc ) %]
|
|
<p>MARC staging results :</p>
|
|
<ul>
|
|
[% SWITCH (record_type) %]
|
|
[% CASE 'biblio' %]
|
|
<li>Processing bibliographic records</li>
|
|
[% CASE 'auth' %]
|
|
<li>Processing authority records</li>
|
|
[% END %]
|
|
<li>[% total %] records in file</li>
|
|
<li>[% import_errors %] records not staged because of MARC error</li>
|
|
<li>[% staged %] records staged</li>
|
|
[% IF ( checked_matches ) %]
|
|
<li>[% matched %] records with at least one match in catalog per matching rule
|
|
"[% matcher_code %]"</li>
|
|
[% ELSE %]
|
|
[% IF ( matcher_failed ) %]
|
|
<li>Record matching failed -- unable to retrieve selected matching rule.</li>
|
|
[% ELSE %]
|
|
<li>Did not check for matches with existing records in catalog</li>
|
|
[% END %]
|
|
[% END %]
|
|
<li>[% num_items %] item records found and staged</li>
|
|
[% IF ( label_batch ) %]
|
|
<li>New label batch created: # [% label_batch %] </li>
|
|
[% END %]
|
|
<li><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=[% import_batch_id %]">Manage staged records</a></li>
|
|
<li><a href="/cgi-bin/koha/tools/tools-home.pl">Back</a></li>
|
|
</ul>
|
|
[% ELSE %]
|
|
<ul>
|
|
<li>Select a MARC file to stage in the import reservoir. It will be parsed, and each valid record staged for later import into the catalog.</li>
|
|
<li>You can enter a name for this import. It may be useful, when creating a record, to remember where the suggested MARC data comes from!</li>
|
|
</ul>
|
|
<form method="post" action="[% SCRIPT_NAME %]" id="uploadfile" enctype="multipart/form-data">
|
|
<fieldset class="rows" id="uploadform">
|
|
<legend>Stage records into the reservoir</legend>
|
|
<ol>
|
|
<li>
|
|
<div id="fileuploadform">
|
|
<label for="fileToUpload">Select the file to stage: </label>
|
|
<input type="file" id="fileToUpload" name="fileToUpload" />
|
|
</div> </li>
|
|
</ol>
|
|
<fieldset class="action"><button class="submit" onclick="return ajaxFileUpload();">Upload file</button></fieldset>
|
|
</fieldset>
|
|
|
|
<div id="uploadpanel"><div id="fileuploadstatus">Upload progress: <div id="fileuploadprogress"></div> <span id="fileuploadpercent">0</span>%</div>
|
|
<div id="fileuploadfailed"></div></div>
|
|
</form>
|
|
|
|
<form method="post" id="processfile" action="[% SCRIPT_NAME %]" enctype="multipart/form-data">
|
|
<fieldset class="rows">
|
|
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
|
|
<input type="hidden" name="runinbackground" id="runinbackground" value="" />
|
|
<input type="hidden" name="completedJobID" id="completedJobID" value="" />
|
|
<ol><li>
|
|
<label for="comments">Comments about this file: </label>
|
|
<input type="text" id="comments" name="comments" />
|
|
|
|
</li>
|
|
<li>
|
|
<label for='record_type'>Record type:</label>
|
|
<select name='record_type' id='record_type'>
|
|
<option value='biblio' selected='selected'>Bibliographic</option>
|
|
<option value='auth'>Authority</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="encoding">Character encoding: </label>
|
|
<select name="encoding" id="encoding"><option value="utf8" selected="selected">UTF-8 (Default)</option><option value="MARC-8">MARC 8</option><option value="ISO_5426">ISO 5426</option><option value="ISO_6937">ISO 6937</option><option value=ISO_8859-1">ISO 8859-1</option><option value="EUC-KR">EUC-KR</option></select>
|
|
</li>
|
|
</ol></fieldset>
|
|
|
|
[% IF plugins %]
|
|
<fieldset class="rows">
|
|
<legend>Transform file to MARC:</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="comments">Convert file to MARC using the following plugin: </label>
|
|
<select name="to_marc_plugin" id="to_marc_plugin">
|
|
<option value="">Do not use.</option>
|
|
[% FOREACH p IN plugins %]
|
|
<option value="[% p.metadata.class %]">[% p.metadata.name %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
[% END %]
|
|
|
|
[% IF MarcModificationTemplatesLoop %]
|
|
<fieldset class="rows">
|
|
<legend>Use MARC Modification Template:</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="comments">Modify record using the following template: </label>
|
|
<select name="marc_modification_template_id" id="marc_modification_template_id">
|
|
<option value="">Do not use.</option>
|
|
[% FOREACH mmt IN MarcModificationTemplatesLoop %]
|
|
<option value="[% mmt.template_id %]">[% mmt.name %]</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
[% END %]
|
|
|
|
<fieldset class="rows">
|
|
<legend>Look for existing records in catalog?</legend>
|
|
<ol><li><label for="matcher">Record matching rule:</label>
|
|
<select name="matcher" id="matcher">
|
|
<option value="">Do not look for matching records</option>
|
|
[% FOREACH available_matcher IN available_matchers %]
|
|
<option value="[% available_matcher.matcher_id %]">[% available_matcher.code %] ([% available_matcher.description %])
|
|
</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li><label for="overlay_action">Action if matching record found: </label>
|
|
[% INCLUDE 'tools-overlay-action.inc' %]
|
|
</li>
|
|
<li><label for="nomatch_action">Action if no match is found: </label>
|
|
[% INCLUDE 'tools-nomatch-action.inc' %]
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="rows" id="items">
|
|
<legend>Check for embedded item record data?</legend>
|
|
<ol>
|
|
<li class="radio">
|
|
<input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" />
|
|
<label for="parse_itemsyes">Yes</label>
|
|
</li>
|
|
<li class="radio">
|
|
<input type="radio" id="parse_itemsno" name="parse_items" value="0" />
|
|
<label for="parse_itemsno">No</label>
|
|
</li>
|
|
</ol>
|
|
<ol>
|
|
<li><label for="item_action">How to process items: </label>
|
|
[% INCLUDE 'tools-item-action.inc' %]
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="button" id="mainformsubmit" onclick="return CheckForm(this.form);" value="Stage for import" /></fieldset>
|
|
|
|
<div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
|
|
<div id="jobfailed"></div></div>
|
|
|
|
</form>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|
|
|