src/pyams_portal/zmi/layout.py
changeset 82 fb2eed8dc88e
parent 78 9cb4449caef6
child 84 2be886bff11b
equal deleted inserted replaced
81:17f00e31a7b0 82:fb2eed8dc88e
   469     dialog_class = 'modal-large'
   469     dialog_class = 'modal-large'
   470 
   470 
   471     def __call__(self):
   471     def __call__(self):
   472         request = self.request
   472         request = self.request
   473         request.registry.notify(PageletCreatedEvent(self))
   473         request.registry.notify(PageletCreatedEvent(self))
   474         portlet_id = int(request.params.get('portlet.widgets.portlet_id'))
   474         portlet_id = int(request.params.get('{0}widgets.portlet_id'.format(self.prefix)))
   475         portlet_config = IPortalPortletsConfiguration(self.context).get_portlet_configuration(portlet_id)
   475         portlet_config = IPortalPortletsConfiguration(self.context).get_portlet_configuration(portlet_id)
   476         if portlet_config is None:
   476         if portlet_config is None:
   477             raise NotFound()
   477             raise NotFound()
   478         editor = self.request.registry.queryMultiAdapter((portlet_config.editor_settings, request),
   478         editor = self.request.registry.queryMultiAdapter((portlet_config.editor_settings, request),
   479                                                          IPagelet, name='properties.html')
   479                                                          IPagelet, name='properties.html')
   492 
   492 
   493     def __call__(self):
   493     def __call__(self):
   494         request = self.request
   494         request = self.request
   495         request.registry.notify(PageletCreatedEvent(self))
   495         request.registry.notify(PageletCreatedEvent(self))
   496         # load portlet config
   496         # load portlet config
   497         portlet_id = int(request.params.get('portlet.widgets.portlet_id'))
   497         portlet_id = int(request.params.get('{0}widgets.portlet_id'.format(self.prefix)))
   498         portlet_config = IPortalPortletsConfiguration(self.context).get_portlet_configuration(portlet_id)
   498         portlet_config = IPortalPortletsConfiguration(self.context).get_portlet_configuration(portlet_id)
   499         if portlet_config is None:
   499         if portlet_config is None:
   500             raise NotFound()
   500             raise NotFound()
   501         # check inheritance
   501         # check inheritance
   502         old_override = portlet_config.inherit_parent
   502         old_override = portlet_config.inherit_parent