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

(-)a/C4/Search.pm (-9 / +8 lines)
Lines 1305-1311 sub buildQuery { Link Here
1305
    warn "QUERY BEFORE LIMITS: >$query<" if $DEBUG;
1305
    warn "QUERY BEFORE LIMITS: >$query<" if $DEBUG;
1306
1306
1307
    # add limits
1307
    # add limits
1308
    my $group_OR_limits;
1308
    my %group_OR_limits;
1309
    my $availability_limit;
1309
    my $availability_limit;
1310
    foreach my $this_limit (@limits) {
1310
    foreach my $this_limit (@limits) {
1311
        if ( $this_limit =~ /available/ ) {
1311
        if ( $this_limit =~ /available/ ) {
Lines 1322-1338 sub buildQuery { Link Here
1322
        # group_OR_limits, prefixed by mc-
1322
        # group_OR_limits, prefixed by mc-
1323
        # OR every member of the group
1323
        # OR every member of the group
1324
        elsif ( $this_limit =~ /mc/ ) {
1324
        elsif ( $this_limit =~ /mc/ ) {
1325
        
1325
            my ($k,$v) = split(/:/, $this_limit,2);
1326
            if ( $this_limit =~ /mc-ccode:/ ) {
1326
            if ( $k !~ /mc-i(tem)?type/ ) {
1327
                # in case the mc-ccode value has complicating chars like ()'s inside it we wrap in quotes
1327
                # in case the mc-ccode value has complicating chars like ()'s inside it we wrap in quotes
1328
                $this_limit =~ tr/"//d;
1328
                $this_limit =~ tr/"//d;
1329
                my ($k,$v) = split(/:/, $this_limit,2);
1330
                $this_limit = $k.":\"".$v."\"";
1329
                $this_limit = $k.":\"".$v."\"";
1331
            }
1330
            }
1332
1331
1333
            $group_OR_limits .= " or " if $group_OR_limits;
1332
            $group_OR_limits{$k} .= " or " if $group_OR_limits{$k};
1334
            $limit_desc      .= " or " if $group_OR_limits;
1333
            $limit_desc      .= " or " if $group_OR_limits{$k};
1335
            $group_OR_limits .= "$this_limit";
1334
            $group_OR_limits{$k} .= "$this_limit";
1336
            $limit_cgi       .= "&limit=$this_limit";
1335
            $limit_cgi       .= "&limit=$this_limit";
1337
            $limit_desc      .= " $this_limit";
1336
            $limit_desc      .= " $this_limit";
1338
        }
1337
        }
Lines 1355-1363 sub buildQuery { Link Here
1355
            }
1354
            }
1356
        }
1355
        }
1357
    }
1356
    }
1358
    if ($group_OR_limits) {
1357
    foreach my $k (keys (%group_OR_limits)) {
1359
        $limit .= " and " if ( $query || $limit );
1358
        $limit .= " and " if ( $query || $limit );
1360
        $limit .= "($group_OR_limits)";
1359
        $limit .= "($group_OR_limits{$k})";
1361
    }
1360
    }
1362
    if ($availability_limit) {
1361
    if ($availability_limit) {
1363
        $limit .= " and " if ( $query || $limit );
1362
        $limit .= " and " if ( $query || $limit );
(-)a/catalogue/search.pl (-27 / +33 lines)
Lines 239-282 my $categories = GetBranchCategories(undef,'searchdomain'); Link Here
239
$template->param(branchloop => \@branch_loop, searchdomainloop => $categories);
239
$template->param(branchloop => \@branch_loop, searchdomainloop => $categories);
240
240
241
# load the Type stuff
241
# load the Type stuff
242
# load the Type stuff
243
my $itemtypes = GetItemTypes;
242
my $itemtypes = GetItemTypes;
244
# the index parameter is different for item-level itemtypes
243
# the index parameter is different for item-level itemtypes
245
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
244
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
246
my @itemtypesloop;
245
my @advancedsearchesloop;
247
my $selected=1;
248
my $cnt;
246
my $cnt;
249
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
247
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes";
250
248
my @advanced_search_types = split(/\|/, $advanced_search_types);
251
if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {                                                                 foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
249
252
    my %row =(  number=>$cnt++,
250
foreach my $advanced_srch_type (@advanced_search_types) {
253
                ccl => qq($itype_or_itemtype,phr),
251
   if ($advanced_srch_type eq 'itemtypes') {
252
   # itemtype is a special case, since it's not defined in authorized values
253
        my @itypesloop;
254
	foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
255
	    my %row =(  number=>$cnt++,
256
		ccl => "$itype_or_itemtype,phr",
254
                code => $thisitemtype,
257
                code => $thisitemtype,
255
                selected => $selected,
256
                description => $itemtypes->{$thisitemtype}->{'description'},
258
                description => $itemtypes->{$thisitemtype}->{'description'},
257
                count5 => $cnt % 4,
259
                imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
258
                imageurl=> getitemtypeimagelocation( 'intranet', $itemtypes->{$thisitemtype}->{'imageurl'} ),
259
            );
260
            );
260
        $selected = 0 if ($selected) ;
261
    	    push @itypesloop, \%row;
261
        push @itemtypesloop, \%row;
262
	}
262
    }
263
        my %search_code = (  advanced_search_type => $advanced_srch_type,
263
    $template->param(itemtypeloop => \@itemtypesloop);
264
                             code_loop => \@itypesloop );
264
} else {
265
        push @advancedsearchesloop, \%search_code;
265
    my $advsearchtypes = GetAuthorisedValues($advanced_search_types);
266
    } else {
266
    for my $thisitemtype (sort {$a->{'lib'} cmp $b->{'lib'}} @$advsearchtypes) {
267
    # covers all the other cases: non-itemtype authorized values 
267
        my %row =(
268
       my $advsearchtypes = GetAuthorisedValues($advanced_srch_type, '', 'opac');
268
                number=>$cnt++,
269
        my @authvalueloop;
269
                ccl => $advanced_search_types,
270
	for my $thisitemtype (@$advsearchtypes) {
271
		my %row =(
272
				number=>$cnt++,
273
				ccl => $advanced_srch_type,
270
                code => $thisitemtype->{authorised_value},
274
                code => $thisitemtype->{authorised_value},
271
                selected => $selected,
272
                description => $thisitemtype->{'lib'},
275
                description => $thisitemtype->{'lib'},
273
                count5 => $cnt % 4,
276
                imageurl => getitemtypeimagelocation( 'intranet', $thisitemtype->{'imageurl'} ),
274
                imageurl=> getitemtypeimagelocation( 'intranet', $thisitemtype->{'imageurl'} ),
277
                );
275
            );
278
		push @authvalueloop, \%row;
276
        push @itemtypesloop, \%row;
279
	}
280
        my %search_code = (  advanced_search_type => $advanced_srch_type,
281
                             code_loop => \@authvalueloop );
282
        push @advancedsearchesloop, \%search_code;
277
    }
283
    }
278
    $template->param(itemtypeloop => \@itemtypesloop);
279
}
284
}
285
$template->param(advancedsearchesloop => \@advancedsearchesloop);
280
286
281
# The following should only be loaded if we're bringing up the advanced search template
287
# The following should only be loaded if we're bringing up the advanced search template
282
if ( $template_type eq 'advsearch' ) {
288
if ( $template_type eq 'advsearch' ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-6 / +10 lines)
Lines 2054-2085 fieldset.rows+h3 {clear:both;padding-top:.5em;} Link Here
2054
    padding-left:20px
2054
    padding-left:20px
2055
}
2055
}
2056
2056
2057
#advanced-search fieldset {
2057
.adsearch {
2058
    margin: 0;
2059
}
2060
2061
.advsearch fieldset {
2058
	border : 1px solid #EEE;
2062
	border : 1px solid #EEE;
2059
	-moz-border-radius : 3px;
2063
	-moz-border-radius : 3px;
2060
	border-radius : 3px;
2064
	border-radius : 3px;
2061
}
2065
}
2062
2066
2063
#advanced-search fieldset.action {
2067
.advsearch fieldset.action {
2064
	border : 0;
2068
	border : 0;
2065
}
2069
}
2066
2070
2067
#advanced-search fieldset fieldset {
2071
.advsearch fieldset fieldset {
2068
	border : 1px solid #EEE;
2072
	border : 1px solid #EEE;
2069
	margin : 0;
2073
	margin : 0;
2070
	padding : .3em .5em;
2074
	padding : .3em .5em;
2071
	-moz-border-radius : 0;
2075
	-moz-border-radius : 0;
2072
	border-radius : 0;
2076
	border-radius : 0;
2073
}
2077
}
2074
#advanced-search fieldset fieldset+fieldset {
2078
.advsearch fieldset fieldset+fieldset {
2075
	border-top : 0;
2079
	border-top : 0;
2076
}
2080
}
2077
#advanced-search table {
2081
.advsearch table {
2078
	border-spacing : 5px;
2082
	border-spacing : 5px;
2079
	border-collapse : separate;
2083
	border-collapse : separate;
2080
	border-width : 0;
2084
	border-width : 0;
2081
}
2085
}
2082
#advanced-search td {
2086
.advsearch td {
2083
	border : 1px solid #EEE;
2087
	border : 1px solid #EEE;
2084
	padding : 0.3em 0.4em;
2088
	padding : 0.3em 0.4em;
2085
}
2089
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (-5 / +4 lines)
Lines 71-82 Searching: Link Here
71
            - subdivisions for searches generated by clicking on subject tracings.
