Changeset 4707 for waeup/branches


Ignore:
Timestamp:
7 Jan 2010, 22:31:16 (15 years ago)
Author:
uli
Message:

Add faculty index page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-layout/src/waeup/browser/pages.py

    r4690 r4707  
    1414                              IFaculty)
    1515from waeup.widgets.interfaces import ITableProvider
     16from waeup.utils.helpers import getName
    1617from zope.app.security.interfaces import (IAuthentication,
    1718                                          IUnauthenticatedPrincipal,
     
    417418        self.redirect(self.url())
    418419        return
     420
     421#
     422# Faculty pages
     423#
     424class FacultyPage(WAeUPPage):
     425    """Index page of faculties.
     426    """
     427    grok.context(IFaculty)
     428    grok.name('index')
     429    pnav = 1
     430    @property
     431    def title(self):
     432        return "%s (%s)" % (getName(self.context), self.context.code)
     433
     434    def update(self):
     435        self.table = ITableProvider(self.context).getTables(view=self)[0]
     436        self.table.need()
Note: See TracChangeset for help on using the changeset viewer.