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