Changeset 10685 for main/waeup.kofa/trunk
- Timestamp:
- 2 Nov 2013, 09:02:26 (11 years ago)
- 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 24 24 from waeup.kofa.interfaces import MessageFactory as _ 25 25 from waeup.kofa.university.interfaces import ( 26 IFacultiesContainer, IFaculty, IDepartment, IDepartmentAdd,27 ICoursesContainer, ICourse, IC ourseAdd, ICertificatesContainer,28 ICertificate, ICertificate Add, ICertificateCourse, ICertificateCourseAdd)26 IFacultiesContainer, IFaculty, IDepartment, 27 ICoursesContainer, ICourse, ICertificatesContainer, 28 ICertificate, ICertificateCourse) 29 29 30 30 class IBreadcrumb(Interface): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r10684 r10685 47 47 from waeup.kofa.browser.interfaces import ( 48 48 IUniversity, IFacultiesContainer, IFaculty, 49 IDepartment, I DepartmentAdd, ICourse, ICourseAdd, ICertificate,50 ICertificate Add, ICertificateCourse, ICertificateCourseAdd,49 IDepartment, ICourse, ICertificate, 50 ICertificateCourse, 51 51 ICaptchaManager, IChangePassword) 52 52 from waeup.kofa.browser.layout import jsaction, action, UtilityView … … 1904 1904 grok.require('waeup.manageAcademics') 1905 1905 label = _('Add department') 1906 form_fields = grok.AutoFields(IDepartment Add)1906 form_fields = grok.AutoFields(IDepartment) 1907 1907 pnav = 1 1908 1908 … … 1977 1977 tabfouractions2 = [_('Add local role')] 1978 1978 1979 form_fields = grok.AutoFields(IDepartment) 1979 form_fields = grok.AutoFields(IDepartment).omit('code') 1980 1980 1981 1981 @property … … 2058 2058 grok.require('waeup.manageAcademics') 2059 2059 label = _(u'Add course') 2060 form_fields = grok.AutoFields(ICourse Add)2060 form_fields = grok.AutoFields(ICourse) 2061 2061 pnav = 1 2062 2062 … … 2099 2099 grok.require('waeup.manageAcademics') 2100 2100 label = _(u'Add certificate') 2101 form_fields = grok.AutoFields(ICertificate Add)2101 form_fields = grok.AutoFields(ICertificate) 2102 2102 pnav = 1 2103 2103 … … 2163 2163 tabtwoactions2 = [_('Add local role')] 2164 2164 2165 form_fields = grok.AutoFields(ICourse) 2165 form_fields = grok.AutoFields(ICourse).omit('code') 2166 2166 2167 2167 def update(self): … … 2224 2224 label = _('Edit certificate') 2225 2225 2226 form_fields = grok.AutoFields(ICertificate) 2226 form_fields = grok.AutoFields(ICertificate).omit('code') 2227 2227 2228 2228 pnav = 1 … … 2283 2283 grok.name('addcertificatecourse') 2284 2284 grok.require('waeup.manageAcademics') 2285 form_fields = grok.AutoFields(ICertificateCourse Add)2285 form_fields = grok.AutoFields(ICertificateCourse) 2286 2286 pnav = 1 2287 2287 label = _('Add certificate course') … … 2336 2336 grok.name('manage') 2337 2337 grok.require('waeup.manageAcademics') 2338 form_fields = grok.AutoFields(ICertificateCourse) 2338 form_fields = grok.AutoFields(ICertificateCourse).omit('code') 2339 2339 label = _('Edit certificate course') 2340 2340 pnav = 1 -
main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py
r10650 r10685 29 29 from waeup.kofa.interfaces import IKofaPluggable 30 30 from waeup.kofa.university.interfaces import ( 31 ICertificate, ICertificate Add, ICertificateCourse)31 ICertificate, ICertificateCourse) 32 32 from waeup.kofa.university.vocabularies import course_levels 33 33 from waeup.kofa.utils.batching import VirtualExportJobContainer … … 40 40 """A certificate. 41 41 """ 42 grok.implements(ICertificate , ICertificateAdd)42 grok.implements(ICertificate) 43 43 44 44 local_roles = [ -
main/waeup.kofa/trunk/src/waeup/kofa/university/course.py
r10650 r10685 27 27 from zope.component.interfaces import IFactory, ComponentLookupError 28 28 from waeup.kofa.interfaces import IKofaPluggable 29 from waeup.kofa.university.interfaces import ICourse , ICourseAdd29 from waeup.kofa.university.interfaces import ICourse 30 30 from waeup.kofa.utils.batching import VirtualExportJobContainer 31 31 … … 37 37 """A university course. 38 38 """ 39 grok.implements(ICourse , ICourseAdd)39 grok.implements(ICourse) 40 40 41 41 local_roles = ['waeup.local.Lecturer'] -
main/waeup.kofa/trunk/src/waeup/kofa/university/department.py
r10650 r10685 30 30 from waeup.kofa.interfaces import IKofaUtils, IKofaPluggable 31 31 from waeup.kofa.utils.helpers import attrs_to_fields 32 from waeup.kofa.university.interfaces import IDepartment , IDepartmentAdd32 from waeup.kofa.university.interfaces import IDepartment 33 33 34 34 class VirtualDepartmentExportJobContainer(VirtualExportJobContainer): … … 39 39 """A university department. 40 40 """ 41 grok.implements(IDepartment , IDepartmentAdd)41 grok.implements(IDepartment) 42 42 43 43 local_roles = [ -
main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py
r10684 r10685 69 69 default = u'NA', 70 70 required = True, 71 readonly = True,72 71 ) 73 72 … … 97 96 98 97 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'].order111 112 98 class ICoursesContainer(IKofaContainer): 113 99 """A container for faculties. … … 126 112 default = u'NA', 127 113 required = True, 128 readonly = True,129 114 ) 130 115 … … 164 149 165 150 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'].order178 179 151 class ICertificate(IKofaObject): 180 152 """Representation of a certificate. … … 184 156 default = u'NA', 185 157 required = True, 186 readonly = True,187 158 ) 188 159 … … 282 253 283 254 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'].order296 297 255 class ICertificatesContainer(IKofaContainer): 298 256 """A container for certificates. … … 311 269 title = _(u'Course'), 312 270 source = CourseSource(), 313 readonly = True,314 271 ) 315 272 … … 332 289 This is needed for cataloging. 333 290 """ 334 335 class ICertificateCourseAdd(ICertificateCourse):336 """A certificatecourse is referring a course and337 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.