Bug 5917 / Bug 6085 : Fixing not being able to change language
[koha.git] / koha-tt / 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="syntax">Character encoding: </label>
97         [% IF ( UNIMARC ) %]
98             <select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC" selected="selected">UNIMARC</option></select>
99         [% ELSE %]
100             <select name="syntax" id="syntax"><option value="MARC21" selected="selected">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
101         [% END %]
102                 
103         </li>
104 </ol></fieldset>
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 %])
112           </option>
113        [% END %]
114     </select>
115     </li>
116       <li><label for="overlay_action">Action if matching bibliographic record found: </label>
117            [% INCLUDE 'tools-overlay-action.inc' %]
118       </li>
119       <li><label for="nomatch_action">Action if no match is found: </label>
120            [% INCLUDE 'tools-nomatch-action.inc' %]
121       </li>
122     </ol>
123   </fieldset>
124   <fieldset class="rows">
125     <legend>Check for embedded item record data?</legend>
126     <ol>
127       <li class="radio">
128         <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" />
129         <label for="parse_itemsyes">Yes</label>
130       </li>
131       <li class="radio">
132         <input type="radio" id="parse_itemsno" name="parse_items" value="0" />
133         <label for="parse_itemsno">No</label>
134       </li>
135     </ol>
136     <ol>
137       <li><label for="item_action">How to process items: </label>
138            [% INCLUDE 'tools-item-action.inc' %]
139       </li>
140     </ol>
141   </fieldset>
142   <fieldset class="action"><input type="button" id="mainformsubmit" onclick="return CheckForm(this.form);" value="Stage for import" /></fieldset>
143  
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>
146   
147 </form>
148 [% END %]
149
150 </div>
151 </div>
152 <div class="yui-b">
153 [% INCLUDE 'tools-menu.inc' %]
154 </div>
155 </div>
156 [% INCLUDE 'intranet-bottom.inc' %]