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

(-)a/C4/Auth.pm (+10 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
Lines 458-463 sub get_template_and_user { Link Here
458
        $can_make_suggestions = Koha::Patrons->find(C4::Context->userenv->{'number'})->category->can_make_suggestions;
459
        $can_make_suggestions = Koha::Patrons->find(C4::Context->userenv->{'number'})->category->can_make_suggestions;
459
    }
460
    }
460
461
462
    my $intranet_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_intranet_js;
463
    if(index($intranet_js_plugins, "Cover Image Plugin") != -1){
464
        $template->param( Cover_Images_Required => 1 )
465
    }
466
    my $opac_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_opac_js;
467
    if(index($opac_js_plugins, "Cover Image Plugin") != -1){
468
        $template->param( Cover_Images_Required => 1 )
469
    }
470
461
    my $minPasswordLength = C4::Context->preference('minPasswordLength');
471
    my $minPasswordLength = C4::Context->preference('minPasswordLength');
462
    $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3;
472
    $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3;
463
    $template->param(
473
    $template->param(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-12 / +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 ( AmazonCoverImages  || Cover_Images_Required || 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 221-235 Link Here
221
                        [% END %]
221
                        [% END %]
222
                    [% END %]
222
                    [% END %]
223
223
224
                    [% IF ( AmazonCoverImages && normalized_isbn) %]
225
                        <div class="cover-image" id="amazon-bookcoverimg">
226
                            <a href="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.LZZZZZZZ.jpg" title="Amazon cover image">
227
                                <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.MZZZZZZZ.jpg" alt="Amazon cover image" data-link="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"/>
228
                            </a>
229
                            <div class="hint">Image from Amazon.com</div>
230
                        </div>
231
                    [% END %]
232
233
                    [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
224
                    [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
234
                        [% coce_id = normalized_ean || normalized_isbn %]
225
                        [% coce_id = normalized_ean || normalized_isbn %]
235
                        <div class="cover-image coce-coverimg">
226
                        <div class="cover-image coce-coverimg">
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 %]
1301
    [% Asset.js("js/recalls.js") | $raw %]
1311
    [% Asset.js("js/coce.js") | $raw %]
1302
    [% Asset.js("js/coce.js") | $raw %]
1312
    [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1303
    [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1304
    [% IF ( Cover_Images_Required ) %]
1305
        <script>
1306
            var normalized_isbn = "[% normalized_isbn %]";   
1307
        </script>
1308
    [% END %]
1313
    <script>
1309
    <script>
1314
        var interface = "[% interface | html %]";
1310
        var interface = "[% interface | html %]";
1315
        var theme = "[% theme | html %]";
1311
        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 (-3 / +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() {
594
- 

Return to bug 32680