X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=html.pl;h=3d9cfce0e96fcec5c2542e6ee1011e4f403af5c6;hb=626163e24773f07bb9131a80a3a111f052b64f24;hp=968b20fffb65e50fa1e11676d50ff13d5d1c67fe;hpb=e511191929b98e883fa85fded8947de7d78ef881;p=koha-bibliografija
diff --git a/html.pl b/html.pl
index 968b20f..3d9cfce 100755
--- a/html.pl
+++ b/html.pl
@@ -114,7 +114,7 @@ while( my $row = $sth_auth->fetchrow_hashref ) {
debug 'department_in_group' => $department_in_group;
foreach my $department ( keys %$department_in_sum ) {
- $department_in_sum->{$department} = 0 unless $department =~ m/(centar|croaticum|katedra|odsjek)/i;
+# $department_in_sum->{$department} = 0 unless $department =~ m/(centar|croaticum|katedra|odsjek)/i;
}
debug 'auth_department' => $auth_department;
@@ -463,10 +463,10 @@ sub count_author_years {
my $years = shift;
my ($authid) = @_;
foreach my $type ( keys %{ $authors->{$authid} } ) {
- next if $type =~ m/^_/;
+# next if $type =~ m/^_/; # FIXME
foreach my $category ( keys %{ $authors->{$authid}->{$type} } ) {
foreach my $biblionumber ( unique_biblionumber @{ $authors->{$authid}->{$type}->{$category} } ) {
- $years->{ $biblio_year->{ $biblionumber } }->{ $type . '-' . $category }++;
+ $years->{ $biblio_year->{ $biblionumber } }->{ $type . '-' . $category }->{ $biblionumber }++;
}
}
}
@@ -492,10 +492,12 @@ sub html_year_selection {
foreach my $year ( sort { $b <=> $a } keys %$years ) {
print $fh qq| \n|;
foreach my $type_cat ( keys %{ $years->{$year} } ) {
- $type_cat_count->{ $type_cat } += $years->{$year}->{$type_cat};
+ my $count = scalar keys %{ $years->{$year}->{$type_cat} };
+ $years->{$year}->{$type_cat} = $count; # remove biblionumbers and use count
+ $type_cat_count->{ $type_cat } += $count;
my ($type,$cat) = split(/-/, $type_cat);
$type_cat_count->{_toc}->{$type}->{$cat}++;
- $type_cat_count->{_toc_count}->{$type} += $years->{$year}->{$type_cat};
+ $type_cat_count->{_toc_count}->{$type} += $count;
}
}
@@ -599,7 +601,7 @@ debug 'department_category_author' => $department_category_author;
sub department_html {
- my ( $fh, $department, $type, $label ) = @_;
+ my ( $fh, $department, $type, $label, $csv_fh ) = @_;
print $fh qq|$label
\n|;
@@ -612,10 +614,33 @@ sub department_html {
next unless @biblionumber;
- my $label = $category_label->{$category} || 'Bez kategorije';
- print $fh qq|$label
\n