Various Changes #1

Merged
merged 7 commits into from Feb 4, 2013

2 participants

@Tschanzt

@jone Could you take a look at this? The Branch changes this things:

  • Show title & editbar
  • Don't show inherited portlets
  • Hide Plone languageselector
  • Fix and add additional Tests
@Tschanzt

👍

@jone jone commented on an outdated diff Feb 1, 2013
ftw/subsite/handlers.py
@@ -0,0 +1,27 @@
+from plone.portlets.constants import CONTEXT_CATEGORY
+from plone.portlets.interfaces import ILocalPortletAssignmentManager
+from plone.portlets.interfaces import IPortletManager
+from zope.component import getUtility, getMultiAdapter
+from zope.component.interfaces import ComponentLookupError
+
+def remove_parent_portlets(object_, event):
@jone
4teamwork AG member
jone added a line comment Feb 1, 2013

block_parent_portlets instead of remove_parent_portlets would be more descriptive, I think..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jone jone commented on an outdated diff Feb 1, 2013
ftw/subsite/tests/test_subsiteview.py
@@ -65,3 +51,27 @@ def test_manageview_render(self):
self.browser.open(self.subsite.absolute_url() + '/manage-subsiteview')
for item in range(1, 6):
self.assertIn('<div id="subsite-column-%s" class="column">' % str(item), self.browser.contents)
+
+ def test_view_authorized(self):
+ self._auth()
+ self.browser.open(self.subsite.absolute_url())
+ self.assertIn(' <h1 id="parent-fieldname-title" class="documentFirstHeading', self.browser.contents)
+ self.assertIn('<div class="contentActions">', self.browser.contents)
+
+ def test_view_anonymous(self):
+ self.browser.open(self.subsite.absolute_url())
+ self.assertNotIn(' <h1 id="parent-fieldname-title" class="documentFirstHeading', self.browser.contents)
@jone
4teamwork AG member
jone added a line comment Feb 1, 2013

Are those leading spaces (see also test_view_authorized) by intention? This would not match </div><h1> - but maybe it should?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jone jone merged commit 504709b into master Feb 4, 2013
@jone jone deleted the tt-various branch Feb 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment