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