[Testbot] Plone 4.3 - Python 2.6 - Build # 1865 - Still failing! - 7 failure(s)

jenkins at plone.org jenkins at plone.org
Sun Mar 16 18:17:17 UTC 2014


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.6 - Build # 1865 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.6/1865/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.schemaeditor
Branch: refs/heads/master
Date: 2014-03-16T10:42:08-07:00
Author: Steve McMahon (smcmahon) <steve at dcn.org>
Commit: https://github.com/plone/plone.schemaeditor/commit/9c9de9fed13a6dfd379e58e792164a763dd251fa

Respect a SchemaContext label if supplied

Files changed:
M CHANGES.rst
M plone/schemaeditor/browser/schema/listing.py

diff --git a/CHANGES.rst b/CHANGES.rst
index c129243..08522ca 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,6 +4,11 @@ Changelog
 2.0 (unreleased)
 ----------------
 
+- On the listing, respect the SchemaContext label if supplied. Otherwise,
+  build one based on the title. This gives us more label flexibility
+  outside the dexterity schemaeditor context.
+  [smcmahon]
+
 - Add fieldsWhichCannotBeDeleted attribute to SchemaContext, which can be
   used to disallow removal of certain fields.
   [davisagli]
diff --git a/plone/schemaeditor/browser/schema/listing.py b/plone/schemaeditor/browser/schema/listing.py
index 37b7d00..f54a7d8 100644
--- a/plone/schemaeditor/browser/schema/listing.py
+++ b/plone/schemaeditor/browser/schema/listing.py
@@ -127,6 +127,15 @@ class SchemaListingPage(FormWrapper):
 
     @property
     def label(self):
+        """ In a dexterity schema editing context, we need to
+            construct a label that will specify the field being
+            edited. Outside that context (e.g., plone.app.users),
+            we should respect the label if specified.
+        """
+
+        context_label = getattr(self.context, 'label', None)
+        if context_label is not None:
+            return context_label
         if self.context.Title() != self.context.__name__:
             return _(u'Edit ${title} (${name})',
                      mapping={'title': self.context.Title(),




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 1782 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140316/cee6ef05/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 167767 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140316/cee6ef05/attachment-0003.obj>


More information about the Testbot mailing list