Changeset 4718


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

Add 'add courses' and 'add certificates' buttons for index page of
departments.

File:
1 edited

Legend:

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

    r4709 r4718  
    77from zope.location.interfaces import ISite
    88from waeup.browser.pages import (UniversityPage, FacultyContainerPage,
    9                                  DatacenterPage, FacultyPage)
     9                                 DatacenterPage, FacultyPage, DepartmentPage)
    1010from waeup.browser.interfaces import IBreadcrumbContainer
    1111from waeup.interfaces import (IUniversity, IWAeUPObject, IWAeUPXMLExporter,
     
    135135    grok.require('waeup.manageUniversity')
    136136
     137class ManageDepartmentAction(ManageUniversityAction):
     138    """ 'Edit settings' button for departments.
     139    """
     140    grok.context(IDepartment)
     141    grok.view(DepartmentPage)
     142    grok.template('manageaction')
     143    grok.require('waeup.manageUniversity')
     144
    137145#
    138146# Add actions...
     
    218226    addview_name = 'add'
    219227    addlink_text = 'Add department'
     228
     229class AddCertificateAction(AddAction):
     230    """Add-certificate button for department index page.
     231    """
     232    grok.context(IDepartment)
     233    grok.view(DepartmentPage)
     234    grok.order(3)
     235    grok.template('addaction')
     236    grok.require('waeup.manageUniversity')
     237
     238    addview_name = 'addcertificate'
     239    addlink_text = 'Add certificate'
     240
     241class AddCourseAction(AddAction):
     242    """Add-course button for department index page.
     243    """
     244    grok.context(IDepartment)
     245    grok.view(DepartmentPage)
     246    grok.order(4)
     247    grok.template('addaction')
     248    grok.require('waeup.manageUniversity')
     249
     250    addview_name = 'addcourse'
     251    addlink_text = 'Add course'
     252
    220253
    221254#
Note: See TracChangeset for help on using the changeset viewer.