LP#1738064: Optionally suppress display of badges in OPAC user/jeffdavis/lp1738064-suppress-badges
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 12 Dec 2017 19:22:59 +0000 (11:22 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 13 Dec 2017 19:16:37 +0000 (11:16 -0800)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/record/summary.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2
docs/RELEASE_NOTES_NEXT/OPAC/badge_display.adoc [new file with mode: 0644]

index 28f730c..49b98d0 100644 (file)
@@ -257,4 +257,9 @@ ctx.exclude_electronic_checkbox = 0;
 ##############################################################################
 # ctx.cache_key = '001'
 
+##############################################################################
+# Display of badge scores
+##############################################################################
+badge_scores.display = 'true';
+
 %]
index d26810d..0ba1dd2 100644 (file)
@@ -432,7 +432,7 @@ END;
         </span>
     </li>
     [%- END %]
-    [%- IF (ctx.badge_scores.size > 0) %]
+    [%- IF (badge_scores.display == 'true' && ctx.badge_scores.size > 0) %]
     <li id='rdetail_badges'>
         <strong class='rdetail_label'>[% l("Badges:") %]</strong>
         <ul>
index 5ab8e9a..c9cf682 100644 (file)
@@ -160,7 +160,7 @@ END;
                                                         END
                                                     -%]
                                                     </div>
-                                                    [% IF rec.popularity > 0.0 %]
+                                                    [% IF badge_scores.display == 'true' AND rec.popularity > 0.0 %]
                                                       <div>
                                                         <span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span>
                                                       </div>
diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/badge_display.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/badge_display.adoc
new file mode 100644 (file)
index 0000000..7ea316c
--- /dev/null
@@ -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 `badge_scores.display`
+setting to "true" in `config.tt2`.