Prepare for showing the album image.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 23 Mar 2011 06:04:25 +0000 (07:04 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 23 Mar 2011 06:04:25 +0000 (07:04 +0100)
src/main/resources/templates/imageBrowser.html

index 6b91960..9dac07b 100644 (file)
 
                        <%foreach album.albums album>
                                <div class="album">
-                                       <div class="image"><a href="imageBrowser.html?album=<% album.id|html>"><img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" /></a></div>
+                                       <div class="image">
+                                               <a href="imageBrowser.html?album=<% album.id|html>">
+                                                       <%ifnull album.image>
+                                                               <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
+                                                       <%else><!-- TODO -->
+                                                               <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
+                                                       <%/if>
+                                               </a>
+                                       </div>
                                </div>
                        <%/foreach>
 
 
                        <%foreach sone.albums album>
                                <div class="album">
-                                       <div class="image"><a href="imageBrowser.html?album=<% album.id|html>"><img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" /></a></div>
+                                       <div class="image">
+                                               <a href="imageBrowser.html?album=<% album.id|html>">
+                                                       <%ifnull album.image>
+                                                               <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
+                                                       <%else><!-- TODO -->
+                                                               <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.name|html>" title="<% album.name|html>" />
+                                                       <%/if>
+                                               </a>
+                                       </div>
                                </div>
                        <%/foreach>