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

(-)a/catalogue/detail.pl (+71 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
}
450
451
if (   C4::Context->preference("SyndeticsEnabled")
452
    && C4::Context->preference("SyndeticsSummary") =~ /staff/
453
    && ( exists( $syndetics_elements->{'SUMMARY'} ) || exists( $syndetics_elements->{'AVSUMMARY'} ) ) )
454
{
455
    eval {
456
        my $syndetics_summary = &get_syndetics_summary( $isbn, $upc, $oclc, $syndetics_elements );
457
        $template->param( SYNDETICS_SUMMARY => $syndetics_summary );
458
    };
459
460
}
461
462
if (   C4::Context->preference("SyndeticsEnabled")
463
    && C4::Context->preference("SyndeticsTOC") =~ /staff/
464
    && exists( $syndetics_elements->{'TOC'} ) )
465
{
466
    eval {
467
        my $syndetics_toc = &get_syndetics_toc( $isbn, $upc, $oclc );
468
        $template->param( SYNDETICS_TOC => $syndetics_toc );
469
    };
470
}
471
472
if (   C4::Context->preference("SyndeticsEnabled")
473
    && C4::Context->preference("SyndeticsExcerpt") =~ /staff/
474
    && exists( $syndetics_elements->{'DBCHAPTER'} ) )
475
{
476
    eval {
477
        my $syndetics_excerpt = &get_syndetics_excerpt( $isbn, $upc, $oclc );
478
        $template->param( SYNDETICS_EXCERPT => $syndetics_excerpt );
479
    };
480
}
481
482
if (   C4::Context->preference("SyndeticsEnabled")
483
    && C4::Context->preference("SyndeticsAuthorNotes") =~ /staff/
484
    && exists( $syndetics_elements->{'ANOTES'} ) )
485
{
486
    eval {
487
        my $syndetics_anotes = &get_syndetics_anotes( $isbn, $upc, $oclc );
488
        $template->param( SYNDETICS_ANOTES => $syndetics_anotes );
489
    };
490
}
491
492
if (   C4::Context->preference("SyndeticsEnabled")
493
    && C4::Context->preference("SyndeticsReviews") =~ /staff/ )
