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

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

Return to bug 24606