Changeset 4561


Ignore:
Timestamp:
16 Dec 2009, 10:44:54 (15 years ago)
Author:
uli
Message:
  • Add viewlets for ICertificateCourse.
File:
1 edited

Legend:

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

    r4504 r4561  
    88from waeup.interfaces import (IUniversity, IWAeUPObject, IWAeUPXMLExporter,
    99                              IWAeUPXMLImporter, IFacultyContainer, IFaculty,
    10                               IDepartment, ICourse, ICertificate)
     10                              IDepartment, ICourse, ICertificate,
     11                              ICertificateCourse,)
    1112from waeup.utils.helpers import getInnerHTMLPart
    1213
     
    3940
    4041class AddCertificate(grok.View):
     42    """Admin add form wrapper for waeup objects.
     43   
     44    We need different named add views for departments as there are
     45    different things to add.
     46    """
     47    grok.context(IWAeUPObject)
     48    grok.template('master')
     49
     50class AddCertificateCourse(grok.View):
    4151    """Admin add form wrapper for waeup objects.
    4252   
     
    238248    addlink_text = 'Add certificate'
    239249
     250class AddCertificateCourseAction(AddAction):
     251    grok.context(ICertificate)
     252    grok.template('addaction')
     253
     254    addview_name = 'addcertificatecourse'
     255    addlink_text = 'Add course'
     256
    240257   
    241258class ManageUniversityAction(grok.Viewlet):
     
    261278class ManageCertificateAction(ManageUniversityAction):
    262279    grok.context(ICertificate)
     280
     281class ManageCertificateCourseAction(ManageUniversityAction):
     282    grok.context(ICertificateCourse)
    263283
    264284class ExportXMLAction(grok.Viewlet):
     
    330350                                    name=self.formview_name)
    331351        self.form.update_form()
    332         if self.request.method == 'POST':
    333             #app = get_application(self.context)
    334             #self.__parent__.redirect(self.__parent__.url(obj=app))
    335             pass
    336352
    337353    def render(self):
Note: See TracChangeset for help on using the changeset viewer.