494
{
495
    eval {
496
        my $syndetics_reviews = &get_syndetics_reviews( $isbn, $upc, $oclc, $syndetics_elements );
497
        $template->param( SYNDETICS_REVIEWS => $syndetics_reviews );
498
    };
499
}
500
430
my @results = ( $dat, );
501
my @results = ( $dat, );
431
foreach ( keys %{$dat} ) {
502
foreach ( keys %{$dat} ) {
432
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
503
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
(-)a/installer/data/mysql/atomicupdate/bug_32432.pl (+203 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "32432",
6
    description => "Convert the Syndetics from 1/0 to multiple",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        my ($SyndeticsSummary) = $dbh->selectrow_array(
12
            q{
13
            SELECT CASE
14
                WHEN value = '1' THEN 'opac'
15
                WHEN value = '0' THEN ''
16
                ELSE value
17
            END
18
            FROM systempreferences
19
            WHERE variable = 'SyndeticsSummary'
20
        }
21
        );
22
23
        $dbh->do(
24
            q{
25
            UPDATE systempreferences
26
            SET type = 'multiple',
27
                options = 'staff|opac',
28
                value = ?
29
            WHERE variable = 'SyndeticsSummary'
30
        }, undef, $SyndeticsSummary
31
        );
32
33
        say_success( $out, "Updated SyndeticsSummary system preference" );
34
35
        my ($SyndeticsExcerpt) = $dbh->selectrow_array(
36
            q{
37
            SELECT CASE
38
                WHEN value = '1' THEN 'opac'
39
                WHEN value = '0' THEN ''
40
                ELSE value
41
            END
42
            FROM systempreferences
43
            WHERE variable = 'SyndeticsExcerpt'
44
        }
45
        );
46
47
        $dbh->do(
48
            q{
49
            UPDATE systempreferences
50
            SET type = 'multiple',
51
                options = 'staff|opac',
52
                value = ?
53
            WHERE variable = 'SyndeticsExcerpt'
54
        }, undef, $SyndeticsExcerpt
55
        );
56
57
        say_success( $out, "Updated SyndeticsExcerpt system preference" );
58
59
        my ($SyndeticsReviews) = $dbh->selectrow_array(
60
            q{
61
            SELECT CASE
62
                WHEN value = '1' THEN 'opac'
63
                WHEN value = '0' THEN ''
64
                ELSE value
65
            END
66
            FROM systempreferences
67
            WHERE variable = 'SyndeticsReviews'
68
        }
69
        );
70
71
        $dbh->do(
72
            q{
73
            UPDATE systempreferences
74
            SET type = 'multiple',
75
                options = 'staff|opac',
76
                value = ?
77
            WHERE variable = 'SyndeticsReviews'
78
        }, undef, $SyndeticsReviews
79
        );
80
81
        say_success( $out, "Updated SyndeticsReviews system preference" );
82
83
        my ($SyndeticsAuthorNotes) = $dbh->selectrow_array(
84
            q{
85
            SELECT CASE
86
                WHEN value = '1' THEN 'opac'
87
                WHEN value = '0' THEN ''
88
                ELSE value
89
            END
90
            FROM systempreferences
91
            WHERE variable = 'SyndeticsAuthorNotes'
92
        }
93
        );
94
95
        $dbh->do(
96
            q{
97
            UPDATE systempreferences
98
            SET type = 'multiple',
99
                options = 'staff|opac',
100
                value = ?
101
            WHERE variable = 'SyndeticsAuthorNotes'
102
        }, undef, $SyndeticsAuthorNotes
103
        );
104
105
        say_success( $out, "Updated SyndeticsAuthorNotes system preference" );
106
107
        my ($SyndeticsTOC) = $dbh->selectrow_array(
108
            q{
109
            SELECT CASE
110
                WHEN value = '1' THEN 'opac'
111
                WHEN value = '0' THEN ''
112
                ELSE value
113
            END
114
            FROM systempreferences
115
            WHERE variable = 'SyndeticsTOC'
116
        }
117
        );
118
119
        $dbh->do(
120
            q{
121
            UPDATE systempreferences
122
            SET type = 'multiple',
123
                options = 'staff|opac',
124
                value = ?
125
            WHERE variable = 'SyndeticsTOC'
126
        }, undef, $SyndeticsTOC
127
        );
128
129
        say_success( $out, "Updated SyndeticsTOC system preference" );
130
131
        my ($SyndeticsAwards) = $dbh->selectrow_array(
132
            q{
133
            SELECT CASE
134
                WHEN value = '1' THEN 'opac'
135
                WHEN value = '0' THEN ''
136
                ELSE value
137
            END
138
            FROM systempreferences
139
            WHERE variable = 'SyndeticsAwards'
140
        }
141
        );
142
143
        $dbh->do(
144
            q{
145
            UPDATE systempreferences
146
            SET type = 'multiple',
147
                options = 'staff|opac',
148
                value = ?
149
            WHERE variable = 'SyndeticsAwards'
150
        }, undef, $SyndeticsAwards
151
        );
152
153
        say_success( $out, "Updated SyndeticsAwards system preference" );
154
155
        my ($SyndeticsEditions) = $dbh->selectrow_array(
156
            q{
157
            SELECT CASE
158
                WHEN value = '1' THEN 'opac'
159
                WHEN value = '0' THEN ''
160
                ELSE value
161
            END
162
            FROM systempreferences
163
            WHERE variable = 'SyndeticsEditions'
164
        }
165
        );
166
167
        $dbh->do(
168
            q{
169
            UPDATE systempreferences
170
            SET type = 'multiple',
171
                options = 'staff|opac',
172
                value = ?
173
            WHERE variable = 'SyndeticsEditions'
174
        }, undef, $SyndeticsEditions
175
        );
176
177
        say_success( $out, "Updated SyndeticsEditions system preference" );
178
179
        my ($SyndeticsSeries) = $dbh->selectrow_array(
180
            q{
181
            SELECT CASE
182
                WHEN value = '1' THEN 'opac'
183
                WHEN value = '0' THEN ''
184
                ELSE value
185
            END
186
            FROM systempreferences
187
            WHERE variable = 'SyndeticsSeries'
188
        }
189
        );
190
191
        $dbh->do(
192
            q{
193
            UPDATE systempreferences
194
            SET type = 'multiple',
195
                options = 'staff|opac',
196
                value = ?
197
            WHERE variable = 'SyndeticsSeries'
198
        }, undef, $SyndeticsSeries
199
        );
200
201
        say_success( $out, "Updated SyndeticsSeries system preference" );
202
    },
203
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-8 / +8 lines)
Lines 793-810 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
793
('SuspensionsCalendar','noSuspensionsWhenClosed','ignoreCalendar|noSuspensionsWhenClosed','Specify whether to use the Calendar in calculating suspension expiration','Choice'),
793
('SuspensionsCalendar','noSuspensionsWhenClosed','ignoreCalendar|noSuspensionsWhenClosed','Specify whether to use the Calendar in calculating suspension expiration','Choice'),
794
('SvcMaxReportRows','10',NULL,'Maximum number of rows to return via the report web service.','Integer'),
794
('SvcMaxReportRows','10',NULL,'Maximum number of rows to return via the report web service.','Integer'),
795
('SwitchOnSiteCheckouts','0',NULL,'Automatically switch an on-site checkout to a normal checkout','YesNo'),
795
('SwitchOnSiteCheckouts','0',NULL,'Automatically switch an on-site checkout to a normal checkout','YesNo'),
796
('SyndeticsAuthorNotes','0','','Display Notes about the Author on OPAC from Syndetics','YesNo'),
796
('SyndeticsAuthorNotes','','staff|opac','Display Notes about the Author from Syndetics','multiple'),
797
('SyndeticsAwards','0','','Display Awards on OPAC from Syndetics','YesNo'),
797
('SyndeticsAwards','staff|opac','','Display Awards from Syndetics','multiple'),
798
('SyndeticsClientCode','0','','Client Code for using Syndetics Solutions content','free'),
798
('SyndeticsClientCode','0','','Client Code for using Syndetics Solutions content','free'),
799
('SyndeticsCoverImages','0','','Display Cover Images from Syndetics','YesNo'),
799
('SyndeticsCoverImages','0','','Display Cover Images from Syndetics','YesNo'),
800
('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'),
800
('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'),
801
('SyndeticsEditions','0','','Display Editions from Syndetics','YesNo'),
801
('SyndeticsEditions','staff|opac','','Display Editions from Syndetics','multiple'),
802
('SyndeticsEnabled','0','','Turn on Syndetics Enhanced Content','YesNo'),
802
('SyndeticsEnabled','0','','Turn on Syndetics Enhanced Content','YesNo'),
803
('SyndeticsExcerpt','0','','Display Excerpts and first chapters on OPAC from Syndetics','YesNo'),
803
('SyndeticsExcerpt','staff|opac','','Display Excerpts and first chapters from Syndetics','multiple'),
804
('SyndeticsReviews','0','','Display Reviews on OPAC from Syndetics','YesNo'),
804
('SyndeticsReviews','staff|opac','','Display Reviews on OPAC from Syndetics','multiple'),
805
('SyndeticsSeries','0','','Display Series information on OPAC from Syndetics','YesNo'),
805
('SyndeticsSeries','staff|opac','','Display Series information on OPAC from Syndetics','multiple'),
806
('SyndeticsSummary','0','','Display Summary Information from Syndetics','YesNo'),
806
('SyndeticsSummary','staff|opac','','Display Summary Information from Syndetics','multiple'),
807
('SyndeticsTOC','0','','Display Table of Content information from Syndetics','YesNo'),
807
('SyndeticsTOC','staff|opac','','Display Table of Content information from Syndetics','multiple'),
808
('TagsEnabled','1','','Enables or disables all tagging features.  This is the main switch for tags.','YesNo'),
808
('TagsEnabled','1','','Enables or disables all tagging features.  This is the main switch for tags.','YesNo'),
809
('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.',''),
809
('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.',''),
810
('TagsInputOnDetail','1','','Allow users to input tags from the detail page.','YesNo'),
810
('TagsInputOnDetail','1','','Allow users to input tags from the detail page.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref (-32 / +32 lines)
Lines 195-247 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
            - Show information from Syndetics about the awards a title has won on item detail pages on the.
204
            - pref: SyndeticsAwards
205
            - pref: SyndeticsAwards
205
              choices:
206
              multiple:
206
                  1: Show
207
                opac: OPAC
207
                  0: "Don't show"
208
                staff: Staff interface
208
            - information from Syndetics about the awards a title has won on item detail pages on the OPAC.
209
        -
209
        -
210
            - 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
210
            - pref: SyndeticsEditions
211
            - pref: SyndeticsEditions
211
              choices:
212
              multiple:
212
                  1: Show
213
                opac: OPAC
213
                  0: "Don't show"
214
                staff: Staff interface
214
            - 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).
215
        -
215
        -
216
            - Show excerpts from of a title from Syndetics on item detail pages on the
216
            - pref: SyndeticsExcerpt
217
            - pref: SyndeticsExcerpt
217
              choices:
218
              multiple:
218
                  1: Show
219
                opac: OPAC
219
                  0: "Don't show"
220
                staff: Staff interface
220
            - excerpts from of a title from Syndetics on item detail pages on the OPAC.
221
        -
221
        -
222
            - Show reviews of a title from Syndetics on item detail pages on the
222
            - pref: SyndeticsReviews
223
            - pref: SyndeticsReviews
223
              choices:
224
              multiple:
224
                  1: Show
225
                opac: OPAC
225
                  0: "Don't show"
226
                staff: Staff interface
226
            - reviews of a title from Syndetics on item detail pages on the OPAC.
227
        -
227
        -
228
            - Show information on other titles in a series from Syndetics on the record detail pages on the
228
            - pref: SyndeticsSeries
229
            - pref: SyndeticsSeries
229
              choices:
230
              multiple:
230
                  1: Show
231
                opac: OPAC
231
                  0: "Don't show"
232
                staff: Staff interface
232
            - "information on other titles in a series from Syndetics on the record detail pages on the OPAC."
233
        -
233
        -
234
            - Show a summary of a title from Syndetics on item detail pages on the
234
            - pref: SyndeticsSummary
235
            - pref: SyndeticsSummary
235
              choices:
236
              multiple:
236
                  1: Show
237
                opac: OPAC
237
                  0: "Don't show"
238
                staff: Staff interface
238
            - a summary of a title from Syndetics on item detail pages on the OPAC.
239
        -
239
        -
240
            - Show the table of contents of a title from Syndetics on item detail pages on the
240
            - pref: SyndeticsTOC
241
            - pref: SyndeticsTOC
241
              choices:
242
              multiple:
242
                  1: Show
243
                opac: OPAC
243
                  0: "Don't show"
244
                staff: Staff interface
244
            - the table of contents of a title from Syndetics on item detail pages on the OPAC.
245
    Tagging:
245
    Tagging:
246
        -
246
        -
247
            - pref: TagsEnabled
247
            - pref: TagsEnabled
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-15 / +151 lines)
Lines 90-96 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
93
            [% SyndeticsAuthorNotes = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsAuthorNotes').split(',').grep('staff').size %]
94
            [% SyndeticsReviews = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsReviews').split(',').grep('staff').size %]
95
            [% SyndeticsExcerpt = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsExcerpt').split(',').grep('staff').size %]
96
            [% SyndeticsTOC = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsTOC').split(',').grep('staff').size %]
97
            [% SyndeticsSummary = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsSummary').split(',').grep('staff').size %]
98
            [% SyndeticsAwards = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsAwards').split(',').grep('staff').size %]
99
            [% SyndeticsEditions = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsEditions').split(',').grep('staff').size %]
100
            [% SyndeticsSeries = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsSeries').split(',').grep('staff').size %]
94
            [% INCLUDE 'cat-toolbar.inc' %]
101
            [% INCLUDE 'cat-toolbar.inc' %]
95
            [% IF ( ocoins ) %]
102
            [% IF ( ocoins ) %]
96
                <!-- COinS / OpenURL -->
103
                <!-- COinS / OpenURL -->
Lines 231-236 Link Here
231
                        [% END %]
238
                        [% END %]
232
                    </span>
239
                    </span>
233
                [% END %]
240
                [% END %]
241
242
                [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %]
243
                    <span class="results_summary">
244
                        <span class="label">Series information:</span>
245
                        <a
246
                            target="_blank"
247
                            rel="noreferrer"
248
                            href="https://secure.syndetics.com/ffseries.aspx?isbn=[% normalized_isbn | uri %]&amp;type=series&amp;num=1&amp;client=[% SyndeticsClientCode | uri %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc | uri %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc | uri %][% END %]"
249
                            >Click to open in new window</a
250
                        >
251
                    </span>
252
                [% END # / IF SyndeticsSeries && SyndeticsSERIES1Exists %]
253
254
                [% IF ( SyndeticsAwards && SyndeticsAWARDS1Exists ) %]
255
                    <span class="results_summary">
256
                        <span class="label">Awards:</span>
257
                        <a
258
                            target="_blank"
259
                            rel="noreferrer"
260
                            href="https://secure.syndetics.com/ffawards.aspx?isbn=[% normalized_isbn | uri %]&amp;type=awards&amp;client=[% SyndeticsClientCode | uri %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc | uri %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc | uri %][% END %]"
261
                            >Click to open in new window</a
262
                        >
263
                    </span>
264
                [% END # / IF SyndeticsAwards && SyndeticsAWARDS1Exists %]
265
266
                [% IF ( SyndeticsEditions && SyndeticsFICTIONExists ) %]
267
                    <span class="results_summary">
268
                        <span class="label">Fiction notes:</span>
269
                        <a
270
                            target="_blank"
271
                            rel="noreferrer"
272
                            href="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | uri %]/fiction.html&amp;client=[% SyndeticsClientCode | uri %][% IF ( normalized_upc ) %]&amp;upc=[% normalized_upc | uri %][% END %][% IF ( normalized_oclc ) %]&amp;oclc=[% normalized_oclc | uri %][% END %]&amp;type=xw10"
273
                            >Click to open in new window</a
274
                        >
275
                    </span>
276
                [% END # / IF SyndeticsFICTIONExists %]
234
            </div>
277
            </div>
235
            [%# .page-section %]
278
            [%# .page-section %]
236
        </div>
279
        </div>
Lines 343-353 Link Here
343
                [% END %]
386
                [% END %]
344
            [% END %]
387
            [% END %]
345
388
346
            [% IF ( MARCNOTES || notes ) %]
389
            [% IF ( MARCNOTES || notes || ( SyndeticsSummary && SYNDETICS_SUMMARY )) %]
347
                [% WRAPPER tab_item tabname= "description" %]
390
                [% WRAPPER tab_item tabname= "descriptions" %]
348
                    <span>Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</span>
391
                    [% SET title_notes_count = 0 %]
392
                    [% IF MARCNOTES %]
393
                        [% SET title_notes_count = MARCNOTES.size %]
394
                    [% END %]
395
                    [% IF SYNDETICS_SUMMARY %][% SET title_notes_count = title_notes_count + 1 %][% END %]
396
                    <span>Title notes ( [% title_notes_count | html %] )</span>
349
                [% END %]
397
                [% END %]
350
            [% END %]
398
            [% END %]
399
351
            [% IF ComponentParts && ComponentParts.size %]
400
            [% IF ComponentParts && ComponentParts.size %]
352
                [% WRAPPER tab_item tabname= "components" %]
401
                [% WRAPPER tab_item tabname= "components" %]
353
                    <span>Components ([% ComponentParts.size | html %])</span>
402
                    <span>Components ([% ComponentParts.size | html %])</span>
Lines 410-415 Link Here
410
                [% END %]
459
                [% END %]
411
            [% END %]
460
            [% END %]
412
461
462
            [% IF ( SyndeticsTOC && SYNDETICS_TOC ) %]
463
                [% WRAPPER tab_item tabname= "toc" %]
464
                    <span>TOC</span>
465
                [% END %]
466
            [% END %]
467
468
            [% IF ( SyndeticsExcerpt && SYNDETICS_EXCERPT ) %]
469
                [% WRAPPER tab_item tabname= "excerpt" %]
470
                    <span>Excerpt</span>
471
                [% END %]
472
            [% END %]
473
474
            [% IF ( SyndeticsReviews && SYNDETICS_REVIEWS ) %]
475
                [% WRAPPER tab_item tabname= "reviews" %]
476
                    <span>Reviews</span>
477
                [% END %]
478
            [% END %]
479
480
            [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %]
481
                [% WRAPPER tab_item tabname= "anotes" %]
482
                    <span>About the author</span>
483
                [% END %]
484
            [% END %]
485
413
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
486
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
414
                [% WRAPPER tab_item tabname= "${ plugins_intranet_catalog_biblio_tab.id }" %]
487
                [% WRAPPER tab_item tabname= "${ plugins_intranet_catalog_biblio_tab.id }" %]
415
                    <span>[% plugins_intranet_catalog_biblio_tab.title | html %]</span>
488
                    <span>[% plugins_intranet_catalog_biblio_tab.title | html %]</span>
Lines 477-497 Link Here
477
                [% END # /tab_panel %]
550
                [% END # /tab_panel %]
478
            [% END %]
551
            [% END %]
479
552
480
            [% IF ( MARCNOTES ) %]
553
            [% IF ( MARCNOTESi || notes || ( SyndeticsSummary && SYNDETICS_SUMMARY )) %]
481
                [% WRAPPER tab_panel tabname="description" %]
554
                [% WRAPPER tab_panel tabname="descriptions" %]
482
                    <div class="content_set">
555
                    <div class="content_set">
483
                        [% FOREACH MARCNOTE IN MARCNOTES %]
556
                        [% IF ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY ) %]
484
                            <p class="marcnote marcnote-[% MARCNOTE.tag | html %]" id="marcnote-[% MARCNOTE.tag | html %]-[% loop.count | html %]">
557
                            <h2>Enhanced descriptions from Syndetics:</h2>
485
                                [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
558
                            <p>[% SYNDETICS_SUMMARY | $raw %]</p>
486
                                    <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
559
                        [% END %]
487
                                [% ELSE %]
560
488
                                    [% MARCNOTE.marcnote | html | html_line_break %]
561
                        [% IF ( MARCNOTES ) %]
562
                            <div id="marcnotes">
563
                                [% FOREACH MARCNOTE IN MARCNOTES %]
564
                                    <p class="marcnote marcnote-[% MARCNOTE.tag | html %]" id="marcnote-[% MARCNOTE.tag | html %]-[% loop.count | html %]">
565
                                        [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
566
                                            <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
567
                                        [% ELSE %]
568
                                            [% MARCNOTE.marcnote | html | html_line_break %]
569
                                        [% END %]
570
                                    </p>
489
                                [% END %]
571
                                [% END %]
490
                            </p>
572
                            </div>
491
                        [% END %]
573
                        [% END %]
492
                    </div>
574
                    </div>
493
                [% END # /tab_panel %]
575
                [% END # /tab_panel#descriptions %]
494
            [% END %]
576
            [% END # / IF MARCNOTES %]
495
577
496
            [% IF ComponentParts && ComponentParts.size %]
578
            [% IF ComponentParts && ComponentParts.size %]
497
                [% WRAPPER tab_panel tabname="components" %]
579
                [% WRAPPER tab_panel tabname="components" %]
Lines 961-966 Link Here
961
                [% END # /tab_panel %]
1043
                [% END # /tab_panel %]
962
            [% END %]
1044
            [% END %]
963
1045
1046
            [% IF ( SyndeticsTOC && SYNDETICS_TOC ) %]
1047
                [% WRAPPER tab_panel tabname="toc" %]
1048
                    <div class="content_set">
1049
                        <h2>Table of contents provided by Syndetics</h2>
1050
                        <ul>
1051
                            [% FOREACH SYNDETICS_TO IN SYNDETICS_TOC %]
1052
                                <li><strong>[% SYNDETICS_TO.l | html %] [% SYNDETICS_TO.t | html %]</strong>[% IF ( SYNDETICS_TO.p ) %]([% SYNDETICS_TO.p | $raw %])[% END %]</li>
1053
                            [% END %]
1054
                        </ul>
1055
                    </div>
1056
                [% END # /tab_panel#toc %]
1057
            [% END %]
1058
1059
            [% IF ( SyndeticsExcerpt && SYNDETICS_EXCERPT ) %]
1060
                [% WRAPPER tab_panel tabname="excerpt" %]
1061
                    <div class="content_set">
1062
                        <h2>Excerpt provided by Syndetics</h2>
1063
                        [% SYNDETICS_EXCERPT | $raw %]
1064
                    </div>
1065
                [% END # /tab_panel#excerpt %]
1066
            [% END # / IF SyndeticsExcerpt && SYNDETICS_EXCERPT %]
1067
1068
            [% IF ( SyndeticsReviews && SYNDETICS_REVIEWS ) %]
1069
                [% WRAPPER tab_panel tabname="reviews" %]
1070
                    <div class="content_set">
1071
                        <h2>Reviews provided by Syndetics</h2>
1072
                        [% FOREACH SYNDETICS_REVIEW IN SYNDETICS_REVIEWS %]
1073
                            [% IF ( SYNDETICS_REVIEW.title ) %]
1074
                                <h3>[% SYNDETICS_REVIEW.title | html %]</h3>
1075
                                [% FOREACH review IN SYNDETICS_REVIEW.reviews %]
1076
1077
                                    [% IF ( review.content ) %]
1078
                                        [% review.content | $raw %]
1079
                                    [% END %]
1080
                                [% END %]
1081
                            [% END %]
1082
                        [% END %]
1083
                    </div>
1084
                [% END # /tab_panel#reviews %]
1085
            [% END # / IF SyndeticsReviews && SYNDETICS_REVIEWS %]
1086
1087
            [% IF ( SyndeticsAuthorNotes && SYNDETICS_ANOTES ) %]
1088
                [% WRAPPER tab_panel tabname="anotes" %]
1089
                    <div class="content_set">
1090
                        <h2>Author notes provided by Syndetics</h2>
1091
                        [% FOREACH SYNDETICS_ANOTE IN SYNDETICS_ANOTES %]
1092
                            [% IF ( SYNDETICS_ANOTE.content ) %]
1093
                                [% SYNDETICS_ANOTE.content | $raw %]
1094
                            [% END %]
1095
                        [% END %]
1096
                    </div>
1097
                [% END # /tab_panel#anotes %]
1098
            [% END # / IF SyndeticsAuthorNotes && SYNDETICS_ANOTES %]
1099
964
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
1100
            [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
965
                [% WRAPPER tab_panel tabname="${ plugins_intranet_catalog_biblio_tab.id }" %]
1101
                [% WRAPPER tab_panel tabname="${ plugins_intranet_catalog_biblio_tab.id }" %]
966
                    [% plugins_intranet_catalog_biblio_tab.content | $raw %]
1102
                    [% plugins_intranet_catalog_biblio_tab.content | $raw %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-2 / +2 lines)
Lines 282-288 Link Here
282
                    [% END # / IF TagsInputEnabled %]
282
                    [% END # / IF TagsInputEnabled %]
283
283
284
                    [% IF ( SyndeticsEnabled ) %]
284
                    [% IF ( SyndeticsEnabled ) %]
285
                        [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %]
285
                        [% IF ( SyndeticsSeries.split(',').grep('opac').size && SyndeticsSERIES1Exists ) %]
286
                            <span class="results_summary">
286
                            <span class="results_summary">
287
                                <span class="label">Series information:</span>
287
                                <span class="label">Series information:</span>
288
                                <a
288
                                <a
Lines 317-323 Link Here
317
                            </span>
317
                            </span>
318
                        [% END # / IF SyndeticsFICTIONExists %]
318
                        [% END # / IF SyndeticsFICTIONExists %]
319
319
320
                        [% IF ( SyndeticsAwards && SyndeticsAWARDS1Exists ) %]
320
                        [% IF ( SyndeticsAwards.split(',').grep('opac').size && SyndeticsAWARDS1Exists ) %]
321
                            <span class="results_summary">
321
                            <span class="results_summary">
322
                                <span class="label">Awards:</span>
322
                                <span class="label">Awards:</span>
323
                                <a
323
                                <a
(-)a/opac/opac-detail.pl (-6 / +5 lines)
Lines 1051-1057 if ( C4::Context->preference("SyndeticsEnabled") ) { Link Here
1051
}
1051
}
1052
1052
1053
if (   C4::Context->preference("SyndeticsEnabled")
1053
if (   C4::Context->preference("SyndeticsEnabled")
1054
    && C4::Context->preference("SyndeticsSummary")
1054
    && C4::Context->preference("SyndeticsSummary") =~ /opac/
1055
    && ( exists( $syndetics_elements->{'SUMMARY'} ) || exists( $syndetics_elements->{'AVSUMMARY'} ) ) )
1055
    && ( exists( $syndetics_elements->{'SUMMARY'} ) || exists( $syndetics_elements->{'AVSUMMARY'} ) ) )
1056
{
1056
{
1057
    eval {
1057
    eval {
Lines 1063-1069 if ( C4::Context->preference("SyndeticsEnabled") Link Here
1063
}
1063
}
1064
1064
1065
if (   C4::Context->preference("SyndeticsEnabled")
1065
if (   C4::Context->preference("SyndeticsEnabled")
1066
    && C4::Context->preference("SyndeticsTOC")
1066
    && C4::Context->preference("SyndeticsTOC") =~ /opac/
1067
    && exists( $syndetics_elements->{'TOC'} ) )
1067
    && exists( $syndetics_elements->{'TOC'} ) )
1068
{
1068
{
1069
    eval {
1069
    eval {
Lines 1074-1080 if ( C4::Context->preference("SyndeticsEnabled") Link Here
1074
}
1074
}
1075
1075
1076
if (   C4::Context->preference("SyndeticsEnabled")
1076
if (   C4::Context->preference("SyndeticsEnabled")
1077
    && C4::Context->preference("SyndeticsExcerpt")
1077
    && C4::Context->preference("SyndeticsExcerpt") =~ /opac/
1078
    && exists( $syndetics_elements->{'DBCHAPTER'} ) )
1078
    && exists( $syndetics_elements->{'DBCHAPTER'} ) )
1079
{
1079
{
1080
    eval {
1080
    eval {
Lines 1085-1091 if ( C4::Context->preference("SyndeticsEnabled") Link Here
1085
}
1085
}
1086
1086
1087
if (   C4::Context->preference("SyndeticsEnabled")
1087
if (   C4::Context->preference("SyndeticsEnabled")
1088
    && C4::Context->preference("SyndeticsReviews") )
1088
    && C4::Context->preference("SyndeticsReviews") =~ /opac/ )
1089
{
1089
{
1090
    eval {
1090
    eval {
1091
        my $syndetics_reviews = &get_syndetics_reviews( $isbn, $upc, $oclc, $syndetics_elements );
1091
        my $syndetics_reviews = &get_syndetics_reviews( $isbn, $upc, $oclc, $syndetics_elements );
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