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 › Cataloging › Koha</title>
5 [% INCLUDE 'doc-head-close.inc' %]
8 <body id="labels_label-edit-template" class="tools labels">
9 [% WRAPPER 'header.inc' %]
10 [% INCLUDE 'cat-search.inc' %]
13 [% WRAPPER 'sub-header.inc' %]
14 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20 <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
23 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
26 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a>
29 <a href="#" aria-current="page">
30 [% IF ( template_id ) %]
31 Edit label template [% template_id | html %]
41 <div class="main container-fluid">
43 <div class="col-sm-10 col-sm-push-2">
45 [% INCLUDE 'labels-toolbar.inc' %]
47 [% IF ( template_id ) %]
48 <h1>Edit label template [% template_id | html %]</h1>
50 <h1>New label template</h1>
53 <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
55 <div class="col-sm-6">
56 <fieldset class="rows">
59 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
62 <label for="template_code">Template code:</label>
63 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
66 <label for="template_desc">Template description:</label>
67 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
70 <label for="units">Units:</label>
71 <select id="units" name="units">
72 [% FOREACH unit IN units %]
73 [% IF ( unit.selected ) %]
74 <option value="[% unit.type | html %]" selected="selected">
76 <option value="[% unit.type | html %]">
79 [% SWITCH unit.type %]
81 <span>PostScript points</span>
85 <span>US Inches</span>
87 <span>SI Millimeters</span>
89 <span>SI Centimeters</span>
96 <label for="page_height">Page height:</label>
97 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
100 <label for="page_width">Page width:</label>
101 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
104 <label for="label_width">Label width:</label>
105 <input type="text" size="4" name="label_width" id="label_width" value="[% label_width | html %]" />
108 <label for="label_height">Label height:</label>
109 <input type="text" size="4" name="label_height" id="label_height" value="[% label_height | html %]" />
115 <div class="col-sm-6">
116 <fieldset class="rows">
118 <label for="top_margin">Top page margin:</label>
119 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
122 <label for="left_margin">Left page margin:</label>
123 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
126 <label for="top_text_margin">Top text margin:</label>
127 <input type="text" size="4" name="top_text_margin" id="top_text_margin" value="[% top_text_margin | html %]" />
130 <label for="left_text_margin">Left text margin:</label>
131 <input type="text" size="4" name="left_text_margin" id="left_text_margin" value="[% left_text_margin | html %]" />
134 <label for="cols">Number of columns:</label>
135 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
138 <label for="rows">Number of rows:</label>
139 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
142 <label for="col_gap">Gap between columns:</label>
143 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
146 <label for="row_gap">Gap between rows:</label>
147 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
151 <label for="profile_id">Profile:</label>
152 [% IF ( profile_list ) %]
153 <select id="profile_id" name="profile_id">
154 [% FOREACH profile_lis IN profile_list %]
155 [% IF ( profile_lis.selected ) %]
156 <option value="[% profile_lis.profile_id | html %]" selected="selected">
158 <option value="[% profile_lis.profile_id | html %]">
160 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
165 [% IF ( profile_list.size == 1 ) %]
167 <a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Make a new printer profile.</a>
174 <fieldset class="action">
175 <input type="submit" class="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Cancel</a>
176 <input type="hidden" name="op" value="save" />
177 [% IF ( template_id ) %]
178 <input type="hidden" name="template_id" value="[% template_id | html %]" />
184 </div> <!-- /.col-sm-10.col-sm-push-2 -->
186 <div class="col-sm-2 col-sm-pull-10">
188 [% INCLUDE 'cat-menu.inc' %]
190 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
191 </div> <!-- /.row -->
193 [% MACRO jsinclude BLOCK %]
195 $(document).ready(function(){
196 $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current");
197 var selectedUnit = $("#units option:selected").attr("value");
198 var unitfields = $("#page_height,#page_width,#label_width,#label_height,#top_margin,#left_margin,#top_text_margin,#left_text_margin,#col_gap,#row_gap");
199 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
200 $("#units").change(function(){
201 $(".unit").html(getUnit($(this).val()));
204 function getUnit(unit){
229 [% INCLUDE 'intranet-bottom.inc' %]