Bug 18201: Export data -Fix "Remove non-local items" option and add "Removes non...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / export.tt
blob90f8a4dfb967c6d31bfe6d587a0479f7f26d3e92
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();
11     $("li.csv_profiles").hide();
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' %]
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>
44 <div id="doc3" class="yui-t2">
45    
46    <div id="bd">
47         <div id="yui-main">
48         <div class="yui-b">
50 [% FOR m IN messages %]
51     <div class="dialog [% m.type %]">
52         [% SWITCH m.code %]
53         [% CASE 'invalid_mimetype' %]The file used does not have a valid format. Only csv and txt are allowed.
54         [% CASE %][% m.code %]
55         [% END %]
56     </div>
57 [% END %]
59 <div id="exporttype" class="toptabs">
60 <ul>
61 <li><a href="#bibs">Export bibliographic records</a></li>
62 <li><a href="#auths">Export authority records</a></li>
63 [% IF ( allow_db_export ) %]
64 <li><a href="#db">Export database</a></li>
65 [% END %]
66 [% IF ( allow_conf_export ) %]
67 <li><a href="#conf">Export configuration</a></li>
68 [% END %]
69 </ul>
70 <div id="bibs">
71 <p>
72     <b>Note : The items are exported by this tool unless specified.</b>
73 </p>
75 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
76     <fieldset class="rows">
77     <legend> Select records to export </legend>
78         <ol>
79         <li>
80             <label for="start">From biblio number: </label>
81             <input id="start" type="text" name="StartingBiblionumber" size="5" />
82         </li>
83         <li>
84             <label for="end">To biblio number: </label>
85             <input id="end" type="text" name="EndingBiblionumber" size="5" />
86         </li>
87         
88         <li>
89             <label for="itemtype">Item type: </label>
90             <select name="itemtype" id="itemtype">
91                 <option value="">-- All --</option>
92                 [% FOREACH itemtype IN itemtypes %]
93                     <option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
94                 [% END %]
95             </select>
96         </li>
97         
98         <li>
99             <label>With items owned by the following libraries: </label>
100             [% INCLUDE 'branch-selector.inc' branches = libraries %]
101         </li>
102     </ol>
104     <fieldset class="rows">
105         <legend>Call number range</legend>
106         <ol>
107             <li>
108                 <label for="startcn">From item call number: </label>
109                 <input id="startcn" type="text" name="start_callnumber" size="15" />
110             </li>
111             <li>
112                 <label for="endcn">To item call number: </label>
113                 <input id="endcn" type="text" name="end_callnumber" size="15" />
114             </li>
115         </ol>
116     </fieldset>
118     <fieldset class="rows">
119         <legend>Accession date (inclusive)</legend>
120         <ol>
121             <li>
122                     <label for="from">Start date:</label>
123                     <input type="text" size="10" id="from" name="start_accession" value="[% from %]" class="datepickerfrom" />
124             </li>
125             <li>
126                 <label for="to">End date:</label>
127                 <input size="10" id="to" name="end_accession" value="[% end_accession %]" type="text" class="datepickerto" />
128             </li>
129         </ol>
130     </fieldset>
132     </fieldset>
133     <fieldset class="rows">
134     <legend>
135         Use a file
136     </legend>
137         <ol>
138         <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. (File types accepted: .csv and .txt)</li>
139         <li><label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
140         </ol>
141     </fieldset>
142     <fieldset class="rows">
143     <legend> Options</legend>
144 <ol>        <li>
145         <label for="dont_export_item">Don't export items:</label>
146         <input id="dont_export_item" type="checkbox" name="dont_export_item" />
147         </li>
148         <li>
149         <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label>
150         <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" />
151         </li>
152         <li>
153         <label for="export_remove_fields">Don't export fields:</label>
154         <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields %]" />
155         separate by a blank. (e.g., 100a 200 606)
156         </li></ol>
157     </fieldset>
158     <fieldset class="rows">
159     <legend>
160         Output format
161     </legend>
162         <ol><li>
163             <label for="output_format">File format: </label>
164             <select id="output_format" name="output_format">
165                 <option value="iso2709">marc</option>
166                 <option value="xml">xml</option>
167                 [% IF csv_profiles %]
168                     <option value="csv">csv</option>
169                 [% ELSE %]
170                     <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>
171                 [% END %]
172             </select>
173         </li>
174         <li class="csv_profiles">
175             <label for="bibs_csv_profile">CSV profile: </label>
176             <select id="bibs_csv_profile" name="csv_profile_id">
177                 [% FOR csv_profile IN csv_profiles %]
178                     <option value="[% csv_profile.export_format_id %]">[% csv_profile.profile %]</option>
179                 [% END %]
180             </select>
181         </li>
182         <li>
183         <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
184         </li></ol>
185     </fieldset>
186     <input type="hidden" name="op" value="export" />
187     <input type="hidden" name="record_type" value="bibs" />
189     <fieldset class="action"><input type="submit" value="Export bibliographic records" class="button" /></fieldset>
190 </form>
191 </div>
193 <div id="auths">
194 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
195     <fieldset class="rows">
196     <legend> Select records to export </legend>
197         <ol><li>
198             <label for="start">From authid: </label>
199             <input id="start" type="text" name="starting_authid" size="6" />
200         </li>
201         <li>
202             <label for="end">To authid: </label>
203             <input id="end" type="text" name="ending_authid" size="6" />
204         </li>
205         <li>
206             <label for="authtype">Authority type: </label>
207             <select name="authtype" id="authtype">
208                 <option value="">-- All --</option>
209                 [% FOREACH authority_type IN authority_types %]
210                     <option value="[% authority_type.authtypecode %]">[% authority_type.authtypetext %]</option>
211                 [% END %]
212             </select>
213         </li>
214         </ol>
215     </fieldset>
216     <fieldset class="rows">
217     <legend>
218         Use a file
219     </legend>
220         <ol>
221         <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>
222         <li><label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /></li>
223         </ol>
224     </fieldset>
225     <fieldset class="rows">
226     <legend>Options</legend>
227         <ol>
228         <li>
229             <label for="export_remove_fields">Don't export fields:</label>
230             <input id="export_remove_fields" type="text" name="export_remove_fields" />
231             separate by a blank. (e.g., 100a 200 606)
232         </li></ol>
233     </fieldset>
234     <fieldset class="rows">
235     <legend>Output format</legend>
236         <ol><li>
237             <label for="output_format">File format: </label>
238             <select id="output_format" name="output_format">
239                 <option value="marc">marc</option>
240                 <option value="xml">xml</option>
241             </select>
242         </li>
243         <li>
244         <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
245         </li></ol>
246     </fieldset>
247     <input type="hidden" name="op" value="export" />
248     <input type="hidden" name="record_type" value="auths" />
250     <fieldset class="action"><input type="submit" value="Export authority records" class="button" /></fieldset>
251 </form>
252 </div>
254 [% IF ( allow_db_export ) %]
255 <div id="db">
256 <form method="post" action="/cgi-bin/koha/tools/export.pl">
257     <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
258     <fieldset class="rows">
259     <legend> Choose a file </legend>
260     [% IF ( dbfiles && (dbfiles.size > 0) ) %]
261         <ul>
262         [% FOREACH dbfile IN dbfiles %]
263             <li><input type="radio" name="filename" value="[% dbfile %]">[% dbfile %]</input></li>
264         [% END %]
265         </ul>
266     [% ELSE %]
267         <p>Unfortunately, no backups are available.</p>
268     [% END %]
269     </fieldset>
271     [% IF ( dbfiles && (dbfiles.size > 0) ) %]
272         <input type="hidden" name="op" value="export" />
273         <input type="hidden" name="record_type" value="db" />
274         <fieldset class="action"><input type="submit" value="Download database" class="button" /></fieldset>
275     [% END %]
276 </form>
277 </div>
278 [% END %]
280 [% IF ( allow_conf_export ) %]
281 <div id="conf">
282 <form method="post" action="/cgi-bin/koha/tools/export.pl">
283     <p><b>Note : This export file will be very large, and is generated nightly.</b></p>
284     <fieldset class="rows">
285     <legend> Choose a file </legend>
286     [% IF ( conffiles && (conffiles.size > 0) ) %]
287         <ul>
288         [% FOREACH conffile IN conffiles %]
289             <li><input type="radio" name="filename" value="[% conffile %]">[% conffile %]</input></li>
290         [% END %]
291         </ul>
292     [% ELSE %]
293         <p>Unfortunately, no backups are available.</p>
294     [% END %]
295     </fieldset>
297     [% IF ( conffiles && (conffiles.size > 0) ) %]
298         <input type="hidden" name="op" value="export" />
299         <input type="hidden" name="record_type" value="conf" />
300         <fieldset class="action"><input type="submit" value="Download configuration" class="button" /></fieldset>
301     [% END %]
302 </form>
303 </div>
304 [% END %]
306 </div>
308 </div>
309 </div>
310 <div class="yui-b noprint">
311 [% INCLUDE 'tools-menu.inc' %]
312 </div>
313 </div>
314 [% INCLUDE 'intranet-bottom.inc' %]