5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Export data › Tools › Koha</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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
28 <a href="#" aria-current="page">
35 <div class="main container-fluid">
37 <div class="col-sm-10 col-sm-push-2">
42 [% FOR m IN messages %]
43 <div class="dialog [% m.type | html %]">
45 [% CASE 'invalid_mimetype' %]<span>The file used does not have a valid format. Only csv and txt are allowed.</span>
46 [% CASE %][% m.code | html %]
51 <div id="exporttype" class="toptabs">
52 <ul class="nav nav-tabs" role="tablist">
53 <li role="presentation" class="active">
54 <a href="#bibs" aria-controls="bibs" role="tab" data-toggle="tab">Export bibliographic records</a>
56 <li role="presentation">
57 <a href="#auths" aria-controls="auths" role="tab" data-toggle="tab">Export authority records</a>
59 [% IF ( allow_db_export ) %]
60 <li role="presentation">
61 <a href="#db" aria-controls="db" role="tab" data-toggle="tab">Export database</a>
64 [% IF ( allow_conf_export ) %]
65 <li role="presentation">
66 <a href="#conf" aria-controls="conf" role="tab" data-toggle="tab">Export configuration</a>
70 <div class="tab-content">
71 <div id="bibs" role="tabpanel" class="tab-pane active">
73 <strong>Note : The items are exported by this tool unless specified.</strong>
76 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
77 <fieldset class="rows">
78 <legend> Select records to export </legend>
81 <label for="start">From biblionumber: </label>
82 <input id="start" type="text" name="StartingBiblionumber" size="5" />
85 <label for="end">To biblionumber: </label>
86 <input id="end" type="text" name="EndingBiblionumber" size="5" />
90 <label for="itemtype">Item type: </label>
91 <select name="itemtype" id="itemtype">
92 <option value="">-- All --</option>
93 [% FOREACH itemtype IN itemtypes %]
94 <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
100 <label>With items owned by the following libraries: </label>
101 [% INCLUDE 'branch-selector.inc' branches = libraries %]
105 <fieldset class="rows">
106 <legend>Call number range</legend>
109 <label for="startcn">From item call number: </label>
110 <input id="startcn" type="text" name="start_callnumber" size="15" />
113 <label for="endcn">To item call number: </label>
114 <input id="endcn" type="text" name="end_callnumber" size="15" />
119 <fieldset class="rows">
120 <legend>Accession date (inclusive)</legend>
123 <label for="from">Start date:</label>
124 <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="flatpickr" data-date_to="to" />
127 <label for="to">End date:</label>
128 <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="flatpickr" />
134 <fieldset class="rows">
139 <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>
140 <li><label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
143 <fieldset class="rows">
144 <legend> Options</legend>
146 <label for="dont_export_item">Don't export items:</label>
147 <input id="dont_export_item" type="checkbox" name="dont_export_item" />
150 <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label>
151 <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" />
154 <label for="export_remove_fields">Don't export fields:</label>
155 <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields | html %]" />
156 separate by a blank. (e.g., 100a 200 606)
159 <fieldset class="rows">
164 <label for="output_format">File format: </label>
165 <select id="output_format" name="output_format">
166 <option value="iso2709">MARC</option>
167 <option value="xml">XML</option>
168 [% IF csv_profiles %]
169 <option value="csv">CSV</option>
171 <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>
175 <li class="csv_profiles">
176 <label for="bibs_csv_profile">CSV profile: </label>
177 <select id="bibs_csv_profile" name="csv_profile_id">
178 [% FOR csv_profile IN csv_profiles %]
179 <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option>
184 <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
187 <input type="hidden" name="op" value="export" />
188 <input type="hidden" name="record_type" value="bibs" />
190 <fieldset class="action"><input type="submit" value="Export bibliographic records" class="button" /></fieldset>
194 <div id="auths" role="tabpanel" class="tab-pane">
195 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
196 <fieldset class="rows">
197 <legend> Select records to export </legend>
199 <label for="start">From authid: </label>
200 <input id="start" type="text" name="starting_authid" size="6" />
203 <label for="end">To authid: </label>
204 <input id="end" type="text" name="ending_authid" size="6" />
207 <label for="authtype">Authority type: </label>
208 <select name="authtype" id="authtype">
209 <option value="">-- All --</option>
210 [% FOREACH authority_type IN authority_types %]
211 <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
217 <fieldset class="rows">
222 <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>
223 <li><label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /></li>
226 <fieldset class="rows">
227 <legend>Options</legend>
230 <label for="export_remove_fields">Don't export fields:</label>
231 <input id="export_remove_fields" type="text" name="export_remove_fields" />
232 separate by a blank. (e.g., 100a 200 606)
235 <fieldset class="rows">
236 <legend>Output format</legend>
238 <label for="output_format">File format: </label>
239 <select id="output_format_auth" name="output_format">
240 <option value="marc">MARC</option>
241 <option value="xml">XML</option>
245 <label for="filename_auth">File name:</label><input id="filename_auth" type="text" name="filename_auth" value="koha.mrc" />
248 <input type="hidden" name="op" value="export" />
249 <input type="hidden" name="record_type" value="auths" />
251 <fieldset class="action"><input type="submit" value="Export authority records" class="button" /></fieldset>
255 [% IF ( allow_db_export ) %]
256 <div id="db" role="tabpanel" class="tab-pane">
257 <form method="post" action="/cgi-bin/koha/tools/export.pl">
258 <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p>
259 <fieldset class="rows">
260 <legend> Choose a file </legend>
261 [% IF ( dbfiles && (dbfiles.size > 0) ) %]
263 [% FOREACH dbfile IN dbfiles %]
264 <li><input type="radio" name="filename" value="[% dbfile | html %]">[% dbfile | html %]</input></li>
268 <p>Unfortunately, no backups are available.</p>
272 [% IF ( dbfiles && (dbfiles.size > 0) ) %]
273 <input type="hidden" name="op" value="export" />
274 <input type="hidden" name="record_type" value="db" />
275 <fieldset class="action"><input type="submit" value="Download database" class="button" /></fieldset>
281 [% IF ( allow_conf_export ) %]
282 <div id="conf" role="tabpanel" class="tab-pane">
283 <form method="post" action="/cgi-bin/koha/tools/export.pl">
284 <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p>
285 <fieldset class="rows">
286 <legend> Choose a file </legend>
287 [% IF ( conffiles && (conffiles.size > 0) ) %]
289 [% FOREACH conffile IN conffiles %]
290 <li><input type="radio" name="filename" value="[% conffile | html %]">[% conffile | html %]</input></li>
294 <p>Unfortunately, no backups are available.</p>
298 [% IF ( conffiles && (conffiles.size > 0) ) %]
299 <input type="hidden" name="op" value="export" />
300 <input type="hidden" name="record_type" value="conf" />
301 <fieldset class="action"><input type="submit" value="Download configuration" class="button" /></fieldset>
306 </div> <!-- /.tab-content -->
310 </div> <!-- /.col-sm-10.col-sm-push-2 -->
312 <div class="col-sm-2 col-sm-pull-10">
314 [% INCLUDE 'tools-menu.inc' %]
316 </div> <!-- .col-sm-2.col-sm-pull-10 -->
317 </div> <!-- /.row -->
319 [% MACRO jsinclude BLOCK %]
320 [% Asset.js("js/tools-menu.js") | $raw %]
321 [% INCLUDE 'calendar.inc' %]
323 $(document).ready(function() {
325 $("li.csv_profiles").hide();
327 $("#bibs select[name='output_format']").on('change', function(){
328 var format = $(this).val();
329 if ( format == 'csv' ) {
330 $("#bibs li.csv_profiles").show();
332 $("#bibs li.csv_profiles").hide();
335 $("#checkall").on("click",function(e){
337 $(".branch_select").prop("checked",1);
339 $("#checknone").on("click",function(e){
341 $(".branch_select").prop("checked",0);
344 $('#output_format').change(function(){
345 var filename = $('#filename').val();
346 var file_name = filename.split(".");
347 var extension = $(this).val();
348 if (extension == "iso2709") {
351 $('#filename').val(file_name[0] + "." + extension);
353 $('#output_format_auth').change(function(){
354 var filename_auth = $('#filename_auth').val();
355 var file_name_auth = filename_auth.split(".");
356 var extension = $(this).val();
357 if (extension == "marc") {
360 $('#filename_auth').val(file_name_auth[0] + "." + extension);
366 [% INCLUDE 'intranet-bottom.inc' %]