Ignore:
Timestamp:
2 Nov 2013, 09:02:26 (11 years ago)
Author:
Henrik Bettermann
Message:

Remove other redundant interfaces, see previous revision.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py

    r10684 r10685  
    2424from waeup.kofa.interfaces import MessageFactory as _
    2525from waeup.kofa.university.interfaces import (
    26     IFacultiesContainer, IFaculty, IDepartment, IDepartmentAdd,
    27     ICoursesContainer, ICourse, ICourseAdd, ICertificatesContainer,
    28     ICertificate, ICertificateAdd, ICertificateCourse, ICertificateCourseAdd)
     26    IFacultiesContainer, IFaculty, IDepartment,
     27    ICoursesContainer, ICourse, ICertificatesContainer,
     28    ICertificate, ICertificateCourse)
    2929
    3030class IBreadcrumb(Interface):
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r10684 r10685  
    4747from waeup.kofa.browser.interfaces import (
    4848    IUniversity, IFacultiesContainer, IFaculty,
    49     IDepartment, IDepartmentAdd, ICourse, ICourseAdd, ICertificate,
    50     ICertificateAdd, ICertificateCourse, ICertificateCourseAdd,
     49    IDepartment, ICourse, ICertificate,
     50    ICertificateCourse,
    5151    ICaptchaManager, IChangePassword)
    5252from waeup.kofa.browser.layout import jsaction, action, UtilityView
     
    19041904    grok.require('waeup.manageAcademics')
    19051905    label = _('Add department')
    1906     form_fields = grok.AutoFields(IDepartmentAdd)
     1906    form_fields = grok.AutoFields(IDepartment)
    19071907    pnav = 1
    19081908
     
    19771977    tabfouractions2 = [_('Add local role')]
    19781978
    1979     form_fields = grok.AutoFields(IDepartment)
     1979    form_fields = grok.AutoFields(IDepartment).omit('code')
    19801980
    19811981    @property
     
    20582058    grok.require('waeup.manageAcademics')
    20592059    label = _(u'Add course')
    2060     form_fields = grok.AutoFields(ICourseAdd)
     2060    form_fields = grok.AutoFields(ICourse)
    20612061    pnav = 1
    20622062
     
    20992099    grok.require('waeup.manageAcademics')
    21002100    label = _(u'Add certificate')
    2101     form_fields = grok.AutoFields(ICertificateAdd)
     2101    form_fields = grok.AutoFields(ICertificate)
    21022102    pnav = 1
    21032103
     
    21632163    tabtwoactions2 = [_('Add local role')]
    21642164
    2165     form_fields = grok.AutoFields(ICourse)
     2165    form_fields = grok.AutoFields(ICourse).omit('code')
    21662166
    21672167    def update(self):
     
    22242224    label = _('Edit certificate')
    22252225
    2226     form_fields = grok.AutoFields(ICertificate)
     2226    form_fields = grok.AutoFields(ICertificate).omit('code')
    22272227
    22282228    pnav = 1
     
    22832283    grok.name('addcertificatecourse')
    22842284    grok.require('waeup.manageAcademics')
    2285     form_fields = grok.AutoFields(ICertificateCourseAdd)
     2285    form_fields = grok.AutoFields(ICertificateCourse)
    22862286    pnav = 1
    22872287    label = _('Add certificate course')
     
    23362336    grok.name('manage')
    23372337    grok.require('waeup.manageAcademics')
    2338     form_fields = grok.AutoFields(ICertificateCourse)
     2338    form_fields = grok.AutoFields(ICertificateCourse).omit('code')
    23392339    label = _('Edit certificate course')
    23402340    pnav = 1
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py

    r10650 r10685  
    2929from waeup.kofa.interfaces import IKofaPluggable
    3030from waeup.kofa.university.interfaces import (
    31     ICertificate, ICertificateAdd, ICertificateCourse)
     31    ICertificate, ICertificateCourse)
    3232from waeup.kofa.university.vocabularies import course_levels
    3333from waeup.kofa.utils.batching import VirtualExportJobContainer
     
    4040    """A certificate.
    4141    """
    42     grok.implements(ICertificate, ICertificateAdd)
     42    grok.implements(ICertificate)
    4343
    4444    local_roles = [
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.py

    r10650 r10685  
    2727from zope.component.interfaces import IFactory, ComponentLookupError
    2828from waeup.kofa.interfaces import IKofaPluggable
    29 from waeup.kofa.university.interfaces import ICourse, ICourseAdd
     29from waeup.kofa.university.interfaces import ICourse
    3030from waeup.kofa.utils.batching import VirtualExportJobContainer
    3131
     
    3737    """A university course.
    3838    """
    39     grok.implements(ICourse, ICourseAdd)
     39    grok.implements(ICourse)
    4040
    4141    local_roles = ['waeup.local.Lecturer']
  • main/waeup.kofa/trunk/src/waeup/kofa/university/department.py

    r10650 r10685  
    3030from waeup.kofa.interfaces import IKofaUtils, IKofaPluggable
    3131from waeup.kofa.utils.helpers import attrs_to_fields
    32 from waeup.kofa.university.interfaces import IDepartment, IDepartmentAdd
     32from waeup.kofa.university.interfaces import IDepartment
    3333
    3434class VirtualDepartmentExportJobContainer(VirtualExportJobContainer):
     
    3939    """A university department.
    4040    """
    41     grok.implements(IDepartment, IDepartmentAdd)
     41    grok.implements(IDepartment)
    4242
    4343    local_roles = [
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r10684 r10685  
    6969        default = u'NA',
    7070        required = True,
    71         readonly = True,
    7271        )
    7372
     
    9796
    9897
    99 class IDepartmentAdd(IDepartment):
    100     """Representation of a university department.
    101     """
    102     code = schema.TextLine(
    103         title = _(u'Code'),
    104         description = _(u'This code will become part of the URL.'),
    105         default = u'NA',
    106         required = True,
    107         readonly = False,
    108         )
    109 
    110 IDepartmentAdd['code'].order =  IDepartment['code'].order
    111 
    11298class ICoursesContainer(IKofaContainer):
    11399    """A container for faculties.
     
    126112        default = u'NA',
    127113        required = True,
    128         readonly = True,
    129114        )
    130115
     
    164149
    165150
    166 class ICourseAdd(ICourse):
    167     """Representation of a course.
    168     """
    169     code = schema.TextLine(
    170         title = _(u'Code'),
    171         description = _(u'Enter unique course code which will become part of the URL.'),
    172         default = u'NA',
    173         required = True,
    174         readonly = False,
    175         )
    176 
    177 ICourseAdd['code'].order =  ICourse['code'].order
    178 
    179151class ICertificate(IKofaObject):
    180152    """Representation of a certificate.
     
    184156        default = u'NA',
    185157        required = True,
    186         readonly = True,
    187158        )
    188159
     
    282253
    283254
    284 class ICertificateAdd(ICertificate):
    285     """Representation of a certificate.
    286     """
    287     code = schema.TextLine(
    288         title = _(u'Code'),
    289         default = u'NA',
    290         description = _(u'Enter unique certificate code which will become part of the URL.'),
    291         required = True,
    292         readonly = False,
    293         )
    294 
    295 ICertificateAdd['code'].order =  ICertificate['code'].order
    296 
    297255class ICertificatesContainer(IKofaContainer):
    298256    """A container for certificates.
     
    311269        title = _(u'Course'),
    312270        source = CourseSource(),
    313         readonly = True,
    314271        )
    315272
     
    332289        This is needed for cataloging.
    333290        """
    334 
    335 class ICertificateCourseAdd(ICertificateCourse):
    336     """A certificatecourse is referring a course and
    337        provides some own attributes.
    338     """
    339     course = schema.Choice(
    340         title = _(u'Course'),
    341         source = CourseSource(),
    342         readonly = False,
    343         )
    344 
    345 ICertificateCourseAdd['course'].order =  ICertificateCourse['course'].order
Note: See TracChangeset for help on using the changeset viewer.