Bug 33384: Use template wrapper for breadcrumbs: Labels
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-edit-profile.tt
1 [% USE raw %]
2 [% SET footerjs = 1 %]
3     [% INCLUDE 'doc-head-open.inc' %]
4     <title>[% IF ( profile_id ) %]Edit printer profile [% profile_id | html %] [% ELSE %] New printer profile [% END%] &rsaquo; Profiles &rsaquo; Label creator &rsaquo; Cataloging &rsaquo; Koha</title>
5     [% INCLUDE 'doc-head-close.inc' %]
6 </head>
7
8 <body id="labels_label-edit-profile" class="tools labels">
9     [% WRAPPER 'header.inc' %]
10     [% INCLUDE 'cat-search.inc' %]
11 [% END %]
12
13 [% WRAPPER 'sub-header.inc' %]
14     [% WRAPPER breadcrumbs %]
15         [% WRAPPER breadcrumb_item %]
16             <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
17         [% END %]
18         [% WRAPPER breadcrumb_item %]
19             <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
20         [% END %]
21         [% WRAPPER breadcrumb_item %]
22                 <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Profiles</a>
23         [% END %]
24         [% WRAPPER breadcrumb_item bc_active= 1 %]
25             [% IF ( profile_id ) %]
26                 <span>Edit printer profile [% profile_id | html %]</span>
27             [% ELSE %]
28                 <span>New printer profile</span>
29             [% END%]
30         [% END %]
31     [% END #/ WRAPPER breadcrumbs %]
32 [% END #/ WRAPPER sub-header.inc %]
33
34     <div class="main container-fluid">
35         <div class="row">
36             <div class="col-sm-10 col-sm-push-2">
37                 <main>
38
39                     [% INCLUDE 'labels-toolbar.inc' %]
40
41                     [% IF ( profile_id ) %]
42                         <h1>Edit printer profile [% profile_id | html %]</h1>
43                     [% ELSE %]
44                         <h1>New printer profile</h1>
45                     [% END%]
46
47                     <form name="input" action="/cgi-bin/koha/labels/label-edit-profile.pl" method="get">
48                                     <fieldset class="rows"><legend>Profile settings</legend>
49                                         <ol>
50                                             <li>
51                                                 [% IF ( profile_id ) %]
52                                                  <span class="label">Printer name:</span>[% printer_name | html %]
53                                                 <input type="hidden" name="printer_name" value="[% printer_name | html %]" />
54                                                 [% ELSE %]
55                                                 <label for="printer_name">Printer name:</label><input type="text"  size="20" name="printer_name" id="printer_name" />
56                                                 [% END %]
57                                             </li>
58                                             <li>
59                                                 [% IF ( profile_id ) %]
60                                                                                                 <span class="label">Paper bin:</span> [% paper_bin | html %]
61                                                 <input type="hidden" name="paper_bin" value="[% paper_bin | html %]" />
62                                                 [% ELSE %]
63                                                 <label for="paper_bin">Paper bin:</label><input type="text"  size="20" name="paper_bin" id="paper_bin" />
64                                                 [% END %]
65                                             </li>
66                                             <li>
67                                                 [% IF ( label_template ) %]
68                                                  <label for="template_name">Template name:</label> [% label_template | html %]
69                                                 [% ELSE %]
70                                                  <span class="label">Template name:</span> Profile unassigned
71                                                 [% END %]
72                                             </li>
73                                             <li>
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">
79                                                     [% ELSE %]
80                                                     <option value="[% unit.type | html %]">
81                                                     [% END %]
82                                                     [% SWITCH unit.type %]
83                                                     [%   CASE 'POINT' %]
84                                                         <span>PostScript points</span>
85                                                     [%   CASE 'AGATE' %]
86                                                         <span>Agates</span>
87                                                     [%   CASE 'INCH' %]
88                                                         <span>US Inches</span>
89                                                     [%   CASE 'MM' %]
90                                                         <span>SI Millimeters</span>
91                                                     [%   CASE 'CM' %]
92                                                         <span>SI Centimeters</span>
93                                                     [% END %]
94                                                     </option>
95                                                     [% END %]
96                                                 </select>
97                                             </li>
98                                          </ol>
99                                                                                 </fieldset>
100
101                                                                                 <fieldset class="rows"><legend>Offset:</legend>
102                                                                                 <ol>
103                                             <li>
104                                                 <label for="offset_horz">Horizontal: </label><input type="text"  size="4" name="offset_horz" id="offset_horz" value="[% offset_horz | html %]" />
105                                             </li>
106                                             <li>
107                                                 <label for="offset_vert">Vertical: </label><input type="text" size="4" name="offset_vert" id="offset_vert" value="[% offset_vert | html %]" />
108                                             </li>
109                                          </ol>
110                                                                                 </fieldset>
111
112                                                                                 <fieldset class="rows"><legend>Creep:</legend>
113                                                                                 <ol>
114                                             <li>
115                                                 <label for="creep_horz">Horizontal: </label><input type="text"  size="4" name="creep_horz" id="creep_horz" value="[% creep_horz | html %]" />
116                                             </li>
117                                             <li>
118                                                 <label for="creep_vert">Vertical: </label><input type="text" size="4" name="creep_vert" id="creep_vert" value="[% creep_vert | html %]" />
119                                             </li>
120                                         </ol>
121                                     </fieldset>
122                                     <fieldset class="action">
123                                         <input type="submit" class="btn btn-primary" value="Save" />
124                                         <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile" class="cancel">Cancel</a>
125                                         <input type="hidden" name="op" value="save" />
126                                         <input type="hidden" name="profile_id" value="[% profile_id | html %]" />
127                                     </fieldset>
128                     </form>
129
130             </main>
131         </div> <!-- /.col-sm-10.col-sm-push-2 -->
132
133         <div class="col-sm-2 col-sm-pull-10">
134             <aside>
135                 [% INCLUDE 'cat-menu.inc' %]
136             </aside>
137         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
138      </div> <!-- /.row -->
139
140 [% MACRO jsinclude BLOCK %]
141     <script>
142         $(document).ready(function(){
143             $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current");
144             var selectedUnit = $("#units option:selected").val();
145             var unitfields = $("#offset_horz,#offset_vert,#creep_horz,#creep_vert");
146             $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
147             $("#units").change(function(){
148                 $(".unit").html(getUnit($(this).val()));
149             });
150         });
151         function getUnit(unit){
152             switch(unit){
153                 case "POINT":
154                     var unit = " pt";
155                     break;
156                 case "AGATE":
157                     var unit = " ag";
158                     break;
159                 case "INCH":
160                     var unit = " in";
161                     break;
162                 case "MM":
163                     var unit = " mm";
164                     break;
165                 case "CM":
166                     var unit = " cm";
167                     break;
168                 default:
169                     var unit = "";
170             }
171             return unit;
172         }
173     </script>
174 [% END %]
175
176 [% INCLUDE 'intranet-bottom.inc' %]