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