From c215089c22b9c4ceef5e24ac75709f9477e3a3a6 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Tue, 17 Nov 2020 15:58:32 -0500 Subject: [PATCH] PINES Added Content Updates for Boopac - Squashed OPAC: Added Content Updates This updates the Syndetics section to pull in full content instead of screen-scraping it, and expands the NoveList section by default. Signed-off-by: Terran McCanna PINES Customization: Added Content Fix This adds a missing line that I left off of the previous added content customization for the bootstrap OPAC. Signed-off-by: Terran McCanna Syndetics - upgrade from Classic to Unbound Signed-off-by: Terran McCanna Syndetics - remove part that relies on old perl (because it's borking things) Signed-off-by: Terran McCanna --- .../opac/parts/record/addedcontent.tt2 | 57 ++-------------------- .../opac/parts/record/extras.tt2 | 8 +-- 2 files changed, 9 insertions(+), 56 deletions(-) diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/addedcontent.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/addedcontent.tt2 index 05f640d0b1..58cca01bd0 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/addedcontent.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/addedcontent.tt2 @@ -1,55 +1,8 @@ -
+ -[% - ac_types = { - reviews => l('Reviews'), - anotes => l('Author Notes'), - toc => l('Table of Contents'), - excerpt => l('Excerpt'), - summary => l('Summary') - }; - selected_type = CGI.param('ac'); - - # For each type of added content, render the link if it's known to have - # content, do not render the link if it's known to not have content. If - # the content status is unknown, render the link, but hide the link via CSS - # if dojo is enabled. If dojo is not enabled, render and display the link. -%] - -
- [% - all_hidden = 1; - FOR type IN ac_types.keys; - tab_class = 'ac_tab'; - SET tab_class = tab_class _ ' ac_tab_selected' IF type == selected_type; - IF ctx.added_content.$type.status != '2'; # no content - all_hidden = 0; - IF ctx.added_content.$type.status == '3' AND want_dojo; # status unknown - tab_class = tab_class _ ' hidden'; - END %] - - [% END; - END; - %] -
- -
- [% - IF selected_type; - content = ctx.added_content.$selected_type.content; - IF content; - content; - ELSE; - l('No Content Available'); - END; - ELSIF all_hidden; - l('No Content Available'); - END; - %] +
+ +
-
- - diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/extras.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/extras.tt2 index 41ded07a9d..1629d8f904 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/extras.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/extras.tt2 @@ -54,11 +54,11 @@ extras = [ {name => 'summaryplus', label => l('Summaries & More'), hide => hide_summary}, {name => 'annotation', label => l('Annotation'), hide => 1}, - {name => 'awards', label => l('Awards, Reviews, & Suggested Reads')}, {name => 'excerpt', label => l('Excerpt'), hide => 1}, {name => 'issues', label => l('Issues Held'), hide => !(ctx.have_holdings_to_show || ctx.have_mfhd_to_show)}, {name => 'preview', label => l('Preview'), hide => 1}, - {name => 'addedcontent', label => l('Additional Content'), hide => hide_ac}, # hide if all content is known to not exist + {name => 'addedcontent', label => l('More Information from Syndetics')}, + {name => 'awards', label => l('More Information from NoveList')}, {name => 'cnbrowse', label => l('Shelf Browser')}, {name => 'marchtml', label => l('MARC Record')} ]; @@ -69,7 +69,7 @@ %]
[% - IF tab_is_active(name); + IF tab_is_active(name) OR name == 'awards' OR name == 'addedcontent'; href = mkurl('', {}, ['expand', 'ac']); arrow = arrow_down; ELSE; @@ -87,7 +87,7 @@ [% IF !(name == 'awards' OR name == 'addedcontent'); arrow; END %] [% extra.label | html %]
- [% IF tab_is_active(name); %] + [% IF tab_is_active(name) OR name == 'awards' OR name == 'addedcontent'; %]
[% IF name == 'marchtml'; -- 2.11.0