Ignore:
Timestamp:
28 Jul 2009, 00:17:48 (15 years ago)
Author:
uli
Message:
  • Make use of new helper function.
  • Get rid of display form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/university/department.py

    r4453 r4459  
    66from zope.interface import implementedBy
    77from waeup.interfaces import IDepartment
     8from waeup.utils.helpers import getName
    89from waeup.widgets.interfaces import ITableProvider
    910from waeup.viewlets import MainArea, LeftSidebar, Index, FormWrapMixin, Manage
     
    5253        return implementedBy(Department)
    5354
    54        
    55 class DisplayForm(grok.DisplayForm):
    56     grok.context(IDepartment)
    57     form_fields = grok.AutoFields(IDepartment)
    5855
    59 class Content(FormWrapMixin, grok.Viewlet):
     56class Content(grok.Viewlet):
    6057    """A viewlet that wraps the `AddDepartmentForm`.
    6158    """
     
    6865                                  # to be rendered in this viewlet.
    6966
     67    def getName(self):
     68        return getName(self.context)
     69
     70    def getParentName(self):
     71        return getName(self.context.__parent__)
    7072
    7173class CourseList(grok.Viewlet):
Note: See TracChangeset for help on using the changeset viewer.