From: Jason Etheridge Date: Thu, 3 Nov 2022 18:45:11 +0000 (-0400) Subject: hyperlinks for the formats and editions in the catalog staff view X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1655f3d12ec241056a65417b9831bc10de25ea13;p=working%2FEvergreen.git hyperlinks for the formats and editions in the catalog staff view Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html index 9ea09d1800..585a7fad76 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html @@ -514,13 +514,19 @@
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index e7ed7c9550..73283b8fdf 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -3137,22 +3137,19 @@ sub catalog_record_summary { foreach my $bib_id ( keys %{ $attributes } ) { foreach my $ctype ( keys %{ $attributes->{$bib_id} } ) { # we want { - # "srce":{ - # "code": { " ":1, ... } # leaf value is the bib count - # "label": { "National bibliographic agency":1, ... } - # }, ...} + # "srce":{ " ": { "label": "National bibliographic agency", "count" : 1 } }, + # ... + # } + my $current_code = $attributes->{$bib_id}->{$ctype}->{code}; + my $code_label = $attributes->{$bib_id}->{$ctype}->{label}; $metabib_attr->{$ctype} = {} unless $metabib_attr->{$ctype}; - $metabib_attr->{$ctype}->{code} = {} unless $metabib_attr->{$ctype}->{code}; - $metabib_attr->{$ctype}->{label} = {} unless $metabib_attr->{$ctype}->{label}; - if ( $metabib_attr->{$ctype}->{code}->{ $attributes->{$bib_id}->{$ctype}->{code} } ) { - $metabib_attr->{$ctype}->{code}->{ $attributes->{$bib_id}->{$ctype}->{code} } += 1; - } else { - $metabib_attr->{$ctype}->{code}->{ $attributes->{$bib_id}->{$ctype}->{code} } = 1; - } - if ( $metabib_attr->{$ctype}->{label}->{ $attributes->{$bib_id}->{$ctype}->{label} } ) { - $metabib_attr->{$ctype}->{label}->{ $attributes->{$bib_id}->{$ctype}->{label} } += 1; + if (! $metabib_attr->{$ctype}->{ $current_code }) { + $metabib_attr->{$ctype}->{ $current_code } = { + "label" => $code_label, + "count" => 1 + } } else { - $metabib_attr->{$ctype}->{label}->{ $attributes->{$bib_id}->{$ctype}->{label} } = 1; + $metabib_attr->{$ctype}->{ $current_code }->{count}++; } } }