From: Brian Warner <warner@lothar.com>
Date: Fri, 15 Jun 2007 08:32:57 +0000 (-0700)
Subject: webish: enable deletion of directories
X-Git-Tag: allmydata-tahoe-0.4.0~39
X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/vdrive/(%5B%5E?a=commitdiff_plain;h=51809ce341db3135812e03824dc3cb748cf7d6ab;p=tahoe-lafs%2Ftahoe-lafs.git

webish: enable deletion of directories
---

diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py
index 023406e3..e40e15bd 100644
--- a/src/allmydata/webish.py
+++ b/src/allmydata/webish.py
@@ -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