+ <h1 class="backlink"><%image.title|html></h1>
+
+ <div class="backlinks">
+ <%foreach image.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>
+
+ <%ifnull image>
+
+ <%else>
+
+ <%if image.sone.local>
+ <script language="javascript">
+ $(function() {
+ getTranslation("WebInterface.DefaultText.EditImage.Title", function(text) {
+ $("#edit-image input[name='title']").each(function() {
+ registerInputTextareaSwap(this, text, "title", false, true);
+ });
+ });
+ getTranslation("WebInterface.DefaultText.EditImage.Description", function(text) {
+ $("#edit-image :input[name='description']").each(function() {
+ registerInputTextareaSwap(this, text, "description", true, false);
+ });
+ });
+ $("#edit-image label").hide();
+
+ /* hide all those forms. */
+ hideBlock = function(blockElement, clickElement) {
+ $(blockElement).hide();
+ $(clickElement).removeClass("hidden").click(function() {
+ $(blockElement).slideDown();
+ $(this).slideUp();
+ return false;
+ });
+ };
+
+ hideBlock(".edit-image", ".show-edit-image");
+ hideBlock(".delete-image", ".show-delete-image");
+ });
+ </script>
+ <%/if>
+
+ <div class="single-image">
+ <%ifnull !image.key>
+ <a href="/<%image.key|html>"><% image|image-link max-width=640 max-height=480></a>
+ <%else>
+ <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=640 max-height=480></a>
+ <%/if>
+ </div>
+
+ <p class="parsed"><%image.description|parse sone=image.sone></p>
+
+ <%if image.sone.local>
+
+ <p><a class="show-edit-image hidden small-link">» <%= Page.ImageBrowser.Image.Edit.Title|l10n|html></a></p>
+ <div class="edit-image">
+ <h2><%= Page.ImageBrowser.Image.Edit.Title|l10n|html></h2>
+
+ <form id="edit-image" action="editImage.html" method="post">
+ <input type="hidden" name="formPassword" value="<%formPassword|html>" />
+ <input type="hidden" name="returnPage" value="<%request.uri|html>" />
+ <input type="hidden" name="image" value="<%image.id|html>" />
+
+ <div>
+ <label for="title"><%= Page.ImageBrowser.Image.Title.Label|l10n|html></label>
+ <input type="text" name="title" value="<%image.title|html>" />
+ </div>
+ <div>
+ <label for="description"><%= Page.ImageBrowser.Image.Description.Label|l10n|html></label>
+ <textarea name="description"><%image.description|html></textarea>
+ </div>
+ <div>
+ <button type="submit"><%= Page.ImageBrowser.Image.Button.Save|l10n|html></button>
+ </div>
+ </form>
+ </div>
+
+ <p><a class="show-delete-image hidden small-link">» <%= Page.ImageBrowser.Image.Delete.Title|l10n|html></a></p>
+ <div class="delete-image">
+ <h2><%= Page.ImageBrowser.Image.Delete.Title|l10n|html></h2>
+
+ <form id="delete-image" action="deleteImage.html" method="get">
+ <input type="hidden" name="image" value="<%image.id|html>" />
+ <button type="submit"><%= Page.ImageBrowser.Image.Button.Delete|l10n|html></button>
+ </form>
+ </div>
+
+ <%/if>
+
+ <%/if>
+
+ <%elseif soneRequested>
+
+ <%if sone.local>
+ <script language="javascript">
+ $(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();