3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>[% IF ( template_id ) %]Edit label template [% template_id | html %] [% ELSE %] New label template [% END %] › Templates › Label creator › Tools › Koha</title>
5 [% INCLUDE 'doc-head-close.inc' %]
8 <body id="labels_label-edit-template" class="tools labels">
9 [% INCLUDE 'header.inc' %]
10 [% INCLUDE 'cat-search.inc' %]
12 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
15 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
18 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
21 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
24 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a>
27 <a href="#" aria-current="page">
28 [% IF ( template_id ) %]
29 Edit label template [% template_id | html %]
38 <div class="main container-fluid">
40 <div class="col-sm-10 col-sm-push-2">
42 [% INCLUDE 'labels-toolbar.inc' %]
44 [% IF ( template_id ) %]
45 <h1>Edit label template [% template_id | html %]</h1>
47 <h1>New label template</h1>
50 <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
52 <div class="col-sm-6">
53 <fieldset class="rows">
56 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
59 <label for="template_code">Template code:</label>
60 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
63 <label for="template_desc">Template description:</label>
64 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
67 <label for="units">Units:</label>
68 <select id="units" name="units">
69 [% FOREACH unit IN units %]
70 [% IF ( unit.selected ) %]
71 <option value="[% unit.type | html %]" selected="selected">
73 <option value="[% unit.type | html %]">
76 [% SWITCH unit.type %]
78 <span>PostScript points</span>
82 <span>US Inches</span>
84 <span>SI Millimeters</span>
86 <span>SI Centimeters</span>
93 <label for="page_height">Page height:</label>
94 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
97 <label for="page_width">Page width:</label>
98 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
101 <label for="label_width">Label width:</label>
102 <input type="text" size="4" name="label_width" id="label_width" value="[% label_width | html %]" />
105 <label for="label_height">Label height:</label>
106 <input type="text" size="4" name="label_height" id="label_height" value="[% label_height | html %]" />
112 <div class="col-sm-6">
113 <fieldset class="rows">
115 <label for="top_margin">Top page margin:</label>
116 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
119 <label for="left_margin">Left page margin:</label>
120 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
123 <label for="top_text_margin">Top text margin:</label>
124 <input type="text" size="4" name="top_text_margin" id="top_text_margin" value="[% top_text_margin | html %]" />
127 <label for="left_text_margin">Left text margin:</label>
128 <input type="text" size="4" name="left_text_margin" id="left_text_margin" value="[% left_text_margin | html %]" />
131 <label for="cols">Number of columns:</label>
132 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
135 <label for="rows">Number of rows:</label>
136 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
139 <label for="col_gap">Gap between columns:</label>
140 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
143 <label for="row_gap">Gap between rows:</label>
144 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
148 <label for="profile_id">Profile:</label>
149 [% IF ( profile_list ) %]
150 <select id="profile_id" name="profile_id">
151 [% FOREACH profile_lis IN profile_list %]
152 [% IF ( profile_lis.selected ) %]
153 <option value="[% profile_lis.profile_id | html %]" selected="selected">
155 <option value="[% profile_lis.profile_id | html %]">
157 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
162 [% IF ( profile_list.size == 1 ) %]
164 <a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Make a new printer profile.</a>
171 <fieldset class="action">
172 <input type="submit" class="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Cancel</a>
173 <input type="hidden" name="op" value="save" />
174 [% IF ( template_id ) %]
175 <input type="hidden" name="template_id" value="[% template_id | html %]" />
181 </div> <!-- /.col-sm-10.col-sm-push-2 -->
183 <div class="col-sm-2 col-sm-pull-10">
185 [% INCLUDE 'tools-menu.inc' %]
187 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
188 </div> <!-- /.row -->
190 [% MACRO jsinclude BLOCK %]
191 [% Asset.js("js/tools-menu.js") | $raw %]
193 $(document).ready(function(){
194 var selectedUnit = $("#units option:selected").attr("value");
195 var unitfields = $("#page_height,#page_width,#label_width,#label_height,#top_margin,#left_margin,#top_text_margin,#left_text_margin,#col_gap,#row_gap");
196 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
197 $("#units").change(function(){
198 $(".unit").html(getUnit($(this).val()));
201 function getUnit(unit){
226 [% INCLUDE 'intranet-bottom.inc' %]