PINES Added Content Updates for Boopac - Squashed rel_3_10_pines_custom_added_content
authorTerran McCanna <tmccanna@georgialibraries.org>
Tue, 17 Nov 2020 20:58:32 +0000 (15:58 -0500)
committerTerran McCanna <tmccanna@georgialibraries.org>
Fri, 18 Nov 2022 17:47:43 +0000 (12:47 -0500)
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 <tmccanna@georgialibraries.org>
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 <tmccanna@georgialibraries.org>
Syndetics - upgrade from Classic to Unbound

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Syndetics - remove part that relies on old perl

(because it's borking things)

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates-bootstrap/opac/parts/record/addedcontent.tt2
Open-ILS/src/templates-bootstrap/opac/parts/record/extras.tt2

index 05f640d..58cca01 100755 (executable)
@@ -1,55 +1,8 @@
-<div class='rdetail_extras_div'>
+<!-- PINES CUSTOMIZATION: Newer Syndetics Unbound code -->
 
-[%
-    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.
-%]
-
-    <div id='ac_tab_wrapper'>
-    [%
-        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 %]
-            <div class="[% tab_class %]" id="ac:[% type %]">
-                <a href="[% mkurl('', {ac => type}) _ '#addedcontent' %]" rel="nofollow" vocab="">[% ac_types.$type %]</a>
-            </div>
-            [% END;
-        END;
-    %]
-    </div>
-
-    <div id='ac_content'>
-        [%
-            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;
-        %]
+    <div class='rdetail_extras_div'>
+               <script src="https://unbound.syndetics.com/syndeticsunbound/connector/initiator.php?a_id=1562" 
+                                               type="text/javascript"></script>
+               <div id="syndetics_unbound"></div>
     </div>
-</div>
-
-
index b681ab4..e31db91 100755 (executable)
         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 @@
         %]
         <div class="card border-secondary col-12 p-0">
          [%
-                    IF tab_is_active(name);
+                    IF tab_is_active(name) OR name == 'awards' OR name == 'addedcontent';
                         href = mkurl('', {}, ['expand', 'ac']);
                         arrow = arrow_down;
                     ELSE;
@@ -86,7 +86,7 @@
                 <span>[% arrow %] [% extra.label | html %]</span>
               </a>
             </div>
-            [%  IF tab_is_active(name); %]
+            [%  IF tab_is_active(name) OR name == 'awards' OR name == 'addedcontent'; %]
             <div class='card-body'>
 
                     [% IF name == 'marchtml';