3 [% BLOCK translate_label_types %]
6 [% CASE 'BARBIB' %]Barcode/Biblio
7 [% CASE 'BIBBAR' %]Biblio/Barcode
8 [% CASE 'ALT' %]Alternating
9 [% CASE 'BAR' %]Barcode
12 [% INCLUDE 'doc-head-open.inc' %]
13 <title>Koha › Tools › Label creator › Layouts › [% IF ( layout_id ) %]Edit ([% layout_id | html %])[% ELSE %]New[% END %]</title>
14 [% INCLUDE 'doc-head-close.inc' %]
17 [% BLOCK translate_justification_types %]
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> ›
29 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
30 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
31 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> ›
32 [% IF ( layout_id ) %]Edit ([% layout_id | html %])[% ELSE %]New[% END %]
35 <div class="main container-fluid">
37 <div class="col-sm-10 col-sm-push-2">
40 [% INCLUDE 'labels-toolbar.inc' %]
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>
47 <label for="layout_name">Layout name: </label>
48 <input type="text" name="layout_name" id="layout_name" size="20" value="[% layout_name | html %]" />
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>
57 <option value="[% barcode_type.type | html %]">[% barcode_type.name | html %]</option>
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>
69 <option value="[% label_type.type | html %]">[% PROCESS translate_label_types type=label_type.type %]</option>
76 <legend>Bibliographic data to print</legend>
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>
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>
83 <div id="layout_table">
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>
92 <option value="[% orde | html %]">[% orde | html %]</option>
95 </select> <label for="[% text_field.field_name |url %]">[% text_field.field_label | html %]</label>
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>
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>
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 %]" />
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>
122 <label for="guidebox">Draw guide boxes: </label>
123 [% IF ( guidebox ) %]
124 <input type="checkbox" name="guidebox" id="guidebox" value="1" checked="checked" />
126 <input type="checkbox" name="guidebox" id="guidebox" value="1" />
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" />
134 <input type="checkbox" name="callnum_split" id="callnum_split" value="1" />
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>
144 <option value="[% text_justification_type.type | html %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
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>
156 <option value="[% font_type.type | html %]">[% font_type.name | html %]</option>
162 <label for="font_size">Font size: </label>
163 <input type="text" name="font_size" id="font_size" size="2" value="[% font_size | html %]" />
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" />
170 <input type="checkbox" name="oblique_title" id="oblique_title" value="1" />
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 %]" />
183 </div> <!-- /.col-sm-10.col-sm-push-2 -->
185 <div class="col-sm-2 col-sm-pull-10">
187 [% INCLUDE 'tools-menu.inc' %]
189 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
190 </div> <!-- /.row -->
192 [% MACRO jsinclude BLOCK %]
193 [% Asset.js("js/tools-menu.js") | $raw %]
195 $(document).ready(function() {
196 $("input[name='layout_choice']").change( function() { layout_method() } );
198 $("#font").on("change",function(){
202 function layout_method() {
203 if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
204 $('#layout_table').hide();
205 $('#layout_string').show();
207 $('#layout_table').show();
208 $('#layout_string').hide();
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;
217 document.getElementById("oblique_title").disabled = false;
223 [% INCLUDE 'intranet-bottom.inc' %]