5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Tools › Export data</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <style type="text/css">
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 id="doc3" class="yui-t2">
27 [% FOR m IN messages %]
28 <div class="dialog [% m.type | html %]">
30 [% CASE 'invalid_mimetype' %]The file used does not have a valid format. Only csv and txt are allowed.
31 [% CASE %][% m.code | html %]
36 <div id="exporttype" class="toptabs">
38 <li><a href="#bibs">Export bibliographic records</a></li>
39 <li><a href="#auths">Export authority records</a></li>
40 [% IF ( allow_db_export ) %]
41 <li><a href="#db">Export database</a></li>
43 [% IF ( allow_conf_export ) %]
44 <li><a href="#conf">Export configuration</a></li>
49 <b>Note : The items are exported by this tool unless specified.</b>
52 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
53 <fieldset class="rows">
54 <legend> Select records to export </legend>
57 <label for="start">From biblionumber: </label>
58 <input id="start" type="text" name="StartingBiblionumber" size="5" />
61 <label for="end">To biblionumber: </label>
62 <input id="end" type="text" name="EndingBiblionumber" size="5" />
66 <label for="itemtype">Item type: </label>
67 <select name="itemtype" id="itemtype">
68 <option value="">-- All --</option>
69 [% FOREACH itemtype IN itemtypes %]
70 <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
76 <label>With items owned by the following libraries: </label>
77 [% INCLUDE 'branch-selector.inc' branches = libraries %]
81 <fieldset class="rows">
82 <legend>Call number range</legend>
85 <label for="startcn">From item call number: </label>
86 <input id="startcn" type="text" name="start_callnumber" size="15" />
89 <label for="endcn">To item call number: </label>
90 <input id="endcn" type="text" name="end_callnumber" size="15" />
95 <fieldset class="rows">
96 <legend>Accession date (inclusive)</legend>
99 <label for="from">Start date:</label>
100 <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="datepickerfrom" />
103 <label for="to">End date:</label>
104 <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="datepickerto" />
110 <fieldset class="rows">
115 <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>
116 <li><label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
119 <fieldset class="rows">
120 <legend> Options</legend>
122 <label for="dont_export_item">Don't export items:</label>
123 <input id="dont_export_item" type="checkbox" name="dont_export_item" />
126 <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label>
127 <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" />
130 <label for="export_remove_fields">Don't export fields:</label>
131 <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields | html %]" />
132 separate by a blank. (e.g., 100a 200 606)
135 <fieldset class="rows">
140 <label for="output_format">File format: </label>
141 <select id="output_format" name="output_format">
142 <option value="iso2709">MARC</option>
143 <option value="xml">XML</option>
144 [% IF csv_profiles %]
145 <option value="csv">CSV</option>
147 <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>
151 <li class="csv_profiles">
152 <label for="bibs_csv_profile">CSV profile: </label>
153 <select id="bibs_csv_profile" name="csv_profile_id">
154 [% FOR csv_profile IN csv_profiles %]
155 <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option>
160 <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
163 <input type="hidden" name="op" value="export" />
164 <input type="hidden" name="record_type" value="bibs" />
166 <fieldset class="action"><input type="submit" value="Export bibliographic records" class="button" /></fieldset>
171 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
172 <fieldset class="rows">
173 <legend> Select records to export </legend>
175 <label for="start">From authid: </label>
176 <input id="start" type="text" name="starting_authid" size="6" />
179 <label for="end">To authid: </label>
180 <input id="end" type="text" name="ending_authid" size="6" />
183 <label for="authtype">Authority type: </label>
184 <select name="authtype" id="authtype">
185 <option value="">-- All --</option>
186 [% FOREACH authority_type IN authority_types %]
187 <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
193 <fieldset class="rows">
198 <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>
199 <li><label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /></li>
202 <fieldset class="rows">
203 <legend>Options</legend>
206 <label for="export_remove_fields">Don't export fields:</label>
207 <input id="export_remove_fields" type="text" name="export_remove_fields" />
208 separate by a blank. (e.g., 100a 200 606)
211 <fieldset class="rows">
212 <legend>Output format</legend>
214 <label for="output_format">File format: </label>
215 <select id="output_format" name="output_format">
216 <option value="marc">marc</option>
217 <option value="xml">xml</option>
221 <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
224 <input type="hidden" name="op" value="export" />
225 <input type="hidden" name="record_type" value="auths" />
227 <fieldset class="action"><input type="submit" value="Export authority records" class="button" /></fieldset>
231 [% IF ( allow_db_export ) %]
233 <form method="post" action="/cgi-bin/koha/tools/export.pl">
234 <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
235 <fieldset class="rows">
236 <legend> Choose a file </legend>
237 [% IF ( dbfiles && (dbfiles.size > 0) ) %]
239 [% FOREACH dbfile IN dbfiles %]
240 <li><input type="radio" name="filename" value="[% dbfile | html %]">[% dbfile | html %]</input></li>
244 <p>Unfortunately, no backups are available.</p>
248 [% IF ( dbfiles && (dbfiles.size > 0) ) %]
249 <input type="hidden" name="op" value="export" />
250 <input type="hidden" name="record_type" value="db" />
251 <fieldset class="action"><input type="submit" value="Download database" class="button" /></fieldset>
257 [% IF ( allow_conf_export ) %]
259 <form method="post" action="/cgi-bin/koha/tools/export.pl">
260 <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
261 <fieldset class="rows">
262 <legend> Choose a file </legend>
263 [% IF ( conffiles && (conffiles.size > 0) ) %]
265 [% FOREACH conffile IN conffiles %]
266 <li><input type="radio" name="filename" value="[% conffile | html %]">[% conffile | html %]</input></li>
270 <p>Unfortunately, no backups are available.</p>
274 [% IF ( conffiles && (conffiles.size > 0) ) %]
275 <input type="hidden" name="op" value="export" />
276 <input type="hidden" name="record_type" value="conf" />
277 <fieldset class="action"><input type="submit" value="Download configuration" class="button" /></fieldset>
287 <div class="yui-b noprint">
288 [% INCLUDE 'tools-menu.inc' %]
292 [% MACRO jsinclude BLOCK %]
293 [% Asset.js("js/tools-menu.js") | $raw %]
294 [% INCLUDE 'calendar.inc' %]
295 <script type="text/javascript">
296 $(document).ready(function() {
297 $('#exporttype').tabs();
299 $("li.csv_profiles").hide();
301 $("#bibs select[name='output_format']").on('change', function(){
302 var format = $(this).val();
303 if ( format == 'csv' ) {
304 $("#bibs li.csv_profiles").show();
306 $("#bibs li.csv_profiles").hide();
309 $("#checkall").on("click",function(e){
311 $(".branch_select").prop("checked",1);
313 $("#checknone").on("click",function(e){
315 $(".branch_select").prop("checked",0);
321 [% INCLUDE 'intranet-bottom.inc' %]