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

(-)a/catalogue/detail.pl (+5 lines)
Lines 686-689 $template->param(found1 => scalar $query->param('found1') ); Link Here
686
686
687
$template->param(biblio => $biblio);
687
$template->param(biblio => $biblio);
688
688
689
my $intranet_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_intranet_js;
690
if(index($intranet_js_plugins, "Cover Image Plugin") != -1){
691
    $template->param( Cover_Images_Required => 1 )
692
}
693
689
output_html_with_http_headers $query, $cookie, $template->output;
694
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/catalogue/search.pl (+5 lines)
Lines 779-784 my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( Link Here
779
    }
779
    }
780
);
780
);
781
781
782
my $intranet_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_intranet_js;
783
if(index($intranet_js_plugins, "Cover Image Plugin") != -1){
784
    $template->param( Cover_Images_Required => 1 )
785
}
786
782
787
783
$template->param(
788
$template->param(
784
    add_to_some_private_shelves => $some_private_shelves,
789
    add_to_some_private_shelves => $some_private_shelves,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-3 / +8 lines)
Lines 114-120 Link Here
114
        <span class="Z3988" title="[% ocoins | html %]"></span>
114
        <span class="Z3988" title="[% ocoins | html %]"></span>
115
    [% END %]
115
    [% END %]
116
116
117
    [% IF ( AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
117
    [% IF ( Cover_Images_Required || AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
118
        <div id="catalogue_detail_biblio" class="col-xs-9">
118
        <div id="catalogue_detail_biblio" class="col-xs-9">
119
    [% ELSE %]
119
    [% ELSE %]
120
        <div id="catalogue_detail_biblio" class="col-xs-12">
120
        <div id="catalogue_detail_biblio" class="col-xs-12">
Lines 204-213 Link Here
204
        [% END %]
204
        [% END %]
205
        </div> [%# .page-section %]
205
        </div> [%# .page-section %]
206
206
207
        [% IF ( AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
207
        [% IF ( Cover_Images_Required || AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
208
        </div>
208
        </div>
209
            <div class="col-xs-3 bookcoverimg">
209
            <div class="col-xs-3 bookcoverimg">
210
                <div id="biblio-cover-slider" class="cover-slider">
210
                <div id="biblio-cover-slider" class="cover-slider cover_images_required">
211
                    [% IF ( LocalCoverImages ) %]
211
                    [% IF ( LocalCoverImages ) %]
212
                        [% IF localimages.count %]
212
                        [% IF localimages.count %]
213
                            [% FOREACH image IN localimages %]
213
                            [% FOREACH image IN localimages %]
Lines 1461-1466 Note that permanent location is a code, and location may be an authval. Link Here
1461
        </script>
1461
        </script>
1462
        [% Asset.js("js/modals/display_ticket.js") | $raw %]
1462
        [% Asset.js("js/modals/display_ticket.js") | $raw %]
1463
    [% END %]
1463
    [% END %]
1464
    [% IF ( Cover_Images_Required ) %]
1465
        <script>
1466
            var normalized_isbn = "[% normalized_isbn %]";
1467
        </script>
1468
    [% END %]
1464
    <script>
1469
    <script>
1465
        var interface = "[% interface | html %]";
1470
        var interface = "[% interface | html %]";
1466
        var theme = "[% theme | html %]";
1471
        var theme = "[% theme | html %]";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-3 / +15 lines)
Lines 449-455 Link Here
449
                                <table>
449
                                <table>
450
                                    <thead>
450
                                    <thead>
451
                                    <tr>
451
                                    <tr>
452
                                        [% IF ( AmazonCoverImages  || LocalCoverImages || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
452
                                        [% IF ( Cover_Images_Required || AmazonCoverImages  || LocalCoverImages || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
453
                                            <th>&nbsp;</th>
453
                                            <th>&nbsp;</th>
454
                                        [% END %]
454
                                        [% END %]
455
                                        <th colspan="2">Results</th>
455
                                        <th colspan="2">Results</th>
Lines 461-469 Link Here
461
                                    <tbody>
461
                                    <tbody>
462
                                    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
462
                                    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
463
                                        <tr id="row[% SEARCH_RESULT.biblionumber | html %]">
463
                                        <tr id="row[% SEARCH_RESULT.biblionumber | html %]">
464
                                            [% IF ( AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
464
                                            [% IF ( Cover_Images_Required || AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
465
    <td class="bookcoverimg">
465
    <td class="bookcoverimg">
466
        <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]">
466
        <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides search_cover_images_required" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]">
467
            [% IF ( LocalCoverImages ) %][% SEARCH_RESULT.localimage | html %]
467
            [% IF ( LocalCoverImages ) %][% SEARCH_RESULT.localimage | html %]
468
                <div id="local-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image local-coverimg">
468
                <div id="local-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image local-coverimg">
469
                    <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]">
469
                    <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]">
Lines 781-786 Link Here
781
    [% Asset.css("css/humanmsg.css") | $raw %]
781
    [% Asset.css("css/humanmsg.css") | $raw %]
782
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
782
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
783
    [% INCLUDE 'select2.inc' %]
783
    [% INCLUDE 'select2.inc' %]
784
    [% IF ( Cover_Images_Required ) %]
785
        <script>
786
            const search_results = {};
787
            [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
788
                var cover_index = "[% loop.count %]";
789
                search_results[cover_index] = {};
790
                search_results[cover_index].isbn = "[% SEARCH_RESULT.normalized_isbn | html %]";
791
                search_results[cover_index].biblionumber = "[% SEARCH_RESULT.biblionumber | html %]";
792
                search_results[cover_index].processedBiblio = "[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber | html %]"
793
            [% END %]
794
        </script>
795
    [% END %]
784
    <script>
796
    <script>
785
        var PREF_AmazonCoverImages = parseInt( "[% Koha.Preference('AmazonCoverImages') | html %]", 10);
797
        var PREF_AmazonCoverImages = parseInt( "[% Koha.Preference('AmazonCoverImages') | html %]", 10);
786
        var q_array = new Array();  // will hold search terms, if present
798
        var q_array = new Array();  // will hold search terms, if present
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +7 lines)
Lines 59-65 Link Here
59
59
60
                    <div class="bookcover">
60
                    <div class="bookcover">
61
61
62
                        <div id="biblio-cover-slider" class="cover-slider">
62
                        <div id="biblio-cover-slider" class="cover-slider cover_images_required">
63
                            [% IF ( OPACLocalCoverImages ) %]
63
                            [% IF ( OPACLocalCoverImages ) %]
64
                                [% IF localimages.count %]
64
                                [% IF localimages.count %]
65
                                    [% FOREACH image IN localimages %]
65
                                    [% FOREACH image IN localimages %]
Lines 1454-1459 Link Here
1454
        [% Asset.js("js/ratings.js") | $raw %]
1454
        [% Asset.js("js/ratings.js") | $raw %]
1455
    [% END %]
1455
    [% END %]
1456
1456
1457
    [% IF ( Cover_Images_Required ) %]
1458
        <script>
1459
            var normalized_isbn = "[% normalized_isbn %]";
1460
        </script>
1461
    [% END %]
1462
1457
    [% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %][% END %]
1463
    [% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %][% END %]
1458
    [% IF ( Koha.Preference('OPACDetailQRCode') ) %]
1464
    [% IF ( Koha.Preference('OPACDetailQRCode') ) %]
1459
        [% Asset.js("lib/kjua/kjua.min.js") | $raw %]
1465
        [% Asset.js("lib/kjua/kjua.min.js") | $raw %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-2 / +16 lines)
Lines 341-347 Link Here
341
341
342
                                            [% # Cell 4: Search result details and controls %]
342
                                            [% # Cell 4: Search result details and controls %]
343
                                            <td class="bibliocol">
343
                                            <td class="bibliocol">
344
                                                <div class="coverimages itemtype_[% SEARCH_RESULT.itemtype | html %]">
344
                                                <div class="coverimages search_cover_images_required itemtype_[% SEARCH_RESULT.itemtype | html %]">
345
                                                    <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
345
                                                    <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">
346
                                                        [% IF ( SEARCH_RESULT.title ) %]
346
                                                        [% IF ( SEARCH_RESULT.title ) %]
347
                                                            [% img_title = SEARCH_RESULT.title %]
347
                                                            [% img_title = SEARCH_RESULT.title %]
Lines 587-593 Link Here
587
    [% IF OpenLibraryCovers || OpenLibrarySearch %]
587
    [% IF OpenLibraryCovers || OpenLibrarySearch %]
588
        [% Asset.js("js/openlibrary.js") | $raw %]
588
        [% Asset.js("js/openlibrary.js") | $raw %]
589
    [% END %]
589
    [% END %]
590
590
    [% IF ( Cover_Images_Required ) %]
591
        <script>
592
            const search_results = {};
593
            [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
594
                var cover_index = "[% loop.count %]";
595
                search_results[cover_index] = {};
596
                search_results[cover_index].isbn = "[% SEARCH_RESULT.normalized_isbn | html %]";
597
                [% IF SEARCH_RESULT.img_title %]
598
                    search_results[cover_index].img_title = "[% SEARCH_RESULT.img_title | html %]";
599
                [% ELSE %]
600
                    search_results[cover_index].img_title = "[% SEARCH_RESULT.biblionumber | html %]";
601
                [% END %]
602
            [% END %]
603
        </script>
604
    [% END %]
591
    <script>
605
    <script>
592
        [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
606
        [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
593
            function holdMultiple() {
607
            function holdMultiple() {
(-)a/opac/opac-detail.pl (+5 lines)
Lines 1242-1245 if ( C4::Context->preference('OPACAuthorIdentifiers') ) { Link Here
1242
    $template->param( author_identifiers => \@author_identifiers );
1242
    $template->param( author_identifiers => \@author_identifiers );
1243
}
1243
}
1244
1244
1245
my $opac_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_opac_js;
1246
if(index($opac_js_plugins, "Cover Image Plugin") != -1){
1247
    $template->param( Cover_Images_Required => 1 )
1248
}
1249
1245
output_html_with_http_headers $query, $cookie, $template->output;
1250
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/opac/opac-search.pl (-1 / +5 lines)
Lines 924-928 if ($offset == 0) { Link Here
924
    $template->param(firstPage => 1);
924
    $template->param(firstPage => 1);
925
}
925
}
926
926
927
my $opac_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_opac_js;
928
if(index($opac_js_plugins, "Cover Image Plugin") != -1){
929
    $template->param( Cover_Images_Required => 1 )
930
}
931
927
    $template->param( borrowernumber    => $borrowernumber);
932
    $template->param( borrowernumber    => $borrowernumber);
928
output_with_http_headers $cgi, $cookie, $template->output, $content_type;
933
output_with_http_headers $cgi, $cookie, $template->output, $content_type;
929
- 

Return to bug 32680