Ignore:
Timestamp:
8 Jan 2010, 01:24:18 (15 years ago)
Author:
uli
Message:

Add index page for courses.

File:
1 edited

Legend:

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

    r4720 r4722  
    99from hurry.query import Eq
    1010from hurry.query.query import Query, Text
    11 from waeup.browser import WAeUPPage, WAeUPEditFormPage, WAeUPAddFormPage
     11from waeup.browser import (WAeUPPage, WAeUPEditFormPage, WAeUPAddFormPage,
     12                           WAeUPDisplayFormPage)
    1213from waeup.catalog import search, search_context
    1314from waeup.datacenter import Import
     
    605606        self.redirect(self.url(self.context))
    606607        return
     608
     609#
     610# Courses pages
     611#
     612class CoursePage(WAeUPDisplayFormPage):
     613    """Course index page.
     614    """
     615    grok.context(ICourse)
     616    grok.name('index')
     617    grok.require('waeup.View')
     618    pnav = 1
     619    form_fields = grok.AutoFields(ICourse)
     620
     621    @property
     622    def title(self):
     623        return 'Course: %s (%s)' % (self.context.title, self.context.code)
     624
Note: See TracChangeset for help on using the changeset viewer.