5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Tools › Export data</title>
7 [% INCLUDE 'doc-head-close.inc' %]
9 fieldset.rows fieldset.rows {
15 <body id="tools_export" class="tools">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'cat-search.inc' %]
19 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Export data</div>
21 <div class="main container-fluid">
23 <div class="col-sm-10 col-sm-push-2">
26 [% FOR m IN messages %]
27 <div class="dialog [% m.type | html %]">
29 [% CASE 'invalid_mimetype' %]The file used does not have a valid format. Only csv and txt are allowed.
30 [% CASE %][% m.code | html %]
35 <div id="exporttype" class="toptabs">
37 <li><a href="#bibs">Export bibliographic records</a></li>
38 <li><a href="#auths">Export authority records</a></li>
39 [% IF ( allow_db_export ) %]
40 <li><a href="#db">Export database</a></li>
42 [% IF ( allow_conf_export ) %]
43 <li><a href="#conf">Export configuration</a></li>
48 <b>Note : The items are exported by this tool unless specified.</b>
51 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
52 <fieldset class="rows">
53 <legend> Select records to export </legend>
56 <label for="start">From biblionumber: </label>
57 <input id="start" type="text" name="StartingBiblionumber" size="5" />
60 <label for="end">To biblionumber: </label>
61 <input id="end" type="text" name="EndingBiblionumber" size="5" />
65 <label for="itemtype">Item type: </label>
66 <select name="itemtype" id="itemtype">
67 <option value="">-- All --</option>
68 [% FOREACH itemtype IN itemtypes %]
69 <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
75 <label>With items owned by the following libraries: </label>
76 [% INCLUDE 'branch-selector.inc' branches = libraries %]
80 <fieldset class="rows">
81 <legend>Call number range</legend>
84 <label for="startcn">From item call number: </label>
85 <input id="startcn" type="text" name="start_callnumber" size="15" />
88 <label for="endcn">To item call number: </label>
89 <input id="endcn" type="text" name="end_callnumber" size="15" />
94 <fieldset class="rows">
95 <legend>Accession date (inclusive)</legend>
98 <label for="from">Start date:</label>
99 <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="datepickerfrom" />
102 <label for="to">End date:</label>
103 <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="datepickerto" />
109 <fieldset class="rows">
114 <li>File containing a list of biblionumbers with one biblionumber per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)</li>
115 <li><label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
118 <fieldset class="rows">
119 <legend> Options</legend>
121 <label for="dont_export_item">Don't export items:</label>
122 <input id="dont_export_item" type="checkbox" name="dont_export_item" />
125 <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label>
126 <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" />
129 <label for="export_remove_fields">Don't export fields:</label>
130 <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields | html %]" />
131 separate by a blank. (e.g., 100a 200 606)
134 <fieldset class="rows">
139 <label for="output_format">File format: </label>
140 <select id="output_format" name="output_format">
141 <option value="iso2709">MARC</option>
142 <option value="xml">XML</option>
143 [% IF csv_profiles %]
144 <option value="csv">CSV</option>
146 <option value="csv" disabled data-toggle="tooltip" data-placement="left" title="You must create a CSV profile for MARC exports to use this option.">CSV</option>
150 <li class="csv_profiles">
151 <label for="bibs_csv_profile">CSV profile: </label>
152 <select id="bibs_csv_profile" name="csv_profile_id">
153 [% FOR csv_profile IN csv_profiles %]
154 <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option>
159 <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
162 <input type="hidden" name="op" value="export" />
163 <input type="hidden" name="record_type" value="bibs" />
165 <fieldset class="action"><input type="submit" value="Export bibliographic records" class="button" /></fieldset>
170 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
171 <fieldset class="rows">
172 <legend> Select records to export </legend>
174 <label for="start">From authid: </label>
175 <input id="start" type="text" name="starting_authid" size="6" />
178 <label for="end">To authid: </label>
179 <input id="end" type="text" name="ending_authid" size="6" />
182 <label for="authtype">Authority type: </label>
183 <select name="authtype" id="authtype">
184 <option value="">-- All --</option>
185 [% FOREACH authority_type IN authority_types %]
186 <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
192 <fieldset class="rows">
197 <li>File containing a list of authids with one authid per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)</li>
198 <li><label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /></li>
201 <fieldset class="rows">
202 <legend>Options</legend>
205 <label for="export_remove_fields">Don't export fields:</label>
206 <input id="export_remove_fields" type="text" name="export_remove_fields" />
207 separate by a blank. (e.g., 100a 200 606)
210 <fieldset class="rows">
211 <legend>Output format</legend>
213 <label for="output_format">File format: </label>
214 <select id="output_format" name="output_format">
215 <option value="marc">marc</option>
216 <option value="xml">xml</option>
220 <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
223 <input type="hidden" name="op" value="export" />
224 <input type="hidden" name="record_type" value="auths" />
226 <fieldset class="action"><input type="submit" value="Export authority records" class="button" /></fieldset>
230 [% IF ( allow_db_export ) %]
232 <form method="post" action="/cgi-bin/koha/tools/export.pl">
233 <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
234 <fieldset class="rows">
235 <legend> Choose a file </legend>
236 [% IF ( dbfiles && (dbfiles.size > 0) ) %]
238 [% FOREACH dbfile IN dbfiles %]
239 <li><input type="radio" name="filename" value="[% dbfile | html %]">[% dbfile | html %]</input></li>
243 <p>Unfortunately, no backups are available.</p>
247 [% IF ( dbfiles && (dbfiles.size > 0) ) %]
248 <input type="hidden" name="op" value="export" />
249 <input type="hidden" name="record_type" value="db" />
250 <fieldset class="action"><input type="submit" value="Download database" class="button" /></fieldset>
256 [% IF ( allow_conf_export ) %]
258 <form method="post" action="/cgi-bin/koha/tools/export.pl">
259 <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
260 <fieldset class="rows">
261 <legend> Choose a file </legend>
262 [% IF ( conffiles && (conffiles.size > 0) ) %]
264 [% FOREACH conffile IN conffiles %]
265 <li><input type="radio" name="filename" value="[% conffile | html %]">[% conffile | html %]</input></li>
269 <p>Unfortunately, no backups are available.</p>
273 [% IF ( conffiles && (conffiles.size > 0) ) %]
274 <input type="hidden" name="op" value="export" />
275 <input type="hidden" name="record_type" value="conf" />
276 <fieldset class="action"><input type="submit" value="Download configuration" class="button" /></fieldset>
285 </div> <!-- /.col-sm-10.col-sm-push-2 -->
287 <div class="col-sm-2 col-sm-pull-10">
289 [% INCLUDE 'tools-menu.inc' %]
291 </div> <!-- .col-sm-2.col-sm-pull-10 -->
292 </div> <!-- /.row -->
294 [% MACRO jsinclude BLOCK %]
295 [% Asset.js("js/tools-menu.js") | $raw %]
296 [% INCLUDE 'calendar.inc' %]
298 $(document).ready(function() {
299 $('#exporttype').tabs();
301 $("li.csv_profiles").hide();
303 $("#bibs select[name='output_format']").on('change', function(){
304 var format = $(this).val();
305 if ( format == 'csv' ) {
306 $("#bibs li.csv_profiles").show();
308 $("#bibs li.csv_profiles").hide();
311 $("#checkall").on("click",function(e){
313 $(".branch_select").prop("checked",1);
315 $("#checknone").on("click",function(e){
317 $(".branch_select").prop("checked",0);
323 [% INCLUDE 'intranet-bottom.inc' %]