Merge remote-tracking branch 'kc/new/bug_6170' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / stage-marc-import.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; 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">
11 //<![CDATA[
12 $(document).ready(function(){
13         $("#processfile").hide();
14 });
15 function CheckForm(f) {
16     if ($("#fileToUpload").value == '') {
17         alert(_('Please upload a file first.'));
18     } else {
19         return submitBackgroundJob(f);
20     }
21     return false;
22 }
23
24 //]]>
25 </script>
26 </head>
27 <body>
28 [% INCLUDE 'header.inc' %]
29 [% INCLUDE 'cat-search.inc' %]
30
31 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% IF ( uploadmarc ) %]<a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC Records For Import</a> &rsaquo; Upload Results[% ELSE %]Stage MARC Records For Import[% END %]</div>
32
33 <div id="doc3" class="yui-t2">
34    
35    <div id="bd">
36         <div id="yui-main">
37         <div class="yui-b">
38
39 <h1>Stage MARC Records For Import</h1>
40 [% IF ( uploadmarc ) %]
41 <p>MARC Staging results :</p>
42 <ul>
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         &quot;[% matcher_code %]&quot;</li>
49     [% ELSE %]
50         [% IF ( matcher_failed ) %]
51           <li>Record matching failed -- unable to retrieve selected matching rule.</li>
52         [% ELSE %]
53           <li>Did not check for matches with existing records in catalog</li>
54         [% END %]
55     [% END %]
56         <li>[% num_items %] item records found and staged</li>
57         [% IF ( label_batch ) %]
58           <li>New label batch created: # [% label_batch %] </li>
59     [% END %]
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>
62 </ul>
63 [% ELSE %]
64 <ul>
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>
67 </ul>
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>
71 <ol>
72         <li>
73         <div id="fileuploadform">
74                 <label for="fileToUpload">Select the file to stage: </label>
75                 <input type="file" id="fileToUpload" name="fileToUpload" />
76         </div>  </li>
77 </ol>
78         <fieldset class="action"><button class="submit" onclick="return ajaxFileUpload();">Upload file</button></fieldset>
79 </fieldset>
80                 
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>
83 </form>
84
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="" />
90         <ol><li>
91                 <label for="comments">Comments about this file: </label>
92                 <input type="text" id="comments" name="comments" />
93                 
94         </li>
95         <li>
96                 <label for="encoding">Character encoding: </label>
97             <select name="encoding" id="encoding"><option value="" selected="selected">Default</option><option value="utf8">UTF-8</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>
98         </li>
99 </ol></fieldset>
100   <fieldset class="rows">
101     <legend>Look for existing records in catalog?</legend>
102     <ol><li><label for="matcher">Record matching rule:</label>
103     <select name="matcher" id="matcher">
104        <option value="">Do not look for matching records</option> 
105        [% FOREACH available_matcher IN available_matchers %]
106           <option value="[% available_matcher.matcher_id %]">[% available_matcher.code %] ([% available_matcher.description %])
107           </option>
108        [% END %]
109     </select>
110     </li>
111       <li><label for="overlay_action">Action if matching bibliographic record found: </label>
112            [% INCLUDE 'tools-overlay-action.inc' %]
113       </li>
114       <li><label for="nomatch_action">Action if no match is found: </label>
115            [% INCLUDE 'tools-nomatch-action.inc' %]
116       </li>
117     </ol>
118   </fieldset>
119   <fieldset class="rows">
120     <legend>Check for embedded item record data?</legend>
121     <ol>
122       <li class="radio">
123         <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" />
124         <label for="parse_itemsyes">Yes</label>
125       </li>
126       <li class="radio">
127         <input type="radio" id="parse_itemsno" name="parse_items" value="0" />
128         <label for="parse_itemsno">No</label>
129       </li>
130     </ol>
131     <ol>
132       <li><label for="item_action">How to process items: </label>
133            [% INCLUDE 'tools-item-action.inc' %]
134       </li>
135     </ol>
136   </fieldset>
137   <fieldset class="action"><input type="button" id="mainformsubmit" onclick="return CheckForm(this.form);" value="Stage for import" /></fieldset>
138  
139        <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
140      <div id="jobfailed"></div></div>
141   
142 </form>
143 [% END %]
144
145 </div>
146 </div>
147 <div class="yui-b">
148 [% INCLUDE 'tools-menu.inc' %]
149 </div>
150 </div>
151 [% INCLUDE 'intranet-bottom.inc' %]