Bug 33914: Improve translation of title tags: Course reserves
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / add_items-step2.tt
1 [% USE raw %]
2 [% USE HtmlTags %]
3 [% USE Branches %]
4 [% PROCESS 'i18n.inc' %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% FILTER collapse %]
8     [% IF is_edit || course_reserve %]
9         [% t("Edit reserve") | html %]
10     [% ELSE %]
11         [% t("Add reserves") | html %]
12     [% END %] &rsaquo;
13     [% course.course_name | html %] &rsaquo;
14     [% t("Course reserves") | html %] &rsaquo;
15     [% t("Koha") | html %]
16 [% END %]</title>
17 [% INCLUDE 'doc-head-close.inc' %]
18 </head>
19
20 <body id="courses_add_items_step2" class="course">
21
22 [% WRAPPER 'header.inc' %]
23     [% INCLUDE 'cat-search.inc' %]
24 [% END %]
25
26 [% WRAPPER 'sub-header.inc' %]
27     [% WRAPPER breadcrumbs %]
28         [% WRAPPER breadcrumb_item %]
29             <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
30         [% END %]
31         [% WRAPPER breadcrumb_item %]
32             <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | uri %]">[% course.course_name | html %]</a>
33         [% END %]
34         [% WRAPPER breadcrumb_item bc_active= 1 %]
35             [% IF is_edit || course_reserve %]
36                 [% tp("Edit course reserve", "Edit") | html %]
37             [% ELSE %]
38                 [% tp("Place course reserve", "Reserve") | html %]
39             [% END %]
40                 [% biblio.title | html | $HtmlTags tag="em" %]
41         [% END %]
42     [% END #/ WRAPPER breadcrumbs %]
43 [% END #/ WRAPPER sub-header.inc %]
44
45 <div class="main container-fluid">
46     <div class="row">
47         <div class="col-md-8 col-md-offset-2">
48             <h1>
49                 [% IF is_edit || course_reserve %]<span>Edit</span> [% ELSE %]<span>Reserve</span> [% END %]<em>[% biblio.title | html %]</em> for <em>[% course.course_name | html %]</em>
50             </h1>
51
52         [% IF course_reserve && !is_edit%]<div class="dialog message" id="already_on_reserve_this">This course already has this item on reserve.</div>[% END %]
53         [% IF course_item %]
54             [% IF item %]
55                 <div class="dialog message" id="already_on_reserve">Number of courses reserving this item: [% course_item.course_reserves.count | html %]</div>
56             [% ELSE %]
57                 <div class="dialog message" id="already_on_reserve">Number of courses reserving this bibliographic record: [% course_item.course_reserves.count | html %]</div>
58             [% END %]
59         [% END %]
60
61         <form method="post" action="/cgi-bin/koha/course_reserves/add_items.pl">
62             <input type="hidden" name="course_id" value="[% course.course_id | html %]" />
63             <input type="hidden" name="return" value="[% return | html %]" />
64             <input type="hidden" name="action" value="add" />
65
66             [% IF item # adding an item to course items %]
67
68             <fieldset class="rows">
69                 [% IF is_edit || course_reserve %]
70                     <legend>Edit <em>[% biblio.title | html %]</em> in <em>[% course.course_name | html %]</em></legend>
71                 [% ELSE %]
72                     <legend>Add <em>[% biblio.title | html %]</em> to <em>[% course.course_name | html %]</em></legend>
73                 [% END %]
74                 <ol>
75                     <li>
76                         <span class="label">Barcode:</span>
77                         <span id="barcode">[% item.barcode | html %]</span>
78                         <input type="hidden" name="itemnumber" value="[% item.itemnumber | html %]" />
79                     </li>
80
81                     [% IF item_level_itypes %]
82                     <li>
83                         <label class="required" for="itype">Item type:</label>
84
85                         [% IF course_item.itype_enabled %]
86                             <input type="checkbox" class="field-toggle" data-pulldown="itype" value="1" name="itype_enabled" id="itype_enabled" checked="checked" />
87                         [% ELSE %]
88                             <input type="checkbox" class="field-toggle" data-pulldown="itype" value="1" name="itype_enabled" id="itype_enabled" />
89                         [% END %]
90
91                         [% IF course_item.itype_enabled %]
92                             <select id="itype" name="itype">
93                         [% ELSE %]
94                             <select id="itype" name="itype" disabled="disabled">
95                         [% END %]
96
97                             <option value=""></option>
98                             [% FOREACH it IN itypes %]
99                                 [% IF it.itemtype == course_item.itype %]
100                                     <option value="[% it.itemtype | html %]" selected="selected">[% it.description | html %]</option>
101                                 [% ELSE %]
102                                     <option value="[% it.itemtype | html %]">[% it.description | html %]</option>
103                                 [% END %]
104                             [% END %]
105                         </select>
106                     </li>
107                     [% END %]
108
109                     <li>
110                         <label class="required" for="ccode">Collection:</label>
111
112                         [% IF course_item.ccode_enabled %]
113                             <input type="checkbox" class="field-toggle" data-pulldown="ccode" value="1" name="ccode_enabled" id="ccode_enabled" checked="checked" />
114                         [% ELSE %]
115                             <input type="checkbox" class="field-toggle" data-pulldown="ccode" value="1" name="ccode_enabled" id="ccode_enabled" />
116                         [% END %]
117
118                         [% IF course_item.ccode_enabled %]
119                             <select id="ccode" name="ccode">
120                         [% ELSE %]
121                             <select id="ccode" name="ccode" disabled="disabled">
122                         [% END %]
123
124                             <option value=""></option>
125                             [% FOREACH c IN ccodes %]
126                                 [% IF c.authorised_value == course_item.ccode %]
127                                     <option value="[% c.authorised_value | html %]" selected="selected">[% c.lib | html %]</option>
128                                 [% ELSE %]
129                                     <option value="[% c.authorised_value | html %]">[% c.lib | html %]</option>
130                                 [% END %]
131                             [% END %]
132                         </select>
133                     </li>
134
135                     <li>
136                         <label class="required" for="location">Shelving location:</label>
137
138                         [% IF course_item.location_enabled %]
139                             <input type="checkbox" class="field-toggle" data-pulldown="location" value="1" name="location_enabled" id="location_enabled" checked="checked" />
140                         [% ELSE %]
141                             <input type="checkbox" class="field-toggle" data-pulldown="location"  value="1" name="location_enabled" id="location_enabled" />
142                         [% END %]
143
144                         [% IF course_item.location_enabled %]
145                             <select id="location" name="location">
146                         [% ELSE %]
147                             <select id="location" name="location" disabled="disabled">
148                         [% END %]
149
150                             <option value=""></option>
151                             [% FOREACH s IN locations %]
152                                 [% IF s.authorised_value == course_item.location %]
153                                     <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
154                                 [% ELSE %]
155                                     <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
156                                 [% END %]
157                             [% END %]
158                         </select>
159                     </li>
160
161                     <li>
162                         <label class="required" for="homebranch">Home library:</label>
163
164                         [% IF course_item.homebranch_enabled %]
165                             <input type="checkbox" value="1" class="field-toggle" data-pulldown="homebranch" name="homebranch_enabled" id="homebranch_enabled" checked />
166                         [% ELSE %]
167                             <input type="checkbox" value="1" class="field-toggle" data-pulldown="homebranch" name="homebranch_enabled" id="homebranch_enabled" />
168                         [% END %]
169
170                         [% IF course_item.homebranch_enabled %]
171                             <select id="homebranch" name="homebranch">
172                         [% ELSE %]
173                             <select id="homebranch" name="homebranch" disabled="disabled">
174                         [% END %]
175
176                             <option value=""></option>
177                             [% FOREACH b IN Branches.all() %]
178                                 [% IF course_item.homebranch.defined && ( ( course.enabled == 'yes' && b.branchcode == item.homebranch ) || ( course.enabled == 'no' && b.branchcode == course_item.homebranch ) ) %]
179                                     <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
180                                 [% ELSE %]
181                                     <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
182                                 [% END %]
183                             [% END %]
184                         </select>
185                     </li>
186
187                     <li>
188                         <label class="required" for="holdingbranch">Holding library:</label>
189
190                         [% IF course_item.holdingbranch_enabled %]
191                             <input type="checkbox" value="1" class="field-toggle" data-pulldown="holdingbranch" name="holdingbranch_enabled" id="holdingbranch_enabled" checked="checked" />
192                         [% ELSE %]
193                             <input type="checkbox" value="1" class="field-toggle" data-pulldown="holdingbranch" name="holdingbranch_enabled" id="holdingbranch_enabled" />
194                         [% END %]
195
196                         [% IF course_item.holdingbranch_enabled %]
197                             <select id="holdingbranch" name="holdingbranch">
198                         [% ELSE %]
199                             <select id="holdingbranch" name="holdingbranch" disabled="disabled">
200                         [% END %]
201
202                             <option value=""></option>
203                             [% FOREACH b IN Branches.all() %]
204                                 [% IF b.branchcode == course_item.holdingbranch %]
205                                     <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
206                                 [% ELSE %]
207                                     <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
208                                 [% END %]
209                             [% END %]
210                         </select>
211                     </li>
212
213                     <li>
214                         <label for="staff_note">Staff note:</label>
215                         <textarea name="staff_note" id="staff_note">[% course_reserve.staff_note | html %]</textarea>
216                     </li>
217
218                     <li>
219                         <label for="public_note">Public note:</label>
220                         <textarea name="public_note" id="public_note">[% course_reserve.public_note | html %]</textarea>
221                     </li>
222
223                 </ol>
224             </fieldset>
225                  <p>
226                     Checking the box next to the field label will enable changes to that field. Leave boxes unchecked to make no change.<br>
227                     Any items with existing course reserves will have their <em>on reserve</em> values updated.
228                 </p>
229
230             [% ELSE # adding a biblio to course items %]
231
232             <fieldset class="rows">
233                 [% IF is_edit || course_reserve %]
234                     <legend>Edit <em>[% biblio.title | html %]</em> in <em>[% course.course_name | html %]</em></legend>
235                 [% ELSE %]
236                     <legend>Add <em>[% biblio.title | html %]</em> to <em>[% course.course_name | html %]</em></legend>
237                 [% END %]
238                 <ol>
239                     <li>
240                         <span class="label">Biblionumber:</span>
241                         <span id="biblionumber">[% biblio.biblionumber | html %]</span>
242                         <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
243                     </li>
244
245                     <li>
246                         <label for="staff_note">Staff note:</label>
247                         <textarea name="staff_note" id="staff_note">[% course_reserve.staff_note | html %]</textarea>
248                     </li>
249
250                     <li>
251                         <label for="public_note">Public note:</label>
252                         <textarea name="public_note" id="public_note">[% course_reserve.public_note | html %]</textarea>
253                     </li>
254
255                 </ol>
256             </fieldset>
257
258             [% END %]
259             <fieldset class="action">
260                 <input type="submit" id="submit" value="Save" class="btn btn-primary focus" />
261
262                 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% course.course_id | uri %]" class="cancel">Cancel</a>
263             </fieldset>
264         </form>
265     </div>
266 </div>
267
268 [% MACRO jsinclude BLOCK %]
269     <script>
270         $(document).ready(function(){
271             $('.field-toggle').change(function() {
272                 if( this.checked ) {
273                     $('#' + $(this).data('pulldown') ).removeAttr('disabled');
274                 } else {
275                     $('#' + $(this).data('pulldown') ).val('');
276                     $('#' + $(this).data('pulldown') ).attr('disabled', 'disabled');
277                 }
278             });
279         });
280     </script>
281 [% END %]
282
283 [% INCLUDE 'intranet-bottom.inc' %]