bug 2265: fix problem when cloning MARC field
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-edit-layout.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo; Tools &rsaquo; Labels</title>
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <script>
4 function jscss(action,o,c1,c2)
5 {
6  // from:  http://onlinetools.org/articles/unobtrusivejavascript/cssjsseparation.html
7   switch (action){
8     case 'swap':
9       o.className=!jscss('check',o,c1)?o.className.replace(c2,c1): o.className.replace(c1,c2);
10     break;
11     case 'add':
12       if(!jscss('check',o,c1)){o.className+=o.className?' '+c1:c1;}
13     break;
14     case 'remove':
15       var rep=o.className.match(' '+c1)?' '+c1:c1;
16       o.className=o.className.replace(rep,'');
17     break;
18     case 'check':
19       return new RegExp('\\b'+c1+'\\b').test(o.className)
20     break;
21   }
22 }
23 function chooselayoutspec(rb) {
24         stringspec=document.getElementById("formatstring");
25         if(rb.value == 'layout_string') {
26                 stringspec.disabled=0;
27                 jscss('remove',document.getElementById('layout_string'),'disabled','');
28                 jscss('add',document.getElementById('layout_tx'),'disabled','');
29         } else {
30                 stringspec.disabled=1;
31                 jscss('remove',document.getElementById('layout_tx'),'disabled','');
32                 jscss('add',document.getElementById('layout_string'),'disabled','');
33         }
34 }
35 </script>
36 </head>
37 <body>
38 <!-- TMPL_INCLUDE NAME="header.inc" -->
39 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
40
41 <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; <a href="/cgi-bin/koha/labels/label-home.pl">Labels</a> &rsaquo; <!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Label Layout</div>
42
43 <div id="doc3" class="yui-t2">
44    
45    <div id="bd">
46         <div id="yui-main">
47         <div class="yui-b">
48         <!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
49 <form name="input" action="/cgi-bin/koha/labels/label-manager.pl" method="get">
50 <fieldset class="rows">
51 <legend><!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Label Layout</legend>
52 <ol>
53 <li><label for="layoutname">Layout Name</label>
54 <input type="text" name="layoutname" id="layoutname" size="20" value="<!-- TMPL_VAR NAME="layoutname" -->" /></li>
55
56 <li><label for="barcodetype">Choose Barcode Type (encoding)</label>
57 <select name="barcodetype" id="barcodetype">
58     <!-- TMPL_LOOP NAME="barcode_types" -->
59         <!-- TMPL_IF NAME="active" -->
60         <option value="<!-- TMPL_VAR NAME="code" -->" selected="selected"><!-- TMPL_VAR NAME="desc" --></option>
61         <!-- TMPL_ELSE -->
62         <option value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="desc" --></option>
63         <!-- /TMPL_IF -->
64     <!-- /TMPL_LOOP -->
65 </select></li>
66
67
68 <li><label for="printingtype">Choose Layout Type</label>
69 <select name="printingtype" id="printingtype">
70     <!-- TMPL_LOOP NAME="printingtypes" -->
71 <!-- TMPL_IF NAME="active" -->
72         <option value="<!-- TMPL_VAR NAME="code" -->" selected="selected"><!-- TMPL_VAR NAME="desc" --></option>
73         <!-- TMPL_ELSE -->
74         <option value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="desc" --></option>
75 <!-- /TMPL_IF -->
76     <!-- /TMPL_LOOP -->
77 </select></li>
78
79
80 <li> 
81 <fieldset class="rows">
82 <legend>
83 Bibliographic Data to Print
84 </legend>
85 <input type="radio" name="layoutchoice" value="layout_tx" <!-- TMPL_UNLESS NAME="layout_string" -->checked="checked"<!-- /TMPL_UNLESS --> onclick="chooselayoutspec(this);" >Choose Order Of Text Fields to Print</input>
86 <fieldset id="layout_tx"  <!-- TMPL_IF NAME="layout_string" -->class="disabled"<!-- /TMPL_IF -->>
87 <table summary="fields to print">
88 <tr>
89         <td>
90  <select name="tx_title" id="tx_title">
91             <!-- TMPL_LOOP Name="tx_title" -->
92                         <!-- TMPL_IF Name="selected" -->
93                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
94                     <!-- TMPL_VAR Name="num" -->
95                 </option>
96                         <!-- TMPL_ELSE -->
97                 <option value="<!-- TMPL_VAR Name="num" -->">
98                     <!-- TMPL_VAR Name="num" -->
99                 </option>
100                 <!-- /TMPL_IF -->
101             <!-- /TMPL_LOOP -->
102             </select>
103         <label for="tx_title">Title</label>
104         </td>
105             <td>
106         <select name="tx_subtitle" id="tx_subtitle">
107                  <!-- TMPL_LOOP Name="tx_subtitle" -->
108          <!-- TMPL_IF Name="selected" -->
109                                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
110                     <!-- TMPL_VAR Name="num" -->
111                 </option>
112                         <!-- TMPL_ELSE -->      
113                 <option value="<!-- TMPL_VAR Name="num" -->">
114                     <!-- TMPL_VAR Name="num" -->
115                 </option>
116                         <!-- /TMPL_IF -->       
117             <!-- /TMPL_LOOP -->
118       </select>
119         <label for="tx_subtitle">Subtitle</label>
120         </td> 
121
122         <td>
123         <select name="tx_author" id="tx_author">
124              <!-- TMPL_LOOP Name="tx_author" -->
125                 <!-- TMPL_IF Name="selected" -->         
126                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
127                     <!-- TMPL_VAR Name="num" -->
128                 </option>
129                 <!-- TMPL_ELSE -->              
130                 <option value="<!-- TMPL_VAR Name="num" -->">
131                     <!-- TMPL_VAR Name="num" -->
132                 </option>
133                 <!-- /TMPL_IF -->               
134             <!-- /TMPL_LOOP -->
135             </select>
136        <label for="tx_author">Author</label>
137         </td>
138 </tr> 
139  <tr>
140         <td>
141         <select name="tx_isbn" id="tx_isbn">
142               <!-- TMPL_LOOP Name="tx_isbn" -->
143                 <!-- TMPL_IF Name="selected" -->          
144                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
145                     <!-- TMPL_VAR Name="num" -->
146                 </option>
147                 <!-- TMPL_ELSE -->              
148                 <option value="<!-- TMPL_VAR Name="num" -->">
149                     <!-- TMPL_VAR Name="num" -->
150                 </option>
151                 <!-- /TMPL_IF -->               
152             <!-- /TMPL_LOOP -->
153             </select>
154       <label for="tx_isbn">ISBN</label>
155         </td>
156
157         <td>
158         <select name="tx_issn" id="tx_issn">
159                <!-- TMPL_LOOP Name="tx_issn" -->
160                 <!-- TMPL_IF Name="selected" -->           
161                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
162                     <!-- TMPL_VAR Name="num" -->
163                 </option>
164                 <!-- TMPL_ELSE -->              
165                 <option value="<!-- TMPL_VAR Name="num" -->">
166                     <!-- TMPL_VAR Name="num" -->
167                 </option>
168                 <!-- /TMPL_IF -->               
169             <!-- /TMPL_LOOP -->
170             </select>
171      <label for="tx_issn">ISSN</label>
172          </td>
173         <td>
174         <select name="tx_itemtype" id="tx_itemtype">
175                  <!-- TMPL_LOOP Name="tx_itemtype" -->
176                 <!-- TMPL_IF Name="selected" -->                 
177                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
178                     <!-- TMPL_VAR Name="num" -->
179                 </option>
180                         <!-- TMPL_ELSE -->      
181                 <option value="<!-- TMPL_VAR Name="num" -->">
182                     <!-- TMPL_VAR Name="num" -->
183                 </option>
184                 <!-- /TMPL_IF -->               
185             <!-- /TMPL_LOOP -->
186             </select>
187    <label for="tx_itemtype">Itemtype</label>
188         </td>
189   </tr>
190 <tr>
191         <td>
192         <select name="tx_barcode">
193                  <!-- TMPL_LOOP Name="tx_barcode" -->
194                 <!-- TMPL_IF Name="selected" -->                 
195                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
196                     <!-- TMPL_VAR Name="num" -->
197                 </option>
198                         <!-- TMPL_ELSE -->       
199                 <option value="<!-- TMPL_VAR Name="num" -->">
200                     <!-- TMPL_VAR Name="num" -->
201                 </option>
202                         <!-- /TMPL_IF -->       
203             <!-- /TMPL_LOOP -->
204       </select>
205         <label for="tx_barcode">Barcode (as text)</label>
206         </td>
207         <td>
208         <select name="tx_classif" id="tx_classif">
209                   <!-- TMPL_LOOP Name="tx_classif" -->
210                 <!-- TMPL_IF Name="selected" -->                    
211                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
212                     <!-- TMPL_VAR Name="num" -->
213                 </option>
214                         <!-- TMPL_ELSE -->        
215                 <option value="<!-- TMPL_VAR Name="num" -->">
216                     <!-- TMPL_VAR Name="num" -->
217                 </option>
218                 <!-- /TMPL_IF -->               
219             <!-- /TMPL_LOOP -->
220      </select>
221         <label for="tx_classif">Classification</label>
222         </td>
223         <td>
224         <select name="tx_subclass" id="tx_subclass">
225                   <!-- TMPL_LOOP Name="tx_subclass" -->
226                 <!-- TMPL_IF Name="selected" -->                  
227                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
228                     <!-- TMPL_VAR Name="num" -->
229                 </option>
230                         <!-- TMPL_ELSE -->        
231                 <option value="<!-- TMPL_VAR Name="num" -->">
232                     <!-- TMPL_VAR Name="num" -->
233                 </option>
234                         <!-- /TMPL_IF -->       
235             <!-- /TMPL_LOOP -->
236      </select>
237         <label for="tx_subclass">Subclass</label>
238         </td>
239 </tr> 
240  <tr>
241             <td>
242         <select name="tx_itemcallnumber" id="tx_itemcallnumber">
243                  <!-- TMPL_LOOP Name="tx_itemcallnumber" -->
244                         <!-- TMPL_IF Name="selected" -->          
245                 <option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
246                     <!-- TMPL_VAR Name="num" -->
247                 </option>
248                         <!-- TMPL_ELSE -->       
249                 <option value="<!-- TMPL_VAR Name="num" -->">
250                     <!-- TMPL_VAR Name="num" -->
251                 </option>
252                         <!-- /TMPL_IF -->       
253             <!-- /TMPL_LOOP -->
254       </select>
255         <label for="tx_itemcallnumber">Call Number</label>
256         </td>
257                 <td>&nbsp;</td>
258                 <td>&nbsp;</td>
259   </tr>
260 </table>
261 </fieldset>
262 <br />
263 <input type="radio" name="layoutchoice" value="layout_string" <!-- TMPL_IF NAME="layout_string" -->checked="checked"<!-- /TMPL_IF --> onclick="chooselayoutspec(this);"> List Fields </input>
264 <!-- TMPL_IF NAME="layout_string" --><fieldset id="layout_string"><!-- TMPL_ELSE --><fieldset id="layout_string" class="disabled"><!-- /TMPL_IF -->
265 <label for="layoutname">Data Fields</label>
266   
267 <!-- TMPL_IF NAME="layout_string" --><input type="text" name="formatstring" id="formatstring" size="60" value="<!-- TMPL_VAR NAME="formatstring" -->" /><!-- TMPL_ELSE --><input type="text" name="formatstring" id="formatstring" size="60" value="<!-- TMPL_VAR NAME="formatstring" -->" disabled="disabled" /><!-- /TMPL_IF -->
268
269    <div class="help">
270    <p>Enter a comma separated list of fields to print.  You may include any <em>Koha field</em> or MARC subfield.</p>
271    <p>See online help for advanced options</p>
272    <p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
273         </div>
274 </fieldset>
275 </fieldset>   
276 </li>
277 <li><label for="startlabel">Start printing from Label number: </label><input type="text" name="startlabel"  id="startlabel" size="1"  value="<!-- TMPL_IF NAME="startlabel" --><!-- TMPL_VAR NAME="startlabel" --><!-- TMPL_ELSE -->1<!-- /TMPL_IF -->" /></li>
278
279
280 <li><label for="guidebox">Draw Guide Boxes</label>
281 <!-- TMPL_IF NAME="guidebox"-->
282 <input type="checkbox" name="guidebox" id="guidebox" value="1"  checked="checked" />
283 <!-- TMPL_ELSE -->
284 <input type="checkbox" name="guidebox" id="guidebox" value="1" />
285 <!-- /TMPL_IF --></li>
286
287 </ol>
288 </fieldset>
289 <fieldset class="action">
290         <input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/labels/label-home.pl">Cancel</a>
291         <input type="hidden" name="op" value="<!-- TMPL_IF NAME="layout_id" -->save<!-- TMPL_ELSE -->add<!-- /TMPL_IF -->_layout" />
292         <input type="hidden" name="layout_id" value="<!-- TMPL_VAR NAME="layout_id" -->" />
293 </fieldset>
294 </form>
295
296 </div>
297 </div>
298 <div class="yui-b">
299 <!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
300 </div>
301 </div>
302 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->