1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha › Tools › CSV export profiles</title><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2 <script type="text/javascript">
4 function reloadPage(p) {
6 if (id != 0) { document.location = "/cgi-bin/koha/tools/csv-profiles.pl?id=" + id; }
8 $(document).ready(function() {
9 $('#csvexporttabs > ul').tabs();
16 <!-- TMPL_INCLUDE NAME="header.inc" -->
17 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
19 <div id="breadcrumbs">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
22 › CSV export profiles
25 <div id="doc3" class="yui-t2">
29 <!-- TMPL_IF EXPR="success || error" -->
30 <!-- TMPL_IF NAME="success" -->
31 <!-- TMPL_IF EXPR="action eq 'create'" --><p>The new CSV profile "<!-- TMPL_VAR NAME="profile_name" -->" has been successfully created.</p><!-- /TMPL_IF -->
32 <!-- TMPL_IF EXPR="action eq 'edit'" --><p>The CSV profile has been successfully modified.</p><!-- /TMPL_IF -->
33 <!-- TMPL_IF EXPR="action eq 'delete'" --><p>The CSV profile has been successfully deleted.</p><!-- /TMPL_IF -->
35 <!-- TMPL_IF EXPR="action eq 'create'" --><p class="error">The new CSV profile "<!-- TMPL_VAR NAME="profile_name" -->" has not been created.</p><!-- /TMPL_IF -->
36 <!-- TMPL_IF EXPR="action eq 'edit'" --><p class="error">The CSV profile has not been modified.</p><!-- /TMPL_IF -->
37 <!-- TMPL_IF EXPR="action eq 'delete'" --><p class="error">The CSV profile has not been deleted.</p><!-- /TMPL_IF -->
40 <div id="csvexporttabs" class="toptabs">
42 <li><a href="csv-profiles.pl#csvnew">New profile</a></li>
43 <!-- TMPL_IF NAME="existing_profiles" -->
44 <!-- TMPL_IF NAME="selected_profile_id" -->
45 <li class="ui-tabs-selected">
49 <a href="csv-profiles.pl#csvedit">Edit existing profile</a></li> <!-- /TMPL_IF -->
52 <h3>New CSV export profile</h3>
54 <form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post">
55 <fieldset class="rows">
56 <ol><li><label for="profile_name" class="required">Profile name: </label>
57 <input type="text" id="profile_name" name="profile_name" /></li>
59 <li><label for="profile_description">Profile description: </label>
60 <textarea cols="50" rows="2" name="profile_description" id="profile_description"></textarea></li>
62 <li><label for="new_csv_separator">CSV separator: </label>
63 <select name="csv_separator" id="new_csv_separator">
64 <option value=":">Colon (:)</option>
65 <option value="," selected="selected">Comma (,)</option>
66 <option value="|">Pipe (|)</option>
67 <option value=";">Semi-colon (;)</option>
68 <option value="#">Sharp (#)</option>
69 <option value=" ">Space ( )</option>
70 <option value="\t">Tabulation (\t)</option>
71 <option value="\n">New line (\n)</option>
75 <li><label for="new_field_separator">Field separator: </label>
76 <select name="field_separator" id="new_field_separator">
77 <option value=":">Colon (:)</option>
78 <option value=",">Comma (,)</option>
79 <option value="|">Pipe (|)</option>
80 <option value=";">Semi-colon (;)</option>
81 <option value="#" selected="selected">Sharp (#)</option>
82 <option value=" ">Space ( )</option>
83 <option value="\t">Tabulation (\t)</option>
84 <option value="\n">New line (\n)</option>
88 <li><label for="new_subfield_separator">Subfield separator: </label>
89 <select name="subfield_separator" id="new_subfield_separator">
90 <option value=":">Colon (:)</option>
91 <option value=",">Comma (,)</option>
92 <option value="|" selected="selected">Pipe (|)</option>
93 <option value=";">Semi-colon (;)</option>
94 <option value="#">Sharp (#)</option>
95 <option value=" ">Space ( )</option>
96 <option value="\t">Tabulation (\t)</option>
97 <option value="\n">New line (\n)</option>
101 <li><label for="new_encoding">Encoding: </label>
102 <select name="encoding" id="new_encoding">
103 <!-- TMPL_LOOP NAME="encodings" -->
104 <option<!-- TMPL_IF EXPR="encoding eq 'utf8'" --> selected="selected" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="encoding" --></option>
109 <li><label for="new_profile_content">Profile marcfields: </label>
110 <textarea cols="50" rows="2" name="profile_content" id="new_profile_content"></textarea>
111 <p>You have to define which fields or subfields you want to export, separated by pipes.</p>
112 <p>You can also use your own headers (instead of the ones from koha) by prefixing the field number with an header, followed by the equal sign.</p>
113 <p>Example: Personal name=200|Entry element=210$a|300|009</p>
117 <fieldset class="action"><input type="hidden" name="action" value="create" />
118 <input type="submit" value="Submit" /></fieldset>
120 <br style="clear:both;" />
122 <!-- TMPL_IF NAME="existing_profiles" -->
124 <h3>Modify or delete a CSV export profile</h3>
126 <form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post">
127 <fieldset class="rows">
128 <ol><li><label for="modify_profile_name">Profile name: </label>
129 <select id="modify_profile_name" name="profile_name" onchange="javascript:reloadPage(this)">
130 <option value="0">-- Choose One --</option>
131 <!-- TMPL_LOOP NAME="existing_profiles" -->
132 <!-- TMPL_IF EXPR="export_format_id eq selected_profile_id" -->
133 <option value="<!-- TMPL_VAR NAME="export_format_id" -->" selected="selected"><!-- TMPL_VAR NAME="profile" --></option>
135 <option value="<!-- TMPL_VAR NAME="export_format_id" -->"><!-- TMPL_VAR NAME="profile" --></option>
140 <li><label for="modify_profile_description">Profile description: </label>
141 <textarea cols="50" rows="2" name="profile_description" id="modify_profile_description"><!-- TMPL_VAR NAME="selected_profile_description" --></textarea></li>
143 <li><label for="csv_separator">CSV separator: </label>
144 <select name="csv_separator" id="csv_separator">
145 <option value=":">Colon (:)</option>
146 <!-- TMPL_IF EXPR="selected_csv_separator eq ','" -->
147 <option value="," selected="selected">Comma (,)</option>
149 <option value=",">Comma (,)</option>
151 <!-- TMPL_IF EXPR="selected_csv_separator eq '|'" -->
152 <option value="|" selected="selected">Pipe (|)</option>
154 <option value="|">Pipe (|)</option>
156 <!-- TMPL_IF EXPR="selected_csv_separator eq ';'" -->
157 <option value=";" selected="selected">Semi-colon (;)</option>
159 <option value=";">Semi-colon (;)</option>
161 <!-- TMPL_IF EXPR="selected_csv_separator eq '#'" -->
162 <option value="#" selected="selected">Sharp (#)</option>
164 <option value="#">Sharp (#)</option>
166 <!-- TMPL_IF EXPR="selected_csv_separator eq ' '" -->
167 <option value=" " selected="selected">Space ( )</option>
169 <option value=" ">Space ( )</option>
171 <!-- TMPL_IF EXPR="selected_csv_separator eq '\t'" -->
172 <option value="\t" selected="selected">Tabulation (\t)</option>
174 <option value="\t">Tabulation (\t)</option>
176 <!-- TMPL_IF EXPR="selected_csv_separator eq '\n'" -->
177 <option value="\n" selected="selected">New line (\n)</option>
179 <option value="\n">New line (\n)</option>
183 <li><label for="field_separator">Field separator: </label>
184 <select name="field_separator" id="field_separator">
185 <option value=":">Colon (:)</option>
187 <!-- TMPL_IF EXPR="selected_field_separator eq ','" -->
188 <option value="," selected="selected">Comma (,)</option>
190 <option value=",">Comma (,)</option>
193 <!-- TMPL_IF EXPR="selected_field_separator eq '|'" -->
194 <option value="|" selected="selected">Pipe (|)</option>
196 <option value="|">Pipe (|)</option>
199 <!-- TMPL_IF EXPR="selected_field_separator eq ';'" -->
200 <option value=";" selected="selected">Semi-colon (;)</option>
202 <option value=";">Semi-colon (;)</option>
205 <!-- TMPL_IF EXPR="selected_field_separator eq '#'" -->
206 <option value="#" selected="selected">Sharp (#)</option>
208 <option value="#">Sharp (#)</option>
211 <!-- TMPL_IF EXPR="selected_field_separator eq ' '" -->
212 <option value=" " selected="selected">Space ( )</option>
214 <option value=" ">Space ( )</option>
217 <!-- TMPL_IF EXPR="selected_field_separator eq '\t'" -->
218 <option value="\t" selected="selected">Tabulation (\t)</option>
220 <option value="\t">Tabulation (\t)</option>
222 <!-- TMPL_IF EXPR="selected_field_separator eq '\n'" -->
223 <option value="\n" selected="selected">New line (\n)</option>
225 <option value="\n">New line (\n)</option>
230 <li><label for="subfield_separator">Subfield separator: </label>
231 <select name="subfield_separator" id="subfield_separator">
232 <option value=":">Colon (:)</option>
235 <!-- TMPL_IF EXPR="selected_subfield_separator eq ','" -->
236 <option value="," selected="selected">Comma (,)</option>
238 <option value=",">Comma (,)</option>
241 <!-- TMPL_IF EXPR="selected_subfield_separator eq '|'" -->
242 <option value="|" selected="selected">Pipe (|)</option>
244 <option value="|">Pipe (|)</option>
247 <!-- TMPL_IF EXPR="selected_subfield_separator eq ';'" -->
248 <option value=";" selected="selected">Semi-colon (;)</option>
250 <option value=";">Semi-colon (;)</option>
253 <!-- TMPL_IF EXPR="selected_subfield_separator eq '#'" -->
254 <option value="#" selected="selected">Sharp (#)</option>
256 <option value="#">Sharp (#)</option>
259 <!-- TMPL_IF EXPR="selected_subfield_separator eq ' '" -->
260 <option value=" " selected="selected">Space ( )</option>
262 <option value=" ">Space ( )</option>
265 <!-- TMPL_IF EXPR="selected_subfield_separator eq '\t'" -->
266 <option value="\t" selected="selected">Tabulation (\t)</option>
268 <option value="\t">Tabulation (\t)</option>
270 <!-- TMPL_IF EXPR="selected_subfield_separator eq '\n'" -->
271 <option value="\n" selected="selected">New line (\n)</option>
273 <option value="\n">New line (\n)</option>
278 <li><label for="encoding">Encoding: </label>
279 <select name="encoding" id="encoding">
280 <!-- TMPL_LOOP NAME="encodings" -->
281 <!-- TMPL_IF EXPR="selected_encoding eq encoding" -->
282 <option selected="selected"><!-- TMPL_VAR NAME="encoding" --></option>
284 <option><!-- TMPL_VAR NAME="encoding" --></option>
289 <li><label for="modify_profile_content">Profile marcfields: </label>
290 <textarea cols="50" rows="2" name="profile_content" id="modify_profile_content"><!-- TMPL_VAR NAME="selected_profile_marcfields" --></textarea></li>
292 <li class="radio"> <label for="delete">Delete selected profile ?</label>
293 <input type="checkbox" name="delete" id="delete" /></li>
298 <fieldset class="action"><input type="hidden" name="modify_profile_id" value="<!-- TMPL_VAR NAME="selected_profile_id" -->" />
299 <input type="hidden" name="action" value="edit" />
300 <input type="submit" value="Submit" /> <a href="/cgi-bin/koha/tools/csv-profiles.pl" class="cancel">Cancel</a></fieldset>
308 <div class="yui-b noprint">
309 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
312 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->