if (!webInterface.getCore().isLocalSone(image.getSone())) {
throw new RedirectException("noPermission.html");
}
- String title = request.getHttpRequest().getPartAsStringFailsafe("title", 100).trim();
- String description = request.getHttpRequest().getPartAsStringFailsafe("description", 1024).trim();
- if (title.length() == 0) {
- templateContext.set("titleMissing", true);
+ if ("true".equals(request.getHttpRequest().getPartAsStringFailsafe("moveLeft", 4))) {
+ image.getAlbum().moveImageUp(image);
+ } else if ("true".equals(request.getHttpRequest().getPartAsStringFailsafe("moveRight", 4))) {
+ image.getAlbum().moveImageDown(image);
+ } else {
+ String title = request.getHttpRequest().getPartAsStringFailsafe("title", 100).trim();
+ String description = request.getHttpRequest().getPartAsStringFailsafe("description", 1024).trim();
+ if (title.length() == 0) {
+ templateContext.set("titleMissing", true);
+ }
+ image.setTitle(title);
+ image.setDescription(description);
}
- image.setTitle(title);
- image.setDescription(description);
webInterface.getCore().touchConfiguration();
throw new RedirectException(returnPage);
}
Page.ImageBrowser.Image.Edit.Title=Edit Image
Page.ImageBrowser.Image.Title.Label=Title:
Page.ImageBrowser.Image.Description.Label=Description:
+Page.ImageBrowser.Image.Button.MoveLeft=◀
Page.ImageBrowser.Image.Button.Save=Save Image
+Page.ImageBrowser.Image.Button.MoveRight=►
Page.ImageBrowser.Image.Delete.Title=Delete Image
Page.ImageBrowser.Image.Button.Delete=Delete Image
<textarea name="description"><%image.description|html></textarea>
</div>
<div>
+ <%notfirst><button type="submit" name="moveLeft" value="true"><%= Page.ImageBrowser.Image.Button.MoveLeft|l10n|html></button><%/notfirst>
<button type="submit"><%= Page.ImageBrowser.Image.Button.Save|l10n|html></button>
+ <%notlast><button type="submit" name="moveRight" value="true"><%= Page.ImageBrowser.Image.Button.MoveRight|l10n|html></button><%/notlast>
</div>
</div>
</form>