2 [% PROCESS 'i18n.inc' %]
4 [%- BLOCK translate_label_types -%]
6 [%- CASE 'BIB' -%]<span> Only the bibliographic data is printed</span>
7 [%- CASE 'BARBIB'-%]<span> Barcode precedes bibliographic data</span>
8 [%- CASE 'BIBBAR'-%]<span> Bibliographic data precedes barcode</span>
9 [%- CASE 'ALT' -%]<span> Barcode and bibliographic data are printed on alternating labels</span>
10 [%- CASE 'BAR' -%]<span> Only the barcode is printed</span>
13 [% INCLUDE 'doc-head-open.inc' %]
14 <title>[% FILTER collapse %]
16 [% tx("Edit label layout {layout_id}", { layout_id = layout_id }) | html %]
18 [% t("New label layout") | html %]
20 [% t("Layouts") | html %] ›
21 [% t("Label creator") | html %] ›
22 [% t("Cataloging") | html %] ›
23 [% t("Koha") | html %]
25 [% INCLUDE 'doc-head-close.inc' %]
28 [% BLOCK translate_justification_types %]
30 [% CASE 'L' %]<span>Left</span>
31 [% CASE 'C' %]<span>Center</span>
32 [% CASE 'R' %]<span>Right</span>
35 <body id="labels_label-edit-layout" class="tools labels">
36 [% WRAPPER 'header.inc' %]
37 [% INCLUDE 'cat-search.inc' %]
40 [% WRAPPER 'sub-header.inc' %]
41 [% WRAPPER breadcrumbs %]
42 [% WRAPPER breadcrumb_item %]
43 <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
45 [% WRAPPER breadcrumb_item %]
46 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
48 [% WRAPPER breadcrumb_item %]
49 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a>
51 [% WRAPPER breadcrumb_item bc_active= 1 %]
52 [% IF ( layout_id ) %]
53 <span>Edit label layout [% layout_id | html %]</span>
55 <span>New label layout</span>
58 [% END #/ WRAPPER breadcrumbs %]
59 [% END #/ WRAPPER sub-header.inc %]
61 <div class="main container-fluid">
63 <div class="col-sm-10 col-sm-push-2">
66 [% INCLUDE 'labels-toolbar.inc' %]
68 [% IF ( layout_id ) %]
69 <h1>Edit label layout [% layout_id | html %]</h1>
71 <h1>New label layout</h1>
74 <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
75 <fieldset class="rows">
78 <label for="layout_name">Layout name: </label>
79 <input type="text" name="layout_name" id="layout_name" size="20" value="[% layout_name | html %]" />
82 <label for="barcode_type">Choose barcode type (encoding): </label>
83 <select name="barcode_type" id="barcode_type">
84 [% FOREACH barcode_type IN barcode_types %]
85 [% IF ( barcode_type.selected ) %]
86 <option value="[% barcode_type.type | html %]" selected="selected">[% barcode_type.name | html %]</option>
88 <option value="[% barcode_type.type | html %]">[% barcode_type.name | html %]</option>
94 <label for="printing_type">Choose layout type: </label>
95 <select name="printing_type" id="printing_type">
96 [% FOREACH label_type IN label_types %]
97 [% IF ( label_type.selected ) %]
98 <option value="[% label_type.type | html %]" selected="selected">[% PROCESS translate_label_types type=label_type.type %]</option>
100 <option value="[% label_type.type | html %]">[% PROCESS translate_label_types type=label_type.type %]</option>
107 <legend>Bibliographic data to print</legend>
109 <li class="radio">[% IF ( layout_string ) %]
110 <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>
112 <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>
114 <div id="layout_table">
116 [% FOREACH text_field IN fields %]
117 <select name="[% text_field.field_name | html %]" id="[% text_field.field_name |url %]">
118 <option value=""></option>
119 [% FOREACH orde IN [1..field_count] %]
120 [% IF ( orde == text_field.order ) %]
121 <option value="[% orde | html %]" selected="1">[% orde | html %]</option>
123 <option value="[% orde | html %]">[% orde | html %]</option>
126 </select> <label for="[% text_field.field_name |url %]">[% text_field.field_label | html %]</label>
134 [% UNLESS ( layout_string ) %]
135 <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>
137 <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>
139 <li> <fieldset id="layout_string" class="brief">
140 <label for="format_string">Data fields</label>
141 <input type="text" name="format_string" id="format_string" size="80" value="[% format_string | html %]" />
143 <p>Enter a comma separated list of fields to print. You may include any <em>Koha field</em> or MARC subfield.</p>
144 <p>See online help for advanced options</p>
145 <p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
146 <p>Fields homebranch_description, holdingbranch_description, ccode_description, location_description and permanent_location_description show description instead of code.</p>
153 <label for="guidebox">Draw guide boxes: </label>
154 [% IF ( guidebox ) %]
155 <input type="checkbox" name="guidebox" id="guidebox" value="1" checked="checked" />
157 <input type="checkbox" name="guidebox" id="guidebox" value="1" />
161 <label for="callnum_split">Split call numbers: </label>
162 [% IF ( callnum_split ) %]
163 <input type="checkbox" name="callnum_split" id="callnum_split" value="1" checked="checked" />
165 <input type="checkbox" name="callnum_split" id="callnum_split" value="1" />
169 <label for="text_justify">Text justification: </label>
170 <select name="text_justify" id="text_justify">
171 [% FOREACH text_justification_type IN text_justification_types %]
172 [% IF ( text_justification_type.selected ) %]
173 <option value="[% text_justification_type.type | html %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
175 <option value="[% text_justification_type.type | html %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
181 <label for="font">Font: </label>
182 <select name="font" id="font">
183 [% FOREACH font_type IN font_types %]
184 [% IF ( font_type.selected ) %]
185 <option value="[% font_type.type | html %]" selected="selected">[% font_type.name | html %]</option>
187 <option value="[% font_type.type | html %]">[% font_type.name | html %]</option>
193 <label for="font_size">Font size: </label>
194 <input type="text" name="font_size" id="font_size" size="2" value="[% font_size | html %]" />
197 <label for="scale_width">Barcode width: </label>
198 <input type="text" name="scale_width" id="scale_width" size="2" value="[% scale_width | html %]" />
201 <label for="scale_height">Barcode height: </label>
202 <input type="text" name="scale_height" id="scale_height" size="2" value="[% scale_height | html %]" />
205 <label for="oblique_title">Oblique title: </label>
206 [% IF ( oblique_title ) %]
207 <input type="checkbox" name="oblique_title" id="oblique_title" value="1" checked="checked" />
209 <input type="checkbox" name="oblique_title" id="oblique_title" value="1" />
214 <fieldset class="action">
215 <input type="submit" class="btn btn-primary" value="Save" />
216 <a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Cancel</a>
217 <input type="hidden" name="op" value="save" />
218 <input type="hidden" name="layout_id" value="[% layout_id | html %]" />
222 </div> <!-- /.col-sm-10.col-sm-push-2 -->
224 <div class="col-sm-2 col-sm-pull-10">
226 [% INCLUDE 'cat-menu.inc' %]
228 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
229 </div> <!-- /.row -->
231 [% MACRO jsinclude BLOCK %]
233 $(document).ready(function() {
234 $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current");
235 $("input[name='layout_choice']").change( function() { layout_method() } );
237 $("#font").on("change",function(){
241 function layout_method() {
242 if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
243 $('#layout_table').hide();
244 $('#layout_string').show();
246 $('#layout_table').show();
247 $('#layout_string').hide();
250 function checkOblique() {
251 var font = document.getElementById("font");
252 var selectedfont = font.options[font.selectedIndex].value;
253 if ( selectedfont.match("I$") || selectedfont.match("O$") ) {
254 document.getElementById("oblique_title").disabled = true;
256 document.getElementById("oblique_title").disabled = false;
262 [% INCLUDE 'intranet-bottom.inc' %]