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

(-)a/C4/Auth.pm (+1 lines)
Lines 51-56 use Net::CIDR; Link Here
51
use C4::Log qw( logaction );
51
use C4::Log qw( logaction );
52
use Koha::CookieManager;
52
use Koha::CookieManager;
53
use Koha::Auth::Permissions;
53
use Koha::Auth::Permissions;
54
use Koha::Template::Plugin::KohaPlugins;
54
55
55
# use utf8;
56
# use utf8;
56
57
(-)a/catalogue/detail.pl (+5 lines)
Lines 684-687 $template->param(found1 => scalar $query->param('found1') ); Link Here
684
684
685
$template->param(biblio => $biblio);
685
$template->param(biblio => $biblio);
686
686
687
my $intranet_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_intranet_js;
688
if(index($intranet_js_plugins, "Cover Image Plugin") != -1){
689
    $template->param( Cover_Images_Required => 1 )
690
}
691
687
output_html_with_http_headers $query, $cookie, $template->output;
692
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/etc/koha-conf.xml (-1 / +1 lines)
Lines 78-84 Link Here
78
 <authorityserver>authorities</authorityserver>
78
 <authorityserver>authorities</authorityserver>
79
 <authorityservershadow>1</authorityservershadow>
79
 <authorityservershadow>1</authorityservershadow>
80
 <pluginsdir>__PLUGINS_DIR__</pluginsdir> <!-- This entry can be repeated to use multiple directories -->
80
 <pluginsdir>__PLUGINS_DIR__</pluginsdir> <!-- This entry can be repeated to use multiple directories -->
81
 <enable_plugins>0</enable_plugins>
81
 <enable_plugins>1</enable_plugins>
82
 <upload_path></upload_path>
82
 <upload_path></upload_path>
83
 <tmp_path></tmp_path>
83
 <tmp_path></tmp_path>
84
 <intranetdir>__INTRANET_CGI_DIR__</intranetdir>
84
 <intranetdir>__INTRANET_CGI_DIR__</intranetdir>
(-)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 1310-1315 Note that permanent location is a code, and location may be an authval. Link Here
1310
    [% Asset.js("js/recalls.js") | $raw %]
1310
    [% Asset.js("js/recalls.js") | $raw %]
1311
    [% Asset.js("js/coce.js") | $raw %]
1311
    [% Asset.js("js/coce.js") | $raw %]
1312
    [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1312
    [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1313
    [% IF ( Cover_Images_Required ) %]
1314
        <script>
1315
            var normalized_isbn = "[% normalized_isbn %]";   
1316
        </script>
1317
    [% END %]
1313
    <script>
1318
    <script>
1314
        var interface = "[% interface | html %]";
1319
        var interface = "[% interface | html %]";
1315
        var theme = "[% theme | html %]";
1320
        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 1447-1452 Link Here
1447
        [% Asset.js("js/ratings.js") | $raw %]
1447
        [% Asset.js("js/ratings.js") | $raw %]
1448
    [% END %]
1448
    [% END %]
1449
1449
1450
    [% IF ( Cover_Images_Required ) %]
1451
        <script>
1452
            var normalized_isbn = "[% normalized_isbn %]";   
1453
        </script>
1454
    [% END %]
1455
1450
    [% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %][% END %]
1456
    [% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %][% END %]
1451
    [% IF ( Koha.Preference('OPACDetailQRCode') ) %]
1457
    [% IF ( Koha.Preference('OPACDetailQRCode') ) %]
1452
        [% Asset.js("lib/kjua/kjua.min.js") | $raw %]
1458
        [% 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 1246-1249 if ( C4::Context->preference('OPACAuthorIdentifiers') ) { Link Here
1246
    $template->param( author_identifiers => \@author_identifiers );
1246
    $template->param( author_identifiers => \@author_identifiers );
1247
}
1247
}
1248
1248
1249
my $opac_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_opac_js;
1250
if(index($opac_js_plugins, "Cover Image Plugin") != -1){
1251
    $template->param( Cover_Images_Required => 1 )
1252
}
1253
1249
output_html_with_http_headers $query, $cookie, $template->output;
1254
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/opac/opac-search.pl (-1 / +5 lines)
Lines 915-919 if ($offset == 0) { Link Here
915
    $template->param(firstPage => 1);
915
    $template->param(firstPage => 1);
916
}
916
}
917
917
918
my $opac_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_opac_js;
919
if(index($opac_js_plugins, "Cover Image Plugin") != -1){
920
    $template->param( Cover_Images_Required => 1 )
921
}
922
918
    $template->param( borrowernumber    => $borrowernumber);
923
    $template->param( borrowernumber    => $borrowernumber);
919
output_with_http_headers $cgi, $cookie, $template->output, $content_type;
924
output_with_http_headers $cgi, $cookie, $template->output, $content_type;
920
- 

Return to bug 32680