2 [% PROCESS 'i18n.inc' %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% FILTER collapse %]
6 [% IF( template_id ) %]
7 [% tx("Edit label template {template_id}", { template_id = template_id }) | html %]
9 [% t("New label template") | html %]
11 [% t("Templates") | html %] ›
12 [% t("Label creator") | html %] ›
13 [% t("Cataloging") | html %] ›
14 [% t("Koha") | html %]
16 [% INCLUDE 'doc-head-close.inc' %]
19 <body id="labels_label-edit-template" class="tools labels">
20 [% WRAPPER 'header.inc' %]
21 [% INCLUDE 'cat-search.inc' %]
24 [% WRAPPER 'sub-header.inc' %]
25 [% WRAPPER breadcrumbs %]
26 [% WRAPPER breadcrumb_item %]
27 <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
29 [% WRAPPER breadcrumb_item %]
30 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
32 [% WRAPPER breadcrumb_item %]
33 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a>
35 [% WRAPPER breadcrumb_item bc_active= 1 %]
36 [% IF ( template_id ) %]
37 <span>Edit label template [% template_id | html %]</span>
39 <span>New label template</span>
42 [% END #/ WRAPPER breadcrumbs %]
43 [% END #/ WRAPPER sub-header.inc %]
45 <div class="main container-fluid">
47 <div class="col-sm-10 col-sm-push-2">
49 [% INCLUDE 'labels-toolbar.inc' %]
51 [% IF ( template_id ) %]
52 <h1>Edit label template [% template_id | html %]</h1>
54 <h1>New label template</h1>
57 <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
59 <div class="col-sm-6">
60 <fieldset class="rows">
63 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id | html %][% ELSE %]N/A[% END %]
66 <label for="template_code">Template code:</label>
67 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code | html %]" />
70 <label for="template_desc">Template description:</label>
71 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc | html %]</textarea>
74 <label for="units">Units:</label>
75 <select id="units" name="units">
76 [% FOREACH unit IN units %]
77 [% IF ( unit.selected ) %]
78 <option value="[% unit.type | html %]" selected="selected">
80 <option value="[% unit.type | html %]">
83 [% SWITCH unit.type %]
85 <span>PostScript points</span>
89 <span>US Inches</span>
91 <span>SI Millimeters</span>
93 <span>SI Centimeters</span>
100 <label for="page_height">Page height:</label>
101 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height | html %]" />
104 <label for="page_width">Page width:</label>
105 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width | html %]" />
108 <label for="label_width">Label width:</label>
109 <input type="text" size="4" name="label_width" id="label_width" value="[% label_width | html %]" />
112 <label for="label_height">Label height:</label>
113 <input type="text" size="4" name="label_height" id="label_height" value="[% label_height | html %]" />
119 <div class="col-sm-6">
120 <fieldset class="rows">
122 <label for="top_margin">Top page margin:</label>
123 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin | html %]" />
126 <label for="left_margin">Left page margin:</label>
127 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin | html %]" />
130 <label for="top_text_margin">Top text margin:</label>
131 <input type="text" size="4" name="top_text_margin" id="top_text_margin" value="[% top_text_margin | html %]" />
134 <label for="left_text_margin">Left text margin:</label>
135 <input type="text" size="4" name="left_text_margin" id="left_text_margin" value="[% left_text_margin | html %]" />
138 <label for="cols">Number of columns:</label>
139 <input type="text" size="4" name="cols" id="cols" value="[% cols | html %]" />
142 <label for="rows">Number of rows:</label>
143 <input type="text" size="4" name="rows" id="rows" value="[% rows | html %]" />
146 <label for="col_gap">Gap between columns:</label>
147 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap | html %]" />
150 <label for="row_gap">Gap between rows:</label>
151 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap | html %]" />
155 <label for="profile_id">Profile:</label>
156 [% IF ( profile_list ) %]
157 <select id="profile_id" name="profile_id">
158 [% FOREACH profile_lis IN profile_list %]
159 [% IF ( profile_lis.selected ) %]
160 <option value="[% profile_lis.profile_id | html %]" selected="selected">
162 <option value="[% profile_lis.profile_id | html %]">
164 [% profile_lis.printer_name | html %]/[% profile_lis.paper_bin | html %]
169 [% IF ( profile_list.size == 1 ) %]
171 <a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Make a new printer profile.</a>
178 <fieldset class="action">
179 <input type="submit" class="btn btn-primary" value="Save" /><a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Cancel</a>
180 <input type="hidden" name="op" value="save" />
181 [% IF ( template_id ) %]
182 <input type="hidden" name="template_id" value="[% template_id | html %]" />
188 </div> <!-- /.col-sm-10.col-sm-push-2 -->
190 <div class="col-sm-2 col-sm-pull-10">
192 [% INCLUDE 'cat-menu.inc' %]
194 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
195 </div> <!-- /.row -->
197 [% MACRO jsinclude BLOCK %]
199 $(document).ready(function(){
200 $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current");
201 var selectedUnit = $("#units option:selected").val();
202 var unitfields = $("#page_height,#page_width,#label_width,#label_height,#top_margin,#left_margin,#top_text_margin,#left_text_margin,#col_gap,#row_gap");
203 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
204 $("#units").change(function(){
205 $(".unit").html(getUnit($(this).val()));
208 function getUnit(unit){
233 [% INCLUDE 'intranet-bottom.inc' %]