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