Bug 14915: (QA followup) Switch recent commits from Glyphicons to Font Awesome
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-edit-layout.tt
1 [% BLOCK translate_label_types %]
2 [%  SWITCH type %]
3 [%   CASE 'BIB'    %]Biblio
4 [%   CASE 'BARBIB' %]Barcode/Biblio
5 [%   CASE 'BIBBAR' %]Biblio/Barcode
6 [%   CASE 'ALT'    %]Alternating
7 [%   CASE 'BAR'    %]Barcode
8 [%  END %]
9 [% END %]
10     [% INCLUDE 'doc-head-open.inc' %]
11     <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Manage label layouts</title>
12     [% INCLUDE 'doc-head-close.inc' %]
13     <script type="text/JavaScript" language="JavaScript">
14         //<![CDATA[
15             $(document).ready(function() {
16                 $("input[name='layout_choice']").change( function() { layout_method() } );
17                 layout_method();
18             });
19             function layout_method() {
20                 if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
21                     $('#layout_table').hide();
22                     $('#layout_string').show();
23                 } else {
24                     $('#layout_table').show();
25                     $('#layout_string').hide();
26                 }
27             }
28             function checkOblique() {
29                 var font = document.getElementById("font");
30                 var selectedfont = font.options[font.selectedIndex].value;
31                 if ( selectedfont.match("I$") || selectedfont.match("O$") ) {
32                     document.getElementById("oblique_title").disabled = true;
33                 } else {
34                     document.getElementById("oblique_title").disabled = false;
35                 }
36             }
37         //]]>
38     </script>
39 </head>
40 [% BLOCK translate_justification_types %]
41 [%  SWITCH type %]
42 [%   CASE 'L' %]Left
43 [%   CASE 'C' %]Center
44 [%   CASE 'R' %]Right
45 [%  END %]
46 [% END %]
47 <body id="labels_label-edit-layout" class="tools labels">
48     [% INCLUDE 'header.inc' %]
49     [% INCLUDE 'cat-search.inc' %]
50     <div id="breadcrumbs">
51         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
52         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
53         <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
54         <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage label layouts</a> &rsaquo;
55         [% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout
56     </div>
57     <div id="doc3" class="yui-t2">
58         <div id="bd">
59             <div id="yui-main">
60                 <div class="yui-b">
61                     <div class="yui-g">
62                     [% INCLUDE 'labels-toolbar.inc' %]
63                         <div class="yui-u first">
64
65                         </div>
66                     </div>
67                     <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
68                         <fieldset class="rows">
69                             <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout</legend>
70                             <ol>
71                                 <li>
72                                     <label for="layout_name">Layout name: </label>
73                                     <input type="text" name="layout_name" id="layout_name" size="20" value="[% layout_name %]" />
74                                 </li>
75                                 <li>
76                                     <label for="barcode_type">Choose barcode type (encoding): </label>
77                                     <select name="barcode_type" id="barcode_type">
78                                     [% FOREACH barcode_type IN barcode_types %]
79                                     [% IF ( barcode_type.selected ) %]
80                                     <option value="[% barcode_type.type %]" selected="selected">[% barcode_type.name %]</option>
81                                     [% ELSE %]
82                                     <option value="[% barcode_type.type %]">[% barcode_type.name %]</option>
83                                     [% END %]
84                                     [% END %]
85                                     </select>
86                                 </li>
87                                 <li>
88                                     <label for="printing_type">Choose layout type: </label>
89                                     <select name="printing_type" id="printing_type">
90                                     [% FOREACH label_type IN label_types %]
91                                     [% IF ( label_type.selected ) %]
92                                     <option value="[% label_type.type %]" selected="selected">[% PROCESS translate_label_types type=label_type.type %]</option>
93                                     [% ELSE %]
94                                     <option value="[% label_type.type %]">[% PROCESS translate_label_types type=label_type.type %]</option>
95                                     [% END %]
96                                     [% END %]
97                                     </select>
98                                 </li>
99                                 <li>
100                                     <fieldset>
101                                         <legend>Bibliographic data to print</legend>
102                                                                                 <ol>
103                                         <li class="radio">[% IF ( layout_string ) %]
104                                         <input type="radio" name="layout_choice" id="layout_choice_order" value="layout_table" checked="checked" /><label for="layout_choice_order">Choose order of text fields to print</label>
105                                         [% ELSE %]
106                                         <input type="radio" name="layout_choice" id="layout_choice_order" value="layout_table" /><label for="layout_choice_order">Choose Order Of Text Fields to Print</label>
107                                         [% END %]
108                                                                                                 <div id="layout_table">
109                                                     <p>
110                                             [% FOREACH text_field IN fields %]
111                                                         <select name="[% text_field.field_name %]" id="[% text_field.field_name |url %]">
112                                                             <option value=""></option>
113                                                             [% FOREACH orde IN [1..field_count] %]
114                                                                 [% IF ( orde == text_field.order ) %]
115                                                             <option value="[% orde %]" selected="1">[% orde %]</option>
116                                                                 [% ELSE %]
117                                                             <option value="[% orde %]">[% orde %]</option>
118                                                                 [% END %]
119                                                             [% END %]
120                                                         </select>&nbsp;<label for="[% text_field.field_name |url %]">[% text_field.field_label %]</label>
121
122                                                         &nbsp;&nbsp;
123
124                                             [% END %]
125                                                     </p>
126                                                                                         </div>
127                                             </li>
128                                             [% UNLESS ( layout_string ) %]
129                                             <li class="radio"><input type="radio" id="layout_choice_list" name="layout_choice" value="layout_string" checked="checked" /> <label for="layout_choice_list">List fields</label></li>
130                                             [% ELSE %]
131                                             <li class="radio"><input type="radio" id="layout_choice_list" name="layout_choice" value="layout_string" /> <label for="layout_choice_list">List Fields</label></li>
132                                             [% END %]
133                                            <li> <fieldset id="layout_string" class="brief">
134                                                 <label for="format_string">Data fields</label>
135                                                 <input type="text" name="format_string" id="format_string" size="80" value="[% format_string |html %]" />
136                                                 <div class="hint">
137                                                     <p>Enter a comma separated list of fields to print.  You may include any <em>Koha field</em> or MARC subfield.</p>
138                                                     <p>See online help for advanced options</p>
139                                                     <p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
140                                                     <p>Fields homebranch_description, holdingbranch_description, ccode_description, location_description and permanent_location_description show description instead of code.</p>
141                                                 </div>
142                                             </fieldset></li>
143                                                                                         </ol>
144                                     </fieldset>
145                                 </li>
146                                 <li>
147                                     <label for="guidebox">Draw guide boxes: </label>
148                                     [% IF ( guidebox ) %]
149                                     <input type="checkbox" name="guidebox" id="guidebox" value="1"  checked="checked" />
150                                     [% ELSE %]
151                                     <input type="checkbox" name="guidebox" id="guidebox" value="1" />
152                                     [% END %]
153                                 </li>
154                                 <li>
155                                     <label for="callnum_split">Split call numbers: </label>
156                                     [% IF ( callnum_split ) %]
157                                     <input type="checkbox" name="callnum_split" id="callnum_split" value="1"  checked="checked" />
158                                     [% ELSE %]
159                                     <input type="checkbox" name="callnum_split" id="callnum_split" value="1" />
160                                     [% END %]
161                                 </li>
162                                 <li>
163                                     <label for="text_justify">Text justification: </label>
164                                     <select name="text_justify" id="text_justify">
165                                         [% FOREACH text_justification_type IN text_justification_types %]
166                                         [% IF ( text_justification_type.selected ) %]
167                                         <option value="[% text_justification_type.type %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
168                                         [% ELSE %]
169                                         <option value="[% text_justification_type.type %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
170                                         [% END %]
171                                         [% END %]
172                                     </select>
173                                 </li>
174                                 <li>
175                                     <label for="font">Font: </label>
176                                     <select name="font" id="font" onchange="checkOblique()">
177                                         [% FOREACH font_type IN font_types %]
178                                         [% IF ( font_type.selected ) %]
179                                         <option value="[% font_type.type %]" selected="selected">[% font_type.name %]</option>
180                                         [% ELSE %]
181                                         <option value="[% font_type.type %]">[% font_type.name %]</option>
182                                         [% END %]
183                                         [% END %]
184                                     </select>
185                                 </li>
186                                 <li>
187                                     <label for="font_size">Font size: </label>
188                                     <input type="text" name="font_size" id="font_size" size="2" value="[% font_size |html %]" />
189                                 </li>
190                                 <li>
191                                     <label for="oblique_title">Oblique title: </label>
192                                     [% IF ( oblique_title ) %]
193                                     <input type="checkbox" name="oblique_title" id="oblique_title" value="1"  checked="checked" />
194                                     [% ELSE %]
195                                     <input type="checkbox" name="oblique_title" id="oblique_title" value="1" />
196                                     [% END %]
197                                 </li>
198                             </ol>
199                         </fieldset>
200                         <fieldset class="action">
201                             <input type="submit" value="Save" />
202                             <a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Cancel</a>
203                             <input type="hidden" name="op" value="save" />
204                             <input type="hidden" name="layout_id" value="[% layout_id %]" />
205                         </fieldset>
206                     </form>
207                 </div>
208             </div>
209         </div>
210         [% INCLUDE 'intranet-bottom.inc' %]