From: Brian Warner Date: Tue, 26 Jun 2007 19:37:00 +0000 (-0700) Subject: webish: mark read-only directories as such when listing their parent X-Git-Tag: allmydata-tahoe-0.4.0~29 X-Git-Url: https://git.rkrishnan.org/module-simplejson.tests.html?a=commitdiff_plain;h=b6162681d5900e7bafec1abfa896dbb1ccd0423e;p=tahoe-lafs%2Ftahoe-lafs.git webish: mark read-only directories as such when listing their parent --- diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index e8b518c6..b27b7adb 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -186,7 +186,11 @@ class Directory(rend.Page): subdir_url = urllib.quote(name) ctx.fillSlots("filename", T.a(href=subdir_url)[html.escape(name)]) - ctx.fillSlots("type", "DIR") + if target.is_mutable(): + dirtype = "DIR" + else: + dirtype = "DIR-RO" + ctx.fillSlots("type", dirtype) ctx.fillSlots("size", "-") ctx.fillSlots("uri", "-") else: