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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc (+65 lines)
Lines 33-35 Link Here
33
    [%- END -%]
33
    [%- END -%]
34
    [%- this_biblio_href | url %][% biblionumber | url -%]
34
    [%- this_biblio_href | url %][% biblionumber | url -%]
35
[%- END %]
35
[%- END %]
36
37
[% # BOOTSTRAP TAB WRAPPER USAGE                                                                         %]
38
[% #     [ WRAPPER tabs id= "tabs_container_id" ]                                                        %]
39
[% #         [ WRAPPER tabs_nav ]                                                                        %]
40
[% #             [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] <span>Tab text 1</span> [ END ] %]
41
[% #             [ WRAPPER tab_item tabname= "tab_name_2" ] <span>Tab text 2</span> [ END ]              %]
42
[% #             ...                                                                                     %]
43
[% #         [ END ]                                                                                     %]
44
[% #         [ WRAPPER tab_panels ]                                                                      %]
45
[% #             [ WRAPPER tab_panel tabname="tab_name_1" bt_active= 1 ] Panel contents 1 [ END ]        %]
46
[% #             [ WRAPPER tab_panel tabname="tab_name_2" ] Panel contents 2 [ END ]                     %]
47
[% #             ...                                                                                     %]
48
[% #         [ END ]                                                                                     %]
49
[% #     [ END ]                                                                                         %]
50
51
[% BLOCK tabs %]
52
    [% IF ( id ) %]
53
        <div id="[% id | html %]" class="toptabs">
54
    [% ELSE %]
55
        <div class="toptabs">
56
    [% END %]
57
        [% content | $raw %]
58
    </div>
59
[% END %]
60
61
[% BLOCK tabs_nav %]
62
    <ul class="nav nav-tabs" role="tablist">
63
        [% content | $raw %]
64
    </ul>
65
[% END %]
66
67
[% BLOCK tab_item %]
68
    <li class="nav-item" role="presentation">
69
        [% IF ( bt_active ) %]
70
            [% SET link_class="nav-link active" %]
71
            [% SET aria_selected="true" %]
72
        [% ELSE %]
73
            [% SET link_class="nav-link" %]
74
            [% SET aria_selected="false" %]
75
        [% END %]
76
        <a href="#[% tabname | uri %]_panel" class="[% link_class | html %]" id="[% tabname | html %]-tab" data-toggle="tab" data-target="#[% tabname | html %]_panel" data-tabname="[% tabname | uri %]" aria-controls="[% tabname | uri %]_panel" role="tab" aria-selected="[% aria_selected | html %]">
77
            [% content | $raw %]
78
        </a>
79
    </li>
80
[% END %]
81
82
[% BLOCK tab_panels %]
83
    [% IF ( id ) %]
84
        <div class="tab-content" id="[% id | html %]_content">
85
    [% ELSE %]
86
        <div class="tab-content">
87
    [% END %]
88
        [% content | $raw %]
89
    </div>
90
[% END %]
91
92
[% BLOCK tab_panel %]
93
    [% IF ( bt_active ) %]
94
        <div role="tabpanel" class="tab-pane show active" id="[% tabname | html %]_panel" aria-labelledby="[% tabname | html %]-tab">
95
    [% ELSE %]
96
        <div role="tabpanel" class="tab-pane" id="[% tabname | html %]_panel" aria-labelledby="[% tabname | html %]-tab">
97
    [% END %]
98
        [% content| $raw %]
99
    </div>
100
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-22 / +19 lines)
Lines 112-118 Link Here
112
                                            </select> <!-- /#search-field_[% loop.index | html %] -->
112
                                            </select> <!-- /#search-field_[% loop.index | html %] -->
113
                                        </div> <!-- .search-term-input -->
113
                                        </div> <!-- .search-term-input -->
114
                                        <div class="search-term-input">
114
                                        <div class="search-term-input">
115
                                            <input class="form-control" type="text" size="" name="q" title="Enter search terms" value="" />
115
                                            <input class="form-control" type="text" name="q" title="Enter search terms" value="" />
116
                                        </div> <!-- .search-term-input -->
116
                                        </div> <!-- .search-term-input -->
117
                                        [% IF ( expanded_options ) %]
117
                                        [% IF ( expanded_options ) %]
118
                                            <div class="search-term-input">
118
                                            <div class="search-term-input">
Lines 144-150 Link Here
144
                                        See from (non-preferred form) headings are included
144
                                        See from (non-preferred form) headings are included
145
                                    </div>
145
                                    </div>
146
                                [% END %]
146
                                [% END %]
147
                            </div> <!-- /.search-terms -->
147
                            </div> <!-- /.advanced-search-terms -->
148
                        </fieldset>
148
                        </fieldset>
149
                    </div> <!-- /#booleansearch -->
149
                    </div> <!-- /#booleansearch -->
150
                </div> <!-- / .col -->
150
                </div> <!-- / .col -->
Lines 162-184 Link Here
162
                [%# Following on one line for translatability %]
162
                [%# Following on one line for translatability %]
163
                [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
163
                [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
164
                    <div class="col order-first order-md-first order-lg-2">
164
                    <div class="col order-first order-md-first order-lg-2">
165
                        <div id="advsearches" class="toptabs">
165
                        [% WRAPPER tabs id= "advsearches" %]
166
                            <ul class="nav nav-tabs" role="tablist">
166
                            [% WRAPPER tabs_nav %]
167
                                [% FOREACH advsearchloo IN advancedsearchesloop %]
167
                                [% FOREACH advsearchloo IN advancedsearchesloop %]
168
                                    <li class="nav-item" role="presentation" id="advsearch-tab-[% advsearchloo.advanced_search_type | html %]">
168
                                    [% WRAPPER tab_item tabname= "advsearch-tab-${advsearchloo.advanced_search_type}" bt_active= "0" %]
169
                                        <a href="#advsearch-[% advsearchloo.advanced_search_type | uri %]" class="nav-link" aria-controls="advsearch-[% advsearchloo.advanced_search_type | html %]" aria-selected="false" role="tab" data-toggle="tab">
169
                                        [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]<span>Item type</span>
170
                                            [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]<span>Item type</span>
170
                                        [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]<span>Collection</span>
171
                                            [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]<span>Collection</span>
171
                                        [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]<span>Shelving location</span>
172
                                            [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]<span>Shelving location</span>
172
                                        [% ELSE %]<span>Something else</span>
173
                                            [% ELSE %]<span>Something else</span>
173
                                        [% END %]
174
                                            [% END %]
174
                                    [% END %]
175
                                        </a>
176
                                    </li>
177
                                [% END %]
175
                                [% END %]
178
                            </ul>
176
                            [% END # /WRAPPER tabs_nav %]
179
                            <div class="tab-content">
177
                            [% WRAPPER tab_panels id= "advsearches" %]
180
                                [% FOREACH advsearchloo IN advancedsearchesloop %]
178
                                [% FOREACH advsearchloo IN advancedsearchesloop %]
181
                                    <div role="tabpanel" class="tab-pane" id="advsearch-[% advsearchloo.advanced_search_type | html %]" class="advsearch" aria-labelledby="advsearch-tab-[% advsearchloo.advanced_search_type | html %]">
179
                                    [% WRAPPER tab_panel tabname="advsearch-tab-${advsearchloo.advanced_search_type}" %]
182
                                        <fieldset>
180
                                        <fieldset>
183
                                            <legend>Limit to any of the following:</legend>
181
                                            <legend>Limit to any of the following:</legend>
184
                                            <div class="row">
182
                                            <div class="row">
Lines 204-216 Link Here
204
                                                    [% END %]
202
                                                    [% END %]
205
                                                [% END %]
203
                                                [% END %]
206
                                        </fieldset>
204
                                        </fieldset>
207
                                    </div> <!-- / #advsearch-[% advsearchloo.advanced_search_type | html %] -->
205
                                    [% END # /tab_panel#advsearch-advsearchloo.advanced_search_type %]
208
                                [% END # / FOREACH advancedsearchesloop %]
206
                                [% END # / FOREACH advancedsearchesloop %]
209
                            </div> <!-- /.tab-content -->
207
                            [% END # /tab_panels %]
210
                        </div> <!-- / #advsearches -->
208
                        [% END # /WRAPPER tabs#advsearches %]
211
                    </div> <!-- / .col -->
209
                    </div> <!-- / .col -->
212
                [% END # /IF OpacAdvSearchOptions %]
210
                [% END # /IF OpacAdvSearchOptions %]
213
            </div>
211
            </div> <!-- /.row -->
214
212
215
            <div id="advsearch_limits" class="row">
213
            <div id="advsearch_limits" class="row">
216
214
Lines 483-489 $(document).ready(function() { Link Here
483
    [% END %]
481
    [% END %]
484
482
485
    if( $("#advsearches .tab-pane.active").length < 1 ){
483
    if( $("#advsearches .tab-pane.active").length < 1 ){
486
        $("#advsearches a:first").tab("show");
484
        $("#advsearches li:first a").tab("show");
487
    }
485
    }
488
486
489
    $('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide();
487
    $('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide();
490
- 

Return to bug 33891