From: Kevin Reid Date: Tue, 26 May 2009 23:24:14 +0000 (-0700) Subject: Tweak wording in directory page: not-read-only is "modifiable", mention creating... X-Git-Tag: trac-3900~17 X-Git-Url: https://git.rkrishnan.org/...?a=commitdiff_plain;h=a71c914e50981ab2e0c26c308b505e6d92d87c10;p=tahoe-lafs%2Ftahoe-lafs.git Tweak wording in directory page: not-read-only is "modifiable", mention creating a directory _in this directory_. --- diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index ad3fa40b..b99e26ab 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -913,7 +913,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase): d.addCallback(lambda res: self.GET(self.public_url + "/reedownlee", followRedirect=True)) def _check2(res): - self.failUnless("(readonly)" in res, res) + self.failUnless("(read-only)" in res, res) self.failIf("Upload a file" in res, res) d.addCallback(_check2) @@ -929,7 +929,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase): d.addCallback(lambda res: self.GET(self.public_url + "/foo/empty/")) def _check4(res): self.failUnless("directory is empty" in res, res) - MKDIR_BUTTON_RE=re.compile('.*Create a new directory.*', re.I) + MKDIR_BUTTON_RE=re.compile('.*Create a new directory in this directory.*', re.I) self.failUnless(MKDIR_BUTTON_RE.search(res), res) d.addCallback(_check4) diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index 42dd271a..ac0b09e8 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -524,14 +524,18 @@ class DirectoryAsHTML(rend.Page): def render_title(self, ctx, data): si_s = abbreviated_dirnode(self.node) - header = ["Directory SI=%s" % si_s] + header = ["AllMyData - Tahoe - Directory SI=%s" % si_s] + if self.node.is_readonly(): + header.append(" (read-only)") + else: + header.append(" (modifiable)") return ctx.tag[header] def render_header(self, ctx, data): si_s = abbreviated_dirnode(self.node) header = ["Directory SI=%s" % si_s] if self.node.is_readonly(): - header.append(" (readonly)") + header.append(" (read-only)") return ctx.tag[header] def render_welcome(self, ctx, data): @@ -674,7 +678,7 @@ class DirectoryAsHTML(rend.Page): T.fieldset[ T.input(type="hidden", name="t", value="mkdir"), T.input(type="hidden", name="when_done", value="."), - T.legend(class_="freeform-form-label")["Create a new directory"], + T.legend(class_="freeform-form-label")["Create a new directory in this directory"], "New directory name: ", T.input(type="text", name="name"), " ", T.input(type="submit", value="Create"),