Tweak wording in directory page: not-read-only is "modifiable", mention creating...
authorKevin Reid <kpreid@mac.com>
Tue, 26 May 2009 23:24:14 +0000 (16:24 -0700)
committerKevin Reid <kpreid@mac.com>
Tue, 26 May 2009 23:24:14 +0000 (16:24 -0700)
src/allmydata/test/test_web.py
src/allmydata/web/directory.py

index ad3fa40b4877e60ae2a6dee4e5bb3d82df62729e..b99e26abc84657a8a1bc9e2d0669d49126acc24b 100644 (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)
 
index 42dd271a08b042003ac56a53380b3f61ddfaff71..ac0b09e8dc414f6418473c949699d3b6f6b654cc 100644 (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"),