fixing branch limits and searchdomain limits

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Joshua Ferraro 2007-10-29 17:42:28 -05:00
parent dbabdce3e0
commit 558fc5dd83
5 changed files with 7 additions and 6 deletions

View file

@ -826,6 +826,7 @@ sub buildQuery {
$limit_search_desc = " and ($limit_search_desc)" if $limit_search_desc;
}
warn "LIMIT: $limit_query";
$query .= $limit_query;
$human_search_desc .= $limit_search_desc;

View file

@ -179,7 +179,7 @@ my ($template,$borrowernumber,$cookie);
my $template_name;
my $template_type;
my @params = $cgi->param("limit");
if ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) ) {
if ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
$template_name = 'catalogue/results.tmpl';
}
else {
@ -236,7 +236,7 @@ my $branches = GetBranches();
my @branch_loop;
#push @branch_loop, {value => "", branchname => "All Branches", };
for my $branch_hash (sort keys %$branches) {
push @branch_loop, {value => "branch:$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, };
push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, };
}
my $categories = GetBranchCategories(undef,'searchdomain');
@ -372,7 +372,7 @@ my @limits;
@limits = split("\0",$params->{'limit'}) if $params->{'limit'};
if($params->{'multibranchlimit'}) {
push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ;
push @limits, join(" or ", map { "homebranch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ;
}
my $available;

View file

@ -127,7 +127,7 @@ att 8007 cn-sort
att 8008 notforloan
att 8009 ccode
att 8010 itemnumber
att 8011 Code-institution
att 8011 homebranch
att 8012 holdingbranch
att 8013 location
att 8014 Date-of-acquisition

View file

@ -238,7 +238,7 @@ melm 952$6 cn-sort:n,!:s
melm 952$7 notforloan:n,!:w
melm 952$8 ccode
melm 952$9 itemnumber:n,!:s
melm 952$a Code-institution
melm 952$a homebranch
melm 952$b holdingbranch
melm 952$c location

View file

@ -267,7 +267,7 @@
<label>Individual Libraries </label><select name="limit" id="branchloop" onchange='if(this.value != ""){document.getElementById("categoryloop").disabled=true;} else {document.getElementById("categoryloop").disabled=false;}'>
<option value="">All Libraries</option>
<!-- TMPL_LOOP NAME="branchloop" -->
<option value="<!-- TMPL_VAR NAME='value' -->"><!-- TMPL_VAR NAME='branchname' --></option>
<option value="homebranch:<!-- TMPL_VAR NAME='value' -->"><!-- TMPL_VAR NAME='branchname' --></option>
<!-- /TMPL_LOOP -->
</select>
<!-- <input type='hidden' name='limit' value='branch: MAIN' /> -->