<%include include/head.html>
- <h1><%= Page.ImageBrowser.Page.Title|l10n|html></h1>
+ <script language="javascript">
+
+ /* ajaxify album creation input field. */
+ $(document).ready(function() {
+ getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
+ $("#create-album input[name='name']").each(function() {
+ registerInputTextareaSwap(this, text, "name", false, true);
+ });
+ });
+ getTranslation("WebInterface.DefaultText.CreateAlbum.Description", function(text) {
+ $("#create-album input[name='description']").each(function() {
+ registerInputTextareaSwap(this, text, "description", true, true);
+ });
+ });
+ $("#create-album label").hide();
+ });
+
+ </script>
+
+ <div class="page-id hidden">image-browser</div>
+
+ <%if albumRequested>
+
+ <%ifnull album>
+
+ <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
+
+ <%elseifnull album.title>
+
+ <p><%= Page.ImageBrowser.Album.Error.NotFound.Text|l10n|html></p>
+
+ <%else>
+
+ <h1><%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html></h1>
+
+ <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">></div>
+ <%/if>
+ <%/foreach>
+ </div>
+
+ <%foreach album.albums album>
+ <div class="album">
+ <a href="imageBrowser.html?album=<% album.id|html>">
+ <%ifnull album.image>
+ <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
+ <%else><!-- TODO -->
+ <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
+ <%/if>
+ </a>
+ </div>
+ <%/foreach>
+
+ <%foreach album.images image>
+ <div class="image">
+ <a href="imageBrowser.html?image=<%image.id|html>">
+ <% image|image-link max-width=200 max-height=150>
+ </a>
+ </div>
+ <%/foreach>
+
+ <div id="description">
+ <% album.description|html>
+ </div>
+
+ <%if album.sone.current>
+ <%include include/uploadImage.html>
+ <%include include/createAlbum.html>
+ <%/if>
+
+ <%/if>
+
+ <%elseif imageRequested>
+
+ <%ifnull image>
+
+ <%else>
+
+ <div class="image">
+ <a href="imageBrowser.html?image=<%image.id|html>">
+ <% image|image-link max-width=200 max-height=150>
+ </a>
+ </div>
+
+ <%/if>
+
+ <%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="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.title|html>" title="<% album.title|html>" />
+ <%else><!-- TODO -->
+ <img src="images/unknown-image-0.png" width="200" height="150" alt="<% album.title|html>" title="<% album.title|html>" />
+ <%/if>
+ </a>
+ </div>
+ </div>
+ <%/foreach>
+
+ <%if sone.current>
+ <%include include/createAlbum.html>
+ <%/if>
+
+ <%/if>
+
+ <%/if>
<%include include/tail.html>