import net.pterodactylus.sone.data.Album;
import net.pterodactylus.sone.data.Image;
+import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContext;
Image image = webInterface.getCore().getImage(imageId, false);
templateContext.set("imageRequested", true);
templateContext.set("image", image);
+ return;
+ }
+ Sone sone = getCurrentSone(request.getToadletContext(), false);
+ String soneId = request.getHttpRequest().getParam("sone", null);
+ if (soneId != null) {
+ sone = webInterface.getCore().getSone(soneId, false);
}
+ templateContext.set("soneRequested", true);
+ templateContext.set("sone", sone);
}
+
}
Page.ImageBrowser.Title=Image Browser - Sone
Page.ImageBrowser.Page.Title=Image Browser
Page.ImageBrowser.Album.Error.NotFound.Text=The requested album could not be found. It is possible that it has not yet been downloaded, or that it has been deleted.
+Page.ImageBrowser.Sone.Error.NotFound.Text=The requested Sone could not be found. It is possible that it has not yet been downloaded.
Page.ImageBrowser.CreateAlbum.Button.CreateAlbum=Create Album
Page.CreateAlbum.Title=Create Album - Sone
<%elseif imageRequested>
- <%else>
+ <%elseif soneRequested>
- <%foreach currentSone.albums album>
- <div class="album">
- <div class="name"><% album.name|html></div>
- </div>
- <%/foreach>
+ <%ifnull sone>
+
+ <p><%= Page.ImageBrowser.Sone.Error.NotFound.Text|l10n|html></p>
+
+ <%else>
- <%include include/createAlbum.html>
+ <%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>