]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish: enable deletion of directories
authorBrian Warner <warner@lothar.com>
Fri, 15 Jun 2007 08:32:57 +0000 (01:32 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 15 Jun 2007 08:32:57 +0000 (01:32 -0700)
src/allmydata/webish.py

index 023406e314409da27d353ef1379e3700c14cb665..e40e15bd9050578cff970456c965d9f1b6e69330 100644 (file)
@@ -167,7 +167,13 @@ class Directory(rend.Page):
             ctx.fillSlots("type", "DIR")
             ctx.fillSlots("size", "-")
             ctx.fillSlots("uri", "-")
-            ctx.fillSlots("delete", "-")
+
+            del_url = url.here.child("_delete")
+            del_url = del_url.add("name", name)
+            delete = T.form(action=del_url, method="post")[
+                T.input(type='submit', value='del', name="del"),
+                ]
+            ctx.fillSlots("delete", delete)
         else:
             raise RuntimeError("unknown thing %s" % (target,))
         return ctx.tag