Lines 242-299
Link Here
|
242 |
|
242 |
|
243 |
[% IF item_templates.owned.count || item_templates.shared.count %] |
243 |
[% IF item_templates.owned.count || item_templates.shared.count %] |
244 |
<div id="item-template-toolbar" class="btn-toolbar"> |
244 |
<div id="item-template-toolbar" class="btn-toolbar"> |
245 |
<div class="btn-group"> |
245 |
<select name="template_id" id="template_id" class="select2" style="width: 20em"> |
246 |
<select name="template_id" id="template_id" class="select2" style="width: 20em"> |
246 |
<option value="0" selected="selected">Do not use template</option> |
247 |
<option value="0" selected="selected">Do not use template</option> |
247 |
<optgroup label="My templates"> |
248 |
<optgroup label="My templates"> |
248 |
[% FOREACH t IN item_templates.owned %] |
249 |
[% FOREACH t IN item_templates.owned %] |
249 |
[% IF t.id == template_id %] |
250 |
[% IF t.id == template_id %] |
250 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option> |
251 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option> |
251 |
[% ELSE %] |
|
|
252 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option> |
253 |
[% END %] |
254 |
[% END %] |
255 |
</optgroup> |
256 |
<optgroup label="Shared templates"> |
257 |
[% FOREACH t IN item_templates.shared %] |
258 |
[% IF t.id == template_id %] |
259 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
260 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
252 |
[% ELSE %] |
261 |
[% ELSE %] |
253 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %](shared)[% END %]</option> |
262 |
<option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
254 |
[% END %] |
263 |
[% END %] |
255 |
[% END %] |
264 |
[% ELSE %] |
256 |
</optgroup> |
265 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
257 |
<optgroup label="Shared templates"> |
266 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option> |
258 |
[% FOREACH t IN item_templates.shared %] |
|
|
259 |
[% IF t.id == template_id %] |
260 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
261 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
262 |
[% ELSE %] |
263 |
<option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
264 |
[% END %] |
265 |
[% ELSE %] |
267 |
[% ELSE %] |
266 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
268 |
<option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option> |
267 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option> |
|
|
268 |
[% ELSE %] |
269 |
<option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option> |
270 |
[% END %] |
271 |
[% END %] |
269 |
[% END %] |
272 |
[% END %] |
270 |
[% END %] |
273 |
</optgroup> |
271 |
[% END %] |
274 |
</select> |
272 |
</optgroup> |
275 |
</div> |
273 |
</select> |
276 |
<div class="btn-group"> |
274 |
<button class="btn btn-default" type="submit" id="load_template_submit" name="load_template_submit" value="1"><i class="fa-solid fa-table-list"></i> Apply template</button> |
277 |
<button type="submit" id="load_template_submit" name="load_template_submit" value="1"><i class="fa-solid fa-table-list"></i> Apply template</button> |
275 |
<div> |
278 |
</div> |
|
|
279 |
<div class="btn-group"> |
280 |
<label for="use_template_for_session"> |
276 |
<label for="use_template_for_session"> |
281 |
[% IF use_template_for_session %] |
277 |
[% IF use_template_for_session %] |
282 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" checked="checked" /> |
278 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" checked="checked" /> |
283 |
[% ELSE %] |
279 |
[% ELSE %] |
284 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" /> |
280 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" /> |
285 |
[% END %] |
281 |
[% END %] |
286 |
For session</label |
282 |
Remember for session |
287 |
> |
283 |
</label> |
288 |
</div> |
284 |
</div> |
289 |
|
285 |
|
290 |
<div class="btn-group"> |
286 |
<button class="btn btn-default" ype="submit" id="unload_template_submit" name="unload_template_submit" value="1"><i class="fa fa-eraser"></i> Clear template</button> |
291 |
<button type="submit" id="unload_template_submit" name="unload_template_submit" value="1"><i class="fa fa-eraser"></i> Clear template</button> |
287 |
<button class="btn btn-default" type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash-can"></i> Delete template</button> |
292 |
</div> |
|
|
293 |
|
294 |
<div class="btn-group"> |
295 |
<button type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash-can"></i> Delete template</button> |
296 |
</div> |
297 |
</div> |
288 |
</div> |
298 |
[% END %] |
289 |
[% END %] |
299 |
|
290 |
|
300 |
- |
|
|