From: Brian Warner Date: Sun, 8 Jul 2007 04:30:04 +0000 (-0700) Subject: web: add a 'return to welcome page' link X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/%22doc.html/index.php?a=commitdiff_plain;h=e5482b525455e69509429acdf7b7b79409c0ff9f;p=tahoe-lafs%2Ftahoe-lafs.git web: add a 'return to welcome page' link --- diff --git a/src/allmydata/web/directory.xhtml b/src/allmydata/web/directory.xhtml index 8f7da30b..b8a7ab83 100644 --- a/src/allmydata/web/directory.xhtml +++ b/src/allmydata/web/directory.xhtml @@ -12,7 +12,8 @@

Refresh this view
-
Parent Directory
+
+
Other representations of this directory: manifest, URI, diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index fe465e63..044f4aef 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -69,6 +69,11 @@ class Directory(rend.Page): header.append(":") return ctx.tag[header] + def render_welcome(self, ctx, data): + depth = len(self._dirpath) + 2 + link = "/".join([".."] * depth) + return T.div[T.a(href=link)["Return to Welcome page"]] + def data_share_uri(self, ctx, data): return self._dirnode.get_uri() def data_share_readonly_uri(self, ctx, data):