Bugzilla – Attachment 184178 Details for
Bug 32432
Show Syndetics Unbound on the staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32432: Add Syndetics Unbound to staff interface
Bug-32432-Add-Syndetics-Unbound-to-staff-interface.patch (text/plain), 32.41 KB, created by
Lucas Gass (lukeg)
on 2025-07-16 22:09:44 UTC
(
hide
)
Description:
Bug 32432: Add Syndetics Unbound to staff interface
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-07-16 22:09:44 UTC
Size:
32.41 KB
patch
obsolete
>From 2df6f1dbad3d9eee21f8f70f9b283b08eca4dd9c Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 11 Jul 2025 18:19:30 +0000 >Subject: [PATCH] Bug 32432: Add Syndetics Unbound to staff interface > >This patchset updates the following system preferences to allow for a multi choice of staff and/or OPAC: >-SyndeticsAuthorNotes >-SyndeticsAwards >-SyndeticsEditions >-SyndeticsExcerpt >-SyndeticsReviews >-SyndeticsSeries >-SyndeticsSummary >-SyndeticsTOC > >NOTE: You must have valid Syndetics Unbound credentials to test. > >To test: >1. Apply patch, updatedatabase, restart_all >2. Enter your credentials into 'SyndeticsClientCode' system preference >3. Make sure SyndeticsEnabled is enabled. >4. Test with each of the system preferences listed above. >5. For each you'll want to make sure you can adjust the system preference to OPAC, Staff, both, and neither. >6. Make sure the content appears in the staff client in the same way it shows in the staff cleint. >--- > catalogue/detail.pl | 71 ++++++ > .../data/mysql/atomicupdate/bug_32432.pl | 203 ++++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 16 +- > .../admin/preferences/enhanced_content.pref | 64 +++--- > .../prog/en/modules/catalogue/detail.tt | 166 ++++++++++++-- > .../bootstrap/en/modules/opac-detail.tt | 4 +- > opac/opac-detail.pl | 10 +- > 7 files changed, 472 insertions(+), 62 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_32432.pl > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index c6445d4a201..34f1c75ca17 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -60,6 +60,14 @@ use Koha::Reviews; > use Koha::SearchEngine::Search; > use Koha::SearchEngine::QueryBuilder; > use Koha::Serial::Items; >+use C4::External::Syndetics qw( >+ get_syndetics_anotes >+ get_syndetics_excerpt >+ get_syndetics_index >+ get_syndetics_reviews >+ get_syndetics_summary >+ get_syndetics_toc >+); > > my $query = CGI->new(); > >@@ -427,6 +435,69 @@ if ( C4::Context->preference('OPACComments') ) { > > } > >+my $syndetics_elements; >+ >+if ( C4::Context->preference("SyndeticsEnabled") ) { >+ $template->param( "SyndeticsEnabled" => 1 ); >+ $template->param( "SyndeticsClientCode" => C4::Context->preference("SyndeticsClientCode") ); >+ eval { >+ $syndetics_elements = &get_syndetics_index( $isbn, $upc, $oclc ); >+ for my $element ( values %$syndetics_elements ) { >+ $template->param( "Syndetics$element" . "Exists" => 1 ); >+ } >+ }; >+} >+ >+if ( C4::Context->preference("SyndeticsEnabled") >+ && C4::Context->preference("SyndeticsSummary") =~ /staff/ >+ && ( exists( $syndetics_elements->{'SUMMARY'} ) || exists( $syndetics_elements->{'AVSUMMARY'} ) ) ) >+{ >+ eval { >+ my $syndetics_summary = &get_syndetics_summary( $isbn, $upc, $oclc, $syndetics_elements ); >+ $template->param( SYNDETICS_SUMMARY => $syndetics_summary ); >+ }; >+ >+} >+ >+if ( C4::Context->preference("SyndeticsEnabled") >+ && C4::Context->preference("SyndeticsTOC") =~ /staff/ >+ && exists( $syndetics_elements->{'TOC'} ) ) >+{ >+ eval { >+ my $syndetics_toc = &get_syndetics_toc( $isbn, $upc, $oclc ); >+ $template->param( SYNDETICS_TOC => $syndetics_toc ); >+ }; >+} >+ >+if ( C4::Context->preference("SyndeticsEnabled") >+ && C4::Context->preference("SyndeticsExcerpt") =~ /staff/ >+ && exists( $syndetics_elements->{'DBCHAPTER'} ) ) >+{ >+ eval { >+ my $syndetics_excerpt = &get_syndetics_excerpt( $isbn, $upc, $oclc ); >+ $template->param( SYNDETICS_EXCERPT => $syndetics_excerpt ); >+ }; >+} >+ >+if ( C4::Context->preference("SyndeticsEnabled") >+ && C4::Context->preference("SyndeticsAuthorNotes") =~ /staff/ >+ && exists( $syndetics_elements->{'ANOTES'} ) ) >+{ >+ eval { >+ my $syndetics_anotes = &get_syndetics_anotes( $isbn, $upc, $oclc ); >+ $template->param( SYNDETICS_ANOTES => $syndetics_anotes ); >+ }; >+} >+ >+if ( C4::Context->preference("SyndeticsEnabled") >+ && C4::Context->preference("SyndeticsReviews") =~ /staff/ ) >+{ >+ eval { >+ my $syndetics_reviews = &get_syndetics_reviews( $isbn, $upc, $oclc, $syndetics_elements ); >+ $template->param( SYNDETICS_REVIEWS => $syndetics_reviews ); >+ }; >+} >+ > my @results = ( $dat, ); > foreach ( keys %{$dat} ) { > $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' ); >diff --git a/installer/data/mysql/atomicupdate/bug_32432.pl b/installer/data/mysql/atomicupdate/bug_32432.pl >new file mode 100755 >index 00000000000..91f000c7295 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32432.pl >@@ -0,0 +1,203 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "32432", >+ description => "Convert the Syndetics from 1/0 to multiple", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ my ($SyndeticsSummary) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsSummary' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsSummary' >+ }, undef, $SyndeticsSummary >+ ); >+ >+ say_success( $out, "Updated SyndeticsSummary system preference" ); >+ >+ my ($SyndeticsExcerpt) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsExcerpt' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsExcerpt' >+ }, undef, $SyndeticsExcerpt >+ ); >+ >+ say_success( $out, "Updated SyndeticsExcerpt system preference" ); >+ >+ my ($SyndeticsReviews) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsReviews' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsReviews' >+ }, undef, $SyndeticsReviews >+ ); >+ >+ say_success( $out, "Updated SyndeticsReviews system preference" ); >+ >+ my ($SyndeticsAuthorNotes) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsAuthorNotes' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsAuthorNotes' >+ }, undef, $SyndeticsAuthorNotes >+ ); >+ >+ say_success( $out, "Updated SyndeticsAuthorNotes system preference" ); >+ >+ my ($SyndeticsTOC) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsTOC' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsTOC' >+ }, undef, $SyndeticsTOC >+ ); >+ >+ say_success( $out, "Updated SyndeticsTOC system preference" ); >+ >+ my ($SyndeticsAwards) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsAwards' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsAwards' >+ }, undef, $SyndeticsAwards >+ ); >+ >+ say_success( $out, "Updated SyndeticsAwards system preference" ); >+ >+ my ($SyndeticsEditions) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsEditions' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsEditions' >+ }, undef, $SyndeticsEditions >+ ); >+ >+ say_success( $out, "Updated SyndeticsEditions system preference" ); >+ >+ my ($SyndeticsSeries) = $dbh->selectrow_array( >+ q{ >+ SELECT CASE >+ WHEN value = '1' THEN 'opac' >+ WHEN value = '0' THEN '' >+ ELSE value >+ END >+ FROM systempreferences >+ WHERE variable = 'SyndeticsSeries' >+ } >+ ); >+ >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET type = 'multiple', >+ options = 'staff|opac', >+ value = ? >+ WHERE variable = 'SyndeticsSeries' >+ }, undef, $SyndeticsSeries >+ ); >+ >+ say_success( $out, "Updated SyndeticsSeries system preference" ); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index f2b6d940cc0..3ccbfdcdd27 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -793,18 +793,18 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('SuspensionsCalendar','noSuspensionsWhenClosed','ignoreCalendar|noSuspensionsWhenClosed','Specify whether to use the Calendar in calculating suspension expiration','Choice'), > ('SvcMaxReportRows','10',NULL,'Maximum number of rows to return via the report web service.','Integer'), > ('SwitchOnSiteCheckouts','0',NULL,'Automatically switch an on-site checkout to a normal checkout','YesNo'), >-('SyndeticsAuthorNotes','0','','Display Notes about the Author on OPAC from Syndetics','YesNo'), >-('SyndeticsAwards','0','','Display Awards on OPAC from Syndetics','YesNo'), >+('SyndeticsAuthorNotes','','staff|opac','Display Notes about the Author from Syndetics','multiple'), >+('SyndeticsAwards','staff|opac','','Display Awards from Syndetics','multiple'), > ('SyndeticsClientCode','0','','Client Code for using Syndetics Solutions content','free'), > ('SyndeticsCoverImages','0','','Display Cover Images from Syndetics','YesNo'), > ('SyndeticsCoverImageSize','MC','MC|LC','Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','Choice'), >-('SyndeticsEditions','0','','Display Editions from Syndetics','YesNo'), >+('SyndeticsEditions','staff|opac','','Display Editions from Syndetics','multiple'), > ('SyndeticsEnabled','0','','Turn on Syndetics Enhanced Content','YesNo'), >-('SyndeticsExcerpt','0','','Display Excerpts and first chapters on OPAC from Syndetics','YesNo'), >-('SyndeticsReviews','0','','Display Reviews on OPAC from Syndetics','YesNo'), >-('SyndeticsSeries','0','','Display Series information on OPAC from Syndetics','YesNo'), >-('SyndeticsSummary','0','','Display Summary Information from Syndetics','YesNo'), >-('SyndeticsTOC','0','','Display Table of Content information from Syndetics','YesNo'), >+('SyndeticsExcerpt','staff|opac','','Display Excerpts and first chapters from Syndetics','multiple'), >+('SyndeticsReviews','staff|opac','','Display Reviews on OPAC from Syndetics','multiple'), >+('SyndeticsSeries','staff|opac','','Display Series information on OPAC from Syndetics','multiple'), >+('SyndeticsSummary','staff|opac','','Display Summary Information from Syndetics','multiple'), >+('SyndeticsTOC','staff|opac','','Display Table of Content information from Syndetics','multiple'), > ('TagsEnabled','1','','Enables or disables all tagging features. This is the main switch for tags.','YesNo'), > ('TagsExternalDictionary','','','Path on server to local ispell executable, used to set $Lingua::Ispell::path This dictionary is used as a \"whitelist\" of pre-allowed tags.',''), > ('TagsInputOnDetail','1','','Allow users to input tags from the detail page.','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >index 1f088136f49..2be0609a1de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >@@ -195,53 +195,53 @@ Enhanced content: > LC: large > - size. > - >+ - Show notes about the author of a title from Syndetics on item detail pages on the > - pref: SyndeticsAuthorNotes >- choices: >- 1: Show >- 0: "Don't show" >- - notes about the author of a title from Syndetics on item detail pages on the OPAC. >+ multiple: >+ opac: OPAC >+ staff: Staff interface > - >+ - Show information from Syndetics about the awards a title has won on item detail pages on the. > - pref: SyndeticsAwards >- choices: >- 1: Show >- 0: "Don't show" >- - information from Syndetics about the awards a title has won on item detail pages on the OPAC. >+ multiple: >+ opac: OPAC >+ staff: Staff interface > - >+ - Show information about other editions of a title from Syndetics (when either <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACFRBRizeEditions">OPACFRBRizeEditions</a> or <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=FRBRizeEditions">FRBRizeEditions</a> is on) on the > - pref: SyndeticsEditions >- choices: >- 1: Show >- 0: "Don't show" >- - information about other editions of a title from Syndetics on item detail pages on the OPAC (when <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACFRBRizeEditions">OPACFRBRizeEditions</a> is on). >+ multiple: >+ opac: OPAC >+ staff: Staff interface > - >+ - Show excerpts from of a title from Syndetics on item detail pages on the > - pref: SyndeticsExcerpt >- choices: >- 1: Show >- 0: "Don't show" >- - excerpts from of a title from Syndetics on item detail pages on the OPAC. >+ multiple: >+ opac: OPAC >+ staff: Staff interface > - >+ - Show reviews of a title from Syndetics on item detail pages on the > - pref: SyndeticsReviews >- choices: >- 1: Show >- 0: "Don't show" >- - reviews of a title from Syndetics on item detail pages on the OPAC. >+ multiple: >+ opac: OPAC >+ staff: Staff interface > - >+ - Show information on other titles in a series from Syndetics on the record detail pages on the > - pref: SyndeticsSeries >- choices: >- 1: Show >- 0: "Don't show" >- - "information on other titles in a series from Syndetics on the record detail pages on the OPAC." >+ multiple: >+ opac: OPAC >+ staff: Staff interface > - >+ - Show a summary of a title from Syndetics on item detail pages on the > - pref: SyndeticsSummary >- choices: >- 1: Show >- 0: "Don't show" >- - a summary of a title from Syndetics on item detail pages on the OPAC. >+ multiple: >+ opac: OPAC >+ staff: Staff interface > - >+ - Show the table of contents of a title from Syndetics on item detail pages on the > - pref: SyndeticsTOC >- choices: >- 1: Show >- 0: "Don't show" >- - the table of contents of a title from Syndetics on item detail pages on the OPAC. >+ multiple: >+ opac: OPAC >+ staff: Staff interface > Tagging: > - > - pref: TagsEnabled >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 0fc818512a5..62c5778385c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -90,7 +90,14 @@ > [% CoceProviders = Koha.Preference('CoceProviders') %] > [% CoceHost = Koha.Preference('CoceHost') %] > [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %] >- >+ [% SyndeticsAuthorNotes = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsAuthorNotes').split(',').grep('staff').size %] >+ [% SyndeticsReviews = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsReviews').split(',').grep('staff').size %] >+ [% SyndeticsExcerpt = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsExcerpt').split(',').grep('staff').size %] >+ [% SyndeticsTOC = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsTOC').split(',').grep('staff').size %] >+ [% SyndeticsSummary = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsSummary').split(',').grep('staff').size %] >+ [% SyndeticsAwards = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsAwards').split(',').grep('staff').size %] >+ [% SyndeticsEditions = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsEditions').split(',').grep('staff').size %] >+ [% SyndeticsSeries = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsSeries').split(',').grep('staff').size %] > [% INCLUDE 'cat-toolbar.inc' %] > [% IF ( ocoins ) %] > <!-- COinS / OpenURL --> >@@ -231,6 +238,42 @@ > [% END %] > </span> > [% END %] >+ >+ [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %] >+ <span class="results_summary"> >+ <span class="label">Series information:</span> >+ <a >+ target="_blank" >+ rel="noreferrer" >+ href="https://secure.syndetics.com/ffseries.aspx?isbn=[% normalized_isbn | uri %]&type=series&num=1&client=[% SyndeticsClientCode | uri %][% IF ( normalized_upc ) %]&upc=[% normalized_upc | uri %][% END %][% IF ( normalized_oclc ) %]&oclc=[% normalized_oclc | uri %][% END %]" >+ >Click to open in new window</a >+ > >+ </span> >+ [% END # / IF SyndeticsSeries && SyndeticsSERIES1Exists %] >+ >+ [% IF ( SyndeticsAwards && SyndeticsAWARDS1Exists ) %] >+ <span class="results_summary"> >+ <span class="label">Awards:</span> >+ <a >+ target="_blank" >+ rel="noreferrer" >+ href="https://secure.syndetics.com/ffawards.aspx?isbn=[% normalized_isbn | uri %]&type=awards&client=[% SyndeticsClientCode | uri %][% IF ( normalized_upc ) %]&upc=[% normalized_upc | uri %][% END %][% IF ( normalized_oclc ) %]&oclc=[% normalized_oclc | uri %][% END %]" >+ >Click to open in new window</a >+ > >+ </span> >+ [% END # / IF SyndeticsAwards && SyndeticsAWARDS1Exists %] >+ >+ [% IF ( SyndeticsEditions && SyndeticsFICTIONExists ) %] >+ <span class="results_summary"> >+ <span class="label">Fiction notes:</span> >+ <a >+ target="_blank" >+ rel="noreferrer" >+ href="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | uri %]/fiction.html&client=[% SyndeticsClientCode | uri %][% IF ( normalized_upc ) %]&upc=[% normalized_upc | uri %][% END %][% IF ( normalized_oclc ) %]&oclc=[% normalized_oclc | uri %][% END %]&type=xw10" >+ >Click to open in new window</a >+ > >+ </span> >+ [% END # / IF SyndeticsFICTIONExists %] > </div> > [%# .page-section %] > </div> >@@ -343,11 +386,17 @@ > [% END %] > [% END %] > >- [% IF ( MARCNOTES || notes ) %] >- [% WRAPPER tab_item tabname= "description" %] >- <span>Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</span> >+ [% IF ( MARCNOTES || notes || ( SyndeticsSummary && SYNDETICS_SUMMARY )) %] >+ [% WRAPPER tab_item tabname= "descriptions" %] >+ [% SET title_notes_count = 0 %] >+ [% IF MARCNOTES %] >+ [% SET title_notes_count = MARCNOTES.size %] >+ [% END %] >+ [% IF SYNDETICS_SUMMARY %][% SET title_notes_count = title_notes_count + 1 %][% END %] >+ <span>Title notes ( [% title_notes_count | html %] )</span> > [% END %] > [% END %] >+ > [% IF ComponentParts && ComponentParts.size %] > [% WRAPPER tab_item tabname= "components" %] > <span>Components ([% ComponentParts.size | html %])</span> >@@ -410,6 +459,30 @@ > [% END %] > [% END %] > >+ [% IF ( SyndeticsTOC && SYNDETICS_TOC ) %] >+ [% WRAPPER tab_item tabname= "toc" %] >+ <span>TOC</span> >+ [% END %] >+ [% END %] >+ >+ [% IF ( SyndeticsExcerpt && SYNDETICS_EXCERPT ) %] >+ [% WRAPPER tab_item tabname= "excerpt" %] >+ <span>Excerpt</span> >+ [% END %] >+ [% END %] >+ >+ [% IF ( SyndeticsReviews && SYNDETICS_REVIEWS ) %] >+ [% WRAPPER tab_item tabname= "reviews" %] >+ <span>Reviews</span> >+ [% END %] >+ [% END %] >+ >+ [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %] >+ [% WRAPPER tab_item tabname= "anotes" %] >+ <span>About the author</span> >+ [% END %] >+ [% END %] >+ > [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %] > [% WRAPPER tab_item tabname= "${ plugins_intranet_catalog_biblio_tab.id }" %] > <span>[% plugins_intranet_catalog_biblio_tab.title | html %]</span> >@@ -477,21 +550,30 @@ > [% END # /tab_panel %] > [% END %] > >- [% IF ( MARCNOTES ) %] >- [% WRAPPER tab_panel tabname="description" %] >+ [% IF ( MARCNOTESi || notes || ( SyndeticsSummary && SYNDETICS_SUMMARY )) %] >+ [% WRAPPER tab_panel tabname="descriptions" %] > <div class="content_set"> >- [% FOREACH MARCNOTE IN MARCNOTES %] >- <p class="marcnote marcnote-[% MARCNOTE.tag | html %]" id="marcnote-[% MARCNOTE.tag | html %]-[% loop.count | html %]"> >- [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] >- <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a> >- [% ELSE %] >- [% MARCNOTE.marcnote | html | html_line_break %] >+ [% IF ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY ) %] >+ <h2>Enhanced descriptions from Syndetics:</h2> >+ <p>[% SYNDETICS_SUMMARY | $raw %]</p> >+ [% END %] >+ >+ [% IF ( MARCNOTES ) %] >+ <div id="marcnotes"> >+ [% FOREACH MARCNOTE IN MARCNOTES %] >+ <p class="marcnote marcnote-[% MARCNOTE.tag | html %]" id="marcnote-[% MARCNOTE.tag | html %]-[% loop.count | html %]"> >+ [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] >+ <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a> >+ [% ELSE %] >+ [% MARCNOTE.marcnote | html | html_line_break %] >+ [% END %] >+ </p> > [% END %] >- </p> >+ </div> > [% END %] > </div> >- [% END # /tab_panel %] >- [% END %] >+ [% END # /tab_panel#descriptions %] >+ [% END # / IF MARCNOTES %] > > [% IF ComponentParts && ComponentParts.size %] > [% WRAPPER tab_panel tabname="components" %] >@@ -961,6 +1043,60 @@ > [% END # /tab_panel %] > [% END %] > >+ [% IF ( SyndeticsTOC && SYNDETICS_TOC ) %] >+ [% WRAPPER tab_panel tabname="toc" %] >+ <div class="content_set"> >+ <h2>Table of contents provided by Syndetics</h2> >+ <ul> >+ [% FOREACH SYNDETICS_TO IN SYNDETICS_TOC %] >+ <li><strong>[% SYNDETICS_TO.l | html %] [% SYNDETICS_TO.t | html %]</strong>[% IF ( SYNDETICS_TO.p ) %]([% SYNDETICS_TO.p | $raw %])[% END %]</li> >+ [% END %] >+ </ul> >+ </div> >+ [% END # /tab_panel#toc %] >+ [% END %] >+ >+ [% IF ( SyndeticsExcerpt && SYNDETICS_EXCERPT ) %] >+ [% WRAPPER tab_panel tabname="excerpt" %] >+ <div class="content_set"> >+ <h2>Excerpt provided by Syndetics</h2> >+ [% SYNDETICS_EXCERPT | $raw %] >+ </div> >+ [% END # /tab_panel#excerpt %] >+ [% END # / IF SyndeticsExcerpt && SYNDETICS_EXCERPT %] >+ >+ [% IF ( SyndeticsReviews && SYNDETICS_REVIEWS ) %] >+ [% WRAPPER tab_panel tabname="reviews" %] >+ <div class="content_set"> >+ <h2>Reviews provided by Syndetics</h2> >+ [% FOREACH SYNDETICS_REVIEW IN SYNDETICS_REVIEWS %] >+ [% IF ( SYNDETICS_REVIEW.title ) %] >+ <h3>[% SYNDETICS_REVIEW.title | html %]</h3> >+ [% FOREACH review IN SYNDETICS_REVIEW.reviews %] >+ >+ [% IF ( review.content ) %] >+ [% review.content | $raw %] >+ [% END %] >+ [% END %] >+ [% END %] >+ [% END %] >+ </div> >+ [% END # /tab_panel#reviews %] >+ [% END # / IF SyndeticsReviews && SYNDETICS_REVIEWS %] >+ >+ [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %] >+ [% WRAPPER tab_panel tabname="anotes" %] >+ <div class="content_set"> >+ <h2>Author notes provided by Syndetics</h2> >+ [% FOREACH SYNDETICS_ANOTE IN SYNDETICS_ANOTES %] >+ [% IF ( SYNDETICS_ANOTE.content ) %] >+ [% SYNDETICS_ANOTE.content | $raw %] >+ [% END %] >+ [% END %] >+ </div> >+ [% END # /tab_panel#anotes %] >+ [% END # / IF SyndeticsAuthorNotes && SYNDETICS_ANOTES %] >+ > [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %] > [% WRAPPER tab_panel tabname="${ plugins_intranet_catalog_biblio_tab.id }" %] > [% plugins_intranet_catalog_biblio_tab.content | $raw %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index c761be0ac5e..3abd2f2dc98 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -282,7 +282,7 @@ > [% END # / IF TagsInputEnabled %] > > [% IF ( SyndeticsEnabled ) %] >- [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %] >+ [% IF ( SyndeticsSeries.split(',').grep('opac').size && SyndeticsSERIES1Exists ) %] > <span class="results_summary"> > <span class="label">Series information:</span> > <a >@@ -317,7 +317,7 @@ > </span> > [% END # / IF SyndeticsFICTIONExists %] > >- [% IF ( SyndeticsAwards && SyndeticsAWARDS1Exists ) %] >+ [% IF ( SyndeticsAwards.split(',').grep('opac').size && SyndeticsAWARDS1Exists ) %] > <span class="results_summary"> > <span class="label">Awards:</span> > <a >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 9cd2364f849..e4f7102ed30 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -1051,7 +1051,7 @@ if ( C4::Context->preference("SyndeticsEnabled") ) { > } > > if ( C4::Context->preference("SyndeticsEnabled") >- && C4::Context->preference("SyndeticsSummary") >+ && C4::Context->preference("SyndeticsSummary") =~ /opac/ > && ( exists( $syndetics_elements->{'SUMMARY'} ) || exists( $syndetics_elements->{'AVSUMMARY'} ) ) ) > { > eval { >@@ -1063,7 +1063,7 @@ if ( C4::Context->preference("SyndeticsEnabled") > } > > if ( C4::Context->preference("SyndeticsEnabled") >- && C4::Context->preference("SyndeticsTOC") >+ && C4::Context->preference("SyndeticsTOC") =~ /opac/ > && exists( $syndetics_elements->{'TOC'} ) ) > { > eval { >@@ -1074,7 +1074,7 @@ if ( C4::Context->preference("SyndeticsEnabled") > } > > if ( C4::Context->preference("SyndeticsEnabled") >- && C4::Context->preference("SyndeticsExcerpt") >+ && C4::Context->preference("SyndeticsExcerpt") =~ /opac/ > && exists( $syndetics_elements->{'DBCHAPTER'} ) ) > { > eval { >@@ -1085,7 +1085,7 @@ if ( C4::Context->preference("SyndeticsEnabled") > } > > if ( C4::Context->preference("SyndeticsEnabled") >- && C4::Context->preference("SyndeticsReviews") ) >+ && C4::Context->preference("SyndeticsReviews") =~ /opac/ ) > { > eval { > my $syndetics_reviews = &get_syndetics_reviews( $isbn, $upc, $oclc, $syndetics_elements ); >@@ -1095,7 +1095,7 @@ if ( C4::Context->preference("SyndeticsEnabled") > } > > if ( C4::Context->preference("SyndeticsEnabled") >- && C4::Context->preference("SyndeticsAuthorNotes") >+ && C4::Context->preference("SyndeticsAuthorNotes") =~ /opac/ > && exists( $syndetics_elements->{'ANOTES'} ) ) > { > eval { >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32432
:
184018
|
184019
|
184020
|
184022
|
184023
|
184024
|
184177
| 184178