From 2e078dad238877df8976d1698dc2d4ae12015c9d Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Fri, 27 Jul 2012 17:24:07 -0400 Subject: [PATCH] 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 --- Open-ILS/src/templates/opac/parts/record/extras.tt2 | 2 +- Open-ILS/src/templates/opac/parts/record/summaryplus.tt2 | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) 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 %]
-- 2.11.0