MT2116: Addons to the CSV export
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / csv-profiles.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo; Tools &rsaquo; CSV export profiles</title><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2 <script type="text/javascript">
3 //<![CDATA[
4 function reloadPage(p) {
5         var id = p.value;
6         if (id != 0) { document.location = "/cgi-bin/koha/tools/csv-profiles.pl?id=" + id; }
7 }
8      $(document).ready(function() {
9         $('#csvexporttabs > ul').tabs();
10      });
11 //]]>
12 </script>
13 </head>
14
15 <body>
16         <!-- TMPL_INCLUDE NAME="header.inc" -->
17         <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
18
19         <div id="breadcrumbs">
20                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21                 &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
22                 &rsaquo; CSV export profiles
23         </div>
24
25         <div id="doc3" class="yui-t2">
26                 <div id="bd">
27                         <div id="yui-main">
28                                 <div class="yui-b">
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 -->
34                                             <!-- TMPL_ELSE -->
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 -->
38                                             <!-- /TMPL_IF -->
39                                     <!-- /TMPL_IF -->
40 <div id="csvexporttabs" class="toptabs">
41 <ul>
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">
46         <!-- TMPL_ELSE -->
47         <li>
48          <!-- /TMPL_IF -->
49         <a href="csv-profiles.pl#csvedit">Edit profile</a></li> <!-- /TMPL_IF -->
50 </ul>
51         <div id="csvnew">
52                                         <h3>New CSV export profile</h3>
53
54                                              <form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post">
55                                                 <fieldset class="brief">
56                                                     <ol><li><label for="profile_name" class="required">Profile name :</label>
57                                                     <input type="text" id="profile_name" name="profile_name" /></li>
58
59                                                     <li><label for="profile_description">Profile description :</label>
60                                                     <textarea cols="50" rows="2" name="profile_description" id="profile_description"></textarea></li>
61
62                                                     <label for="csv">CSV separator :</label>
63                                                     <select name="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                                                     </select>
72                                                     <br /><br />
73
74                                                     <label for="field_separator">Field separator :</label>
75                                                     <select name="field_separator">
76                                                         <option value=";">Colon (:)</option>
77                                                         <option value=",">Comma (,)</option>
78                                                         <option value="|">Pipe (|)</option>
79                                                         <option value=";">Semi-colon (;)</option>
80                                                         <option value="#" selected="selected">Sharp (#)</option>
81                                                         <option value=" ">Space ( )</option>
82                                                         <option value="\t">Tabulation (\t)</option>
83                                                     </select>
84                                                     <br /><br />
85
86                                                     <label for="subfield_separator">Subfield separator :</label>
87                                                     <select name="subfield_separator">
88                                                         <option value=";">Colon (:)</option>
89                                                         <option value=",">Comma (,)</option>
90                                                         <option value="|" selected="selected">Pipe (|)</option>
91                                                         <option value=";">Semi-colon (;)</option>
92                                                         <option value="#">Sharp (#)</option>
93                                                         <option value=" ">Space ( )</option>
94                                                         <option value="\t">Tabulation (\t)</option>
95                                                     </select>
96                                                     <br /><br />
97
98                                                     <label for="profile_content">Profile marcfields :</label>
99                                                     <textarea cols="50" rows="2" name="profile_content" id="profile_content"></textarea>
100                                                     <p>You have to define which fields or subfields you want to export, separated by pipes.<br />
101                                                        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.<br /> 
102                                                        Example&nbsp;: Personal name=200|Entry element=210$a|300
103                                                     </p>
104                                                 </fieldset>
105                                                 <input type="hidden" name="action" value="create" />
106                                                 <input type="submit" value="Submit" />
107                                             </form>
108 </div>
109                                         <!-- TMPL_IF NAME="existing_profiles" -->
110 <div id="csvedit">
111                                         <h3>Modify or delete a CSV export profile</h3>
112                                                 
113                                             <form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post">
114                                                 <fieldset class="brief">
115                                                     <ol><li><label for="modify_profile_name">Profile name :</label>
116                                                     <select id="modify_profile_name" name="profile_name" onchange="javascript:reloadPage(this)">
117                                                         <option value="0">-- Choose One --</option>
118                                                         <!-- TMPL_LOOP NAME="existing_profiles" -->
119                                                         <option value="<!-- TMPL_VAR NAME="export_format_id" -->"<!-- TMPL_IF EXPR="export_format_id eq selected_profile_id" --> selected="selected"<!-- /TMPL_IF-->><!-- TMPL_VAR NAME="profile" --></option>
120                                                         <!-- /TMPL_LOOP -->
121                                                     </select></li>
122
123                                                     <li><label for="modify_profile_description">Profile description :</label>
124                                                     <textarea cols="50" rows="2" name="profile_description" id="modify_profile_description"><!-- TMPL_VAR NAME="selected_profile_description" --></textarea>
125
126                                                     <label for="csv">CSV separator :</label>
127                                                     <select name="csv_separator">
128                                                         <option value=";">Colon (:)</option>
129                                                         <option value=","<!-- TMPL_IF EXPR="selected_csv_separator eq ','" --> selected="selected"<!-- /TMPL_IF -->>Comma (,)</option>
130                                                         <option value="|"<!-- TMPL_IF EXPR="selected_csv_separator eq '|'" --> selected="selected"<!-- /TMPL_IF -->>Pipe (|)</option>
131                                                         <option value=";"<!-- TMPL_IF EXPR="selected_csv_separator eq ';'" --> selected="selected"<!-- /TMPL_IF -->>Semi-colon (;)</option>
132                                                         <option value="#"<!-- TMPL_IF EXPR="selected_csv_separator eq '#'" --> selected="selected"<!-- /TMPL_IF -->>Sharp (#)</option>
133                                                         <option value=" "<!-- TMPL_IF EXPR="selected_csv_separator eq ' '" --> selected="selected"<!-- /TMPL_IF -->>Space ( )</option>
134                                                         <option value="\t"<!-- TMPL_IF EXPR="selected_csv_separator eq '\t'" --> selected="selected"<!-- /TMPL_IF -->>Tabulation (\t)</option>
135                                                     </select>
136                                                     <br /><br />
137
138
139                                                     <label for="field_separator">Field separator :</label>
140                                                     <select name="field_separator">
141                                                         <option value=";">Colon (:)</option>
142                                                         <option value=","<!-- TMPL_IF EXPR="selected_field_separator eq ','" --> selected="selected"<!-- /TMPL_IF -->>Comma (,)</option>
143                                                         <option value="|"<!-- TMPL_IF EXPR="selected_field_separator eq '|'" --> selected="selected"<!-- /TMPL_IF -->>Pipe (|)</option>
144                                                         <option value=";"<!-- TMPL_IF EXPR="selected_field_separator eq ';'" --> selected="selected"<!-- /TMPL_IF -->>Semi-colon (;)</option>
145                                                         <option value="#"<!-- TMPL_IF EXPR="selected_field_separator eq '#'" --> selected="selected"<!-- /TMPL_IF -->>Sharp (#)</option>
146                                                         <option value=" "<!-- TMPL_IF EXPR="selected_field_separator eq ' '" --> selected="selected"<!-- /TMPL_IF -->>Space ( )</option>
147                                                         <option value="\t"<!-- TMPL_IF EXPR="selected_field_separator eq '\t'" --> selected="selected"<!-- /TMPL_IF -->>Tabulation (\t)</option>
148                                                     </select>
149                                                     <br /><br />
150
151                                                     <label for="subfield_separator">Subfield separator :</label>
152                                                     <select name="subfield_separator">
153                                                         <option value=";">Colon (:)</option>
154                                                         <option value=","<!-- TMPL_IF EXPR="selected_subfield_separator eq ','" --> selected="selected"<!-- /TMPL_IF -->>Comma (,)</option>
155                                                         <option value="|"<!-- TMPL_IF EXPR="selected_subfield_separator eq '|'" --> selected="selected"<!-- /TMPL_IF -->>Pipe (|)</option>
156                                                         <option value=";"<!-- TMPL_IF EXPR="selected_subfield_separator eq ';'" --> selected="selected"<!-- /TMPL_IF -->>Semi-colon (;)</option>
157                                                         <option value="#"<!-- TMPL_IF EXPR="selected_subfield_separator eq '#'" --> selected="selected"<!-- /TMPL_IF -->>Sharp (#)</option>
158                                                         <option value=" "<!-- TMPL_IF EXPR="selected_subfield_separator eq ' '" --> selected="selected"<!-- /TMPL_IF -->>Space ( )</option>
159                                                         <option value="\t"<!-- TMPL_IF EXPR="selected_subfield_separator eq '\t'" --> selected="selected"<!-- /TMPL_IF -->>Tabulation (\t)</option>
160                                                     </select>
161                                                     <br /><br />
162
163
164                                                     <label for="modify_profile_content">Profile marcfields :</label>
165                                                     <textarea cols="50" rows="2" name="profile_content" id="modify_profile_content"><!-- TMPL_VAR NAME="selected_profile_marcfields" --></textarea></li>
166                                                     
167                                                    <li class="radio"> <label for="delete">Delete selected profile ?</label>
168                                                     <input type="checkbox" name="delete" id="delete" /></li></ol>
169
170                                                 </fieldset>
171
172                                                 <input type="hidden" name="modify_profile_id" value="<!-- TMPL_VAR NAME="selected_profile_id" -->" />
173                                                 <input type="hidden" name="action" value="edit" />
174                                                 <input type="submit" value="Submit" /> <a href="/cgi-bin/koha/tools/csv-profiles.pl" class="cancel">Cancel</a>
175                                             </form>
176 </div>
177                                         <!-- /TMPL_IF -->
178
179                                 </div>
180                         </div>
181
182                     <div class="yui-b noprint">
183         <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
184     </div>
185         </div>
186         <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->