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

(-)a/Koha/Item.pm (-5 / +4 lines)
Lines 785-803 sub renewal_branchcode { Link Here
785
    return $branchcode;
785
    return $branchcode;
786
}
786
}
787
787
788
=head3 cover_image
788
=head3 cover_images
789
789
790
Return the cover image associated with this item.
790
Return the cover images associated with this item.
791
791
792
=cut
792
=cut
793
793
794
sub cover_image {
794
sub cover_images {
795
    my ( $self ) = @_;
795
    my ( $self ) = @_;
796
796
797
    my $cover_image_rs = $self->_result->cover_images;
797
    my $cover_image_rs = $self->_result->cover_images;
798
    return unless $cover_image_rs;
798
    return unless $cover_image_rs;
799
    # So far we allow only 1 cover image per item
799
    return Koha::CoverImages->_new_from_dbic($cover_image_rs);
800
    return Koha::CoverImages->_new_from_dbic($cover_image_rs)->next;
801
}
800
}
802
801
803
=head3 _set_found_trigger
802
=head3 _set_found_trigger
(-)a/catalogue/detail.pl (-5 / +4 lines)
Lines 408-428 foreach my $item (@items) { Link Here
408
    }
408
    }
409
409
410
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
410
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
411
        my $cover_image = $item_object->cover_image;
411
        $item->{cover_images} = $item_object->cover_images;
412
        $item->{imagenumber} = $cover_image ? $cover_image->imagenumber : undef;
413
    }
412
    }
414
413
415
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
414
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
416
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
415
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
417
            push @itemloop, $item;
416
            push @itemloop, $item;
418
            $itemloop_has_images++ if $item->{imagenumber};
417
            $itemloop_has_images++ if $item_object->cover_images->count;
419
        } else {
418
        } else {
420
            push @otheritemloop, $item;
419
            push @otheritemloop, $item;
421
            $otheritemloop_has_images++ if $item->{imagenumber};
420
            $otheritemloop_has_images++ if $item_object->cover_images->count;
422
        }
421
        }
423
    } else {
422
    } else {
424
        push @itemloop, $item;
423
        push @itemloop, $item;
425
        $itemloop_has_images++ if $item->{imagenumber};
424
        $itemloop_has_images++ if $item_object->cover_images->count;
426
    }
425
    }
427
}
426
}
428
427
(-)a/catalogue/imageviewer.pl (-14 / +9 lines)
Lines 66-89 if( $query->cookie("searchToOrder") ){ Link Here
66
}
66
}
67
67
68
if ( C4::Context->preference("LocalCoverImages") ) {
68
if ( C4::Context->preference("LocalCoverImages") ) {
69
    my $images;
69
    if ( $itemnumber ) {
70
    if ( $itemnumber ) {
70
        my $item = Koha::Items->find($itemnumber);
71
        my $item = Koha::Items->find($itemnumber);
71
        my $image = $item->cover_image;
72
        $images = $item->cover_images->as_list;
72
        $template->param(
73
            LocalCoverImages => 1,
74
            images           => [$image],
75
            imagenumber      => ($image ? $image->imagenumber : undef),
76
        );
77
78
    } else {
73
    } else {
79
        my $images = $biblio->cover_images->as_list;
74
        $images = $biblio->cover_images->as_list;
80
81
        $template->param(
82
            LocalCoverImages => 1,
83
            images           => $images,
84
            imagenumber      => (@$images ? $images->[0]->imagenumber : undef),
85
        );
86
    }
75
    }
76
77
    $template->param(
78
        LocalCoverImages => 1,
79
        images           => $images,
80
        imagenumber      => (@$images ? $images->[0]->imagenumber : undef),
81
    );
87
}
82
}
88
$template->{VARS}->{'count'}        = $itemcount;
83
$template->{VARS}->{'count'}        = $itemcount;
89
$template->{VARS}->{'biblionumber'} = $biblionumber;
84
$template->{VARS}->{'biblionumber'} = $biblionumber;
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (-3 / +6 lines)
Lines 2117-2123 li { Link Here
2117
    display: inline-block;
2117
    display: inline-block;
2118
}
2118
}
2119
2119
2120
#bookcoverimg {
2120
.bookcoverimg {
2121
    text-align: center;
2121
    text-align: center;
2122
}
2122
}
2123
2123
Lines 2127-2139 li { Link Here
2127
    }
2127
    }
