Lines 214-270
Link Here
|
214 |
|
214 |
|
215 |
[% IF item_templates.owned.count || item_templates.shared.count %] |
215 |
[% IF item_templates.owned.count || item_templates.shared.count %] |
216 |
<div id="item-template-toolbar" class="btn-toolbar"> |
216 |
<div id="item-template-toolbar" class="btn-toolbar"> |
217 |
<div class="btn-group"> |
217 |
<select name="template_id" id="template_id" class="select2" style="width: 20em"> |
218 |
<select name="template_id" id="template_id" class="select2" style="width: 20em"> |
218 |
<option value="0" selected="selected">Do not use template</option> |
219 |
<option value="0" selected="selected">Do not use template</option> |
219 |
<optgroup label="My templates"> |
220 |
<optgroup label="My templates"> |
220 |
[% FOREACH t IN item_templates.owned %] |
221 |
[% FOREACH t IN item_templates.owned %] |
221 |
[% IF t.id == template_id %] |
222 |
[% IF t.id == template_id %] |
222 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
223 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
223 |
[% ELSE %] |
|
|
224 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
225 |
[% END %] |
226 |
[% END %] |
227 |
</optgroup> |
228 |
<optgroup label="Shared templates"> |
229 |
[% FOREACH t IN item_templates.shared %] |
230 |
[% IF t.id == template_id %] |
231 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
232 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
224 |
[% ELSE %] |
233 |
[% ELSE %] |
225 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
234 |
<option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
226 |
[% END %] |
235 |
[% END %] |
227 |
[% END %] |
236 |
[% ELSE %] |
228 |
</optgroup> |
237 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
229 |
<optgroup label="Shared templates"> |
238 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option> |
230 |
[% FOREACH t IN item_templates.shared %] |
|
|
231 |
[% IF t.id == template_id %] |
232 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
233 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
234 |
[% ELSE %] |
235 |
<option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
236 |
[% END %] |
237 |
[% ELSE %] |
239 |
[% ELSE %] |
238 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
240 |
<option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option> |
239 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option> |
|
|
240 |
[% ELSE %] |
241 |
<option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option> |
242 |
[% END %] |
243 |
[% END %] |
241 |
[% END %] |
244 |
[% END %] |
242 |
[% END %] |
245 |
</optgroup> |
243 |
[% END %] |
246 |
</select> |
244 |
</optgroup> |
247 |
</div> |
245 |
</select> |
248 |
<div class="btn-group"> |
246 |
<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> |
249 |
<button type="submit" id="load_template_submit" name="load_template_submit" value="1"><i class="fa-solid fa-table-list"></i> Apply template</button> |
247 |
<div> |
250 |
</div> |
|
|
251 |
<div class="btn-group"> |
252 |
<label for="use_template_for_session"> |
248 |
<label for="use_template_for_session"> |
253 |
[% IF use_template_for_session %] |
249 |
[% IF use_template_for_session %] |
254 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" checked="checked"> |
250 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session" checked="checked"> |
255 |
[% ELSE %] |
251 |
[% ELSE %] |
256 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session"> |
252 |
<input type="checkbox" id="use_template_for_session" name="use_template_for_session"> |
257 |
[% END %] |
253 |
[% END %] |
258 |
For session</label> |
254 |
Remember for session |
|
|
255 |
</label> |
259 |
</div> |
256 |
</div> |
260 |
|
257 |
|
261 |
<div class="btn-group"> |
258 |
<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> |
262 |
<button type="submit" id="unload_template_submit" name="unload_template_submit" value="1"><i class="fa fa-eraser"></i> Clear template</button> |
259 |
<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> |
263 |
</div> |
|
|
264 |
|
265 |
<div class="btn-group"> |
266 |
<button type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash-can"></i> Delete template</button> |
267 |
</div> |
268 |
</div> |
260 |
</div> |
269 |
[% END %] |
261 |
[% END %] |
270 |
|
262 |
|
271 |
- |
|
|