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

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss (-2 / +2 lines)
Lines 906-912 $input-padding-y-lg: $input-btn-padding-y-lg; Link Here
906
$input-padding-x-lg:                    $input-btn-padding-x-lg;
906
$input-padding-x-lg:                    $input-btn-padding-x-lg;
907
$input-font-size-lg:                    $input-btn-font-size-lg;
907
$input-font-size-lg:                    $input-btn-font-size-lg;
908
908
909
$input-bg:                              var(--#{$prefix}body-bg);
909
$input-bg:                              $white; // var(--#{$prefix}body-bg);
910
$input-disabled-color:                  null;
910
$input-disabled-color:                  null;
911
$input-disabled-bg:                     var(--#{$prefix}secondary-bg);
911
$input-disabled-bg:                     var(--#{$prefix}secondary-bg);
912
$input-disabled-border-color:           null;
912
$input-disabled-border-color:           null;
Lines 920-926 $input-border-radius: .375rem; // var(--#{$prefix}border-radiu Link Here
920
$input-border-radius-sm:                var(--#{$prefix}border-radius-sm);
920
$input-border-radius-sm:                var(--#{$prefix}border-radius-sm);
921
$input-border-radius-lg:                var(--#{$prefix}border-radius-lg);
921
$input-border-radius-lg:                var(--#{$prefix}border-radius-lg);
922
922
923
$input-focus-bg:                        $input-bg;
923
$input-focus-bg:                        $white; // $input-bg;
924
$input-focus-border-color:              tint-color($component-active-bg, 50%);
924
$input-focus-border-color:              tint-color($component-active-bg, 50%);
925
$input-focus-color:                     $input-color;
925
$input-focus-color:                     $input-color;
926
$input-focus-width:                     $input-btn-focus-width;
926
$input-focus-width:                     $input-btn-focus-width;
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (-19 / +17 lines)
Lines 78-83 $enable-dark-mode: false; Link Here
78
    )
78
    )
79
}
79
}
80
80
81
.label-btn {
82
    @include button-variant(
83
        $default-bs-btn-bg,
84
        transparent, // $default-bs-btn-border-color,
85
        $default-bs-btn-color,
86
        transparent, // $default-bs-btn-hover-bg,
87
        #EEE, // $default-bs-btn-hover-border-color,
88
        $default-bs-btn-hover-color,
89
        #EEE, // $default-bs-btn-active-bg,
90
        #BCBCBC, // $default-bs-btn-active-border-color,
91
        $default-bs-btn-active-color,
92
        $default-bs-btn-disabled-bg,
93
        $default-bs-btn-disabled-border-color,
94
        $default-bs-btn-disabled-color
95
    )
96
}
97
81
.text-bg-primary {
98
.text-bg-primary {
82
    background-color: shift-color( $primary, -55% );
99
    background-color: shift-color( $primary, -55% );
83
    color: $black;
100
    color: $black;
Lines 2654-2678 td.bundle { Link Here
2654
    width: 50%;
2671
    width: 50%;
2655
}
2672
}
2656
2673
2657
#advsearches {
2658
    margin-bottom: 1em;
2659
2660
    .tab-pane {
2661
        margin: 0 1em 1em 0;
2662
2663
        table {
2664
            border-collapse: separate;
2665
            border-spacing: 5px;
2666
            border-width: 0;
2667
        }
2668
2669
        td {
2670
            border: 1px solid #EEE;
2671
            padding: .3em .4em;
2672
        }
2673
    }
2674
}
2675
2676
#circ_circulation_issue {
2674
#circ_circulation_issue {
2677
    position: relative;
2675
    position: relative;
2678
2676
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc (-183 / +185 lines)
Lines 1-186 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% SET select_id = refiner ? 'refiner_idx_' _ index : 'idx_' _ index %]
2
[% SET select_id = refiner ? 'refiner_idx_' _ index : 'idx_' _ index %]
3
<select class="advsearch" name="idx" id="[% select_id | html %]">
3
<div class="search-term-input">
4
    [% IF ms_kw %]
4
    <select class="advsearch" name="idx" id="[% select_id | html %]">
5
        <option selected="selected" value="kw">Keyword</option>
5
        [% IF ms_kw %]
6
    [% ELSE %]
6
            <option selected="selected" value="kw">Keyword</option>
7
        <option value="kw">Keyword</option>
7
        [% ELSE %]
8
    [% END %]
8
            <option value="kw">Keyword</option>
9
    [% IF ms_kwcommaphr %]
9
        [% END %]
10
        <option selected="selected" value="kw,phr">&nbsp;&nbsp;&nbsp;&nbsp; Keyword as phrase</option>
10
        [% IF ms_kwcommaphr %]
11
    [% ELSE %]
11
            <option selected="selected" value="kw,phr">&nbsp;&nbsp;&nbsp;&nbsp; Keyword as phrase</option>
12
        <option value="kw,phr">&nbsp;&nbsp;&nbsp;&nbsp; Keyword as phrase</option>
12
        [% ELSE %]
13
    [% END %]
13
            <option value="kw,phr">&nbsp;&nbsp;&nbsp;&nbsp; Keyword as phrase</option>
14
    [% IF ms_au %]
14
        [% END %]
15
        <option selected="selected" value="au">Author</option>
15
        [% IF ms_au %]
16
    [% ELSE %]
16
            <option selected="selected" value="au">Author</option>
17
        <option value="au">Author</option>
17
        [% ELSE %]
18
    [% END %]
18
            <option value="au">Author</option>
19
    [% IF ms_aucommaphr %]
19
        [% END %]
20
        <option selected="selected" value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author as phrase</option>
20
        [% IF ms_aucommaphr %]
21
    [% ELSE %]
21
            <option selected="selected" value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author as phrase</option>
22
        <option value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author as phrase</option>
22
        [% ELSE %]
23
    [% END %]
23
            <option value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author as phrase</option>
24
    [% IF ms_cpn %]
24
        [% END %]
25
        <option selected="selected" value="cpn">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name</option>
25
        [% IF ms_cpn %]
26
    [% ELSE %]
26
            <option selected="selected" value="cpn">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name</option>
27
        <option value="cpn">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name</option>
27
        [% ELSE %]
28
    [% END %]
28
            <option value="cpn">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name</option>
29
    [% IF ms_cfn %]
29
        [% END %]
30
        <option selected="selected" value="cfn">&nbsp;&nbsp;&nbsp;&nbsp; Conference name</option>
30
        [% IF ms_cfn %]
31
    [% ELSE %]
31
            <option selected="selected" value="cfn">&nbsp;&nbsp;&nbsp;&nbsp; Conference name</option>
32
        <option value="cfn">&nbsp;&nbsp;&nbsp;&nbsp; Conference name</option>
32
        [% ELSE %]
33
    [% END %]
33
            <option value="cfn">&nbsp;&nbsp;&nbsp;&nbsp; Conference name</option>
34
    [% IF ms_cpncommaphr %]
34
        [% END %]
35
        <option selected="selected" value="cpn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name as phrase</option>
35
        [% IF ms_cpncommaphr %]
36
    [% ELSE %]
36
            <option selected="selected" value="cpn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name as phrase</option>
37
        <option value="cpn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name as phrase</option>
37
        [% ELSE %]
38
    [% END %]
38
            <option value="cpn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name as phrase</option>
39
    [% IF ms_cfncommaphr %]
39
        [% END %]
40
        <option selected="selected" value="cfn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Conference name as phrase</option>
40
        [% IF ms_cfncommaphr %]
41
    [% ELSE %]
41
            <option selected="selected" value="cfn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Conference name as phrase</option>
42
        <option value="cfn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Conference name as phrase</option>
42
        [% ELSE %]
43
    [% END %]
43
            <option value="cfn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Conference name as phrase</option>
44
    [% IF ms_pn %]
44
        [% END %]
45
        <option selected="selected" value="pn">&nbsp;&nbsp;&nbsp;&nbsp; Personal name</option>
45
        [% IF ms_pn %]
46
    [% ELSE %]
46
            <option selected="selected" value="pn">&nbsp;&nbsp;&nbsp;&nbsp; Personal name</option>
47
        <option value="pn">&nbsp;&nbsp;&nbsp;&nbsp; Personal name</option>
47
        [% ELSE %]
48
    [% END %]
48
            <option value="pn">&nbsp;&nbsp;&nbsp;&nbsp; Personal name</option>
49
    [% IF ms_pncommaphr %]
49
        [% END %]
50
        <option selected="selected" value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Personal name as phrase</option>
50
        [% IF ms_pncommaphr %]
51
    [% ELSE %]
51
            <option selected="selected" value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Personal name as phrase</option>
52
        <option value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Personal name as phrase</option>
52
        [% ELSE %]
53
    [% END %]
53
            <option value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Personal name as phrase</option>
54
    [% IF ms_ti %]
54
        [% END %]
55
        <option selected="selected" value="ti">Title</option>
55
        [% IF ms_ti %]
56
    [% ELSE %]
56
            <option selected="selected" value="ti">Title</option>
57
        <option value="ti">Title</option>
57
        [% ELSE %]
58
    [% END %]
58
            <option value="ti">Title</option>
59
    [% IF ms_ticommaphr %]
59
        [% END %]
60
        <option selected="selected" value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title as phrase</option>
60
        [% IF ms_ticommaphr %]
61
    [% ELSE %]
61
            <option selected="selected" value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title as phrase</option>
62
        <option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title as phrase</option>
62
        [% ELSE %]
63
    [% END %]
63
            <option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title as phrase</option>
64
    [% IF ms_se %]
64
        [% END %]
65
        <option selected="seleced" value="se">&nbsp;&nbsp;&nbsp;&nbsp; Series title</option>
65
        [% IF ms_se %]
66
    [% ELSE %]
66
            <option selected="seleced" value="se">&nbsp;&nbsp;&nbsp;&nbsp; Series title</option>
67
        <option value="se">&nbsp;&nbsp;&nbsp;&nbsp; Series title</option>
67
        [% ELSE %]
68
    [% END %]
68
            <option value="se">&nbsp;&nbsp;&nbsp;&nbsp; Series title</option>
69
    [% IF ms_su %]
69
        [% END %]
70
        <option selected="selected" value="su">Subject</option>
70
        [% IF ms_su %]
71
    [% ELSE %]
71
            <option selected="selected" value="su">Subject</option>
72
        <option value="su">Subject</option>
72
        [% ELSE %]
73
    [% END %]
73
            <option value="su">Subject</option>
74
    [% IF ms_sucommaphr %]
74
        [% END %]
75
        <option selected="selected" value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject as phrase</option>
75
        [% IF ms_sucommaphr %]
76
    [% ELSE %]
76
            <option selected="selected" value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject as phrase</option>
77
        <option value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject as phrase</option>
77
        [% ELSE %]
78
    [% END %]
78
            <option value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject as phrase</option>
79
    [% IF ( expanded_options ) %]
79
        [% END %]
80
        [% IF ms_sudashbr %]
80
        [% IF ( expanded_options ) %]
81
            <option selected="selected" value="su-br">&nbsp;&nbsp;&nbsp;&nbsp; Subject and broader terms</option>
81
            [% IF ms_sudashbr %]
82
        [% ELSE %]
82
                <option selected="selected" value="su-br">&nbsp;&nbsp;&nbsp;&nbsp; Subject and broader terms</option>
83
            <option value="su-br">&nbsp;&nbsp;&nbsp;&nbsp; Subject and broader terms</option>
83
            [% ELSE %]
84
        [% END %]
84
                <option value="su-br">&nbsp;&nbsp;&nbsp;&nbsp; Subject and broader terms</option>
85
        [% IF ms_sudashna %]
85
            [% END %]
86
            <option selected="selected" value="su-na">&nbsp;&nbsp;&nbsp;&nbsp; Subject and narrower terms</option>
86
            [% IF ms_sudashna %]
87
        [% ELSE %]
87
                <option selected="selected" value="su-na">&nbsp;&nbsp;&nbsp;&nbsp; Subject and narrower terms</option>
88
            <option value="su-na">&nbsp;&nbsp;&nbsp;&nbsp; Subject and narrower terms</option>
88
            [% ELSE %]
89
        [% END %]
89
                <option value="su-na">&nbsp;&nbsp;&nbsp;&nbsp; Subject and narrower terms</option>
90
        [% IF ms_sudashrl %]
90
            [% END %]
91
            <option selected="selected" value="su-rl">&nbsp;&nbsp;&nbsp;&nbsp; Subject and related terms</option>
91
            [% IF ms_sudashrl %]
92
        [% ELSE %]
92
                <option selected="selected" value="su-rl">&nbsp;&nbsp;&nbsp;&nbsp; Subject and related terms</option>
93
            <option value="su-rl">&nbsp;&nbsp;&nbsp;&nbsp; Subject and related terms</option>
93
            [% ELSE %]
94
        [% END %]
94
                <option value="su-rl">&nbsp;&nbsp;&nbsp;&nbsp; Subject and related terms</option>
95
    [% END %]
95
            [% END %]
96
    [% IF ms_bc %]
96
        [% END %]
97
        <option selected="selected" value="bc">Barcode</option>
97
        [% IF ms_bc %]
98
    [% ELSE %]
98
            <option selected="selected" value="bc">Barcode</option>
99
        <option value="bc">Barcode</option>
99
        [% ELSE %]
100
    [% END %]
100
            <option value="bc">Barcode</option>
101
    [% IF ms_locationcommawrdl %]
101
        [% END %]
102
        <option selected="selected" value="location,wrdl" title="Enter location code value for search">Shelving location (code)</option>
102
        [% IF ms_locationcommawrdl %]
103
    [% ELSE %]
103
            <option selected="selected" value="location,wrdl" title="Enter location code value for search">Shelving location (code)</option>
104
        <option value="location,wrdl" title="Enter location code value for search">Shelving location (code)</option>
104
        [% ELSE %]
105
    [% END %]
105
            <option value="location,wrdl" title="Enter location code value for search">Shelving location (code)</option>
106
    [% IF ( Koha.Preference('IntranetNumbersPreferPhrase') ) %]
106
        [% END %]
107
        [% IF ms_identcommaphr %]
107
        [% IF ( Koha.Preference('IntranetNumbersPreferPhrase') ) %]
108
            <option selected="selected" value="ident,phr">Standard number</option>
108
            [% IF ms_identcommaphr %]
109
        [% ELSE %]
109
                <option selected="selected" value="ident,phr">Standard number</option>
110
            <option value="ident,phr">Standard number</option>
110
            [% ELSE %]
111
        [% END %]
111
                <option value="ident,phr">Standard number</option>
112
    [% ELSE %]
112
            [% END %]
113
        [% IF ms_ident %]
113
        [% ELSE %]
114
            <option selected="selected" value="ident">Standard number</option>
114
            [% IF ms_ident %]
115
        [% ELSE %]
115
                <option selected="selected" value="ident">Standard number</option>
116
            <option value="ident">Standard number</option>
116
            [% ELSE %]
117
        [% END %]
117
                <option value="ident">Standard number</option>
118
    [% END %]
118
            [% END %]
119
    [% IF ms_nb %]
119
        [% END %]
120
        <option selected="selected" value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
120
        [% IF ms_nb %]
121
    [% ELSE %]
121
            <option selected="selected" value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
122
        <option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
122
        [% ELSE %]
123
    [% END %]
123
            <option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
124
    [% IF ms_ns %]
124
        [% END %]
125
        <option selected="selected" value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
125
        [% IF ms_ns %]
126
    [% ELSE %]
126
            <option selected="selected" value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
127
        <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
127
        [% ELSE %]
128
    [% END %]
128
            <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
129
    [% IF ( Koha.Preference('IntranetNumbersPreferPhrase') ) %]
129
        [% END %]
130
        [% IF ms_callnumcommaphr %]
130
        [% IF ( Koha.Preference('IntranetNumbersPreferPhrase') ) %]
131
            <option selected="selected" value="callnum,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
131
            [% IF ms_callnumcommaphr %]
132
        [% ELSE %]
132
                <option selected="selected" value="callnum,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
133
            <option value="callnum,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
133
            [% ELSE %]
134
        [% END %]
134
                <option value="callnum,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
135
    [% ELSE %]
135
            [% END %]
136
        [% IF ms_callnum %]
136
        [% ELSE %]
137
            <option selected="selected" value="callnum">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
137
            [% IF ms_callnum %]
138
        [% ELSE %]
138
                <option selected="selected" value="callnum">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
139
            <option value="callnum">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
139
            [% ELSE %]
140
        [% END %]
140
                <option value="callnum">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
141
    [% END %]
141
            [% END %]
142
    [% IF ms_lncommartrn %]
142
        [% END %]
143
        <option selected="selected" value="ln,rtrn">Language</option>
143
        [% IF ms_lncommartrn %]
144
    [% ELSE %]
144
            <option selected="selected" value="ln,rtrn">Language</option>
145
        <option value="ln,rtrn">Language</option>
145
        [% ELSE %]
146
    [% END %]
146
            <option value="ln,rtrn">Language</option>
147
    [% IF ms_nt %]
147
        [% END %]
148
        <option selected="selected" value="nt">Notes/Comments</option>
148
        [% IF ms_nt %]
149
    [% ELSE %]
149
            <option selected="selected" value="nt">Notes/Comments</option>
150
        <option value="nt">Notes/Comments</option>
150
        [% ELSE %]
151
    [% END %]
151
            <option value="nt">Notes/Comments</option>
152
    [% IF (marcflavour != 'UNIMARC' ) %]
152
        [% END %]
153
        [% IF ms_curriculum %]
153
        [% IF (marcflavour != 'UNIMARC' ) %]
154
            <option selected="selected" value="curriculum">Curriculum</option>
154
            [% IF ms_curriculum %]
155
        [% ELSE %]
155
                <option selected="selected" value="curriculum">Curriculum</option>
156
            <option value="curriculum">Curriculum</option>
156
            [% ELSE %]
157
        [% END %]
157
                <option value="curriculum">Curriculum</option>
158
    [% END %]
158
            [% END %]
159
    [% IF ms_pb %]
159
        [% END %]
160
        <option selected="selected" value="pb">Publisher</option>
160
        [% IF ms_pb %]
161
    [% ELSE %]
161
            <option selected="selected" value="pb">Publisher</option>
162
        <option value="pb">Publisher</option>
162
        [% ELSE %]
163
    [% END %]
163
            <option value="pb">Publisher</option>
164
    [% IF ms_pl %]
164
        [% END %]
165
        <option selected="selected" value="pl">Publisher location</option>
165
        [% IF ms_pl %]
166
    [% ELSE %]
166
            <option selected="selected" value="pl">Publisher location</option>
167
        <option value="pl">Publisher location</option>
167
        [% ELSE %]
168
    [% END %]
168
            <option value="pl">Publisher location</option>
169
        [% END %]
169
170
170
    [%# Use non-normalized st-year instead of st-numeric, %]
171
        [%# Use non-normalized st-year instead of st-numeric, %]
171
    [%# since pubdate can include 'u' to signify unknown %]
172
        [%# since pubdate can include 'u' to signify unknown %]
172
    [%# dates. See "Legal Characters" at: %]
173
        [%# dates. See "Legal Characters" at: %]
173
    [%# http://www.loc.gov/marc/bibliographic/bd008a.html %]
174
        [%# http://www.loc.gov/marc/bibliographic/bd008a.html %]
174
    [%# This search is also for date ranges due to the %]
175
        [%# This search is also for date ranges due to the %]
175
    [%# special Zebra r=r CCL mapping for 'yr' %]
176
        [%# special Zebra r=r CCL mapping for 'yr' %]
176
    [% IF ms_yrcommastdashyear %]
177
        [% IF ms_yrcommastdashyear %]
177
        <option selected="selected" value="yr,st-year">Publication date (yyyy-yyyy)</option>
178
            <option selected="selected" value="yr,st-year">Publication date (yyyy-yyyy)</option>
178
    [% ELSE %]
179
        [% ELSE %]
179
        <option value="yr,st-year">Publication date (yyyy-yyyy)</option>
180
            <option value="yr,st-year">Publication date (yyyy-yyyy)</option>
180
    [% END %]
181
        [% END %]
181
    [% IF ms_acqdatecommastdashdatedashnormalized %]
182
        [% IF ms_acqdatecommastdashdatedashnormalized %]
182
        <option selected="selected" value="acqdate,st-date-normalized">Acquisition date (yyyy-mm-dd)</option>
183
            <option selected="selected" value="acqdate,st-date-normalized">Acquisition date (yyyy-mm-dd)</option>
183
    [% ELSE %]
184
        [% ELSE %]
184
        <option value="acqdate,st-date-normalized">Acquisition date (yyyy-mm-dd)</option>
185
            <option value="acqdate,st-date-normalized">Acquisition date (yyyy-mm-dd)</option>
185
    [% END %]
186
        [% END %]
186
</select>
187
    </select>
188
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc (-251 / +263 lines)
Lines 1-256 Link Here
1
[%- BLOCK subtype_dropdowns -%]
1
[%- BLOCK subtype_dropdowns -%]
2
    <select name="limit" class="subtype">
2
    <p>
3
        [% IF ( limits.aud.size ) %]
3
        <label for="subtype_limit">Audience</label>
4
            <option value="" class="menuheader">Any audience</option>
4
        <select id="audience_limit" name="limit" class="subtype">
5
        [% ELSE %]
5
            [% IF ( limits.aud.size ) %]
6
            <option value="" selected="selected" class="menuheader">Any audience</option>
6
                <option value="" class="menuheader">Any audience</option>
7
        [% END %]
7
            [% ELSE %]
8
        [% IF (limits.aud.0 == 'a' ) %]
8
                <option value="" selected="selected" class="menuheader">Any audience</option>
9
            <option selected="selected" value="aud:a">Preschool</option>
9
            [% END %]
10
        [% ELSE %]
10
            [% IF (limits.aud.0 == 'a' ) %]
11
            <option value="aud:a">Preschool</option>
11
                <option selected="selected" value="aud:a">Preschool</option>
12
        [% END %]
12
            [% ELSE %]
13
        [% IF (limits.aud.0 == 'b' ) %]
13
                <option value="aud:a">Preschool</option>
14
            <option value="aud:b" selected="selected">Primary</option>
14
            [% END %]
15
        [% ELSE %]
15
            [% IF (limits.aud.0 == 'b' ) %]
16
            <option value="aud:b">Primary</option>
16
                <option value="aud:b" selected="selected">Primary</option>
17
        [% END %]
17
            [% ELSE %]
18
        [% IF (limits.aud.0 == 'c' ) %]
18
                <option value="aud:b">Primary</option>
19
            <option value="aud:c" selected="selected">Pre-adolescent</option>
19
            [% END %]
20
        [% ELSE %]
20
            [% IF (limits.aud.0 == 'c' ) %]
21
            <option value="aud:c">Pre-adolescent</option>
21
                <option value="aud:c" selected="selected">Pre-adolescent</option>
22
        [% END %]
22
            [% ELSE %]
23
        [% IF (limits.aud.0 == 'd' ) %]
23
                <option value="aud:c">Pre-adolescent</option>
24
            <option value="aud:d" selected="selected">Adolescent</option>
24
            [% END %]
25
        [% ELSE %]
25
            [% IF (limits.aud.0 == 'd' ) %]
26
            <option value="aud:d">Adolescent</option>
26
                <option value="aud:d" selected="selected">Adolescent</option>
27
        [% END %]
27
            [% ELSE %]
28
        [% IF (limits.aud.0 == 'e' ) %]
28
                <option value="aud:d">Adolescent</option>
29
            <option value="aud:e" selected="selected">Adult</option>
29
            [% END %]
30
        [% ELSE %]
30
            [% IF (limits.aud.0 == 'e' ) %]
31
            <option value="aud:e">Adult</option>
31
                <option value="aud:e" selected="selected">Adult</option>
32
        [% END %]
32
            [% ELSE %]
33
        [% IF (limits.aud.0 == 'f' ) %]
33
                <option value="aud:e">Adult</option>
34
            <option value="aud:f" selected="selected">Specialized</option>
34
            [% END %]
35
        [% ELSE %]
35
            [% IF (limits.aud.0 == 'f' ) %]
36
            <option value="aud:f">Specialized</option>
36
                <option value="aud:f" selected="selected">Specialized</option>
37
        [% END %]
37
            [% ELSE %]
38
        [% IF (limits.aud.0 == 'g' ) %]
38
                <option value="aud:f">Specialized</option>
39
            <option value="aud:g" selected="selected">General</option>
39
            [% END %]
40
        [% ELSE %]
40
            [% IF (limits.aud.0 == 'g' ) %]
41
            <option value="aud:g">General</option>
41
                <option value="aud:g" selected="selected">General</option>
42
        [% END %]
42
            [% ELSE %]
43
        [% IF (limits.aud.0 == 'j' ) %]
43
                <option value="aud:g">General</option>
44
            <option value="aud:j" selected="selected">Juvenile</option>
44
            [% END %]
45
        [% ELSE %]
45
            [% IF (limits.aud.0 == 'j' ) %]
46
            <option value="aud:j">Juvenile</option>
46
                <option value="aud:j" selected="selected">Juvenile</option>
47
        [% END %]
47
            [% ELSE %]
48
        [% limits.delete( 'aud' ) %]
48
                <option value="aud:j">Juvenile</option>
49
    </select>
49
            [% END %]
50
            [% limits.delete( 'aud' ) %]
51
        </select>
52
    </p>
50
53
51
    <select name="limit" class="subtype">
54
    <p>
52
        [% IF ( limits.fic.size OR limits.bio.size OR limits.mus.size ) %]
55
        <label for="content_limit">Content</label>
53
            <option value="" class="menuheader">Any content</option>
56
        <select id="content_limit" name="limit" class="subtype">
54
        [% ELSE %]
57
            [% IF ( limits.fic.size OR limits.bio.size OR limits.mus.size ) %]
55
            <option value="" selected="selected" class="menuheader">Any content</option>
58
                <option value="" class="menuheader">Any content</option>
56
        [% END %]
59
            [% ELSE %]
57
        [% IF (limits.fic.0 == '1' ) %]
60
                <option value="" selected="selected" class="menuheader">Any content</option>
58
            <option value="fic:1" selected="selected">Fiction</option>
61
            [% END %]
59
        [% ELSE %]
62
            [% IF (limits.fic.0 == '1' ) %]
60
            <option value="fic:1">Fiction</option>
63
                <option value="fic:1" selected="selected">Fiction</option>
61
        [% END %]
64
            [% ELSE %]
62
        [% IF (limits.fic.0 == '0' ) %]
65
                <option value="fic:1">Fiction</option>
63
            <option value="fic:0" selected="selected">Non-fiction</option>
66
            [% END %]
64
        [% ELSE %]
67
            [% IF (limits.fic.0 == '0' ) %]
65
            <option value="fic:0">Non-fiction</option>
68
                <option value="fic:0" selected="selected">Non-fiction</option>
66
        [% END %]
69
            [% ELSE %]
67
        [% IF (limits.bio.0 == 'b' ) %]
70
                <option value="fic:0">Non-fiction</option>
68
            <option value="bio:b" selected="selected">Biography</option>
71
            [% END %]
69
        [% ELSE %]
72
            [% IF (limits.bio.0 == 'b' ) %]
70
            <option value="bio:b">Biography</option>
73
                <option value="bio:b" selected="selected">Biography</option>
71
        [% END %]
74
            [% ELSE %]
72
        [% IF (limits.mus.0 == 'j' ) %]
75
                <option value="bio:b">Biography</option>
73
            <option value="mus:j" selected="selected">Musical recording</option>
76
            [% END %]
74
        [% ELSE %]
77
            [% IF (limits.mus.0 == 'j' ) %]
75
            <option value="mus:j">Musical recording</option>
78
                <option value="mus:j" selected="selected">Musical recording</option>
76
        [% END %]
79
            [% ELSE %]
77
        [% IF (limits.mus.0 == 'i' ) %]
80
                <option value="mus:j">Musical recording</option>
78
            <option value="mus:i" selected="selected">Non-musical recording</option>
81
            [% END %]
79
        [% ELSE %]
82
            [% IF (limits.mus.0 == 'i' ) %]
80
            <option value="mus:i">Non-musical recording</option>
83
                <option value="mus:i" selected="selected">Non-musical recording</option>
81
        [% END %]
84
            [% ELSE %]
82
        [% limits.delete( 'fic' ) %]
85
                <option value="mus:i">Non-musical recording</option>
83
        [% limits.delete( 'bio' ) %]
86
            [% END %]
84
        [% limits.delete( 'mus' ) %]
87
            [% limits.delete( 'fic' ) %]
85
    </select>
88
            [% limits.delete( 'bio' ) %]
89
            [% limits.delete( 'mus' ) %]
90
        </select>
91
    </p>
86
92
87
    [% SET lformat = 'l-format' %]
93
    <p>
88
    <select name="limit" class="subtype">
94
        [% SET lformat = 'l-format' %]
89
        [% IF ( limits.$lformat.size ) %]
95
        <label for="format_limit">Format</label>
90
            <option value="" class="menuheader">Any format</option>
96
        <select id="format_limit" name="limit" class="subtype">
91
        [% ELSE %]
97
            [% IF ( limits.$lformat.size ) %]
92
            <option value="" selected="selected" class="menuheader">Any format</option>
98
                <option value="" class="menuheader">Any format</option>
93
        [% END %]
99
            [% ELSE %]
94
        [% IF (limits.$lformat.0 == 'ta' ) %]
100
                <option value="" selected="selected" class="menuheader">Any format</option>
95
            <option value="l-format:ta" selected="selected">Regular print</option>
101
            [% END %]
96
        [% ELSE %]
102
            [% IF (limits.$lformat.0 == 'ta' ) %]
97
            <option value="l-format:ta">Regular print</option>
103
                <option value="l-format:ta" selected="selected">Regular print</option>
98
        [% END %]
104
            [% ELSE %]
99
        [% IF (limits.$lformat.0 == 'tb' ) %]
105
                <option value="l-format:ta">Regular print</option>
100
            <option value="l-format:tb" selected="selected">Large print</option>
106
            [% END %]
101
        [% ELSE %]
107
            [% IF (limits.$lformat.0 == 'tb' ) %]
102
            <option value="l-format:tb">Large print</option>
108
                <option value="l-format:tb" selected="selected">Large print</option>
103
        [% END %]
109
            [% ELSE %]
104
        [% IF (limits.$lformat.0 == 'tc or fb' ) %]
110
                <option value="l-format:tb">Large print</option>
105
            <option value="l-format:tc or fb" selected="selected">Braille</option>
111
            [% END %]
106
        [% ELSE %]
112
            [% IF (limits.$lformat.0 == 'tc or fb' ) %]
107
            <option value="l-format:tc or fb">Braille</option>
113
                <option value="l-format:tc or fb" selected="selected">Braille</option>
108
        [% END %]
114
            [% ELSE %]
109
        <option value="">-----------</option>
115
                <option value="l-format:tc or fb">Braille</option>
110
        [% IF (limits.$lformat.0 == 'sd' ) %]
116
            [% END %]
111
            <option value="l-format:sd" selected="selected">CD audio</option>
117
            <option value="">-----------</option>
112
        [% ELSE %]
118
            [% IF (limits.$lformat.0 == 'sd' ) %]
113
            <option value="l-format:sd">CD audio</option>
119
                <option value="l-format:sd" selected="selected">CD audio</option>
114
        [% END %]
120
            [% ELSE %]
115
        [% IF (limits.$lformat.0 == 'ss' ) %]
121
                <option value="l-format:sd">CD audio</option>
116
            <option value="l-format:ss" selected="selected">Cassette recording</option>
122
            [% END %]
117
        [% ELSE %]
123
            [% IF (limits.$lformat.0 == 'ss' ) %]
118
            <option value="l-format:ss">Cassette recording</option>
124
                <option value="l-format:ss" selected="selected">Cassette recording</option>
119
        [% END %]
125
            [% ELSE %]
120
        [% IF (limits.$lformat.0 == 'vf' ) %]
126
                <option value="l-format:ss">Cassette recording</option>
121
            <option value="l-format:vf" selected="selected">VHS tape / Videocassette</option>
127
            [% END %]
122
        [% ELSE %]
128
            [% IF (limits.$lformat.0 == 'vf' ) %]
123
            <option value="l-format:vf">VHS tape / Videocassette</option>
129
                <option value="l-format:vf" selected="selected">VHS tape / Videocassette</option>
124
        [% END %]
130
            [% ELSE %]
125
        [% IF (limits.$lformat.0 == 'vd' ) %]
131
                <option value="l-format:vf">VHS tape / Videocassette</option>
126
            <option value="l-format:vd" selected="selected">DVD video / Videodisc</option>
132
            [% END %]
127
        [% ELSE %]
133
            [% IF (limits.$lformat.0 == 'vd' ) %]
128
            <option value="l-format:vd">DVD video / Videodisc</option>
134
                <option value="l-format:vd" selected="selected">DVD video / Videodisc</option>
129
        [% END %]
135
            [% ELSE %]
130
        [% IF (limits.$lformat.0 == 'co' ) %]
136
                <option value="l-format:vd">DVD video / Videodisc</option>
131
            <option value="l-format:co" selected="selected">CD software</option>
137
            [% END %]
132
        [% ELSE %]
138
            [% IF (limits.$lformat.0 == 'co' ) %]
133
            <option value="l-format:co">CD software</option>
139
                <option value="l-format:co" selected="selected">CD software</option>
134
        [% END %]
140
            [% ELSE %]
135
        [% IF (limits.$lformat.0 == 'cr' ) %]
141
                <option value="l-format:co">CD software</option>
136
            <option value="l-format:cr" selected="selected">Website</option>
142
            [% END %]
137
        [% ELSE %]
143
            [% IF (limits.$lformat.0 == 'cr' ) %]
138
            <option value="l-format:cr">Website</option>
144
                <option value="l-format:cr" selected="selected">Website</option>
139
        [% END %]
145
            [% ELSE %]
140
        [% limits.delete( 'l-format' ) %]
146
                <option value="l-format:cr">Website</option>
141
    </select>
147
            [% END %]
148
            [% limits.delete( 'l-format' ) %]
149
        </select>
150
    </p>
142
151
143
    <select name="limit" class="subtype">
152
    <p>
144
        [% IF ( limits.ctype.size ) %]
153
        <label for="additional_content_limit">Additional content types</label>
145
            <option value="">Additional content types</option>
154
        <select id="additional_content_limit" name="limit" class="subtype">
146
        [% ELSE %]
155
            [% IF ( limits.ctype.size ) %]
147
            <option value="" selected="selected">Additional content types</option>
156
                <option value="">Additional content types</option>
148
        [% END %]
157
            [% ELSE %]
149
        [% IF (limits.ctype.0 == 'a' ) %]
158
                <option value="" selected="selected">Additional content types</option>
150
            <option value="ctype:a" selected="selected">Abstracts / Summaries</option>
159
            [% END %]
151
        [% ELSE %]
160
            [% IF (limits.ctype.0 == 'a' ) %]
152
            <option value="ctype:a">Abstracts / Summaries</option>
161
                <option value="ctype:a" selected="selected">Abstracts / Summaries</option>
153
        [% END %]
162
            [% ELSE %]
154
        [% IF (limits.ctype.0 == 'b' ) %]
163
                <option value="ctype:a">Abstracts / Summaries</option>
155
            <option value="ctype:b" selected="selected">Bibliographies</option>
164
            [% END %]
156
        [% ELSE %]
165
            [% IF (limits.ctype.0 == 'b' ) %]
157
            <option value="ctype:b">Bibliographies</option>
166
                <option value="ctype:b" selected="selected">Bibliographies</option>
158
        [% END %]
167
            [% ELSE %]
159
        [% IF (limits.ctype.0 == 'c' ) %]
168
                <option value="ctype:b">Bibliographies</option>
160
            <option value="ctype:c" selected="selected">Catalogs</option>
169
            [% END %]
161
        [% ELSE %]
170
            [% IF (limits.ctype.0 == 'c' ) %]
162
            <option value="ctype:c">Catalogs</option>
171
                <option value="ctype:c" selected="selected">Catalogs</option>
163
        [% END %]
172
            [% ELSE %]
164
        [% IF (limits.ctype.0 == 'e' ) %]
173
                <option value="ctype:c">Catalogs</option>
165
            <option value="ctype:e" selected="selected">Encyclopedias </option>
174
            [% END %]
166
        [% ELSE %]
175
            [% IF (limits.ctype.0 == 'e' ) %]
167
            <option value="ctype:e">Encyclopedias </option>
176
                <option value="ctype:e" selected="selected">Encyclopedias </option>
168
        [% END %]
177
            [% ELSE %]
169
        [% IF (limits.ctype.0 == 'f' ) %]
178
                <option value="ctype:e">Encyclopedias </option>
170
            <option value="ctype:f" selected="selected">Handbooks</option>
179
            [% END %]
171
        [% ELSE %]
180
            [% IF (limits.ctype.0 == 'f' ) %]
172
            <option value="ctype:f">Handbooks</option>
181
                <option value="ctype:f" selected="selected">Handbooks</option>
173
        [% END %]
182
            [% ELSE %]
174
        [% IF (limits.ctype.0 == 'g' ) %]
183
                <option value="ctype:f">Handbooks</option>
175
            <option value="ctype:g" selected="selected">Legal articles</option>
184
            [% END %]
176
        [% ELSE %]
185
            [% IF (limits.ctype.0 == 'g' ) %]
177
            <option value="ctype:g">Legal articles</option>
186
                <option value="ctype:g" selected="selected">Legal articles</option>
178
        [% END %]
187
            [% ELSE %]
179
        [% IF (limits.ctype.0 == 'i' ) %]
188
                <option value="ctype:g">Legal articles</option>
180
            <option value="ctype:i" selected="selected">Indexes</option>
189
            [% END %]
181
        [% ELSE %]
190
            [% IF (limits.ctype.0 == 'i' ) %]
182
            <option value="ctype:i">Indexes</option>
191
                <option value="ctype:i" selected="selected">Indexes</option>
183
        [% END %]
192
            [% ELSE %]
184
        [% IF (limits.ctype.0 == 'j' ) %]
193
                <option value="ctype:i">Indexes</option>
185
            <option value="ctype:j" selected="selected">Patent document</option>
194
            [% END %]
186
        [% ELSE %]
195
            [% IF (limits.ctype.0 == 'j' ) %]
187
            <option value="ctype:j">Patent document</option>
196
                <option value="ctype:j" selected="selected">Patent document</option>
188
        [% END %]
197
            [% ELSE %]
189
        [% IF (limits.ctype.0 == 'k' ) %]
198
                <option value="ctype:j">Patent document</option>
190
            <option value="ctype:k" selected="selected">Discographies</option>
199
            [% END %]
191
        [% ELSE %]
200
            [% IF (limits.ctype.0 == 'k' ) %]
192
            <option value="ctype:k">Discographies</option>
201
                <option value="ctype:k" selected="selected">Discographies</option>
193
        [% END %]
202
            [% ELSE %]
194
        [% IF (limits.ctype.0 == 'l' ) %]
203
                <option value="ctype:k">Discographies</option>
195
            <option value="ctype:l" selected="selected">Legislation</option>
204
            [% END %]
196
        [% ELSE %]
205
            [% IF (limits.ctype.0 == 'l' ) %]
197
            <option value="ctype:l">Legislation</option>
206
                <option value="ctype:l" selected="selected">Legislation</option>
198
        [% END %]
207
            [% ELSE %]
199
        [% IF (limits.ctype.0 == 'm' ) %]
208
                <option value="ctype:l">Legislation</option>
200
            <option value="ctype:m" selected="selected">Theses</option>
209
            [% END %]
201
        [% ELSE %]
210
            [% IF (limits.ctype.0 == 'm' ) %]
202
            <option value="ctype:m">Theses</option>
211
                <option value="ctype:m" selected="selected">Theses</option>
203
        [% END %]
212
            [% ELSE %]
204
        [% IF (limits.ctype.0 == 'n' ) %]
213
                <option value="ctype:m">Theses</option>
205
            <option value="ctype:n" selected="selected">Surveys</option>
214
            [% END %]
206
        [% ELSE %]
215
            [% IF (limits.ctype.0 == 'n' ) %]
207
            <option value="ctype:n">Surveys</option>
216
                <option value="ctype:n" selected="selected">Surveys</option>
208
        [% END %]
217
            [% ELSE %]
209
        [% IF (limits.ctype.0 == 'o' ) %]
218
                <option value="ctype:n">Surveys</option>
210
            <option value="ctype:o" selected="selected">Reviews</option>
219
            [% END %]
211
        [% ELSE %]
220
            [% IF (limits.ctype.0 == 'o' ) %]
212
            <option value="ctype:o">Reviews</option>
221
                <option value="ctype:o" selected="selected">Reviews</option>
213
        [% END %]
222
            [% ELSE %]
214
        [% IF (limits.ctype.0 == 'p' ) %]
223
                <option value="ctype:o">Reviews</option>
215
            <option value="ctype:p" selected="selected">Programmed texts</option>
224
            [% END %]
216
        [% ELSE %]
225
            [% IF (limits.ctype.0 == 'p' ) %]
217
            <option value="ctype:p">Programmed texts</option>
226
                <option value="ctype:p" selected="selected">Programmed texts</option>
218
        [% END %]
227
            [% ELSE %]
219
        [% IF (limits.ctype.0 == 'q' ) %]
228
                <option value="ctype:p">Programmed texts</option>
220
            <option value="ctype:q" selected="selected">Filmographies</option>
229
            [% END %]
221
        [% ELSE %]
230
            [% IF (limits.ctype.0 == 'q' ) %]
222
            <option value="ctype:q">Filmographies</option>
231
                <option value="ctype:q" selected="selected">Filmographies</option>
223
        [% END %]
232
            [% ELSE %]
224
        [% IF (limits.ctype.0 == 'r' ) %]
233
                <option value="ctype:q">Filmographies</option>
225
            <option value="ctype:r" selected="selected">Directories</option>
234
            [% END %]
226
        [% ELSE %]
235
            [% IF (limits.ctype.0 == 'r' ) %]
227
            <option value="ctype:r">Directories</option>
236
                <option value="ctype:r" selected="selected">Directories</option>
228
        [% END %]
237
            [% ELSE %]
229
        [% IF (limits.ctype.0 == 's' ) %]
238
                <option value="ctype:r">Directories</option>
230
            <option value="ctype:s" selected="selected">Statistics</option>
239
            [% END %]
231
        [% ELSE %]
240
            [% IF (limits.ctype.0 == 's' ) %]
232
            <option value="ctype:s">Statistics</option>
241
                <option value="ctype:s" selected="selected">Statistics</option>
233
        [% END %]
242
            [% ELSE %]
234
        [% IF (limits.ctype.0 == 't' ) %]
243
                <option value="ctype:s">Statistics</option>
235
            <option value="ctype:t" selected="selected">Technical reports</option>
244
            [% END %]
236
        [% ELSE %]
245
            [% IF (limits.ctype.0 == 't' ) %]
237
            <option value="ctype:t">Technical reports</option>
246
                <option value="ctype:t" selected="selected">Technical reports</option>
238
        [% END %]
247
            [% ELSE %]
239
        [% IF (limits.ctype.0 == 'v' ) %]
248
                <option value="ctype:t">Technical reports</option>
240
            <option value="ctype:v" selected="selected">Legal cases and case notes</option>
249
            [% END %]
241
        [% ELSE %]
250
            [% IF (limits.ctype.0 == 'v' ) %]
242
            <option value="ctype:v">Legal cases and case notes</option>
251
                <option value="ctype:v" selected="selected">Legal cases and case notes</option>
243
        [% END %]
252
            [% ELSE %]
244
        [% IF (limits.ctype.0 == 'w' ) %]
253
                <option value="ctype:v">Legal cases and case notes</option>
245
            <option value="ctype:w" selected="selected">Law reports and digests</option>
254
            [% END %]
246
        [% ELSE %]
255
            [% IF (limits.ctype.0 == 'w' ) %]
247
            <option value="ctype:w">Law reports and digests</option>
256
                <option value="ctype:w" selected="selected">Law reports and digests</option>
248
        [% END %]
257
            [% ELSE %]
249
        [% IF (limits.ctype.0 == 'z' ) %]
258
                <option value="ctype:w">Law reports and digests</option>
250
            <option value="ctype:z" selected="selected">Treaties </option>
259
            [% END %]
251
        [% ELSE %]
260
            [% IF (limits.ctype.0 == 'z' ) %]
252
            <option value="ctype:z">Treaties </option>
261
                <option value="ctype:z" selected="selected">Treaties </option>
253
        [% END %]
262
            [% ELSE %]
254
        [% limits.delete( 'ctype' ) %]
263
                <option value="ctype:z">Treaties </option>
255
    </select>
264
            [% END %]
265
            [% limits.delete( 'ctype' ) %]
266
        </select>
267
    </p>
256
[%- END -%]
268
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/subtypes_unimarc.inc (-8 / +11 lines)
Lines 1-9 Link Here
1
<p>
1
<!-- SUBTYPE LIMITS -->
2
    <a id="show_coded_fields" class="toggle_element" data-element="#Coded_Fields,#show_coded_fields,#hide_coded_fields" href="#"><i class="fa-solid fa-square-plus"></i> Show coded information filters</a>
2
<div>
3
    <a id="hide_coded_fields" class="toggle_element" data-element="#Coded_Fields,#show_coded_fields,#hide_coded_fields" href="#" style="display:none;"><i class="fa-solid fa-square-minus"></i> Hide coded information filters</a>
4
</p>
5
<div style="display:none;" id="Coded_Fields">
6
    <!-- SUBTYPE LIMITS -->
7
    <fieldset>
3
    <fieldset>
8
        <legend>Coded fields</legend>
4
        <legend>Coded fields</legend>
9
        <p>
5
        <p>
Lines 54-59 Link Here
54
                <option value="lf:z">multiple/other literary forms</option>
50
                <option value="lf:z">multiple/other literary forms</option>
55
            </select>
51
            </select>
56
        </p>
52
        </p>
53
    </fieldset>
54
</div>
55
<div>
56
    <fieldset>
57
        <legend>More coded fields</legend>
57
        <p>
58
        <p>
58
            <label for="biography">Biography: </label>
59
            <label for="biography">Biography: </label>
59
            <select id="biography" name="limit" class="subtype">
60
            <select id="biography" name="limit" class="subtype">
Lines 126-132 Link Here
126
            </select>
127
            </select>
127
        </p>
128
        </p>
128
    </fieldset>
129
    </fieldset>
129
130
</div>
131
<div>
130
    <fieldset>
132
    <fieldset>
131
        <legend>Serials</legend>
133
        <legend>Serials</legend>
132
        <p>
134
        <p>
Lines 177-183 Link Here
177
            </select>
179
            </select>
178
        </p>
180
        </p>
179
    </fieldset>
181
    </fieldset>
180
182
</div>
183
<div>
181
    <fieldset>
184
    <fieldset>
182
        <legend>Picture</legend>
185
        <legend>Picture</legend>
183
        <p>
186
        <p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt (-264 / +468 lines)
Lines 12-17 Link Here
12
    [% END %]</title
12
    [% END %]</title
13
>
13
>
14
[% INCLUDE 'doc-head-close.inc' %]
14
[% INCLUDE 'doc-head-close.inc' %]
15
[% FILTER collapse %]
16
    <style>
17
        #advanced-search {
18
            select,
19
            input[type="text"] {
20
                background-color: #fff;
21
                border: 1px solid #aaaaaa;
22
                border-radius: 4px;
23
                color: #495057;
24
                display: inline-block;
25
                height: calc(1.5em + 0.75rem + 2px);
26
                line-height: 1.5;
27
                padding: 0.375rem 0.75rem;
28
                width: 100%;
29
            }
30
        }
31
32
        #advsearches {
33
            margin-bottom: 0.375rem;
34
        }
35
36
        #advsearches .tab-pane {
37
        }
38
39
        #advsearches table {
40
            border-collapse: separate;
41
            border-spacing: 5px;
42
            border-width: 0;
43
        }
44
45
        #advsearches td {
46
            border: 1px solid #eee;
47
            padding: 0.3em 0.4em;
48
        }
49
50
        #searchterms .search-term-input {
51
            margin: 0.375rem;
52
        }
53
54
        #searchterms .search-term-input.search-more-options {
55
            grid-column-end: 4;
56
            grid-column-start: 2;
57
            margin-left: -1.2rem;
58
        }
59
60
        @media only screen and (min-width: 608px) {
61
            #searchterms {
62
                .search-term-row {
63
                    column-gap: 0.5rem;
64
                    display: grid;
65
                    grid-template-columns: 30% 40% 30%;
66
                    margin-bottom: 0.5rem;
67
68
                    &.extended {
69
                        grid-template-columns: 10% 30% 40% 20%;
70
                    }
71
                }
72
73
                .search-term-input {
74
                    margin: 0;
75
                }
76
            }
77
        }
78
79
        @media only screen and (min-width: 608px) {
80
            .search-limits {
81
                align-items: stretch;
82
                display: grid;
83
                gap: 0.5rem;
84
                grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
85
            }
86
        }
87
88
        @media only screen and (min-width: 769px) {
89
            .search-limits {
90
            }
91
        }
92
93
        .search-limits {
94
            margin-bottom: 0.375rem;
95
        }
96
97
        .search-limits div {
98
            background-color: #fff;
99
            flex: 1;
100
        }
101
102
        .search-limits fieldset {
103
            margin: 0;
104
        }
105
106
        .search-limits label {
107
            display: block;
108
            font-weight: bold;
109
            margin: 0.375rem 0;
110
        }
111
112
        .search-limit-check {
113
            display: flex;
114
            gap: 0.375rem;
115
            margin-bottom: 1rem;
116
        }
117
        .search-limit-check input[type="checkbox"] {
118
            flex-shrink: 1;
119
        }
120
        .search-limit-check label {
121
            display: inline-block;
122
        }
123
124
        .limit-grid {
125
            display: grid;
126
            gap: 0.5rem;
127
            grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
128
        }
129
130
        .itemtypeimages {
131
            grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
132
        }
133
134
        .limit-grid-cell {
135
            align-items: flex-start;
136
            border: 1px solid #eee;
137
            display: flex;
138
            flex-direction: row;
139
            padding: 0.375rem;
140
        }
141
142
        .limit-grid-cell:has(img) {
143
            flex-direction: column;
144
        }
145
146
        .limit-grid-cell img,
147
        .limit-grid-cell input {
148
            flex-shrink: 1;
149
            flex-grow: 0;
150
        }
151
152
        .limit-grid-input {
153
            border: 0;
154
            display: flex;
155
            flex-direction: row;
156
            gap: 0.5rem;
157
            justify-content: center;
158
        }
159
160
        .limit-grid-input + label {
161
            display: block;
162
            margin-left: 0.5rem;
163
            text-align: left;
164
        }
165
166
        .ButtonLess .fa,
167
        .ButtonPlus .fa {
168
            padding: 3px 3px 0 5px;
169
        }
170
171
        .ButtonPlus {
172
            padding: 0.375rem 0.75rem;
173
        }
174
    </style>
175
[% END %]
15
</head>
176
</head>
16
177
17
[%- BLOCK language_limit_select -%]
178
[%- BLOCK language_limit_select -%]
Lines 44-71 Link Here
44
    <form action="search.pl" method="get">
205
    <form action="search.pl" method="get">
45
        <div id="advanced-search">
206
        <div id="advanced-search">
46
            [% IF edit_filter %]
207
            [% IF edit_filter %]
47
                <div id="toolbar" class="btn-toolbar">
208
                <div id="edit_search_filter" class="page-section">
48
                    <legend>Editing filter: [% edit_filter.name | html %]</legend>
209
                    <h2>Editing filter: [% edit_filter.name | html %]</h2>
49
                    <div class="p-2">
210
                    <div class="d-inline-flex gap-1">
50
                        <label for="filter_edit_opac">Show in OPAC?</label>
211
                        <div class="btn-group">
51
                        [% IF edit_filter.opac %]
212
                            <label class="btn label-btn">
52
                            <input type="checkbox" id="show_filter_opac" name="show_filter_opac" checked="checked" />
213
                                [% IF edit_filter.opac %]
53
                        [% ELSE %]
214
                                    <input type="checkbox" id="show_filter_opac" name="show_filter_opac" checked="checked" />
54
                            <input type="checkbox" id="show_filter_opac" name="show_filter_opac" />
215
                                [% ELSE %]
55
                        [% END %]
216
                                    <input type="checkbox" id="show_filter_opac" name="show_filter_opac" />
56
                        <label for="filter_edit_staff_client">Show in staff interface?</label>
217
                                [% END %]
57
                        [% IF edit_filter.staff_client %]
218
                                Show in OPAC?
58
                            <input type="checkbox" id="filter_edit_staff_client" name="filter_edit_staff_client" checked="checked" />
219
                            </label>
59
                        [% ELSE %]
220
                        </div>
60
                            <input type="checkbox" id="filter_edit_staff_client" name="filter_edit_staff_client" />
221
61
                        [% END %]
222
                        <label class="btn label-btn">
62
                    </div>
223
                            [% IF edit_filter.staff_client %]
63
                    <hr />
224
                                <input type="checkbox" id="filter_edit_staff_client" name="filter_edit_staff_client" checked="checked" />
64
                    <div class="btn-group">
225
                            [% ELSE %]
65
                        <button id="save_filter" class="btn btn-default"><i class="fa fa-save"></i> Save filter</button>
226
                                <input type="checkbox" id="filter_edit_staff_client" name="filter_edit_staff_client" />
227
                            [% END %]
228
                            Show in staff interface?
229
                        </label>
230
                        <button id="save_filter" class="btn btn-primary"><i class="fa fa-save"></i> Save filter</button>
66
                        <button class="btn btn-default" type="submit" accesskey="s"><i class="fa fa-search"></i> Search using filter</button>
231
                        <button class="btn btn-default" type="submit" accesskey="s"><i class="fa fa-search"></i> Search using filter</button>
67
                    </div>
68
                    <div class="btn-group">
69
                        <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options | uri %]" class="btn btn-link"><i class="fa fa-trash-can"></i> Cancel</a>
232
                        <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options | uri %]" class="btn btn-link"><i class="fa fa-trash-can"></i> Cancel</a>
70
                    </div>
233
                    </div>
71
                </div>
234
                </div>
Lines 106-124 Link Here
106
            <fieldset id="searchterms">
269
            <fieldset id="searchterms">
107
                <legend>Search for </legend>
270
                <legend>Search for </legend>
108
                [% FOREACH query IN operands %]
271
                [% FOREACH query IN operands %]
109
                    [% SET div_style = '' %]
272
                    [% SET div_class = 'search-term-row' %]
110
                    [% SET div_class = '' %]
111
                    [% IF expanded_options %]
273
                    [% IF expanded_options %]
112
                        [% div_class='search-term-row' %]
274
                        [% div_class='search-term-row extended' %]
113
                    [% END %]
114
                    [% IF expanded_options && loop.first %]
115
                        [% div_style = 'text-indent: 4.25em;' %]
116
                    [% END %]
275
                    [% END %]
117
276
118
                    <div class="[% div_class | html %]" style="[% div_style | html %]">
277
                    <div class="[% div_class | html %]" style="[% div_style | html %]">
119
                        [% IF ( expanded_options ) %]
278
                        [% IF ( expanded_options ) %]
120
                            [% IF loop.first %]
279
                            [% SET opindex = loop.index - 1 %]
121
                                [% SET opindex = loop.index - 1 %]
280
                            <div class="search-term-input">
122
                                <select name="op">
281
                                <select name="op">
123
                                    [% IF operators.$opindex == 'OR' %]
282
                                    [% IF operators.$opindex == 'OR' %]
124
                                        <option value="AND">and</option>
283
                                        <option value="AND">and</option>
Lines 134-172 Link Here
134
                                        <option value="NOT">not</option>
293
                                        <option value="NOT">not</option>
135
                                    [% END %]
294
                                    [% END %]
136
                                </select>
295
                                </select>
137
                            [% END %]
296
                            </div>
138
                        [% END %]
297
                        [% END %]
139
                        [% SET preselect = 'ms_' _ indexes.${loop.index}.replace(',','comma') %]
298
                        [% SET preselect = 'ms_' _ indexes.${loop.index}.replace(',','comma') %]
140
                        [% INCLUDE 'search_indexes.inc' ${preselect} = 1 index = loop.index %]
299
                        [% INCLUDE 'search_indexes.inc' ${preselect} = 1 index = loop.index %]
141
                        <input type="text" size="30" name="q" title="Enter search terms" value="[% query | html %]" />
300
                        <div class="search-term-input">
301
                            <input type="text" size="30" name="q" title="Enter search terms" value="[% query | html %]" />
302
                        </div>
142
                        [% IF ( expanded_options ) %]
303
                        [% IF ( expanded_options ) %]
143
                            [% IF ( loop.last ) %]
304
                            <div class="search-term-input">
144
                                <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
305
                                [% UNLESS ( loop.first ) %]
145
                            [% END %]
306
                                    <a class="ButtonPlus" title="Add another field" href="#"><i class="fa fa-xl fa-plus-square" aria-hidden="true"></i></a>
146
                            [% IF ( loop.first ) %]
307
                                    <a class="ButtonLess" title="Remove field" href="#"><i class="fa fa-xl fa-minus-square" aria-hidden="true"></i></a>
147
                                <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
308
                                [% END %]
148
                            [% END %]
309
                            </div>
149
                        [% END %]
310
                        [% END %]
150
                    </div>
311
                    </div>
151
                [% END %]
312
                    <div class="[% div_class | html %]" style="[% div_style | html %]">
152
                [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]
313
                        <div class="search-term-input search-more-options">
153
                    [% IF ( expanded_options ) %]
314
                            [% IF ( expanded_options ) %]
154
                        <p>
315
                                [% IF ( loop.last ) %]
155
                            [% IF Koha.Preference('ElasticsearchMARCFormat') == 'ARRAY' %]
316
                                    [% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' ) %]
156
                                <label><input type="checkbox" name="whole_record" /> Search entire MARC record</label>
317
                                        [% IF Koha.Preference('ElasticsearchMARCFormat') == 'ARRAY' %]
318
                                            <label class="btn label-btn"><input type="checkbox" name="whole_record" /> Search entire MARC record</label>
319
                                        [% END %]
320
                                        <label id="weight_search" class="btn label-btn"><input type="checkbox" name="weight_search" checked="checked" /> Apply field weights to search</label>
321
                                    [% END %]
322
                                    <label class="btn label-btn"><input type="checkbox" name="scan" id="scan" value="1" /> Scan indexes</label>
323
                                [% END %]
324
                            [% ELSE %]
325
                                <input type="hidden" name="weight_search" value="1" />
157
                            [% END %]
326
                            [% END %]
158
                            <span id="weight_search">
327
                        </div>
159
                                <label><input type="checkbox" name="weight_search" checked="checked" /> Apply field weights to search</label>
328
                    </div>
160
                            </span>
161
                        </p>
162
                    [% ELSE %]
163
                        <input type="hidden" name="weight_search" value="1" />
164
                    [% END %]
165
                [% END %]
329
                [% END %]
166
                [% IF Koha.Preference('IncludeSeeFromInSearches') %]
330
                [% IF Koha.Preference('IncludeSeeFromInSearches') %]
167
                    <div class="hint included-see-from-headings-info">
331
                    <div class="[% div_class | html %]" style="[% div_style | html %]">
168
                        <i class="fa fa-info-circle" aria-hidden="true"></i>
332
                        <div class="search-term-input hint included-see-from-headings-info" style="grid-column-start:2;grid-column-end:4">
169
                        See from (non-preferred form) headings are included
333
                            <i class="fa fa-info-circle" aria-hidden="true"></i>
334
                            See from (non-preferred form) headings are included
335
                        </div>
170
                    </div>
336
                    </div>
171
                [% END %]
337
                [% END %]
172
            </fieldset>
338
            </fieldset>
Lines 189-378 Link Here
189
                        [% END # /tab_item#advsearch-tab-... %]
355
                        [% END # /tab_item#advsearch-tab-... %]
190
                    [% END # /FOREACH advsearchloo %]
356
                    [% END # /FOREACH advsearchloo %]
191
                [% END # /WRAPPER tabs_nav %]
357
                [% END # /WRAPPER tabs_nav %]
192
                <!-- prettier-ignore-start -->
358
                [% WRAPPER tab_panels %]
193
                    [% WRAPPER tab_panels %]
359
                    [% FOREACH advsearchloo IN advancedsearchesloop %]
194
                        [% FOREACH advsearchloo IN advancedsearchesloop %]
360
                        [% WRAPPER tab_panel tabname="advsearch-tab-${advsearchloo.advanced_search_type}" %]
195
                            [% WRAPPER tab_panel tabname="advsearch-tab-${advsearchloo.advanced_search_type}" %]
361
                            <h4>Limit to any of the following:</h4>
196
                                <h4>Limit to any of the following:</h4>
362
                            [% SET with_img = Koha.Preference('noItemTypeImages') ? "" : "itemtypeimages" %]
197
                                <table>
363
                            <div id="[% advsearchloo.advanced_search_type | html %]_grid" class="limit-grid [% with_img | html %]">
198
                                    <tr>
364
                                [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
199
                                        [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
365
                                    <div class="limit-grid-cell">
200
                                            <td>
366
                                        [% SET limit_key = 'mc-' _ itemtypeloo.ccl _ "_" _ itemtypeloo.code %]
201
                                                [% SET limit_key = 'mc-' _ itemtypeloo.ccl _ "_" _ itemtypeloo.code %]
367
                                        <div class="limit-grid-input">
202
                                                [% IF limits.$limit_key.defined %]
368
                                            [% IF limits.$limit_key.defined %]
203
                                                    [% limits.delete( limit_key ) %]
369
                                                [% limits.delete( limit_key ) %]
204
                                                    <input type="checkbox" checked="checked" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/>
370
                                                <input
205
                                                [% ELSE %]
371
                                                    type="checkbox"
206
                                                    <input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/>
372
                                                    checked="checked"
207
                                                [% END # /IF limits.$limit_key.defined %]
373
                                                    id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]"
208
                                                <label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]">
374
                                                    name="limit"
209
                                                    [% UNLESS ( Koha.Preference('noItemTypeImages') ) %]
375
                                                    value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"
210
                                                        [% IF ( itemtypeloo.imageurl ) %]
376
                                                />
211
                                                            <img class="itemtype-image" src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />
212
                                                        [% END %]
213
                                                            &nbsp;
214
                                                    [% END %]
215
                                                    <span class="itypetext">[% itemtypeloo.description | html %]</span>
216
                                                </label>
217
                                            </td>
218
                                            [% IF ( loop.last ) %]
219
                                                </tr>
220
                                            [% ELSE %]
377
                                            [% ELSE %]
221
                                                [% UNLESS ( loop.count % 5 ) %]
378
                                                <input
222
                                                    </tr>
379
                                                    type="checkbox"
223
                                                    <tr>
380
                                                    id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]"
381
                                                    name="limit"
382
                                                    value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"
383
                                                />
384
                                            [% END # /IF limits.$limit_key.defined %]
385
                                            [% UNLESS ( Koha.Preference('noItemTypeImages') ) %]
386
                                                [% IF ( itemtypeloo.imageurl ) %]
387
                                                    <img class="itemtype-image" src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />
224
                                                [% END %]
388
                                                [% END %]
225
                                            [% END # /IF ( loop.last ) %]
389
                                            [% END %]
226
                                        [% END # /FOREACH itemtypeloo %]
390
                                        </div>
227
                                </table>
391
                                        <label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]">
228
                            [% END # tab_panel/#advsearch-... %]
392
                                            <span class="itypetext">[% itemtypeloo.description | html %]</span>
229
                        [% END # /FOREACH advsearchloo %]
393
                                        </label>
230
                    [% END # /WRAPPER tab_panels %]
394
                                    </div>
231
                    <!-- prettier-ignore-end -->
395
                                [% END # /FOREACH itemtypeloo %]
396
                            </div>
397
                        [% END # tab_panel/#advsearch-... %]
398
                    [% END # /FOREACH advsearchloo %]
399
                [% END # /WRAPPER tab_panels %]
232
            [% END # /WRAPPER tabs %]
400
            [% END # /WRAPPER tabs %]
233
            <!-- /MC-TYPE LIMIT -->
401
            <!-- /MC-TYPE LIMIT -->
234
402
235
            [% IF ( expanded_options ) %]
403
            <div class="search-limits">
236
                <!-- BASIC LIMITS -->
404
                <!-- BASIC LIMITS -->
237
                <fieldset id="basiclimits">
405
                <div id="basiclimits">
238
                    <legend>Limits</legend>
406
                    <fieldset>
239
                    <fieldset id="pubrange">
407
                        <legend>Limits</legend>
240
                        <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
408
                        <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
241
                        <p>
409
                        <p>
242
                            <label for="limit-yr">Year: </label>
410
                            <label for="limit-yr">Year</label>
243
                            [% SET year_limit_key = 'yr,st-numeric' %]
411
                            [% SET year_limit_key = 'yr,st-numeric' %]
244
                            <input type="text" size="15" name="limit-yr" id="limit-yr" value="[% limits.$year_limit_key.0 | html %]" />&nbsp;&nbsp;(format: yyyy-yyyy)
412
                            <input type="text" size="15" name="limit-yr" id="limit-yr" value="[% limits.$year_limit_key.0 | html %]" />
413
                            <span class="hint">(format: yyyy-yyyy)</span>
245
                            [% IF limits.$year_limit_key.defined %]
414
                            [% IF limits.$year_limit_key.defined %]
246
                                [% limits.delete(year_limit_key) %]
415
                                [% limits.delete(year_limit_key) %]
247
                            [% END %]
416
                            [% END %]
248
                        </p>
417
                        </p>
249
                        <!-- /PUB / COPY YEAR LIMIT -->
418
                        <!-- /PUB / COPY YEAR LIMIT -->
250
                    </fieldset>
251
                    <!-- /#pubrange -->
252
253
                    <fieldset id="language">
254
                        <!-- LANGUAGE LIMIT -->
419
                        <!-- LANGUAGE LIMIT -->
255
                        <p>
420
                        <p>
256
                            <label for="language-limit">Language: </label>
421
                            <label for="language-limit">Language</label>
257
                            [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' selected = limits.${'ln,rtrn'}.0 %]
422
                            [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' selected = limits.${'ln,rtrn'}.0 %]
258
                            [% limits.delete( 'ln,rtrn' ) %]
423
                            [% limits.delete( 'ln,rtrn' ) %]
259
                            <label for="language-original-limit">Language of original: </label>
424
                        </p>
425
                        <p>
426
                            <label for="language-original-limit">Language of original</label>
260
                            [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-original-limit' ln_index='language-original' selected = limits.${'language-original,rtrn'}.0 %]
427
                            [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-original-limit' ln_index='language-original' selected = limits.${'language-original,rtrn'}.0 %]
261
                            [% limits.delete( 'language-original,rtrn' ) %]
428
                            [% limits.delete( 'language-original,rtrn' ) %]
262
                        </p>
429
                        </p>
263
                        <!-- /LANGUAGE LIMIT -->
430
                        <!-- /LANGUAGE LIMIT -->
431
                        <!-- /#language -->
264
                    </fieldset>
432
                    </fieldset>
265
                    <!-- /#language -->
433
                </div>
266
                </fieldset>
267
                <!-- /#basiclimits -->
434
                <!-- /#basiclimits -->
268
                <!-- /BASIC LIMITS -->
435
                <!-- /BASIC LIMITS -->
269
            [% END # /IF ( expanded_options ) %]
270
436
271
            [% IF ( UNIMARC ) %]
437
                [% UNLESS ( UNIMARC ) %]
272
                [% INCLUDE 'subtypes_unimarc.inc' %]
438
                    [% PROCESS 'subtype_limits.inc' %]
273
            [% ELSE %]
439
                    <!-- SUBTYPE LIMITS -->
274
                [% PROCESS 'subtype_limits.inc' %]
440
                    <div>
275
                <!-- SUBTYPE LIMITS -->
441
                        <fieldset id="subtype">
276
                <fieldset id="subtype">
442
                            <legend>Subtype limits</legend>
277
                    <legend>Subtype limits</legend><p> [% PROCESS subtype_dropdowns %] </p
443
                            <p> [% PROCESS subtype_dropdowns %] </p>
278
                    ><fieldset id="current_subtype_limits">
444
                            <fieldset id="current_subtype_limits">
279
                        <legend>Current subtype limits</legend>
445
                                <legend>Current subtype limits</legend>
280
                        [% FOREACH subtype IN ['aud','fic','bio','ctype','l-format'] %]
446
                                [% FOREACH subtype IN ['aud','fic','bio','ctype','l-format'] %]
281
                            [% FOREACH limit IN limits.$subtype %]
447
                                    [% FOREACH limit IN limits.$subtype %]
282
                                <span>
448
                                        <span>
283
                                    <input name="limit" value="[% subtype | html %]:[% limit | html %]" type="hidden" />
449
                                            <input name="limit" value="[% subtype | html %]:[% limit | html %]" type="hidden" />
284
                                    <label for="subtype_limit_[% loop.index() | html %]">[%# PROCESS subtype_limits_description subtype_limit = subtype _':' _ limit #%]</label>
450
                                            <label for="subtype_limit_[% loop.index() | html %]">[%# PROCESS subtype_limits_description subtype_limit = subtype _':' _ limit #%]</label>
285
                                    <input type="checkbox" class="toggle_limit" name="subtype_limit_[% loop.index() | html %]" checked="checked" />
451
                                            <input type="checkbox" class="toggle_limit" name="subtype_limit_[% loop.index() | html %]" checked="checked" />
286
                                </span>
452
                                        </span>
453
                                    [% END %]
454
                                    [% limits.delete( subtype ) %]
455
                                [% END # /FOREACH subtype %]
456
                            </fieldset>
457
                            <!-- #current_subtype_limits -->
458
                        </fieldset>
459
                    </div>
460
                    <!-- /#subtype -->
461
                [% END # /IF ( UNIMARC ) %]
462
463
                <!-- AVAILABILITY LIMITS -->
464
                <div>
465
                    <fieldset id="availability">
466
                        <legend>Location and availability</legend>
467
                        <fieldset id="currently-avail">
468
                            [% IF limit_available %]
469
                                <div class="search-limit-check">
470
                                    <input type="checkbox" id="available-items" name="limit" value="available" checked="checked" />
471
                                    <label for="available-items"> Only items currently available </label>
472
                                </div>
473
                            [% ELSE %]
474
                                <div class="search-limit-check">
475
                                    <input type="checkbox" id="available-items" name="limit" value="available" />
476
                                    <label for="available-items"> Only items currently available </label>
477
                                </div>
287
                            [% END %]
478
                            [% END %]
288
                            [% limits.delete( subtype ) %]
479
                        </fieldset>
289
                        [% END # /FOREACH subtype %]
480
                        <!-- /#currently-avail -->
481
482
                        <fieldset id="select-libs">
483
                            <p>
484
                                <label for="branchloop">Individual libraries:</label>
485
                                <select name="limit" id="branchloop">
486
                                    <option value="">All libraries</option>
487
                                    [%# FIXME Should not we filter the libraries displayed? %]
488
                                    [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1, selected => limits.branch.0 ) %]
489
                                    [% limits.delete('branch') %]
490
                                </select>
491
                                <!-- /#branchloop -->
492
                            </p>
493
                            [% IF search_groups %]
494
                                <p>OR</p>
495
                                <p>
496
                                    <label for="categoryloop">Groups of libraries</label>
497
                                    <select name="limit" id="categoryloop">
498
                                        <option value=""> -- none -- </option>
499
                                        [% FOREACH sg IN search_groups %]
500
                                            [% UNLESS sg.branchcode %]
501
                                                [% IF limits.multibranchlimit.0 == sg.id %]
502
                                                    <option selected="selected" value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
503
                                                [% ELSE %]
504
                                                    <option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
505
                                                [% END %]
506
                                            [% END %]
507
                                        [% END %]
508
                                        [% limits.delete('multibranchlimit') %]
509
                                    </select>
510
                                    <!-- /#categoryloop -->
511
                                </p>
512
                            [% END # /search_groups %]
513
                        </fieldset>
514
                        <!-- /#select-libs -->
290
                    </fieldset>
515
                    </fieldset>
291
                    <!-- #current_subtype_limits -->
516
                </div>
292
                </fieldset>
517
                <!-- /#availability -->
293
                <!-- /#subtype -->
518
                <!-- /AVAILABILITY LIMITS -->
294
            [% END # /IF ( UNIMARC ) %]
519
295
520
                <!-- OTHER LIMITS (facets, etc.) -->
296
            <!-- AVAILABILITY LIMITS -->
521
                [% IF limits.size %]
297
            <fieldset id="availability">
522
                    <fieldset id="">
298
                <legend>Location and availability</legend>
523
                        <legend>Other limits</legend>
299
                <fieldset id="currently-avail">
300
                    [% IF limit_available %]
301
                        <p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" checked="checked" /></p>
302
                    [% ELSE %]
303
                        <p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
304
                    [% END %]
305
                </fieldset>
306
                <!-- /#currently-avail -->
307
308
                <fieldset id="select-libs">
309
                    <p>
310
                        <label for="branchloop">Individual libraries:</label>
311
                        <select name="limit" id="branchloop">
312
                            <option value="">All libraries</option>
313
                            [%# FIXME Should not we filter the libraries displayed? %]
314
                            [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1, selected => limits.branch.0 ) %]
315
                            [% limits.delete('branch') %]
316
                        </select>
317
                        <!-- /#branchloop -->
318
                    </p>
319
                    [% IF search_groups %]
320
                        <p>OR</p>
321
                        <p>
524
                        <p>
322
                            <label for="categoryloop">Groups of libraries: </label>
525
                            [% FOREACH key IN limits.keys %]
323
                            <select name="limit" id="categoryloop">
526
                                [% FOREACH limit IN limits.$key %]
324
                                <option value=""> -- none -- </option>
527
                                    <span>
325
                                [% FOREACH sg IN search_groups %]
528
                                        <input type="hidden" name="limit" value="[% key | html %]:[% limit | html %]" />
326
                                    [% UNLESS sg.branchcode %]
529
                                        <label for="other_[% key _ loop.index() | html %]">[% key | html %]:[% limit | html %]</label>
327
                                        [% IF limits.multibranchlimit.0 == sg.id %]
530
                                        <input type="checkbox" class="toggle_limit" name="other_[% key _ loop.index() | html %]" checked="checked" />
328
                                            <option selected="selected" value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
531
                                    </span>
329
                                        [% ELSE %]
330
                                            <option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option>
331
                                        [% END %]
332
                                    [% END %]
333
                                [% END %]
532
                                [% END %]
334
                                [% limits.delete('multibranchlimit') %]
533
                            [% END %]
534
                        </p>
535
                    </fieldset>
536
                [% END # /IF limits.size %]
537
                <!-- /OTHER LIMITS (facets, etc.) -->
538
539
                <!-- RANK LIMITS -->
540
                <div>
541
                    <fieldset id="sortby">
542
                        <legend>Sorting</legend>
543
                        <p>
544
                            <label for="sort_by">Sort by</label>
545
                            <select id="sort_by" name="sort_by">
546
                                [% INCLUDE 'resort_form.inc' sort_by = sort || sort_by %]
335
                            </select>
547
                            </select>
336
                            <!-- /#categoryloop -->
337
                        </p>
548
                        </p>
338
                    [% END # /search_groups %]
549
                    </fieldset>
339
                </fieldset>
550
                </div>
340
                <!-- /#select-libs -->
551
                <!-- /#sortby -->
341
            </fieldset>
552
                <!-- /RANK LIMITS -->
342
            <!-- /#availability -->
553
                <!-- /.search-limits -->
343
            <!-- /AVAILABILITY LIMITS -->
554
                [% IF ( UNIMARC ) %]
344
555
                    [% INCLUDE 'subtypes_unimarc.inc' %]
345
            <!-- OTHER LIMITS (facets, etc.) -->
556
                [% END %]
346
            [% IF limits.size %]
557
            </div>
347
                <fieldset id="">
348
                    <legend>Other limits</legend>
349
                    <p>
350
                        [% FOREACH key IN limits.keys %]
351
                            [% FOREACH limit IN limits.$key %]
352
                                <span>
353
                                    <input type="hidden" name="limit" value="[% key | html %]:[% limit | html %]" />
354
                                    <label for="other_[% key _ loop.index() | html %]">[% key | html %]:[% limit | html %]</label>
355
                                    <input type="checkbox" class="toggle_limit" name="other_[% key _ loop.index() | html %]" checked="checked" />
356
                                </span>
357
                            [% END %]
358
                        [% END %]
359
                    </p>
360
                </fieldset>
361
            [% END # /IF limits.size %]
362
            <!-- /OTHER LIMITS (facets, etc.) -->
363
364
            <!-- RANK LIMITS -->
365
            <fieldset id="sortby">
366
                <legend>Sorting</legend>
367
                <p>
368
                    <label for="sort_by">Sort by: </label>
369
                    <select id="sort_by" name="sort_by">
370
                        [% INCLUDE 'resort_form.inc' sort_by = sort || sort_by %]
371
                    </select>
372
                </p>
373
            </fieldset>
374
            <!-- /#sortby -->
375
            <!-- /RANK LIMITS -->
376
        </div>
558
        </div>
377
        <!-- /#advanced-search -->
559
        <!-- /#advanced-search -->
378
    </form>
560
    </form>
Lines 383-402 Link Here
383
    [% Asset.css("css/humanmsg.css") | $raw %]
565
    [% Asset.css("css/humanmsg.css") | $raw %]
384
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
566
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
385
    <script>
567
    <script>
386
        /**
568
        window.addEventListener('pageshow', function( e ){
387
         *  Function add_field();
569
            $('.form-control:visible').prop('disabled' , false );
388
         *  This function allows to display a new field to search.
570
        });
389
         */
390
        function add_field() {
391
            var ButtonPlus = document.getElementById("ButtonPlus");
392
            var line = ButtonPlus.parentNode;
393
            var dad  = line.parentNode;
394
            dad.appendChild(line.cloneNode(true));
395
            line.removeChild(ButtonPlus);
396
        }
397
571
398
        $(document).ready(function() {
572
        $(document).ready(function() {
399
            $("input[name=q]:eq(0)").focus();
573
574
            /* This function allows to display a new field to search.
575
            */
576
            $(document).on("click", '.ButtonPlus', function(e) {
577
                e.preventDefault();
578
                $('.ButtonLess').show();
579
                var thisLine = $(this).parent().parent();
580
                var newLine = thisLine.clone();
581
                $(newLine).find('.search-term-input select[name="op"]').first().prop("disabled",false).show();
582
                newLine.find('input').val('');
583
                thisLine.after(newLine);
584
            });
585
586
            $(document).on("click", '.ButtonLess', function(e) {
587
                e.preventDefault();
588
                $(this).parent().parent().remove();
589
                if( $(".ButtonLess").length < 2 ) {
590
                   $('.ButtonLess').hide();
591
                }
592
                $('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide();
593
            });
594
595
            $('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide();
596
400
            if( $("#advsearches .tab-pane.active").length < 1 ){
597
            if( $("#advsearches .tab-pane.active").length < 1 ){
401
                $("#advsearches a:first").tab("show");
598
                $("#advsearches a:first").tab("show");
402
            }
599
            }
Lines 431-488 Link Here
431
                browser.show_back_link();
628
                browser.show_back_link();
432
            [% END %]
629
            [% END %]
433
630
434
            [% IF edit_filter %]
631
            $(".limit-grid > *").on("click", function(e){
435
            $("#save_filter").click(function(e){
632
                const checkbox = $(this).find("input");
436
                e.preventDefault();
633
                if( checkbox.prop("checked") ){
437
                let operators = [];
634
                    checkbox.prop("checked", false );
438
                let indexes = [];
635
                } else {
439
                let operands = [];
636
                    checkbox.prop("checked", true );
440
                let limits =[];
441
                let opac = $("#show_filter_opac").prop('checked');
442
                let staff_client = $("#show_filter_staff_client").prop('checked');
443
                $("select[name='op']").each(function(){
444
                    operators.push( $(this).val() );
445
                });
446
                $("select[name='idx']").each(function(){
447
                    indexes.push( $(this).val() );
448
                });
449
                $("input[name='q']").each(function(){
450
                    operands.push( $(this).val() );
451
                });
452
                $("select[name='limit'],input[name='limit']:checked").each(function(){
453
                    if( $(this).val() != ""){
454
                        limits.push( $(this).val() );
455
                    }
456
                });
457
                let year_limit = $("#limit-yr").val();
458
                if( year_limit ){
459
                    limits.push( "yr,st-numeric:"+year_limit );
460
                }
637
                }
461
                let options = {
638
            });
462
                    url: '/api/v1/search_filters/'+ [% edit_filter.id | html %],
639
463
                    method: "PUT",
640
            [% IF edit_filter %]
464
                    contentType: "application/json",
641
                $("#save_filter").click(function(e){
465
                    data: JSON.stringify({
642
                    e.preventDefault();
466
                        name: "[% edit_filter.name | html %]",
643
                    let operators = [];
467
                        query: JSON.stringify({ operands: operands, indexes: indexes, operators:operators }),
644
                    let indexes = [];
468
                        limits: JSON.stringify({ limits: limits }),
645
                    let operands = [];
469
                        opac: opac,
646
                    let limits =[];
470
                        staff_client: staff_client,
647
                    let opac = $("#show_filter_opac").prop('checked');
471
                    })
648
                    let staff_client = $("#show_filter_staff_client").prop('checked');
472
                };
649
                    $("select[name='op']").each(function(){
473
                $.ajax(options)
650
                        operators.push( $(this).val() );
474
                    .then(function(result) {
651
                    });
475
                        humanMsg.displayAlert( _("Saved filter: ") + result.name  , { className: 'human Success' } );
652
                    $("select[name='idx']").each(function(){
476
                    })
653
                        indexes.push( $(this).val() );
477
                    .fail( function(err){
654
                    });
478
                        humanMsg.displayAlert( _("There was an error during saving:") + err.responseText, { className: 'humanError' } );
655
                    $("input[name='q']").each(function(){
656
                        operands.push( $(this).val() );
479
                    });
657
                    });
658
                    $("select[name='limit'],input[name='limit']:checked").each(function(){
659
                        if( $(this).val() != ""){
660
                            limits.push( $(this).val() );
661
                        }
662
                    });
663
                    let year_limit = $("#limit-yr").val();
664
                    if( year_limit ){
665
                        limits.push( "yr,st-numeric:"+year_limit );
666
                    }
667
                    let options = {
668
                        url: '/api/v1/search_filters/'+ [% edit_filter.id | html %],
669
                        method: "PUT",
670
                        contentType: "application/json",
671
                        data: JSON.stringify({
672
                            name: "[% edit_filter.name | html %]",
673
                            query: JSON.stringify({ operands: operands, indexes: indexes, operators:operators }),
674
                            limits: JSON.stringify({ limits: limits }),
675
                            opac: opac,
676
                            staff_client: staff_client,
677
                        })
678
                    };
679
                    $.ajax(options)
680
                        .then(function(result) {
681
                            humanMsg.displayAlert( _("Saved filter: ") + result.name  , { className: 'human Success' } );
682
                        })
683
                        .fail( function(err){
684
                            humanMsg.displayAlert( _("There was an error during saving:") + err.responseText, { className: 'humanError' } );
685
                        });
480
686
481
687
482
            });
688
                });
483
            [% END %]
689
            [% END %]
484
485
486
        });
690
        });
487
    </script>
691
    </script>
488
[% END %]
692
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-8 / +7 lines)
Lines 604-626 Link Here
604
        });
604
        });
605
            /* This function allows to display a new field to search.
605
            /* This function allows to display a new field to search.
606
            */
606
            */
607
            $(document).on("click", '.ButtonPlus', function(e) {
607
            $(document).on("click", ".ButtonPlus", function(e) {
608
                e.preventDefault();
608
                e.preventDefault();
609
                $('.ButtonLess').show();
609
                $(".ButtonLess").show();
610
                var thisLine = $(this).parent().parent();
610
                var thisLine = $(this).parent().parent();
611
                var newLine = thisLine.clone();
611
                var newLine = thisLine.clone();
612
                $(newLine).find('.search-term-input select[name="op"]').first().prop("disabled",false).show();
612
                $(newLine).find(".search-term-input select[name='op']").first().prop("disabled",false).show();
613
                newLine.find('input').val('');
613
                newLine.find("input").val("");
614
                thisLine.after(newLine);
614
                thisLine.after(newLine);
615
            });
615
            });
616
616
617
            $(document).on("click", '.ButtonLess', function(e) {
617
            $(document).on("click", ".ButtonLess", function(e) {
618
                e.preventDefault();
618
                e.preventDefault();
619
                if( $("a.ButtonLess").length <= 2 ) {
619
                if( $("a.ButtonLess").length <= 2 ) {
620
                   $('.ButtonLess').hide();
620
                   $(".ButtonLess").hide();
621
                }
621
                }
622
                $(this).parent().parent().remove();
622
                $(this).parent().parent().remove();
623
                $('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide();
623
                $(".search-term-row .search-term-input select[name='op']").first().prop("disabled",true).hide();
624
            });
624
            });
625
    </script>
625
    </script>
626
[% END %]
626
[% END %]
627
- 

Return to bug 39398