- Timestamp:
- 18 Aug 2006, 06:49:13 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Academics.py
r382 r389 528 528 return "%s" % (self.title) 529 529 530 530 531 security.declareProtected(View,"LongTitle") 531 532 def LongTitle(self): 532 533 """compose long_title""" 533 itype = self.portal_vocabularies.institution_types_voc.get(self.institution_type,default="Faculty of") 534 534 prefix = getattr(self,'title_prefix',None) 535 if prefix is None: 536 prefix = getattr(self,'institution_type','faculty') 537 self.getContent().edit(mapping = {'title_prefix': prefix}) 538 itype = self.portal_vocabularies.institution_types_voc.get(prefix,default="Faculty of") 535 539 return "%s %s" % (itype,self.title) 536 540 … … 552 556 security = ClassSecurityInfo() 553 557 554 ## security.declareProtected(View,"Title")555 ## def Title(self):556 ## """compose title"""557 ## reg_nr = self.getId()[1:]558 ## return "Department of %s" % (self.title)559 560 558 security.declareProtected(View,"LongTitle") 561 559 def LongTitle(self): 562 560 """compose long_title""" 563 if not hasattr(self,'institution_type'): 564 self.institution_type = "department" 565 itype = self.portal_vocabularies.institution_types_voc.get(self.institution_type,default="Department of") 566 561 prefix = getattr(self,'title_prefix',None) 562 if prefix is None: 563 prefix = getattr(self,'institution_type','department') 564 self.getContent().edit(mapping = {'title_prefix': prefix}) 565 itype = self.portal_vocabularies.institution_types_voc.get(prefix,default="Department of") 567 566 return "%s %s" % (itype,self.title) 568 567 -
WAeUP_SRP/trunk/profiles/default/layouts/department.xml
r388 r389 36 36 <property name="label_edit">Object ID</property> 37 37 <property name="readonly_layout_modes"/> 38 <property name="hidden_layout_modes"/> 38 <property name="hidden_layout_modes"> 39 <element value="view"/> 40 <element value="edit"/> 41 </property> 39 42 <property name="hidden_readonly_layout_modes"/> 40 43 </widget> … … 53 56 <property name="hidden_readonly_layout_modes"/> 54 57 </widget> 58 <widget name="title_prefix" meta_type="Select Widget"> 59 <property name="title">Title Prefix</property> 60 <property name="fields"> 61 <element value="title_prefix"/> 62 </property> 63 <property name="label">Title Prefix</property> 64 <property name="label_edit">Title Prefix</property> 65 <property name="readonly_layout_modes"/> 66 <property name="hidden_layout_modes"/> 67 <property name="hidden_readonly_layout_modes"/> 68 <property name="vocabulary">institution_types_voc</property> 69 </widget> 55 70 <table> 56 71 <row> 57 72 <cell name="code"/> 73 </row> 74 <row> 75 <cell name="title_prefix"/> 58 76 </row> 59 77 <row> -
WAeUP_SRP/trunk/profiles/default/layouts/faculty.xml
r379 r389 61 61 <property name="hidden_readonly_layout_modes"/> 62 62 </widget> 63 <widget name=" institution_type" meta_type="Select Widget">64 <property name="title">T ype of Institution</property>63 <widget name="title_prefix" meta_type="Select Widget"> 64 <property name="title">Title Prefix</property> 65 65 <property name="fields"> 66 <element value=" institution_type"/>66 <element value="title_prefix"/> 67 67 </property> 68 <property name="label">T ype of Institution</property>69 <property name="label_edit">T ype of Institution</property>68 <property name="label">Title Prefix</property> 69 <property name="label_edit">Title Prefix</property> 70 70 <property name="readonly_layout_modes"/> 71 71 <property name="hidden_layout_modes"/> … … 75 75 <table> 76 76 <row> 77 <cell name=" institution_type"/>77 <cell name="title_prefix"/> 78 78 </row> 79 79 <row> -
WAeUP_SRP/trunk/profiles/default/layouts/waeup_common.xml
r388 r389 29 29 <property name="label_edit">Object ID</property> 30 30 <property name="readonly_layout_modes"/> 31 <property name="hidden_layout_modes"/>32 <property name="hidden_readonly_layout_modes"/>33 </widget>34 <widget name="code_alt" meta_type="String Widget">35 <property name="title">Object ID</property>36 <property name="fields">37 <element value="code"/>38 </property>39 <property name="is_required">True</property>40 <property name="label">Object ID</property>41 <property name="label_edit">Object ID</property>42 <property name="readonly_layout_modes"/>43 31 <property name="hidden_layout_modes"> 32 <element value="view"/> 44 33 <element value="edit"/> 45 <element value="view"/>46 34 </property> 47 35 <property name="hidden_readonly_layout_modes"/> -
WAeUP_SRP/trunk/profiles/default/schemas/department.xml
r371 r389 2 2 <object name="department" meta_type="CPS Schema"> 3 3 <field name="code" meta_type="CPS String Field"/> 4 <field name="title_prefix" meta_type="CPS String Field"/> 4 5 </object> -
WAeUP_SRP/trunk/profiles/default/schemas/faculty.xml
r379 r389 5 5 <field name="college_code" meta_type="CPS String Field"/> 6 6 <field name="degree_grade" meta_type="CPS String Field"/> 7 <field name=" institution_type" meta_type="CPS String Field"/>7 <field name="title_prefix" meta_type="CPS String Field"/> 8 8 </object> -
WAeUP_SRP/trunk/skins/waeup_academics/get_departments_voc.py
r313 r389 7 7 if key is None: 8 8 res = context.portal_catalog.search({'meta_type': "Department"}) 9 return [(d.getId ,d.Title,) for d in res]9 return [(d.getId(),d.Title,) for d in res] 10 10 res = context.portal_catalog.search({'meta_type': "Department", 'id': key}) 11 11 if res:
Note: See TracChangeset for help on using the changeset viewer.