2 [% BLOCK translate_label_types %]
5 [% CASE 'BARBIB' %]Barcode/Biblio
6 [% CASE 'BIBBAR' %]Biblio/Barcode
7 [% CASE 'ALT' %]Alternating
8 [% CASE 'BAR' %]Barcode
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>Koha › Tools › Label creator › Layouts › [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]</title>
13 [% INCLUDE 'doc-head-close.inc' %]
16 [% BLOCK translate_justification_types %]
23 <body id="labels_label-edit-layout" class="tools labels">
24 [% INCLUDE 'header.inc' %]
25 [% INCLUDE 'cat-search.inc' %]
26 <div id="breadcrumbs">
27 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
28 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
29 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
30 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> ›
31 [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]
34 <div class="main container-fluid">
36 <div class="col-sm-10 col-sm-push-2">
39 [% INCLUDE 'labels-toolbar.inc' %]
41 <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
42 <fieldset class="rows">
43 <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] label layout</legend>
46 <label for="layout_name">Layout name: </label>
47 <input type="text" name="layout_name" id="layout_name" size="20" value="[% layout_name %]" />
50 <label for="barcode_type">Choose barcode type (encoding): </label>
51 <select name="barcode_type" id="barcode_type">
52 [% FOREACH barcode_type IN barcode_types %]
53 [% IF ( barcode_type.selected ) %]
54 <option value="[% barcode_type.type %]" selected="selected">[% barcode_type.name %]</option>
56 <option value="[% barcode_type.type %]">[% barcode_type.name %]</option>
62 <label for="printing_type">Choose layout type: </label>
63 <select name="printing_type" id="printing_type">
64 [% FOREACH label_type IN label_types %]
65 [% IF ( label_type.selected ) %]
66 <option value="[% label_type.type %]" selected="selected">[% PROCESS translate_label_types type=label_type.type %]</option>
68 <option value="[% label_type.type %]">[% PROCESS translate_label_types type=label_type.type %]</option>
75 <legend>Bibliographic data to print</legend>
77 <li class="radio">[% IF ( layout_string ) %]
78 <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 <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 <div id="layout_table">
84 [% FOREACH text_field IN fields %]
85 <select name="[% text_field.field_name %]" id="[% text_field.field_name |url %]">
86 <option value=""></option>
87 [% FOREACH orde IN [1..field_count] %]
88 [% IF ( orde == text_field.order ) %]
89 <option value="[% orde %]" selected="1">[% orde %]</option>
91 <option value="[% orde %]">[% orde %]</option>
94 </select> <label for="[% text_field.field_name |url %]">[% text_field.field_label %]</label>
102 [% UNLESS ( layout_string ) %]
103 <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 <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 <li> <fieldset id="layout_string" class="brief">
108 <label for="format_string">Data fields</label>
109 <input type="text" name="format_string" id="format_string" size="80" value="[% format_string |html %]" />
111 <p>Enter a comma separated list of fields to print. You may include any <em>Koha field</em> or MARC subfield.</p>
112 <p>See online help for advanced options</p>
113 <p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
114 <p>Fields homebranch_description, holdingbranch_description, ccode_description, location_description and permanent_location_description show description instead of code.</p>
121 <label for="guidebox">Draw guide boxes: </label>
122 [% IF ( guidebox ) %]
123 <input type="checkbox" name="guidebox" id="guidebox" value="1" checked="checked" />
125 <input type="checkbox" name="guidebox" id="guidebox" value="1" />
129 <label for="callnum_split">Split call numbers: </label>
130 [% IF ( callnum_split ) %]
131 <input type="checkbox" name="callnum_split" id="callnum_split" value="1" checked="checked" />
133 <input type="checkbox" name="callnum_split" id="callnum_split" value="1" />
137 <label for="text_justify">Text justification: </label>
138 <select name="text_justify" id="text_justify">
139 [% FOREACH text_justification_type IN text_justification_types %]
140 [% IF ( text_justification_type.selected ) %]
141 <option value="[% text_justification_type.type %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
143 <option value="[% text_justification_type.type %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
149 <label for="font">Font: </label>
150 <select name="font" id="font">
151 [% FOREACH font_type IN font_types %]
152 [% IF ( font_type.selected ) %]
153 <option value="[% font_type.type %]" selected="selected">[% font_type.name %]</option>
155 <option value="[% font_type.type %]">[% font_type.name %]</option>
161 <label for="font_size">Font size: </label>
162 <input type="text" name="font_size" id="font_size" size="2" value="[% font_size |html %]" />
165 <label for="oblique_title">Oblique title: </label>
166 [% IF ( oblique_title ) %]
167 <input type="checkbox" name="oblique_title" id="oblique_title" value="1" checked="checked" />
169 <input type="checkbox" name="oblique_title" id="oblique_title" value="1" />
174 <fieldset class="action">
175 <input type="submit" value="Save" />
176 <a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Cancel</a>
177 <input type="hidden" name="op" value="save" />
178 <input type="hidden" name="layout_id" value="[% layout_id %]" />
182 </div> <!-- /.col-sm-10.col-sm-push-2 -->
184 <div class="col-sm-2 col-sm-pull-10">
186 [% INCLUDE 'tools-menu.inc' %]
188 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
189 </div> <!-- /.row -->
191 [% MACRO jsinclude BLOCK %]
192 [% Asset.js("js/tools-menu.js") %]
194 $(document).ready(function() {
195 $("input[name='layout_choice']").change( function() { layout_method() } );
197 $("#font").on("change",function(){
201 function layout_method() {
202 if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
203 $('#layout_table').hide();
204 $('#layout_string').show();
206 $('#layout_table').show();
207 $('#layout_string').hide();
210 function checkOblique() {
211 var font = document.getElementById("font");
212 var selectedfont = font.options[font.selectedIndex].value;
213 if ( selectedfont.match("I$") || selectedfont.match("O$") ) {
214 document.getElementById("oblique_title").disabled = true;
216 document.getElementById("oblique_title").disabled = false;
222 [% INCLUDE 'intranet-bottom.inc' %]