2128
}
2128
}
2129
2129
2130
.cover-slides {
2130
#biblio-cover-slider {
2131
    background: #FFF url("[% interface | html %]/[% theme | html %]/img/spinner-small.gif") center center no-repeat;
2132
    border: 1px solid #b9d8d9;
2131
    border: 1px solid #b9d8d9;
2133
    border-radius: 3px;
2132
    border-radius: 3px;
2134
    margin: 5px;
2133
    margin: 5px;
2135
    padding: 10px 5px 5px 5px;
2134
    padding: 10px 5px 5px 5px;
2136
    min-height: 175px;
2135
    min-height: 175px;
2136
}
2137
2138
.cover-slides {
2139
    background: #FFF url("[% interface | html %]/[% theme | html %]/img/spinner-small.gif") center center no-repeat;
2137
2140
2138
    .hint {
2141
    .hint {
2139
        font-size: 90%;
2142
        font-size: 90%;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref (-1 / +1 lines)
Lines 316-322 Enhanced content: Link Here
316
              choices:
316
              choices:
317
                  yes: Allow
317
                  yes: Allow
318
                  no: "Don't allow"
318
                  no: "Don't allow"
319
            - multiple images to be attached to each bibliographic record.
319
            - multiple images to be attached to each bibliographic record and item.
320
        -
320
        -
321
            - pref: CustomCoverImages
321
            - pref: CustomCoverImages
322
              choices:
322
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-70 / +81 lines)
Lines 166-173 Link Here
166
166
167
        [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
167
        [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
168
            </div>
168
            </div>
169
            <div class="col-xs-3" id="bookcoverimg">
169
            <div class="col-xs-3 bookcoverimg">
170
                <div id="cover-slides">
170
                <div id="biblio-cover-slider" class="cover-slider">
171
                    [% IF ( LocalCoverImages ) %]
171
                    [% IF ( LocalCoverImages ) %]
172
                        [% IF localimages.count %]
172
                        [% IF localimages.count %]
173
                            [% FOREACH image IN localimages %]
173
                            [% FOREACH image IN localimages %]
Lines 219-226 Link Here
219
                            <div class="hint">Custom cover image</div>
219
                            <div class="hint">Custom cover image</div>
220
                        </div>
220
                        </div>
221
                    [% END %]
221
                    [% END %]
222
                </div> <!-- /#cover-slides -->
222
                </div> <!-- /.cover-slider -->
223
            </div> <!-- /#bookcoverimg.col-xs-3 -->
223
            </div> <!-- /.bookcoverimg.col-xs-3 -->
224
        [% ELSE %]
224
        [% ELSE %]
225
        </div> <!-- /.col-xs-* -->
225
        </div> <!-- /.col-xs-* -->
226
        [% END # /IF ( AmazonCoverImages, etc ) %]
226
        [% END # /IF ( AmazonCoverImages, etc ) %]
Lines 326-336 Link Here
326
                [% END %]
326
                [% END %]
327
                    [% IF ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
327
                    [% IF ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
328
                        <td class="cover">
328
                        <td class="cover">
329
                            [% IF item.imagenumber %]
329
                            <div class="bookcoverimg">
330
                                <a href="/cgi-bin/koha/catalogue/imageviewer.pl?itemnumber=[% item.itemnumber | uri %]&amp;imagenumber=[% item.imagenumber | uri %]">
330
                                <div class="cover-slider">
331
                                    <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1amp;imagenumber=[% item.imagenumber | uri %]" />
331
                                    [% FOREACH image IN item.cover_images %]
332
                                </a>
332
                                        <div class="cover-image local-coverimg">
333
                            [% END %]
333
                                            <a href="/cgi-bin/koha/catalogue/imageviewer.pl?itemnumber=[% image.itemnumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]">
334
                                                <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" />
335
                                            </a>
336
                                        </div>
337
                                    [% END %]
338
                                </div>
339
                            </div>
334
                        </td>
340
                        </td>
335
                    [% END %]
341
                    [% END %]
336
342
Lines 986-1056 Note that permanent location is a code, and location may be an authval. Link Here
986
        // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
992
        // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
987
        function verify_images() {
993
        function verify_images() {
988
            // Loop over each container in the template which contains covers
994
            // Loop over each container in the template which contains covers
989
            $(".cover-image").each( function( index ){
995
            $(".cover-slider").each(function(){
990
                var div = $(this);
996
                $(this).find(".cover-image").each( function( index ){
991
                // Find the image in the container
997
                    var div = $(this);
992
                var img = div.find("img")[0];
998
                    // Find the image in the container
993
                if( $(img).length > 0 ){
999
                    var img = div.find("img")[0];
994
                    if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){
1000
                    if( $(img).length > 0 ){
995
                        // No image loaded in the container. Remove the slide
1001
                        if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){
996
                        div.remove();
1002
                            // No image loaded in the container. Remove the slide
997
                    } else {
1003
                            div.remove();
998
                        // All slides start hidden. If this is the first one, show it.
1004
                        } else {
999
                        if( index == 0 ){
1005
                            // All slides start hidden. If this is the first one, show it.
1000
                            div.show();
1006
                            if( index == 0 ){
1001
                        }
1007
                                div.show();
1002
                        // Check if Amazon image is present
1003
                        if ( div.attr("id") == "amazon-bookcoverimg"  ) {
1004
                            w = img.width;
1005
                            h = img.height;
1006
                            if ((w == 1) || (h == 1)) {
1007
                                // Amazon returned single-pixel placeholder
1008
                                // Remove the container
1009
                                div.remove();
1010
                            }
1008
                            }
1011
                        }
1009
                            // Check if Amazon image is present
1012
                        if( div.attr("id") == "custom-img" ){
1010
                            if ( div.attr("id") == "amazon-bookcoverimg"  ) {
1013
                            if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1011
                                w = img.width;
1014
                                // No image was loaded via the CustomCoverImages system preference
1012
                                h = img.height;
1015
                                // Remove the container
1013
                                if ((w == 1) || (h == 1)) {
1016
                                div.remove();
1014
                                    // Amazon returned single-pixel placeholder
1015
                                    // Remove the container
1016
                                    div.remove();
1017
                                }
1017
                            }
1018
                            }
1018
                        }
1019
                            if( div.attr("id") == "custom-img" ){
1019
                        if( div.attr("id") == "coce-coverimg" ){
1020
                                if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1020
                            // Identify which service's image is being loaded by Coce
1021
                                    // No image was loaded via the CustomCoverImages system preference
1021
                            if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1022
                                    // Remove the container
1022
                                div.find(".hint").html(_("Coce image from Amazon.com"));
1023
                                    div.remove();
1023
                            } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1024
                                }
1024
                                div.find(".hint").html(_("Coce image from Google Books"));
1025
                            }
1025
                            } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1026
                            if( div.attr("id") == "coce-coverimg" ){
1026
                                div.find(".hint").html(_("Coce image from Open Library"));
1027
                                // Identify which service's image is being loaded by Coce
1028
                                if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1029
                                    div.find(".hint").html(_("Coce image from Amazon.com"));
1030
                                } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1031
                                    div.find(".hint").html(_("Coce image from Google Books"));
1032
                                } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1033
                                    div.find(".hint").html(_("Coce image from Open Library"));
1034
                                }
1027
                            }
1035
                            }
1028
                        }
1036
                        }
1029
                    }
1037
                    }
1030
                }
1038
                });
1031
            });
1039
            });
