Move portal_properties settings to configuration registry
commit b13db31e3c55fd5ed9320e9d0c93aea48366c883 Author: esteele <eric@esteele.net> Date: Fri Sep 18 10:14:56 2015 +0200 Remove pdb. commit 6b3e591583146ca661556ef50cafd02f62c79d46 Author: esteele <eric@esteele.net> Date: Fri Sep 18 09:50:06 2015 +0200 Fix registry id commit 9dfce9a739496b6023f93376535dccc9a9310517 Author: esteele <eric@esteele.net> Date: Thu Sep 17 18:34:42 2015 +0200 Use registry lookup for types_use_view_action_in_listings
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
from AccessControl import getSecurityManager
|
||||
from Acquisition import aq_inner
|
||||
from Acquisition import aq_parent
|
||||
from zope.component import getUtility
|
||||
from Products.CMFCore.utils import getToolByName
|
||||
from Products.Five.browser import BrowserView
|
||||
from Products.statusmessages.interfaces import IStatusMessage
|
||||
from comments import CommentForm
|
||||
from plone.app.discussion import PloneAppDiscussionMessageFactory as _
|
||||
from plone.registry.interfaces import IRegistry
|
||||
from plone.z3cform.layout import wrap_form
|
||||
from z3c.form import button
|
||||
from zope.component import getMultiAdapter
|
||||
@@ -30,8 +32,11 @@ class View(BrowserView):
|
||||
|
||||
def __call__(self):
|
||||
context = aq_inner(self.context)
|
||||
ptool = getToolByName(context, 'portal_properties')
|
||||
view_action_types = ptool.site_properties.typesUseViewActionInListings
|
||||
|
||||
registry = getUtility(IRegistry)
|
||||
view_action_types = registry.get(
|
||||
'plone.types_use_view_action_in_listings', [])
|
||||
|
||||
obj = aq_parent(aq_parent(context))
|
||||
url = obj.absolute_url()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user