71
            - subdivisions for searches generated by clicking on subject tracings.
72
    Search Form:
72
    Search Form:
73
        -
73
        -
74
            - Show checkboxes to search by
74
            - Show tabs in OPAC and staff-side advanced search for limiting searches on the
75
            - pref: AdvancedSearchTypes
75
            - pref: AdvancedSearchTypes
76
              choices:
76
              class: long
77
                  itemtypes: itemtype
77
            - "fields (separate values with |). Tabs appear in the order listed.<br/>"
78
                  ccode: collection code
78
            - "<em>Currently supported values</em>: Item types (<strong>itemtypes</strong>), Collection Codes (<strong>ccode</strong>) and Shelving Location (<strong>loc</strong>)."
79
            - on the OPAC and staff advanced search pages.
80
        -
79
        -
81
            - By default,
80
            - By default,
82
            - pref: expandedSearchOption
81
            - pref: expandedSearchOption
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt (-18 / +32 lines)
Lines 15-20 Link Here
15
	}
15
	}
16
	$(document).ready(function() {
16
	$(document).ready(function() {
17
		$("input[name=q]:eq(0)").focus();
17
		$("input[name=q]:eq(0)").focus();
18
                $('#advsearches > ul').tabs();
18
	});
19
	});
19
</script>
20
</script>
20
</head>
21
</head>
Lines 92-118 Link Here
92
            <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear">[New search]</a>
