LP#1738064: Optionally suppress display of badges in OPAC
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 12 Dec 2017 19:22:59 +0000 (11:22 -0800)
committerDan Wells <dbw2@calvin.edu>
Fri, 2 Mar 2018 21:24:20 +0000 (16:24 -0500)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
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 ac731cd..b0ad747 100644 (file)
@@ -260,4 +260,9 @@ ctx.exclude_electronic_checkbox = 0;
 ##############################################################################
 # ctx.cache_key = '001'
 
+##############################################################################
+# Display of badge scores
+##############################################################################
+ctx.hide_badge_scores = 'false';
+
 %]
index 84b4b74..7797c5e 100644 (file)
@@ -466,7 +466,7 @@ END;
         </span>
     </li>
     [%- END %]
-    [%- IF (ctx.badge_scores.size > 0) %]
+    [%- IF (ctx.badge_scores.size > 0 && ctx.hide_badge_scores != 'true') %]
     <li id='rdetail_badges'>
         <strong class='rdetail_label'>[% l("Badges:") %]</strong>
         <ul>
index df787f7..c913555 100644 (file)
@@ -160,7 +160,7 @@ END;
                                                         END
                                                     -%]
                                                     </div>
-                                                    [% IF rec.popularity > 0.0 %]
+                                                    [% IF rec.popularity > 0.0 AND ctx.hide_badge_scores != 'true' %]
                                                       <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..23ded49
--- /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 `ctx.hide_badge_scores`
+setting to "true" in `config.tt2`.