1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Tools › Stage MARC Records For Import</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'file-upload.inc' %]
5 [% INCLUDE 'background-job.inc' %]
6 <style type="text/css">
7 #uploadpanel,#fileuploadstatus,#fileuploadfailed,#jobpanel,#jobstatus,#jobfailed { display : none; }
8 #fileuploadstatus,#jobstatus { margin:.4em; }
9 #fileuploadprogress,#jobprogress{ width:150px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; }</style>
10 <script type="text/javascript">
12 $(document).ready(function(){
13 $("#processfile").hide();
15 function CheckForm(f) {
16 if ($("#fileToUpload").value == '') {
17 alert(_('Please upload a file first.'));
19 return submitBackgroundJob(f);
28 [% INCLUDE 'header.inc' %]
29 [% INCLUDE 'cat-search.inc' %]
31 <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>
33 <div id="doc3" class="yui-t2">
39 <h1>Stage MARC Records For Import</h1>
40 [% IF ( uploadmarc ) %]
41 <p>MARC Staging results :</p>
43 <li>[% total %] records in file</li>
44 <li>[% import_errors %] records not staged because of MARC error</li>
45 <li>[% staged %] records staged</li>
46 [% IF ( checked_matches ) %]
47 <li>[% matched %] records with at least one match in catalog per matching rule
48 "[% matcher_code %]"</li>
50 [% IF ( matcher_failed ) %]
51 <li>Record matching failed -- unable to retrieve selected matching rule.</li>
53 <li>Did not check for matches with existing records in catalog</li>
56 <li>[% num_items %] item records found and staged</li>
57 [% IF ( label_batch ) %]
58 <li>New label batch created: # [% label_batch %] </li>
60 <li><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=[% import_batch_id %]">Manage staged records</a></li>
61 <li><a href="/cgi-bin/koha/tools/tools-home.pl">Back</a></li>
65 <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>
66 <li>You can enter a name for this import. It may be useful, when creating a biblio, to remember where the suggested MARC data comes from!</li>
68 <form method="post" action="[% SCRIPT_NAME %]" id="uploadfile" enctype="multipart/form-data">
69 <fieldset class="rows" id="uploadform">
70 <legend>Stage records into the reservoir</legend>
73 <div id="fileuploadform">
74 <label for="fileToUpload">Select the file to stage: </label>
75 <input type="file" id="fileToUpload" name="fileToUpload" />
78 <fieldset class="action"><button class="submit" onclick="return ajaxFileUpload();">Upload file</button></fieldset>
81 <div id="uploadpanel"><div id="fileuploadstatus">Upload progress: <div id="fileuploadprogress"></div> <span id="fileuploadpercent">0</span>%</div>
82 <div id="fileuploadfailed"></div></div>
85 <form method="post" id="processfile" action="[% SCRIPT_NAME %]" enctype="multipart/form-data">
86 <fieldset class="rows">
87 <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
88 <input type="hidden" name="runinbackground" id="runinbackground" value="" />
89 <input type="hidden" name="completedJobID" id="completedJobID" value="" />
91 <label for="comments">Comments about this file: </label>
92 <input type="text" id="comments" name="comments" />
96 <label for="syntax">Character encoding: </label>
98 <select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC" selected="selected">UNIMARC</option></select>
100 <select name="syntax" id="syntax"><option value="MARC21" selected="selected">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
105 <fieldset class="rows">
106 <legend>Look for existing records in catalog?</legend>
107 <ol><li><label for="matcher">Record matching rule:</label>
108 <select name="matcher" id="matcher">
109 <option value="">Do not look for matching records</option>
110 [% FOREACH available_matcher IN available_matchers %]
111 <option value="[% available_matcher.matcher_id %]">[% available_matcher.code %] ([% available_matcher.description %])
116 <li><label for="overlay_action">Action if matching bibliographic record found: </label>
117 [% INCLUDE 'tools-overlay-action.inc' %]
119 <li><label for="nomatch_action">Action if no match is found: </label>
120 [% INCLUDE 'tools-nomatch-action.inc' %]
124 <fieldset class="rows">
125 <legend>Check for embedded item record data?</legend>
128 <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" />
129 <label for="parse_itemsyes">Yes</label>
132 <input type="radio" id="parse_itemsno" name="parse_items" value="0" />
133 <label for="parse_itemsno">No</label>
137 <li><label for="item_action">How to process items: </label>
138 [% INCLUDE 'tools-item-action.inc' %]
142 <fieldset class="action"><input type="button" id="mainformsubmit" onclick="return CheckForm(this.form);" value="Stage for import" /></fieldset>
144 <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
145 <div id="jobfailed"></div></div>
153 [% INCLUDE 'tools-menu.inc' %]
156 [% INCLUDE 'intranet-bottom.inc' %]