ソースを参照

more bug fixes

master
chris 25年前
コミット
c871ea2ed0
  1. 9
      C4/Search.pm
  2. 2
      search.pl
  3. 26
      subjectsearch.pl

9
C4/Search.pm

@ -343,7 +343,10 @@ sub ItemInfo {
my $class = $data->{'classification'};
my $dewey = $data->{'dewey'};
$dewey =~ s/0+$//;
if ($dewey eq "0.") { $dewey = "";};
if ($dewey < 10){$dewey='00'.$dewey;}
if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
if ($dewey eq "000.") { $dewey = "";};
$class = $class.$dewey;
$class = $class.$data->{'subclass'};
# $results[$i]="$data->{'title'}\t$data->{'barcode'}\t$datedue\t$data->{'branchname'}\t$data->{'dewey'}";
@ -553,10 +556,10 @@ sub itemcount {
if ($data->{'holdingbranch'} eq 'C'){
$lcount++;
}
if ($data->{'holdingbranch'} eq 'F'){
if ($data->{'holdingbranch'} eq 'F' || $data->{'holdingbranch'} eq 'FP'){
$fcount++;
}
if ($data->{'holdingbranch'} eq 'S'){
if ($data->{'holdingbranch'} eq 'S' || $data->{'holdingbranch'} eq 'SP'){
$scount++;
}

2
search.pl

@ -112,7 +112,7 @@ while ($i < $count2){
$stuff[1]=mklink("/cgi-bin/koha/detail.pl?type=$type&bib=$stuff[2]&title=$title2",$stuff[1]);
my $word=$stuff[0];
# print $word;
$word=~ s/[a-z] +[a-z]/$1%20$2/ig;
$word=~ s/([a-z]) +([a-z])/$1%20$2/ig;
$word=~ s/ //g;
$word=~ s/\,/\,%20/g;
$word=~ s/\n//g;

26
subjectsearch.pl

@ -14,7 +14,7 @@ print $input->header;
print startpage();
print startmenu();
my $blah;
my $env;
my $subject=$input->param('subject');
#my $title=$input->param('title');
@ -24,7 +24,7 @@ my $count=@items;
my $i=0;
print center();
print mktablehdr;
print mktablerow(2,'#cccc99','Title','Author');
print mktablerow(4,'#99cc33',bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),"/images/background-mem.gif");
my $colour=1;
while ($i < $count){
my @results=split('\t',$items[$i]);
@ -33,11 +33,25 @@ while ($i < $count){
$word=~ s/ //g;
$word=~ s/\,/\,%20/;
$results[1]=mklink("/cgi-bin/kumara/search.pl?author=$word",$results[1]);
my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]);
$results[3]=$count;
if ($nacount > 0){
$results[4]=$results[4]."On Loan 1";
}
if ($lcount > 0){
$results[4]=$results[4]." L$lcount";
}
if ($fcount > 0){
$results[4]=$results[4]." F$fcount";
}
if ($scount > 0){
$results[4]=$results[4]." S$scount";
}
if ($colour == 1){
print mktablerow(2,'#ffffcc',@results);
$colour=0;
} else{
print mktablerow(2,'white',@results);
print mktablerow(4,'#ffffcc',$results[0],$results[1],$results[3],$results[4]);
$colour=0;
} else{
print mktablerow(4,'white',$results[0],$results[1],$results[3],$results[4]);
$colour=1;
}
$i++;

読み込み中…
キャンセル
保存