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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt (-39 / +42 lines)
Lines 178-187 Link Here
178
178
179
                <!-- MC-TYPE LIMITS -->
179
                <!-- MC-TYPE LIMITS -->
180
                <div id="advsearches" class="toptabs">
180
                <div id="advsearches" class="toptabs">
181
                    <ul>
181
                    <ul class="nav nav-tabs" role="tablist">
182
                        [% FOREACH advsearchloo IN advancedsearchesloop %]
182
                        [% FOREACH advsearchloo IN advancedsearchesloop %]
183
                            <li id="advsearch-tab-[% advsearchloo.advanced_search_type | html %]">
183
                            <li role="presentation" id="advsearch-tab-[% advsearchloo.advanced_search_type | html %]">
184
                                <a href="#advsearch-[% advsearchloo.advanced_search_type | uri %]">
184
                                <a href="#advsearch-[% advsearchloo.advanced_search_type | uri %]" aria-controls="advsearch-[% advsearchloo.advanced_search_type | uri %]" role="tab" data-toggle="tab">
185
                                    [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
185
                                    [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
186
                                    [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
186
                                    [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
187
                                    [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
187
                                    [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
Lines 192-233 Link Here
192
                        [% END # /FOREACH advsearchloo %]
192
                        [% END # /FOREACH advsearchloo %]
193
                    </ul>
193
                    </ul>
194
194
195
                    [% FOREACH advsearchloo IN advancedsearchesloop %]
195
                    <div class="tab-content">
196
                        <div id="advsearch-[% advsearchloo.advanced_search_type | html %]" class="advsearch">
196
                        [% FOREACH advsearchloo IN advancedsearchesloop %]
197
                            <h4>Limit to any of the following:</h4>
197
                            <div id="advsearch-[% advsearchloo.advanced_search_type | html %]"  role="tabpanel" class="tab-pane advsearch">
198
                            <table>
198
                                <h4>Limit to any of the following:</h4>
199
                                <tr>
199
                                <table>
200
                                    [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
200
                                    <tr>
201
                                        <td>
201
                                        [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
202
                                            [% SET limit_key = 'mc-' _ itemtypeloo.ccl _ "_" _ itemtypeloo.code %]
202
                                            <td>
203
                                            [% IF limits.$limit_key.defined %]
203
                                                [% SET limit_key = 'mc-' _ itemtypeloo.ccl _ "_" _ itemtypeloo.code %]
204
                                                [% limits.delete( limit_key ) %]
204
                                                [% IF limits.$limit_key.defined %]
205
                                                <input type="checkbox" checked="checked" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/>
205
                                                    [% limits.delete( limit_key ) %]
206
                                            [% ELSE %]
206
                                                    <input type="checkbox" checked="checked" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/>
207
                                                <input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/>
207
                                                [% ELSE %]
208
                                            [% END # /IF limits.$limit_key.defined %]
208
                                                    <input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/>
209
                                            <label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]">
209
                                                [% END # /IF limits.$limit_key.defined %]
210
                                                [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
210
                                                <label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]">
211
                                                    [% IF ( itemtypeloo.imageurl ) %]
211
                                                    [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
212
                                                        <img src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />
212
                                                        [% IF ( itemtypeloo.imageurl ) %]
213
                                                            <img src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />
214
                                                        [% END %]
215
                                                            &nbsp;
213
                                                    [% END %]
216
                                                    [% END %]
214
                                                        &nbsp;
217
                                                    [% itemtypeloo.description | html %]
215
                                                [% END %]
218
                                                </label>
216
                                                [% itemtypeloo.description | html %]
219
                                            </td>
217
                                            </label>
220
                                            [% IF ( loop.last ) %]
218
                                        </td>
219
                                        [% IF ( loop.last ) %]
220
                                            </tr>
221
                                        [% ELSE %]
222
                                            [% UNLESS ( loop.count % 5 ) %]
223
                                                </tr>
221
                                                </tr>
224
                                                <tr>
222
                                            [% ELSE %]
225
                                            [% END %]
223
                                                [% UNLESS ( loop.count % 5 ) %]
226
                                        [% END # /IF ( loop.last ) %]
224
                                                    </tr>
227
                                    [% END # /FOREACH itemtypeloo %]
225
                                                    <tr>
228
                            </table>
226
                                                [% END %]
229
                        </div> <!-- /#advsearch-[% advsearchloo.advanced_search_type | html %] -->
227
                                            [% END # /IF ( loop.last ) %]
230
                    [% END # /FOREACH advsearchloo %]
228
                                        [% END # /FOREACH itemtypeloo %]
229
                                </table>
230
                            </div> <!-- /#advsearch-[% advsearchloo.advanced_search_type | html %] -->
231
                        [% END # /FOREACH advsearchloo %]
232
                    </div> <!-- /.tab-content -->
231
                </div> <!-- /#advsearches -->
233
                </div> <!-- /#advsearches -->
232
                <!-- /MC-TYPE LIMIT -->
234
                <!-- /MC-TYPE LIMIT -->
233
235
Lines 385-391 Link Here
385
        var Sticky;
387
        var Sticky;
386
        $(document).ready(function() {
388
        $(document).ready(function() {
387
            $("input[name=q]:eq(0)").focus();
389
            $("input[name=q]:eq(0)").focus();
388
            $('#advsearches').tabs();
390
            if( $(".tab-pane.active").length < 1 ){
391
                $("#advsearches a:first").tab("show");
392
            }
389
            Sticky = $("#toolbar");
393
            Sticky = $("#toolbar");
390
            Sticky.hcSticky({
394
            Sticky.hcSticky({
391
                stickTo: ".main",
395
                stickTo: ".main",
392
- 

Return to bug 30433