From 51809ce341db3135812e03824dc3cb748cf7d6ab Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 15 Jun 2007 01:32:57 -0700 Subject: [PATCH] webish: enable deletion of directories --- src/allmydata/webish.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.45.2