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