Bug 16897 - Re-focus on "Add item" in Lists
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / export.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; Export data</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
6 //<![CDATA[
7 $(document).ready(function() {
8     $('#exporttype').tabs();
9
10     $("li.csv_profiles").hide();
11
12     $("#bibs select[name='output_format']").on('change', function(){
13         var format = $(this).val();
14         if ( format == 'csv' ) {
15             $("#bibs li.csv_profiles").show();
16         } else {
17             $("#bibs li.csv_profiles").hide();
18         }
19     });
20     $("#checkall").on("click",function(e){
21         e.preventDefault();
22         $(".branch_select").prop("checked",1);
23     });
24     $("#checknone").on("click",function(e){
25         e.preventDefault();
26         $(".branch_select").prop("checked",0);
27     });
28 });
29 //]]>
30 </script>
31 <style type="text/css">
32     fieldset.rows fieldset.rows {
33         width: 90%;
34     }
35 </style>
36 </head>
37 <body id="tools_export" class="tools">
38 [% INCLUDE 'header.inc' %]
39 [% INCLUDE 'cat-search.inc' %]
40
41 <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; Export data</div>
42
43 <div id="doc3" class="yui-t2">
44    
45    <div id="bd">
46         <div id="yui-main">
47         <div class="yui-b">
48
49 <div id="exporttype" class="toptabs">
50 <ul>
51 <li><a href="#bibs">Export bibliographic records</a></li>
52 <li><a href="#auths">Export authority records</a></li>
53 [% IF ( allow_db_export ) %]
54 <li><a href="#db">Export database</a></li>
55 [% END %]
56 [% IF ( allow_conf_export ) %]
57 <li><a href="#conf">Export configuration</a></li>
58 [% END %]
59 </ul>
60 <div id="bibs">
61 <p>
62     <b>Note : The items are exported by this tool unless specified.</b>
63 </p>
64
65 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
66     <fieldset class="rows">
67     <legend> Select records to export </legend>
68         <ol>
69         <li>
70             <label for="start">From biblio number: </label>
71             <input id="start" type="text" name="StartingBiblionumber" size="5" />
72         </li>
73         <li>
74             <label for="end">To biblio number: </label>
75             <input id="end" type="text" name="EndingBiblionumber" size="5" />
76         </li>
77         
78         <li>
79             <label for="itemtype">Item type: </label>
80             <select name="itemtype" id="itemtype">
81                 <option value="">-- All --</option>
82                 [% FOREACH itemtypeloo IN itemtypeloop %]
83                                 [% IF ( itemtypeloo.selected ) %]
84                 <option value="[% itemtypeloo.value %]" selected="selected">[% itemtypeloo.description %]</option>
85 [% ELSE %]
86                 <option value="[% itemtypeloo.value %]">[% itemtypeloo.description %]</option>
87 [% END %]
88                 [% END %]
89             </select>
90         </li>
91         
92         <li>
93             <label>Library: </label>
94             [% INCLUDE 'branch-selector.inc'
95                 branches = branchloop %]
96         </li>
97     </ol>
98
99     <fieldset class="rows">
100         <legend>Call number range</legend>
101         <ol>
102             <li>
103                 <label for="startcn">From item call number: </label>
104                 <input id="startcn" type="text" name="start_callnumber" size="15" />
105             </li>
106             <li>
107                 <label for="endcn">To item call number: </label>
108                 <input id="endcn" type="text" name="end_callnumber" size="15" />
109             </li>
110         </ol>
111     </fieldset>
112
113     <fieldset class="rows">
114         <legend>Accession date (inclusive)</legend>
115         <ol>
116             <li>
117                     <label for="from">Start date:</label>
118                     <input type="text" size="10" id="from" name="start_accession" value="[% from %]" class="datepickerfrom" />
119             </li>
120             <li>
121                 <label for="to">End date:</label>
122                 <input size="10" id="to" name="end_accession" value="[% end_accession %]" type="text" class="datepickerto" />
123             </li>
124         </ol>
125     </fieldset>
126
127     </fieldset>
128     <fieldset class="rows">
129     <legend>
130         Use a file
131     </legend>
132         <ol>
133         <li>File containing a list of biblio numbers with one biblio number per line. This list works as a filter: it is compatible with other parameters.</li>
134         <li><label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
135         </ol>
136     </fieldset>
137     <fieldset class="rows">
138     <legend> Options</legend>
139 <ol>        <li>
140         <label for="dont_export_item">Don't export items:</label>
141         <input id="dont_export_item" type="checkbox" name="dont_export_item" />
142         </li>
143         <li>
144         <label for="strip_nonlocal_items">Remove non-local items:</label>
145         <input id="strip_nonlocal_items" type="checkbox" name="strip_nonlocal_items" />
146         </li>
147         <li>
148         <label for="export_remove_fields">Don't export fields:</label>
149         <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields %]" />
150         separate by a blank. (e.g., 100a 200 606)
151         </li></ol>
152     </fieldset>
153     <fieldset class="rows">
154     <legend>
155         Output format
156     </legend>
157         <ol><li>
158             <label for="output_format">File format: </label>
159             <select id="output_format" name="output_format">
160                 <option value="iso2709">marc</option>
161                 <option value="xml">xml</option>
162                 <option value="csv">csv</option>
163             </select>
164         </li>
165         <li class="csv_profiles">
166             <label for="bibs_csv_profile">CSV profile: </label>
167             <select id="bibs_csv_profile" name="csv_profile_id">
168                 [% FOR csv_profile IN csv_profiles %]
169                     <option value="[% csv_profile.export_format_id %]">[% csv_profile.profile %]</option>
170                 [% END %]
171             </select>
172         </li>
173         <li>
174         <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
175         </li></ol>
176     </fieldset>
177     <input type="hidden" name="op" value="export" />
178     <input type="hidden" name="record_type" value="bibs" />
179
180     <fieldset class="action"><input type="submit" value="Export bibliographic records" class="button" /></fieldset>
181 </form>
182 </div>
183
184 <div id="auths">
185 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
186     <fieldset class="rows">
187     <legend> Select records to export </legend>
188         <ol><li>
189             <label for="start">From authid: </label>
190             <input id="start" type="text" name="starting_authid" size="6" />
191         </li>
192         <li>
193             <label for="end">To authid: </label>
194             <input id="end" type="text" name="ending_authid" size="6" />
195         </li>
196         <li>
197             <label for="authtype">Authority type: </label>
198             <select name="authtype" id="authtype">
199                 <option value="">-- All --</option>
200                 [% FOREACH authority_type IN authority_types %]
201                     <option value="[% authtypeloo.value %]">[% authtypeloo.description %]</option>
202                 [% END %]
203             </select>
204         </li>
205         </ol>
206     </fieldset>
207     <fieldset class="rows">
208     <legend>
209         Use a file
210     </legend>
211         <ol>
212         <li>File containing a list of authids with one authid per line. This list works as a filter: it is compatible with other parameters.</li>
213         <li><label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /></li>
214         </ol>
215     </fieldset>
216     <fieldset class="rows">
217     <legend>Options</legend>
218         <ol>
219         <li>
220             <label for="export_remove_fields">Don't export fields:</label>
221             <input id="export_remove_fields" type="text" name="export_remove_fields" />
222             separate by a blank. (e.g., 100a 200 606)
223         </li></ol>
224     </fieldset>
225     <fieldset class="rows">
226     <legend>Output format</legend>
227         <ol><li>
228             <label for="output_format">File format: </label>
229             <select id="output_format" name="output_format">
230                 <option value="marc">marc</option>
231                 <option value="xml">xml</option>
232             </select>
233         </li>
234         <li>
235         <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
236         </li></ol>
237     </fieldset>
238     <input type="hidden" name="op" value="export" />
239     <input type="hidden" name="record_type" value="auths" />
240
241     <fieldset class="action"><input type="submit" value="Export authority records" class="button" /></fieldset>
242 </form>
243 </div>
244
245 [% IF ( allow_db_export ) %]
246 <div id="db">
247 <form method="post" action="/cgi-bin/koha/tools/export.pl">
248     <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
249     <fieldset class="rows">
250     <legend> Choose a file </legend>
251     [% IF ( dbfiles && (dbfiles.size > 0) ) %]
252         <ul>
253         [% FOREACH dbfile IN dbfiles %]
254             <li><input type="radio" name="filename" value="[% dbfile %]">[% dbfile %]</input></li>
255         [% END %]
256         </ul>
257     [% ELSE %]
258         <p>Unfortunately, no backups are available.</p>
259     [% END %]
260     </fieldset>
261
262     [% IF ( dbfiles && (dbfiles.size > 0) ) %]
263         <input type="hidden" name="op" value="export" />
264         <input type="hidden" name="record_type" value="db" />
265         <fieldset class="action"><input type="submit" value="Download database" class="button" /></fieldset>
266     [% END %]
267 </form>
268 </div>
269 [% END %]
270
271 [% IF ( allow_conf_export ) %]
272 <div id="conf">
273 <form method="post" action="/cgi-bin/koha/tools/export.pl">
274     <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
275     <fieldset class="rows">
276     <legend> Choose a file </legend>
277     [% IF ( conffiles && (conffiles.size > 0) ) %]
278         <ul>
279         [% FOREACH conffile IN conffiles %]
280             <li><input type="radio" name="filename" value="[% conffile %]">[% conffile %]</input></li>
281         [% END %]
282         </ul>
283     [% ELSE %]
284         <p>Unfortunately, no backups are available.</p>
285     [% END %]
286     </fieldset>
287
288     [% IF ( conffiles && (conffiles.size > 0) ) %]
289         <input type="hidden" name="op" value="export" />
290         <input type="hidden" name="record_type" value="conf" />
291         <fieldset class="action"><input type="submit" value="Download configuration" class="button" /></fieldset>
292     [% END %]
293 </form>
294 </div>
295 [% END %]
296
297 </div>
298
299 </div>
300 </div>
301 <div class="yui-b noprint">
302 [% INCLUDE 'tools-menu.inc' %]
303 </div>
304 </div>
305 [% INCLUDE 'intranet-bottom.inc' %]