From: Jeff Davis Date: Tue, 12 Dec 2017 19:22:59 +0000 (-0800) Subject: LP#1738064: Optionally suppress display of badges in OPAC X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d87ba31eb6eaf1ff64b74399e4d20608039a70c3;p=working%2FEvergreen.git LP#1738064: Optionally suppress display of badges in OPAC Signed-off-by: Jeff Davis --- diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 28f730cdeb..0783e6a256 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -257,4 +257,9 @@ ctx.exclude_electronic_checkbox = 0; ############################################################################## # ctx.cache_key = '001' +############################################################################## +# Display of badge scores +############################################################################## +ctx.hide_badge_scores = 'false'; + %] diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index d26810dec7..64fa1109ff 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -432,7 +432,7 @@ END; [%- END %] - [%- IF (ctx.badge_scores.size > 0) %] + [%- IF (ctx.badge_scores.size > 0 && ctx.hide_badge_scores != 'true') %]
  • [% l("Badges:") %]
      diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 5ab8e9a087..9d5ff1acba 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -160,7 +160,7 @@ END; END -%] - [% IF rec.popularity > 0.0 %] + [% IF rec.popularity > 0.0 AND ctx.hide_badge_scores != 'true' %]
      [% l('Popularity:') %] [% rec.popularity %] / 5.0
      diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/badge_display.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/badge_display.adoc new file mode 100644 index 0000000000..23ded49356 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/OPAC/badge_display.adoc @@ -0,0 +1,5 @@ +Optional Display of Badges in OPAC +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +A new setting controls whether badges (popularity, etc.) are displayed in the +OPAC. If you do not wish badges to be displayed, set the `ctx.hide_badge_scores` +setting to "true" in `config.tt2`.