1032
1040
1033
            var coverSlides = $(".cover-image");
1041
            $(".cover-slider").each(function(){
1034
            if( coverSlides.length > 1 ){
1042
                var coverSlide = this;
1035
                coverSlides.each(function( index ){
1043
                var coverImages = $(this).find(".cover-image");
1036
                    // If more that one slide is present, add a navigation link
1044
                if( coverImages.length > 1 ){
1037
                    // for activating the slide
1045
                    coverImages.each(function( index ){
1038
                    var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1046
                        // If more that one image is present, add a navigation link
1039
                    if( index == 0 ){
1047
                        // for activating the slide
1040
                        // Set the first navigation link as active
1048
                        var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1041
                        $(covernav).addClass("nav-active");
1049
                        if( index == 0 ){
1042
                    }
1050
                            // Set the first navigation link as active
1043
                    $(covernav).html("<i class=\"fa fa-circle\"></i>");
1051
                            $(covernav).addClass("nav-active");
1044
                    $("#cover-slides").append( covernav );
1052
                        }
1045
1053
                        $(covernav).html("<i class=\"fa fa-circle\"></i>");
1046
                });
1054
                        $(coverSlide).append( covernav );
1047
            }
1055
                    });
1056
                }
1048
1057
1049
            if( $(".cover-image:visible").length < 1 ){
1058
                if( $(coverSlide).find(".cover-image:visible").length < 1 ){
1050
                $("#cover-slides").remove();
1059
                    $(coverSlide).remove();
1051
            } else {
1060
                } else {
1052
                $("#cover-slides").addClass("cover-slides");
1061
                    $(coverSlide).addClass("cover-slides");
1053
            }
1062
                }
1063
            });
