Show page title when browsing albums of a Sone.
[Sone.git] / src / main / resources / templates / imageBrowser.html
index 30c61e4..abb6132 100644 (file)
@@ -1,5 +1,72 @@
 <%include include/head.html>
 
-       <h1><%= Page.ImageBrowser.Page.Title|l10n|html></h1>
+       <div class="page-id hidden">image-browser</div>
+
+       <%if albumRequested>
+
+               <%ifnull album>
+
+                       <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
+
+               <%elseifnull album.name>
+
+                       <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
+
+               <%else>
+
+                       <h2><%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.name|html></h2>
+
+                       <div class="backlinks">
+                               <%foreach album.backlinks backlink backlinks>
+                                       <div class="backlink">
+                                               <a href="<% backlink.target|html>"><% backlink.name|html></a>
+                                       </div>
+                                       <%if ! backlinks.last>
+                                               <div class="separator">&gt;</div>
+                                       <%/if>
+                               <%/foreach>
+                       </div>
+
+                       <%foreach album.albums album>
+                               <div class="album">
+                                       <div class="name"><a href="imageBrowser.html?album=<% album.id|html>"><% album.name|html></a></div>
+                               </div>
+                       <%/foreach>
+
+                       <div id="description">
+                               <% album.description|html>
+                       </div>
+
+                       <%if album.sone.current>
+                               <%include include/createAlbum.html>
+                       <%/if>
+
+               <%/if>
+
+       <%elseif imageRequested>
+
+       <%elseif soneRequested>
+
+               <%ifnull sone>
+
+                       <p><%= Page.ImageBrowser.Sone.Error.NotFound.Text|l10n|html></p>
+
+               <%else>
+
+                       <h1><%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html></h1>
+
+                       <%foreach sone.albums album>
+                               <div class="album">
+                                       <div class="name"><a href="imageBrowser.html?album=<% album.id|html>"><% album.name|html></a></div>
+                               </div>
+                       <%/foreach>
+
+                       <%if sone.current>
+                               <%include include/createAlbum.html>
+                       <%/if>
+
+               <%/if>
+
+       <%/if>
 
 <%include include/tail.html>