93
            <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear">[New search]</a>
93
            </fieldset>
94
            </fieldset>
94
<!-- /SEARCH BUTTONS -->
95
<!-- /SEARCH BUTTONS -->
95
96
</div>
96
<!-- ITEMTYPE LIMITS -->
97
<!-- MC-TYPE LIMITS -->
97
	<fieldset id="itemtypelist">
98
    <div class="yui-g">
98
     <legend>Limit to any of the following</legend>
99
      <div id="advsearches" class="toptabs">
100
      <ul>
101
      [% FOREACH advsearchloo IN advancedsearchesloop %]
102
        <li id="advsearch-tab-[% advsearchloo.advanced_search_type %]">
103
           <a href="/cgi-bin/koha/opac-search.pl#advsearch-[% advsearchloo.advanced_search_type %]">
104
           [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item Type
105
           [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
106
           [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving Location
107
           [% ELSE %]Something Else
108
           [% END %]
109
           </a>
110
        </li>                                                 
111
      [% END %]
112
      </ul>
113
    [% FOREACH advsearchloo IN advancedsearchesloop %]
114
    <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="advsearch">
115
    <fieldset>
116
    <legend>Limit to any of the following:</legend>
99
    <table>
117
    <table>
100
        <tr>
118
        <tr>
101
      [% FOREACH itemtypeloo IN itemtypeloop %]
119
    [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
102
        <td>
120
        <td><input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
103
        [% UNLESS ( noItemTypeImages ) %]
121
        [% itemtypeloo.description %]</label></td>
104
        [% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]
122
        [% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %]
105
        [% END %]
123
    [% END %]
106
		<input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]" />&nbsp;
124
        </tr>
107
        <label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% itemtypeloo.description %]</label></td>
108
        [% UNLESS ( itemtypeloo.count5 ) %]</tr><tr>[% END %]
109
      [% END %]
110
	  <!-- FIXME: for validation, avoid generating empty row -->
111
      </tr>
112
    </table>
125
    </table>
113
	</fieldset>
126
    </fieldset>
114
<!-- /ITEMTYPE LIMITS -->
127
    </div>
115
128
    [% END %]
129
<!-- /MC-TYPE LIMIT -->
116
[% IF ( expanded_options ) %]
130
[% IF ( expanded_options ) %]
117
<!-- BASIC LIMITS -->
131
<!-- BASIC LIMITS -->
118
 <fieldset id="basiclimits">
132
 <fieldset id="basiclimits">
(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (-4 / +4 lines)
Lines 660-666 input.deleteshelf:active { Link Here
660
}
660
}
661
661
662
/* the itemtype list in advanced search */
662
/* the itemtype list in advanced search */
663
#advsearch-itemtype table {
663
.advsearch table {
664
	border-collapse : separate;
664
	border-collapse : separate;
665
	border-spacing : 3px;
665
	border-spacing : 3px;
666
	border : 0px;
666
	border : 0px;
Lines 669-682 input.deleteshelf:active { Link Here
669
	border : 0px solid #D8DEB8;
669
	border : 0px solid #D8DEB8;
670
}
670
}
671
671
672
#advsearch-itemtype table tr td {
672
.advsearch table tr td {
673
	background-color : #F8F8EB;
673
	background-color : #F8F8EB;
674
	border : 0px;
674
	border : 0px;
675
	margin : 0px;
675
	margin : 0px;
676
	width : 700px;
676
	width : 700px;
677
}
677
}
678
678
679
#advsearch-itemtype td {
679
.advsearch td {
680
	font-size : 0.8em;
680
	font-size : 0.8em;
681
	background-color : #F8F8EB;
681
	background-color : #F8F8EB;
682
}
682
}
Lines 2293-2296 a.localimage img { Link Here
2293
	border : 1px solid #8EB3E7;
2293
	border : 1px solid #8EB3E7;
2294
	margin : 0 .5em;
2294
	margin : 0 .5em;
2295
	padding : .3em;
2295
	padding : .3em;
2296
}
2296
}
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt (-3 / +26 lines)
Lines 2-7 Link Here
2
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %]
2
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %]
3
    Catalog &rsaquo; Advanced Search
