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