View | Details | Raw Unified | Return to bug 32432
Collapse All | Expand All

(-)a/catalogue/detail.pl (+33 lines)
Lines 60-65 use Koha::Reviews; Link Here
60
use Koha::SearchEngine::Search;
60
use Koha::SearchEngine::Search;
61
use Koha::SearchEngine::QueryBuilder;
61
use Koha::SearchEngine::QueryBuilder;
62
use Koha::Serial::Items;
62
use Koha::Serial::Items;
63
use C4::External::Syndetics qw(
64
    get_syndetics_anotes
65
    get_syndetics_excerpt
66
    get_syndetics_index
67
    get_syndetics_reviews
68
    get_syndetics_summary
69
    get_syndetics_toc
70
);
63
71
64
my $query = CGI->new();
72
my $query = CGI->new();
65
73
Lines 427-432 if ( C4::Context->preference('OPACComments') ) { Link Here
427
435
428
}
436
}
429
437
438
my $syndetics_elements;
439
440
if ( C4::Context->preference("SyndeticsEnabled") ) {
441
    $template->param( "SyndeticsEnabled"    => 1 );
442
    $template->param( "SyndeticsClientCode" => C4::Context->preference("SyndeticsClientCode") );
443
    eval {
444
        $syndetics_elements = &get_syndetics_index( $isbn, $upc, $oclc );
445
        for my $element ( values %$syndetics_elements ) {
446
            $template->param( "Syndetics$element" . "Exists" => 1 );
447
        }
448
    };
449
    warn $@ if $@;
450
}
451
452
if (   C4::Context->preference("SyndeticsEnabled")
453
    && C4::Context->preference("SyndeticsAuthorNotes")
454
    && exists( $syndetics_elements->{'ANOTES'} ) )
455
{
456
    eval {
457
        my $syndetics_anotes = &get_syndetics_anotes( $isbn, $upc, $oclc );
458
        $template->param( SYNDETICS_ANOTES => $syndetics_anotes );
459
    };
460
    warn $@ if $@;
461
}
462
430
my @results = ( $dat, );
463
my @results = ( $dat, );
431
foreach ( keys %{$dat} ) {
464
foreach ( keys %{$dat} ) {
432
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
465
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref (-4 / +4 lines)
Lines 195-205 Enhanced content: Link Here
195
                  LC: large
195
                  LC: large
196
            - size.
196
            - size.
197
        -
197
        -
198
            - Show notes about the author of a title from Syndetics on item detail pages on the
198
            - pref: SyndeticsAuthorNotes
199
            - pref: SyndeticsAuthorNotes
199
              choices:
200
              multiple:
200
                  1: Show
201
                opac: OPAC 
201
                  0: "Don't show"
202
                staff: Staff interface
202
            - notes about the author of a title from Syndetics on item detail pages on the OPAC.
203
        -
203
        -
204
            - pref: SyndeticsAwards
204
            - pref: SyndeticsAwards
205
              choices:
205
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (+20 lines)
Lines 90-95 Link Here
90
            [% CoceProviders   = Koha.Preference('CoceProviders') %]
90
            [% CoceProviders   = Koha.Preference('CoceProviders') %]
91
            [% CoceHost        = Koha.Preference('CoceHost') %]
91
            [% CoceHost        = Koha.Preference('CoceHost') %]
92
            [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
92
            [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
93
            [% SyndeticsAuthorNotes = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsAuthorNotes').split(',').grep('staff').size %]
93
94
94
            [% INCLUDE 'cat-toolbar.inc' %]
95
            [% INCLUDE 'cat-toolbar.inc' %]
95
            [% IF ( ocoins ) %]
96
            [% IF ( ocoins ) %]
Lines 410-415 Link Here
410
                [% END %]
411
                [% END %]
411
            [% END %]
412
            [% END %]
412
413
414
            [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %]
415
                [% WRAPPER tab_item tabname= "anotes" %]
416
                    <span>About the author</span>
417
                [% END %]
418
            [% END %]
419
413
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
420
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
414
                [% WRAPPER tab_item tabname= "${ plugins_intranet_catalog_biblio_tab.id }" %]
421
                [% WRAPPER tab_item tabname= "${ plugins_intranet_catalog_biblio_tab.id }" %]
415
                    <span>[% plugins_intranet_catalog_biblio_tab.title | html %]</span>
422
                    <span>[% plugins_intranet_catalog_biblio_tab.title | html %]</span>
Lines 961-966 Link Here
961
                [% END # /tab_panel %]
968
                [% END # /tab_panel %]
962
            [% END %]
969
            [% END %]
963
970
971
            [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %]
972
                [% WRAPPER tab_panel tabname="anotes" %]
973
                    <div class="content_set">
974
                        <h2>Author notes provided by Syndetics</h2>
975
                        [% FOREACH SYNDETICS_ANOTE IN SYNDETICS_ANOTES %]
976
                            [% IF ( SYNDETICS_ANOTE.content ) %]
977
                                [% SYNDETICS_ANOTE.content | $raw %]
978
                            [% END %]
979
                        [% END %]
980
                    </div>
981
                [% END # /tab_panel#anotes %]
982
            [% END # / IF SyndeticsReviews && SYNDETICS_REVIEWS %]
983
964
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
984
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
965
                [% WRAPPER tab_panel tabname="${ plugins_intranet_catalog_biblio_tab.id }" %]
985
                [% WRAPPER tab_panel tabname="${ plugins_intranet_catalog_biblio_tab.id }" %]
966
                    [% plugins_intranet_catalog_biblio_tab.content | $raw %]
986
                    [% plugins_intranet_catalog_biblio_tab.content | $raw %]
(-)a/opac/opac-detail.pl (-2 / +1 lines)
Lines 1095-1101 if ( C4::Context->preference("SyndeticsEnabled") Link Here
1095
}
1095
}
1096
1096
1097
if (   C4::Context->preference("SyndeticsEnabled")
1097
if (   C4::Context->preference("SyndeticsEnabled")
1098
    && C4::Context->preference("SyndeticsAuthorNotes")
1098
    && C4::Context->preference("SyndeticsAuthorNotes") =~ /opac/
1099
    && exists( $syndetics_elements->{'ANOTES'} ) )
1099
    && exists( $syndetics_elements->{'ANOTES'} ) )
1100
{
1100
{
1101
    eval {
1101
    eval {
1102
- 

Return to bug 32432