View | Details | Raw Unified | Return to bug 32188
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-46 / +46 lines)
Lines 163-222 Link Here
163
        <h2 id="edititem">Edit item #[% itemnumber | html %][% IF ( barcode ) %] / Barcode [% barcode | html %][% END %]</h2>
163
        <h2 id="edititem">Edit item #[% itemnumber | html %][% IF ( barcode ) %] / Barcode [% barcode | html %][% END %]</h2>
164
    [% END %]
164
    [% END %]
165
165
166
    <div id="item-template-toolbar" class="btn-toolbar">
166
    [% IF item_templates.owned.count || item_templates.shared.count %]
167
        <div class="btn-group">
167
        <div id="item-template-toolbar" class="btn-toolbar">
168
            <select name="template_id" id="template_id" class="select2" style="width: 20em">
168
            <div class="btn-group">
169
                <option value="0" selected="selected">Do not use template</option>
169
                <select name="template_id" id="template_id" class="select2" style="width: 20em">
170
                <optgroup label="My templates">
170
                    <option value="0" selected="selected">Do not use template</option>
171
                    [% FOREACH t IN item_templates.owned %]
171
                    <optgroup label="My templates">
172
                        [% IF t.id == template_id %]
172
                        [% FOREACH t IN item_templates.owned %]
173
                            <option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option>
173
                            [% IF t.id == template_id %]
174
                        [% ELSE %]
174
                                <option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option>
175
                            <option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option>
176
                        [% END %]
177
                    [% END %]
178
                </optgroup>
179
                <optgroup label="Shared templates">
180
                    [% FOREACH t IN item_templates.shared %]
181
                        [% IF t.id == template_id %]
182
                            [% IF CAN_user_editcatalogue_manage_item_editor_templates %]
183
                                <option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
184
                            [% ELSE %]
175
                            [% ELSE %]
185
                                <option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
176
                                <option data-editor="1" value="[% t.id | html %]">[% t.name | html %][% IF t.is_shared %] (shared)[% END %]</option>
186
                            [% END %]
177
                            [% END %]
187
                        [% ELSE %]
178
                        [% END %]
188
                            [% IF CAN_user_editcatalogue_manage_item_editor_templates %]
179
                    </optgroup>
189
                                <option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option>
180
                    <optgroup label="Shared templates">
181
                        [% FOREACH t IN item_templates.shared %]
182
                            [% IF t.id == template_id %]
183
                                [% IF CAN_user_editcatalogue_manage_item_editor_templates %]
184
                                    <option data-editor="1" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
185
                                [% ELSE %]
186
                                    <option data-editor="0" value="[% t.id | html %]" selected="selected">[% t.name | html %]</option>
187
                                [% END %]
190
                            [% ELSE %]
188
                            [% ELSE %]
191
                                <option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option>
189
                                [% IF CAN_user_editcatalogue_manage_item_editor_templates %]
190
                                    <option data-editor="1" value="[% t.id | html %]">[% t.name | html %]</option>
191
                                [% ELSE %]
192
                                    <option data-editor="0" value="[% t.id | html %]">[% t.name | html %]</option>
193
                                [% END %]
192
                            [% END %]
194
                            [% END %]
193
                        [% END %]
195
                        [% END %]
196
                    </optgroup>
197
                </select>
198
            </div>
199
            <div class="btn-group">
200
                <button type="submit" id="load_template_submit" name="load_template_submit" value="1"><i class="fa fa-wpforms"></i> Apply template</button>
201
            </div>
202
            <div class="btn-group">
203
                <label for="use_template_for_session">
204
                    [% IF use_template_for_session %]
205
                        <input type="checkbox" id="use_template_for_session" name="use_template_for_session" checked="checked">
206
                    [% ELSE %]
207
                        <input type="checkbox" id="use_template_for_session" name="use_template_for_session">
194
                    [% END %]
208
                    [% END %]
195
                </optgroup>
209
                For session</label>
196
            </select>
210
            </div>
197
        </div>
198
        <div class="btn-group">
199
            <button type="submit" id="load_template_submit" name="load_template_submit" value="1"><i class="fa fa-wpforms"></i> Apply template</button>
200
        </div>
201
        <div class="btn-group">
202
            <label for="use_template_for_session">
203
                [% IF use_template_for_session %]
204
                    <input type="checkbox" id="use_template_for_session" name="use_template_for_session" checked="checked">
205
                [% ELSE %]
206
                    <input type="checkbox" id="use_template_for_session" name="use_template_for_session">
207
                [% END %]
208
            For session</label>
209
        </div>
210
211
211
        <div class="btn-group">
212
            <div class="btn-group">
212
            <button type="submit" id="unload_template_submit" name="unload_template_submit" value="1"><i class="fa fa-eraser"></i> Clear template</button>
213
                <button type="submit" id="unload_template_submit" name="unload_template_submit" value="1"><i class="fa fa-eraser"></i> Clear template</button>
213
        </div>
214
            </div>
214
215
215
        <div class="btn-group">
216
            <div class="btn-group">
216
            <button type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash"></i> Delete template</button>
217
                <button type="submit" id="delete_template_submit" name="delete_template_submit" value="1" disabled><i class="fa fa-trash"></i> Delete template</button>
218
            </div>
217
        </div>
219
        </div>
218
220
    [% END %]
219
    </div>
220
221
221
	<fieldset class="rows">
222
	<fieldset class="rows">
222
        [% PROCESS subfields_for_item subfields => subfields %]
223
        [% PROCESS subfields_for_item subfields => subfields %]
223
- 

Return to bug 32188