2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Tools › Label creator › Templates › [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]New[% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
7 <body id="labels_label-edit-template" class="tools labels">
8 [% INCLUDE 'header.inc' %]
9 [% INCLUDE 'cat-search.inc' %]
10 <div id="breadcrumbs">
11 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
12 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
13 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
14 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a> ›
15 [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]New[% END %]
18 <div class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
22 [% INCLUDE 'labels-toolbar.inc' %]
24 <h3>Edit label template</h3>
25 <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
27 <div class="col-sm-6">
28 <fieldset class="rows">
31 <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id %][% ELSE %]N/A[% END %]
34 <label for="template_code">Template code:</label>
35 <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code %]" />
38 <label for="template_desc">Template description:</label>
39 <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc %]</textarea>
42 <label for="units">Units:</label>
43 <select id="units" name="units">
44 [% FOREACH unit IN units %]
45 [% IF ( unit.selected ) %]
46 <option value="[% unit.type %]" selected="selected">
48 <option value="[% unit.type %]">
51 [% SWITCH unit.type %]
53 <span>PostScript Points</span>
55 <span>Adobe Agates</span>
57 <span>US Inches</span>
59 <span>SI Millimeters</span>
61 <span>SI Centimeters</span>
68 <label for="page_height">Page height:</label>
69 <input type="text" size="4" name="page_height" id="page_height" value="[% page_height %]" />
72 <label for="page_width">Page width:</label>
73 <input type="text" size="4" name="page_width" id="page_width" value="[% page_width %]" />
76 <label for="label_width">Label width:</label>
77 <input type="text" size="4" name="label_width" id="label_width" value="[% label_width %]" />
80 <label for="label_height">Label height:</label>
81 <input type="text" size="4" name="label_height" id="label_height" value="[% label_height %]" />
87 <div class="col-sm-6">
88 <fieldset class="rows">
90 <label for="top_margin">Top page margin:</label>
91 <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin %]" />
94 <label for="left_margin">Left page margin:</label>
95 <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin %]" />
98 <label for="top_text_margin">Top text margin:</label>
99 <input type="text" size="4" name="top_text_margin" id="top_text_margin" value="[% top_text_margin %]" />
102 <label for="left_text_margin">Left text margin:</label>
103 <input type="text" size="4" name="left_text_margin" id="left_text_margin" value="[% left_text_margin %]" />
106 <label for="cols">Number of columns:</label>
107 <input type="text" size="4" name="cols" id="cols" value="[% cols %]" />
110 <label for="rows">Number of rows:</label>
111 <input type="text" size="4" name="rows" id="rows" value="[% rows %]" />
114 <label for="col_gap">Gap between columns:</label>
115 <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap %]" />
118 <label for="row_gap">Gap between rows:</label>
119 <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap %]" />
123 <label for="profile_id">Profile:</label>
124 [% IF ( profile_list ) %]
125 <select id="profile_id" name="profile_id">
126 [% FOREACH profile_lis IN profile_list %]
127 [% IF ( profile_lis.selected ) %]
128 <option value="[% profile_lis.profile_id %]" selected="selected">
130 <option value="[% profile_lis.profile_id %]">
132 [% profile_lis.printer_name %]/[% profile_lis.paper_bin %]
137 <a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Click here to define a printer profile.</a>
144 <fieldset class="action">
145 <input type="submit" class="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Cancel</a>
146 <input type="hidden" name="op" value="save" />
147 [% IF ( template_id ) %]
148 <input type="hidden" name="template_id" value="[% template_id %]" />
154 </div> <!-- /.col-sm-10.col-sm-push-2 -->
156 <div class="col-sm-2 col-sm-pull-10">
158 [% INCLUDE 'tools-menu.inc' %]
160 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
161 </div> <!-- /.row -->
163 [% MACRO jsinclude BLOCK %]
164 [% Asset.js("js/tools-menu.js") %]
166 $(document).ready(function(){
167 var selectedUnit = $("#units option:selected").attr("value");
168 var unitfields = $("#page_height,#page_width,#label_width,#label_height,#top_margin,#left_margin,#top_text_margin,#left_text_margin,#col_gap,#row_gap");
169 $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
170 $("#units").change(function(){
171 $(".unit").html(getUnit($(this).val()));
174 function getUnit(unit){
199 [% INCLUDE 'intranet-bottom.inc' %]