From: Dan Scott Date: Fri, 27 Jul 2012 21:24:07 +0000 (-0400) Subject: Fix summary display in TPAC; avoid Content Cafe X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=df16ba71822e48b7661b1057d523b15deb20f7c8;p=evergreen%2Fmasslnc.git Fix summary display in TPAC; avoid Content Cafe While in misc_util.tt2 we're grabbing args.summary as a single string, and args.summaries as the list of summaries, this gets complicated elsewhere in the summaries display chain, where we're checking for the number of list elements in "summary" (which is now a string), as well as a confusion of logic where ContentCafe was being displayed whether or not the environment variable existed. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2 index 276c96968d..c031bc7076 100644 --- a/Open-ILS/src/templates/opac/parts/record/extras.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2 @@ -10,7 +10,7 @@ # Let's see if we should hide the content cafe / simple summary content hide_summary = 1; - IF attrs.summary.0; hide_summary = 0; ELSE; + IF attrs.summaries.0; hide_summary = 0; ELSE; # Expose content cafe if it's reasonable to do so. # This approach only works when using embedded content cafe. IF ENV.OILS_CONTENT_CAFE_USER; diff --git a/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2 b/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2 index 7796213fa8..27513be9f4 100644 --- a/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summaryplus.tt2 @@ -1,19 +1,20 @@
- [% IF attrs.summary %] + [%- IF attrs.summary %]
[% l('Summary: ') %] - [% FOR sum IN attrs.summary %] + [% FOR sum IN attrs.summaries %] [% IF !loop.first; '
'; END %] [% sum | html %] [% END %]
- [% END %] - + [%- END %] + [%- IF ENV.OILS_CONTENT_CAFE_USER %] [% ident = attrs.isbn_clean || attrs.upc %] + [%- END %]