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

Return to bug 24606