Bug 25031: (follow-up) Fix markup error and restore cover class
authorOwen Leonard <oleonard@myacpl.org>
Fri, 24 Jul 2020 11:19:24 +0000 (11:19 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 24 Jul 2020 12:09:30 +0000 (14:09 +0200)
This patch corrects a markup error that appears when no cover image
services are enabled. An unclosed <div> caused links on the page to
break.

This patch also restores a part of the cover-handling script which adds
a bordered style to the cover image "tiles"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

index d2376ab..05c18f3 100644 (file)
                             <div class="hint">Custom cover image</div>
                         </div>
                     [% END %]
-                </div>
-            </div> <!-- /#bookcoverimg -->
-        [% END %]
+                </div> <!-- /#cover-slides -->
+            </div> <!-- /#bookcoverimg.col-xs-3 -->
+        [% ELSE %]
+        </div> <!-- /.col-xs-* -->
+        [% END # /IF ( AmazonCoverImages, etc ) %]
 </div>
 <div id="bibliodetails" class="toptabs">
 
@@ -993,13 +995,15 @@ Note that permanent location is a code, and location may be an authval.
                         $(covernav).addClass("nav-active");
                     }
                     $(covernav).html("<i class=\"fa fa-circle\"></i>");
-                    $("#cover-slides").addClass("cover-slides").append( covernav );
+                    $("#cover-slides").append( covernav );
 
                 });
             }
 
             if( $(".cover-image:visible").length < 1 ){
                 $("#cover-slides").remove();
+            } else {
+                $("#cover-slides").addClass("cover-slides");
             }
 
             $("#editions img").each(function(i){