From: Terran McCanna Date: Mon, 9 Jul 2018 18:04:46 +0000 (-0400) Subject: PINES Syndetics Customization X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=066585e4e8e88ddd13a385c80bfe959cdae80a2c;p=evergreen%2Fpines.git PINES Syndetics Customization This attempt leaves the Syndetics perl code in place to retrieve images, but ignores it in favor of hardcoding in the Added Content button and modal code on the item details page. Signed-off-by: Terran McCanna --- diff --git a/Open-ILS/src/templates/opac/parts/record/addedcontent.tt2 b/Open-ILS/src/templates/opac/parts/record/addedcontent.tt2 index dd9181a8c2..e0142288df 100644 --- a/Open-ILS/src/templates/opac/parts/record/addedcontent.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/addedcontent.tt2 @@ -1,56 +1,107 @@ -
- -[% - 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 attrs.isbn_clean || attrs.upc || attrs.issn %] + + + +
+ +
+
+ × + +
+
-
-
- [% - 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; - %]
-
+ +[% END %] \ No newline at end of file diff --git a/Open-ILS/src/templates/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2 index c6c55cb335..5f35dddb15 100644 --- a/Open-ILS/src/templates/opac/parts/record/extras.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2 @@ -37,25 +37,17 @@ END; END; - # if no added content is available, hide the main tab. - # if any content is available, use the first tab as the default display tab. - default_ac = ''; - IF !tab_is_active('addedcontent'); - hide_ac = 1; - FOR type IN ctx.added_content.keys; - IF ctx.added_content.$type.status != '2'; # not available - hide_ac = 0; - END; - IF ctx.added_content.$type.status == '1'; - SET default_ac = type UNLESS default_ac; - END; + # if item doesn't have isbn, upc, or issn, hide tab + IF !attrs.isbn_clean && !attrs.upc && !attrs.issn; + hide_ac = 1; + ELSE; + hide_ac = 0; END; - END; 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 => 'awards', label => l('Awards, Reviews, & Suggested Reads'), hide => hide_ac}, # hide if all content is known to not exist {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}, @@ -71,33 +63,20 @@
- [% IF tab_is_active(name) OR name == 'awards'; + [% IF tab_is_active(name) OR name == 'awards' OR name == 'addedcontent'; IF name == 'marchtml'; ctx.marchtml; ELSE;