Tweak wording in directory page: not-read-only is "modifiable", mention creating a directory _in this directory_.

This commit is contained in:
Kevin Reid 2009-05-26 16:24:14 -07:00
parent 3e80676a29
commit a71c914e50
2 changed files with 9 additions and 5 deletions

View File

@ -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('<input type="hidden" name="t" value="mkdir" />.*<legend class="freeform-form-label">Create a new directory</legend>.*<input type="submit" value="Create" />', re.I)
MKDIR_BUTTON_RE=re.compile('<input type="hidden" name="t" value="mkdir" />.*<legend class="freeform-form-label">Create a new directory in this directory</legend>.*<input type="submit" value="Create" />', re.I)
self.failUnless(MKDIR_BUTTON_RE.search(res), res)
d.addCallback(_check4)

View File

@ -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"),