1054
1064
1055
            $("#editions img").each(function(i){
1065
            $("#editions img").each(function(i){
1056
                if ( this.src.indexOf('amazon.com') >= 0 ) {
1066
                if ( this.src.indexOf('amazon.com') >= 0 ) {
Lines 1223-1236 Note that permanent location is a code, and location may be an authval. Link Here
1223
                link = $(this).attr("href");
1233
                link = $(this).attr("href");
1224
                openWindow(link,"Print spine label",400,400);
1234
                openWindow(link,"Print spine label",400,400);
1225
             });
1235
             });
1226
             $("#cover-slides").on("click",".cover-nav", function(e){
1236
             $(".cover-slider").on("click",".cover-nav", function(e){
1227
                 e.preventDefault();
1237
                 e.preventDefault();
1238
                var cover_slider = $(this).parent();
1228
                // Adding click handler for cover image navigation links
1239
                // Adding click handler for cover image navigation links
1229
                var num = $(this).data("num");
1240
                var num = $(this).data("num");
1230
                $(".cover-nav").removeClass("nav-active");
1241
                $(cover_slider).find(".cover-nav").removeClass("nav-active");
1231
                $(this).addClass("nav-active");
1242
                $(this).addClass("nav-active");
1232
                $(".cover-image").hide();
1243
                $(cover_slider).find(".cover-image").hide();
1233
                $(".cover-image").eq( num ).show();
1244
                $(cover_slider).find(".cover-image").eq( num ).show();
1234
             });
1245
             });
1235
        });
1246
        });
1236
1247
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt (-1 / +1 lines)
Lines 100-106 Link Here
100
    <legend>Options</legend>
100
    <legend>Options</legend>
101
    <ol>
101
    <ol>
102
      <li class="checkbox">
102
      <li class="checkbox">
103
        [% IF AllowMultipleCovers == 0 OR itemnumber%]
103
        [% IF AllowMultipleCovers == 0 %]
104
            <input type="checkbox" id="replace" name="replace" checked="checked" disabled="disabled" value="1" />
104
            <input type="checkbox" id="replace" name="replace" checked="checked" disabled="disabled" value="1" />
105
        [% ELSE %]
105
        [% ELSE %]
106
            <input type="checkbox" id="replace" name="replace" value="1" />
106
            <input type="checkbox" id="replace" name="replace" value="1" />
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +3 lines)
Lines 1267-1273 Link Here
1267
1267
1268
                [% IF ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
1268
                [% IF ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
1269
                    <td class="cover">
1269
                    <td class="cover">
1270
                        <div title="[% ITEM_RESULT.itemnumber | html %]" data-imagenumber="[% ITEM_RESULT.imagenumber | html %]" data-biblionumber="[% ITEM_RESULT.biblionumber %]" class="local-thumbnail-preview"></div>
1270
                        [% FOR image IN ITEM_RESULT.cover_images %]
1271
                            <div title="[% ITEM_RESULT.itemnumber | html %]" data-imagenumber="[% image.imagenumber | html %]" data-biblionumber="[% ITEM_RESULT.biblionumber | html %]" class="local-thumbnail-preview"></div>
1272
                        [% END %]
1271
                    </td>
1273
                    </td>
1272
                [% END %]
1274
                [% END %]
1273
1275
(-)a/opac/opac-detail.pl (-5 / +4 lines)
Lines 763-784 if ( not $viewallitems and @items > $max_items_to_display ) { Link Here
763
    }
763
    }
764
764
765
    if ( C4::Context->preference("OPACLocalCoverImages") == 1 ) {
765
    if ( C4::Context->preference("OPACLocalCoverImages") == 1 ) {
766
        my $cover_image = $item->cover_image;
766
        $itm->{cover_images} = $item->cover_images;
767
        $itm->{imagenumber} = $cover_image ? $cover_image->imagenumber : undef;
768
    }
767
    }
769
768
770
    my $itembranch = $itm->{$separatebranch};
769
    my $itembranch = $itm->{$separatebranch};
771
    if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) {
770
    if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) {
772
        if ($itembranch and $itembranch eq $currentbranch) {
771
        if ($itembranch and $itembranch eq $currentbranch) {
773
            push @itemloop, $itm;
772
            push @itemloop, $itm;
774
            $itemloop_has_images++ if $itm->{imagenumber};
773
            $itemloop_has_images++ if $item->cover_images->count;
775
        } else {
774
        } else {
776
            push @otheritemloop, $itm;
775
            push @otheritemloop, $itm;
777
            $otheritemloop_has_images++ if $itm->{imagenumber};
776
            $otheritemloop_has_images++ if $item->cover_images->count;
778
        }
777
        }
779
    } else {
778
    } else {
780
        push @itemloop, $itm;
779
        push @itemloop, $itm;
781
        $itemloop_has_images++ if $itm->{imagenumber};
780
        $itemloop_has_images++ if $item->cover_images->count;
782
    }
