Ignore:
Timestamp:
12 May 2011, 20:56:14 (14 years ago)
Author:
Henrik Bettermann
Message:

Make frontpage editable.

File:
1 edited

Legend:

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

    r6028 r6065  
    4141from waeup.sirp.university.catalog import search
    4242from waeup.sirp.university.vocabularies import course_levels
     43from waeup.sirp.widgets.restwidget import ReSTWidget
    4344
    4445grok.context(IWAeUPObject)
     
    110111#
    111112
    112 class UniversityPage(WAeUPPage):
     113class UniversityPage(WAeUPDisplayFormPage):
    113114    """ The main university page.
    114115    """
     
    116117    grok.name('index')
    117118    grok.context(IUniversity)
    118     title = u'Welcome to SIRP'
    119119    pnav = 0
     120   
     121    form_fields = grok.AutoFields(IUniversity)
     122    form_fields['frontpage'].custom_widget = ReSTWidget
     123
     124    @property
     125    def title(self):
     126        return "Welcome"
     127
     128    @property
     129    def label(self):
     130        return self.context.title
    120131
    121132class Manage(WAeUPEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.