webish: mark read-only directories as such when listing their parent

This commit is contained in:
Brian Warner 2007-06-26 12:37:00 -07:00
parent bc2603c818
commit b6162681d5

View File

@ -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: