Lines 169-186
Link Here
|
169 |
<optgroup label="My templates"> |
169 |
<optgroup label="My templates"> |
170 |
[% FOREACH t IN item_templates.owned %] |
170 |
[% FOREACH t IN item_templates.owned %] |
171 |
[% IF t.id == template_id %] |
171 |
[% IF t.id == template_id %] |
172 |
<option data-owner="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
172 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
173 |
[% ELSE %] |
173 |
[% ELSE %] |
174 |
<option data-owner="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
174 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
175 |
[% END %] |
175 |
[% END %] |
176 |
[% END %] |
176 |
[% END %] |
177 |
</optgroup> |
177 |
</optgroup> |
178 |
<optgroup label="Shared templates"> |
178 |
<optgroup label="Shared templates"> |
179 |
[% FOREACH t IN item_templates.shared %] |
179 |
[% FOREACH t IN item_templates.shared %] |
180 |
[% IF t.id == template_id %] |
180 |
[% IF t.id == template_id %] |
181 |
<option data-owner="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
181 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
|
|
182 |
<option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
183 |
[% ELSE %] |
184 |
<option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option> |
185 |
[% END %] |
182 |
[% ELSE %] |
186 |
[% ELSE %] |
183 |
<option data-owner="0" value="[% t.id | html %]">[% t.name | html %]</option> |
187 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates %] |
|
|
188 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option> |
189 |
[% ELSE %] |
190 |
<option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option> |
191 |
[% END %] |
184 |
[% END %] |
192 |
[% END %] |
185 |
[% END %] |
193 |
[% END %] |
186 |
</optgroup> |
194 |
</optgroup> |
Lines 262-271
Link Here
|
262 |
<fieldset id="save_as_template_span"> |
270 |
<fieldset id="save_as_template_span"> |
263 |
<legend>Save template</legend> |
271 |
<legend>Save template</legend> |
264 |
<select name="replace_template_id" id="replace_template_id" class="select2" style="width: 20em"> |
272 |
<select name="replace_template_id" id="replace_template_id" class="select2" style="width: 20em"> |
265 |
<option value="0" selected="selected">Save as new</option> |
273 |
<option value="0" selected="selected">Save as new template</option> |
266 |
<optgroup label="Update existing"> |
274 |
<optgroup label="Update existing template"> |
267 |
[% FOREACH t IN item_templates.owned %] |
275 |
[% FOREACH t IN item_templates.owned %] |
268 |
<option data-owner="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
276 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
|
|
277 |
[% END %] |
278 |
[% IF CAN_user_editcatalogue_manage_item_editor_templates && item_templates.shared.count %] |
279 |
<optgroup label="Update shared template"> |
280 |
[% FOREACH t IN item_templates.shared %] |
281 |
<option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option> |
282 |
[% END %] |
283 |
</optgroup> |
269 |
[% END %] |
284 |
[% END %] |
270 |
</optgroup> |
285 |
</optgroup> |
271 |
</select> |
286 |
</select> |