Changeset 10561 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 29 Aug 2013, 15:11:14 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/university
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/university/department.py
r10279 r10561 23 23 from zope.interface import implementedBy 24 24 from zope.component import getUtility 25 from waeup.kofa.university.faculty import longtitle 25 26 from waeup.kofa.university.coursescontainer import CoursesContainer 26 27 from waeup.kofa.university.certificatescontainer import CertificatesContainer … … 86 87 87 88 def longtitle(self): 88 insttypes_dict = getUtility(IKofaUtils).INST_TYPES_DICT 89 return "%s %s (%s)" % ( 90 insttypes_dict[self.title_prefix], 91 self.title, self.code) 89 return longtitle(self) 92 90 93 91 class DepartmentFactory(grok.GlobalUtility): -
main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.py
r10279 r10561 26 26 from waeup.kofa.university.interfaces import ( 27 27 IFaculty, IFacultyAdd, IDepartment) 28 29 def longtitle(inst): 30 insttypes_dict = getUtility(IKofaUtils).INST_TYPES_DICT 31 if inst.title_prefix == 'none': 32 return "%s (%s)" % (inst.title, inst.code) 33 return "%s %s (%s)" % ( 34 insttypes_dict[inst.title_prefix], 35 inst.title, inst.code) 28 36 29 37 class Faculty(grok.Container): … … 65 73 66 74 def longtitle(self): 67 insttypes_dict = getUtility(IKofaUtils).INST_TYPES_DICT 68 result = "%s %s (%s)" % ( 69 insttypes_dict[self.title_prefix], 70 self.title, self.code) 71 return result 75 return longtitle(self) 72 76 73 77 class FacultyFactory(grok.GlobalUtility):
Note: See TracChangeset for help on using the changeset viewer.