Ignore:
Timestamp:
11 Mar 2010, 13:21:00 (15 years ago)
Author:
uli
Message:
  • Add message view, which was provided in former times by grokui.admin.
  • WAeUPPage now is a pure megrok.layout Page without mixin. Needs megrok.layout from recent groktoolkit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py

    r4987 r5048  
    44from hurry import yui
    55from megrok.layout import Page, Layout, EditForm, DisplayForm, AddForm
    6 from waeup.sirp.interfaces import IWAeUPObject
    7 from z3c.flashmessage.interfaces import IMessageSource
    8 from zope.component import queryUtility, ComponentLookupError
     6from z3c.flashmessage.interfaces import IMessageSource, IMessageReceiver
     7from zope.component import getUtility, queryUtility, ComponentLookupError
    98from zope.interface import Interface
    10 # Conditional import. getSite moved to zope.site.hooks in recent grok versions.
    119try:
    1210    from zope.site.hooks import getSite
    1311except ImportError:
     12    # BBB
    1413    from zope.app.component.hooks import getSite
     14from waeup.sirp.interfaces import IWAeUPObject
    1515
    1616grok.templatedir('templates')
     
    2929    """
    3030    return dict()
     31
     32class Messages(grok.View):
     33    """Display messages of message receivers.
     34    """
     35
     36    grok.context(Interface)
     37
     38    @property
     39    def messages(self):
     40        receiver = getUtility(IMessageReceiver)
     41        return receiver.receive()
    3142
    3243class UtilityView(object):
     
    6172    grok.baseclass()
    6273   
    63 class WAeUPPage(Page, UtilityView):
     74class WAeUPPage(Page):
    6475    """A megrok.layout page with additional methods.
    6576    """
Note: See TracChangeset for help on using the changeset viewer.