781
    }
783
  }
782
  }
784
}
783
}
(-)a/t/db_dependent/Koha/CoverImages.t (-4 / +5 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 13;
22
use Test::More tests => 14;
23
use Test::Exception;
23
use Test::Exception;
24
24
25
use FindBin '$Bin';
25
use FindBin '$Bin';
Lines 70-85 $image = Koha::CoverImage->new( Link Here
70
)->store;
70
)->store;
71
is( $biblio->cover_images->count, 2, 'There are now two cover images' );
71
is( $biblio->cover_images->count, 2, 'There are now two cover images' );
72
72
73
is( $item->cover_image, undef, 'No cover images yet' );
73
is( $item->cover_images->count, 0, 'No cover images yet' );
74
$image = Koha::CoverImage->new(
74
$image = Koha::CoverImage->new(
75
    {
75
    {
76
        itemnumber => $item->itemnumber,
76
        itemnumber => $item->itemnumber,
77
        src_image  => GD::Image->new($logo_filepath)
77
        src_image  => GD::Image->new($logo_filepath)
78
    }
78
    }
79
)->store;
79
)->store;
80
is( ref( $item->cover_image ),
80
is( ref( $item->cover_images->next ),
81
    'Koha::CoverImage',
81
    'Koha::CoverImage',
82
    'Koha::Item->cover_image returns a Koha::CoverImage object' );
82
    'Koha::Item->cover_images returns a rs of Koha::CoverImage object' );
83
83
84
Koha::CoverImage->new(
84
Koha::CoverImage->new(
85
    {
85
    {
Lines 89-93 Koha::CoverImage->new( Link Here
89
    }
89
    }
90
)->store;
90
)->store;
91
is( $biblio->cover_images->count, 3, );
91
is( $biblio->cover_images->count, 3, );
92
is( $item->cover_images->count, 2, );
92
93
93
$schema->storage->txn_rollback;
94
$schema->storage->txn_rollback;
(-)a/tools/upload-cover-image.pl (-10 / +12 lines)
Lines 94-104 if ($fileID) { Link Here
94
        $fh->close if $fh;
94
        $fh->close if $fh;
95
        if ( defined $srcimage ) {
95
        if ( defined $srcimage ) {
96
            eval {
96
            eval {
97
                if ( $replace && $biblionumber ) {
97
                if ( $replace ) {
98
                    Koha::Biblios->find($biblionumber)->cover_images->delete;
98
                    if ( $biblionumber ) {
99
                } elsif ( $itemnumber ) {
99
                        Koha::Biblios->find($biblionumber)->cover_images->delete;
100
                    my $cover_image = Koha::Items->find($itemnumber)->cover_image;
100
                    } elsif ( $itemnumber ) {
101
                    $cover_image->delete if $cover_image;
101
                        Koha::Items->find($itemnumber)->cover_images->delete;
102
                    }
102
                }
103
                }
103
104
104
                Koha::CoverImage->new(
105
                Koha::CoverImage->new(
Lines 181-190 if ($fileID) { Link Here
181
                            if ( defined $srcimage ) {
182
                            if ( defined $srcimage ) {
182
                                $total++;
183
                                $total++;
183
                                eval {
184
                                eval {
184
                                    if ( $replace && $biblionumber ) {
185
                                    if ( $replace ) {
185
                                        Koha::Biblios->find($biblionumber)->cover_images->delete;
186
                                        if ( $biblionumber ) {
186
                                    } elsif ( $itemnumber ) {
187
                                            Koha::Biblios->find($biblionumber)->cover_images->delete;
187
                                        Koha::Items->find($itemnumber)->cover_image->delete;
188
                                        } elsif ( $itemnumber ) {
189
                                            Koha::Items->find($itemnumber)->cover_images->delete;
190
                                        }
188
                                    }
191
                                    }
189
192
190
                                    Koha::CoverImage->new(
193
                                    Koha::CoverImage->new(
191
- 

Return to bug 26145