From 843d6505be5eab9678f3798d4fabac60f5c020a2 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 1 Nov 2021 17:35:40 +0000 Subject: [PATCH] Bug 29280: (follow-up) Move OpacStarRating logic to template --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 2 +- opac/opac-shelves.pl | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index 0ac0d36338..a3cf1deec9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -477,7 +477,7 @@ [% itemsloo.XSLTBloc | $raw %] - [% IF ( OpacStarRatings == 'all' ) %] + [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
[% SET rating_avg = itemsloo.ratings.get_avg_rating() %] [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %] diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 1ae3b3b340..1178c973cc 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -76,10 +76,6 @@ if( $op eq 'view' || $op eq 'list' ){ }); } -$template->param( - OpacStarRatings => C4::Context->preference("OpacStarRatings") -); - if (C4::Context->preference("BakerTaylorEnabled")) { $template->param( BakerTaylorImageURL => &image_url(), -- 2.20.1