예제 #1
0
class LoginAlerts(Viewlet):
    viewletmanager(Top)
    order(15)
    context(LoginRoot)
    layer(DefaultLayer)

    template = get_template('messages.pt', __file__)
예제 #2
0
class Alerts(Viewlet):
    viewletmanager(Top)
    order(15)
    context(GateKeeper)
    layer(DefaultLayer)

    template = get_template('messages.pt', __file__)
예제 #3
0
class FlashMessages(uvclight.Viewlet):
    uvclight.order(2)
    uvclight.layer(IVBGTheme)
    uvclight.viewletmanager(managers.IAboveContent)
    template = uvclight.get_template('flash.cpt', __file__)

    def update(self):
        self.messages = [msg.message for msg in receive()]
예제 #4
0
class ContextualMenuDisplay(Viewlet):
    viewletmanager(Top)
    order(20)
    layer(DefaultLayer)

    def update(self):
        self.menu = ContextualActions(self.context, self.request, self.view)
        self.menu.update()

    def render(self):
        return self.menu.render()
예제 #5
0
class FooterViewlet(MenuViewlet):
    uvclight.viewletmanager(managers.IFooter)
    uvclight.layer(IVBGTheme)
    uvclight.order(20)

    menu = menus.PersonalMenu
    template = get_template('footer.cpt')

    def getFooter(self):
        menu = menus.FooterMenu(self.context, self.request, self.view)
        menu.update()
        return menu.entries
예제 #6
0
class DocumentActionsViewlet(MenuViewlet):
    uvclight.viewletmanager(managers.IAboveContent)
    uvclight.layer(IVBGTheme)
    uvclight.order(20)

    template = get_template('documentactionstemplate.cpt')
    name = u'Aktion'
    id = u'documentactionsviewlet'

    def update(self):
        self.menu = menus.DocumentActionsMenu(
            self.context, self.request, self.view)
        self.menu.update()
예제 #7
0
class NavigationMenuViewlet(MenuViewlet):
    uvclight.viewletmanager(Navigation)
    uvclight.layer(IVBGTheme)
    uvclight.order(30)

    menu = menus.NavigationMenu
    template = get_template('navigationtemplate.cpt')

    id = u'globalmenuviewlet'

    def getNavigation(self):
        menu = menus.NavigationMenu(self.context, self.request, self.view)
        menu.update()
        return menu.entries

    def getUser(self):
        menu = menus.UserMenu(self.context, self.request, self.view)
        menu.update()
        return menu.entries

    def getRenderableItems(self):
       return list()

    def getQuicklinks(self):
        menu = menus.Quicklinks(self.context, self.request, self.view)
        menu.update()
        return menu.entries

    def getPersonal(self):
        menu = menus.PersonalMenu(self.context, self.request, self.view)
        menu.update()
        return menu.entries

    def isAuth(self):
        if hasattr(self.request, 'principal'):
            if self.request.principal.id != 'user.unauthenticated':
                return True
        return False
예제 #8
0
class RGPDCK(uvclight.Viewlet):
    uvclight.viewletmanager(managers.IAboveContent)
    uvclight.order(00)
    uvclight.name('rgpdck')
    template = uvclight.get_template('rgpdck.cpt', __file__)
예제 #9
0
class AddMenuViewlet(MenuViewlet):
    uvclight.viewletmanager(managers.IAboveContent)
    uvclight.layer(IVBGTheme)
    uvclight.order(20)
    menu = menus.AddMenu
예제 #10
0
class ObjectActionMenuViewlet(MenuViewlet):
    uvclight.viewletmanager(managers.IAboveContent)
    uvclight.context(IContent)
    uvclight.layer(IVBGTheme)
    uvclight.order(10)
    menu = menus.ContextualActionsMenu