3
    Catalog &rsaquo; Advanced Search
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
<script type="text/javascript" language="javascript">//<![CDATA[
6
            $(document).ready(function() {
7
            $('#advsearches > ul').tabs();
8
});
9
    //]]>
10
</script>
5
</head>
11
</head>
6
<body id="advsearch"><div id="doc3" class="yui-t7">
12
<body id="advsearch"><div id="doc3" class="yui-t7">
7
<div id="bd">
13
<div id="bd">
Lines 130-150 Link Here
130
</div>
136
</div>
131
</div>
137
</div>
132
    <div class="yui-g">
138
    <div class="yui-g">
139
      <div id="advsearches" class="toptabs">
140
      <ul>
141
      [% FOREACH advsearchloo IN advancedsearchesloop %]
142
        <li id="advsearch-tab-[% advsearchloo.advanced_search_type %]">
143
           <a href="/cgi-bin/koha/opac-search.pl#advsearch-[% advsearchloo.advanced_search_type %]">
144
           [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item Type
145
           [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
146
           [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving Location
147
           [% ELSE %]Something Else
148
           [% END %]
149
           </a>
150
        </li>
151
      [% END %]
152
      </ul>
133
<!-- /BOOLEAN SEARCH OPTIONS -->
153
<!-- /BOOLEAN SEARCH OPTIONS -->
134
    <div id="advsearch-itemtype" class="container">
154
    [% FOREACH advsearchloo IN advancedsearchesloop %]
155
    <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="container advsearch">
135
    <fieldset>
156
    <fieldset>
136
    <legend>Limit to any of the following:</legend>
157
    <legend>Limit to any of the following:</legend>
137
    <table>
158
    <table>
138
        <tr>
159
        <tr>
139
    [% FOREACH itemtypeloo IN itemtypeloop %]
160
    [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
140
        <td><input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
161
        <td><input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
141
        [% itemtypeloo.description %]</label></td>
162
        [% itemtypeloo.description %]</label></td>
142
        [% UNLESS ( itemtypeloo.count5 ) %][% UNLESS ( loop.last ) %]</tr><tr>[% END %][% END %]
163
        [% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %]
143
    [% END %]
164
    [% END %]
144
        </tr>
165
        </tr>
145
    </table>
166
    </table>
146
    </fieldset>
167
    </fieldset>
147
    </div>
168
    </div>
169
    [% END %]
170
    </div>
148
    <div id="langfilter">
171
    <div id="langfilter">
149
    <fieldset><legend>Language</legend>
172
    <fieldset><legend>Language</legend>
150
    <!-- LANGUAGE LIMIT -->
173
    <!-- LANGUAGE LIMIT -->
(-)a/opac/opac-search.pl (-27 / +33 lines)
Lines 157-196 $template->param(search_languages_loop => $languages_limit_loop,); Link Here
157
my $itemtypes = GetItemTypes;
157
my $itemtypes = GetItemTypes;
158
# the index parameter is different for item-level itemtypes
158
# the index parameter is different for item-level itemtypes
159
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
159
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
160
my @itemtypesloop;
160
my @advancedsearchesloop;
161
my $selected=1;
162
my $cnt;
161
my $cnt;
163
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
162
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes";
164
163
my @advanced_search_types = split(/\|/, $advanced_search_types);
165
if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
164
166
    foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
165
foreach my $advanced_srch_type (@advanced_search_types) {   
167
        my %row =(  number=>$cnt++,
166
   if ($advanced_srch_type eq 'itemtypes') {
168
        ccl => "$itype_or_itemtype,phr",
167
   # itemtype is a special case, since it's not defined in authorized values
168
        my @itypesloop;
169
	foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
170
	    my %row =(  number=>$cnt++,
171
		ccl => "$itype_or_itemtype,phr",
169
                code => $thisitemtype,
172
                code => $thisitemtype,
170
                selected => $selected,
171
                description => $itemtypes->{$thisitemtype}->{'description'},
173
                description => $itemtypes->{$thisitemtype}->{'description'},
172
                count5 => $cnt % 4,
173
                imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
174
                imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
174
            );
175
            );
175
        $selected = 0; # set to zero after first pass through
176
    	    push @itypesloop, \%row;
176
        push @itemtypesloop, \%row;
177
	}
177
    }
178
        my %search_code = (  advanced_search_type => $advanced_srch_type,
178
} else {
179
                             code_loop => \@itypesloop );
179
    my $advsearchtypes = GetAuthorisedValues($advanced_search_types, '', 'opac');
180
        push @advancedsearchesloop, \%search_code;
180
    for my $thisitemtype (@$advsearchtypes) {
181
    } else {
181
        my %row =(
182
    # covers all the other cases: non-itemtype authorized values 
182
                number=>$cnt++,
183
       my $advsearchtypes = GetAuthorisedValues($advanced_srch_type, '', 'opac');
183
                ccl => $advanced_search_types,
184
        my @authvalueloop;
185
	for my $thisitemtype (@$advsearchtypes) {
186
		my %row =(
187
				number=>$cnt++,
188
				ccl => $advanced_srch_type,
184
                code => $thisitemtype->{authorised_value},
189
                code => $thisitemtype->{authorised_value},
185
                selected => $selected,
190
                description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'},
186
                description => $thisitemtype->{'lib'},
191
                imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
187
                count5 => $cnt % 4,
192
                );
188
                imageurl=> getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
193
		push @authvalueloop, \%row;
189
            );
194
	}
190
        push @itemtypesloop, \%row;
195
        my %search_code = (  advanced_search_type => $advanced_srch_type,
196
                             code_loop => \@authvalueloop );
197
        push @advancedsearchesloop, \%search_code;
191
    }
198
    }
192
}
199
}
193
$template->param(itemtypeloop => \@itemtypesloop);
200
$template->param(advancedsearchesloop => \@advancedsearchesloop);
194
201
195
# # load the itypes (Called item types in the template -- just authorized values for searching)
202
# # load the itypes (Called item types in the template -- just authorized values for searching)
196
# my ($itypecount,@itype_loop) = GetCcodes();
203
# my ($itypecount,@itype_loop) = GetCcodes();
197
- 

Return to bug 7031