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