From e5482b525455e69509429acdf7b7b79409c0ff9f Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 7 Jul 2007 21:30:04 -0700 Subject: [PATCH] web: add a 'return to welcome page' link --- src/allmydata/web/directory.xhtml | 3 ++- src/allmydata/webish.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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): -- 2.45.2