Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
## This is just an index scan
if ($scan) {
my ( $term, $occ ) = $results[ $i - 1 ]->term($j);
## This is just an index scan
if ($scan) {
my ( $term, $occ ) = $results[ $i - 1 ]->term($j);
# here we create a minimal MARC record and hand it off to the
# template just like a normal result ... perhaps not ideal, but
# it works for now
# here we create a minimal MARC record and hand it off to the
# template just like a normal result ... perhaps not ideal, but
# it works for now
$tmprecord->encoding('UTF-8');
my $tmptitle;
$tmprecord->encoding('UTF-8');
my $tmptitle;
- # srote the minimal record in author/title (depending on MARC flavour)
+ # srote the minimal record in author/title (depending on MARC flavour)
if ( C4::Context->preference("marcflavour") eq
"UNIMARC" )
{
if ( C4::Context->preference("marcflavour") eq
"UNIMARC" )
{
warn "QUERY BEFORE LIMITS: >$query<" if $DEBUG;
# add limits
warn "QUERY BEFORE LIMITS: >$query<" if $DEBUG;
# add limits
foreach my $this_limit (@limits) {
if ( $this_limit =~ /available/ ) {
# FIXME: switch to zebra search for null values
foreach my $this_limit (@limits) {
if ( $this_limit =~ /available/ ) {
# FIXME: switch to zebra search for null values
}
# these are treated as OR
elsif ( $this_limit =~ /mc/ ) {
}
# these are treated as OR
elsif ( $this_limit =~ /mc/ ) {
- $limit .= " or $this_limit";
+ $group_OR_limits .= " or " if $group_OR_limits;
+ $group_OR_limits .= "$this_limit";
$limit_cgi .="&limit=$this_limit";
$limit_desc .= " or $this_limit";
}
else {
$limit_cgi .="&limit=$this_limit";
$limit_desc .= " or $this_limit";
}
else {
- $limit .= " and $this_limit";
+ $limit .= " and " if $limit || $query;
+ $limit .= "$this_limit";
$limit_cgi .="&limit=$this_limit";
$limit_desc .=" and $this_limit";
}
}
$limit_cgi .="&limit=$this_limit";
$limit_desc .=" and $this_limit";
}
}
+ $limit.=" and " if ($query && $limit);
+ $limit.="($group_OR_limits)" if $group_OR_limits;
# normalize the strings
for ($query, $query_search_desc, $limit, $limit_desc) {
$_ =~ s/ / /g; # remove extra spaces
# normalize the strings
for ($query, $query_search_desc, $limit, $limit_desc) {
$_ =~ s/ / /g; # remove extra spaces
searchdesc => ($query_type?"$query_type=":"")."$query_search_desc",
opacfacets => 1,
facets_loop => $facets,
searchdesc => ($query_type?"$query_type=":"")."$query_search_desc",
opacfacets => 1,
facets_loop => $facets,
search_error => $error,
);
## Now let's find out if we have any supplemental data to show the user
search_error => $error,
);
## Now let's find out if we have any supplemental data to show the user
att 8028 uri
att 8029 replacementprice
att 8030 replacementpricedate
att 8028 uri
att 8029 replacementprice
att 8030 replacementpricedate
## Fixed Fields and other special indexes
att 9901 Extent
## Fixed Fields and other special indexes
att 9901 Extent
# kit, computer database,
# computer file.
Material-type 1=1031
# kit, computer database,
# computer file.
Material-type 1=1031
#collection Material-type
#collection Material-type
-collection-code Material-type
-mt Material-type
-mc-collection Material-type
+#collection-code Material-type
+#mt Material-type
+#mc-collection Material-type
#dt-lh Material-type
#Music-key 1025 A statement of the key in $r in the following:
#dt-lh Material-type
#Music-key 1025 A statement of the key in $r in the following:
uri 1=8028
replacementprice 1=8029
replacementpricedate 1=8030
uri 1=8028
replacementprice 1=8029
replacementpricedate 1=8030
# Publisher Location
Place-publication 1=59
# Publisher Location
Place-publication 1=59
popularity 1=issues
# Material Category
popularity 1=issues
# Material Category
## TYPE LIMITS
dt-bks 1=8700
dt-vis 1=8700
## TYPE LIMITS
dt-bks 1=8700
dt-vis 1=8700
<!--TMPL_LOOP Name="itemtypeloop"-->
<td>
<!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
<!--TMPL_LOOP Name="itemtypeloop"-->
<td>
<!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
- <input type="checkbox" id="mt-<!--TMPL_VAR Name="number" -->" name="limit" value="mt:<!--TMPL_VAR Name="code" -->" />
+ <input type="checkbox" id="mc-<!--TMPL_VAR Name="number" -->" name="limit" value="mc:<!--TMPL_VAR Name="code" -->" />
<!--TMPL_VAR Name="description" --></td>
<!-- TMPL_UNLESS name="count5" --></tr><tr><!-- /TMPL_UNLESS -->
<!--/TMPL_LOOP-->
<!--TMPL_VAR Name="description" --></td>
<!-- TMPL_UNLESS name="count5" --></tr><tr><!-- /TMPL_UNLESS -->
<!--/TMPL_LOOP-->
- Scan Index for: <input type="text" name="qf" id="scan-index" size="35" value="" />
+ Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />