Bug 8710 - Don't show the images tab in the OPAC if the record has no local images
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-detail.tt
index 3ed3144..17658b9 100644 (file)
@@ -712,9 +712,9 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     </li>
 [% END %]
 
-[% IF ( OPACLocalCoverImages ) %][% IF ( localimages ) %]
+[% IF ( OPACLocalCoverImages && localimages.size ) %]
     <li id="tab_images"><a href="#images">Images</a></li>
-[% END %][% END %]
+[% END %]
 </ul>
 
 [% IF ( serialcollection ) %]
@@ -1149,7 +1149,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 </table>
 </div>[% END %][% END %]
 
-[% IF ( OPACLocalCoverImages ) %]
+[% IF ( OPACLocalCoverImages && localimages.size ) %]
 <div id="images">
 <p>Click on an image to view it in the image viewer</p>
 [% FOREACH image IN localimages %]