Add inline image editing.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 22 Sep 2011 05:55:52 +0000 (07:55 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 22 Sep 2011 05:55:52 +0000 (07:55 +0200)
src/main/resources/static/css/sone.css
src/main/resources/templates/imageBrowser.html

index 053923b..81c9f83 100644 (file)
@@ -667,6 +667,14 @@ textarea {
        background-color: #fff;
 }
 
+#sone .image .edit-image input {
+       width: 95%;
+}
+
+#sone .image .edit-image textarea {
+       width: 95%;
+}
+
 #sone .backlinks .separator {
        display: inline;
 }
index 5a26c1a..a037e12 100644 (file)
                                <%if loop.count|mod divisor=3><div class="image-row"><%/if>
                                <div class="image">
                                        <a href="imageBrowser.html?image=<%image.id|html>"><% image|image-link max-width=200 max-height=150></a>
+                                       <%if album.sone.local>
+                                               <br/>
+                                               <form class="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>
+                                                               <input type="text" name="title" value="<%image.title|html>" />
+                                                       </div>
+                                                       <div>
+                                                               <textarea name="description"><%image.description|html></textarea>
+                                                       </div>
+                                                       <div>
+                                                               <button type="submit"><%= Page.ImageBrowser.Image.Button.Save|l10n|html></button>
+                                                       </div>
+                                               </form>
+                                       <%/if>
                                </div>
                                <%= false|store key=endRow>
                                <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if>