Beispiel #1
0
 def title(self):
     m_context = PLONEINTRANET.context(self.context)
     if m_context:
         return m_context.Title() + ' updates'
     elif self.explore:
         return _(u'Explore')
     else:
         return _(u'My network')
 def __init__(self, context, request, view):
     self.context = context
     self.request = request
     self.view = self.__parent__ = view
     # @@activitystream_portal renders this as a portlet
     self.portlet_data = None
     # @@stream renders this optionally with a tag filter
     self.tag = None
     # @@stream and ploneintranet.network:@@author
     # render this optionally with a users filter
     self.users = None
     self.microblog_context = PLONEINTRANET.context(context)
Beispiel #3
0
    def items(self):
        menu = []
        m_context = PLONEINTRANET.context(self.context)
        if m_context:
            m_base = m_context.absolute_url() + '/'
            menu.extend([dict(url=m_base + '@@stream',
                              title=m_context.Title() + ' updates',
                              state='localstream')])

        for item in menu:
            if self.request.URL == item['url']:
                item['state'] = 'active'
        return menu
    def items(self):
        menu = []
        m_context = PLONEINTRANET.context(self.context)
        if m_context:
            m_base = m_context.absolute_url() + '/'
            menu.extend([dict(url=m_base + '@@stream',
                              title=m_context.Title() + ' updates',
                              state='localstream')])

        base = self.portal_url() + '/'
        menu.extend([dict(url=base + '@@stream',
                          title='Explore',
                          state='explore')])
        if PLONEINTRANET.network:
            menu.extend([dict(url=base + '@@stream/network',
                              title='My network',
                              state='stream'),
                         dict(url=base + '@@author',
                              title='My profile',
                              state='profile')])
        for item in menu:
            if self.request.URL == item['url']:
                item['state'] = 'active'
        return menu
Beispiel #5
0
 def microblog_context(self):
     ''' Returns the microblog context
     '''
     return PLONEINTRANET.context(self.context)