3 [%- BLOCK translate_label_types -%]
5 [%- CASE 'BIB' -%]<span> Only the bibliographic data is printed</span>
6 [%- CASE 'BARBIB'-%]<span> Barcode precedes bibliographic data</span>
7 [%- CASE 'BIBBAR'-%]<span> Bibliographic data precedes barcode</span>
8 [%- CASE 'ALT' -%]<span> Barcode and bibliographic data are printed on alternating labels</span>
9 [%- CASE 'BAR' -%]<span> Only the barcode is printed</span>
12 [% INCLUDE 'doc-head-open.inc' %]
13 <title>[% IF ( layout_id ) %]Edit label layout [% layout_id | html %] [% ELSE %] New label layout [% END %] › Layouts › Label creator › Tools › Koha</title>
14 [% INCLUDE 'doc-head-close.inc' %]
17 [% BLOCK translate_justification_types %]
19 [% CASE 'L' %]<span>Left</span>
20 [% CASE 'C' %]<span>Center</span>
21 [% CASE 'R' %]<span>Right</span>
24 <body id="labels_label-edit-layout" class="tools labels">
25 [% INCLUDE 'header.inc' %]
26 [% INCLUDE 'cat-search.inc' %]
28 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
31 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
34 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
37 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
40 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a>
43 [% IF ( layout_id ) %]
45 <a href="#" aria-current="page">
46 Edit label layout [% layout_id | html %]
51 <a href="#" aria-current="page">
59 <div class="main container-fluid">
61 <div class="col-sm-10 col-sm-push-2">
64 [% INCLUDE 'labels-toolbar.inc' %]
66 [% IF ( layout_id ) %]
67 <h1>Edit label layout [% layout_id | html %]</h1>
69 <h1>New label layout</h1>
72 <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
73 <fieldset class="rows">
76 <label for="layout_name">Layout name: </label>
77 <input type="text" name="layout_name" id="layout_name" size="20" value="[% layout_name | html %]" />
80 <label for="barcode_type">Choose barcode type (encoding): </label>
81 <select name="barcode_type" id="barcode_type">
82 [% FOREACH barcode_type IN barcode_types %]
83 [% IF ( barcode_type.selected ) %]
84 <option value="[% barcode_type.type | html %]" selected="selected">[% barcode_type.name | html %]</option>
86 <option value="[% barcode_type.type | html %]">[% barcode_type.name | html %]</option>
92 <label for="printing_type">Choose layout type: </label>
93 <select name="printing_type" id="printing_type">
94 [% FOREACH label_type IN label_types %]
95 [% IF ( label_type.selected ) %]
96 <option value="[% label_type.type | html %]" selected="selected">[% PROCESS translate_label_types type=label_type.type %]</option>
98 <option value="[% label_type.type | html %]">[% PROCESS translate_label_types type=label_type.type %]</option>
105 <legend>Bibliographic data to print</legend>
107 <li class="radio">[% IF ( layout_string ) %]
108 <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>
110 <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>
112 <div id="layout_table">
114 [% FOREACH text_field IN fields %]
115 <select name="[% text_field.field_name | html %]" id="[% text_field.field_name |url %]">
116 <option value=""></option>
117 [% FOREACH orde IN [1..field_count] %]
118 [% IF ( orde == text_field.order ) %]
119 <option value="[% orde | html %]" selected="1">[% orde | html %]</option>
121 <option value="[% orde | html %]">[% orde | html %]</option>
124 </select> <label for="[% text_field.field_name |url %]">[% text_field.field_label | html %]</label>
132 [% UNLESS ( layout_string ) %]
133 <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>
135 <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>
137 <li> <fieldset id="layout_string" class="brief">
138 <label for="format_string">Data fields</label>
139 <input type="text" name="format_string" id="format_string" size="80" value="[% format_string | html %]" />
141 <p>Enter a comma separated list of fields to print. You may include any <em>Koha field</em> or MARC subfield.</p>
142 <p>See online help for advanced options</p>
143 <p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
144 <p>Fields homebranch_description, holdingbranch_description, ccode_description, location_description and permanent_location_description show description instead of code.</p>
151 <label for="guidebox">Draw guide boxes: </label>
152 [% IF ( guidebox ) %]
153 <input type="checkbox" name="guidebox" id="guidebox" value="1" checked="checked" />
155 <input type="checkbox" name="guidebox" id="guidebox" value="1" />
159 <label for="callnum_split">Split call numbers: </label>
160 [% IF ( callnum_split ) %]
161 <input type="checkbox" name="callnum_split" id="callnum_split" value="1" checked="checked" />
163 <input type="checkbox" name="callnum_split" id="callnum_split" value="1" />
167 <label for="text_justify">Text justification: </label>
168 <select name="text_justify" id="text_justify">
169 [% FOREACH text_justification_type IN text_justification_types %]
170 [% IF ( text_justification_type.selected ) %]
171 <option value="[% text_justification_type.type | html %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
173 <option value="[% text_justification_type.type | html %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
179 <label for="font">Font: </label>
180 <select name="font" id="font">
181 [% FOREACH font_type IN font_types %]
182 [% IF ( font_type.selected ) %]
183 <option value="[% font_type.type | html %]" selected="selected">[% font_type.name | html %]</option>
185 <option value="[% font_type.type | html %]">[% font_type.name | html %]</option>
191 <label for="font_size">Font size: </label>
192 <input type="text" name="font_size" id="font_size" size="2" value="[% font_size | html %]" />
195 <label for="oblique_title">Oblique title: </label>
196 [% IF ( oblique_title ) %]
197 <input type="checkbox" name="oblique_title" id="oblique_title" value="1" checked="checked" />
199 <input type="checkbox" name="oblique_title" id="oblique_title" value="1" />
204 <fieldset class="action">
205 <input type="submit" value="Save" />
206 <a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Cancel</a>
207 <input type="hidden" name="op" value="save" />
208 <input type="hidden" name="layout_id" value="[% layout_id | html %]" />
212 </div> <!-- /.col-sm-10.col-sm-push-2 -->
214 <div class="col-sm-2 col-sm-pull-10">
216 [% INCLUDE 'tools-menu.inc' %]
218 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
219 </div> <!-- /.row -->
221 [% MACRO jsinclude BLOCK %]
222 [% Asset.js("js/tools-menu.js") | $raw %]
224 $(document).ready(function() {
225 $("input[name='layout_choice']").change( function() { layout_method() } );
227 $("#font").on("change",function(){
231 function layout_method() {
232 if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
233 $('#layout_table').hide();
234 $('#layout_string').show();
236 $('#layout_table').show();
237 $('#layout_string').hide();
240 function checkOblique() {
241 var font = document.getElementById("font");
242 var selectedfont = font.options[font.selectedIndex].value;
243 if ( selectedfont.match("I$") || selectedfont.match("O$") ) {
244 document.getElementById("oblique_title").disabled = true;
246 document.getElementById("oblique_title").disabled = false;
252 [% INCLUDE 'intranet-bottom.inc' %]