Changeset 370
- Timestamp:
- 14 Aug 2006, 22:02:18 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 6 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Academics.py
r369 r370 292 292 certificates.invokeFactory('Certificate', certificate_id) 293 293 c = getattr(certificates,certificate_id) 294 dict = {'Title': certificate['Description']} 295 dict['code'] = code 296 dict['org_code'] = certificate.get('CertCode') 297 dict['faculty'] = certificate.get('Faculty') 298 dict['department'] = certificate.get('Dept') 299 dict['max_pass'] = certificate.get('MaxPass') 300 dict['max_load'] = certificate.get('MaxLoad') 301 dict['admin_status'] = certificate.get('Admstatus') 302 dict['category'] = certificate.get('category') 303 dict['m_prefix'] = certificate.get('MPREFIX') 304 dict['nr_years'] = int(certificate.get('Nyears')) 305 nc = certificate.get('Ncore','1') 306 try: 307 dict['n_core'] = int(nc) 308 except: 309 dict['n_core'] = 1 310 dict['start_level'] = certificate.get('StartLevel') 311 dict['end_level'] = certificate.get('endLevel') 312 dict['promotion_credits'] = certificate.get('PromotionCredits') 313 dict['probation_credits'] = certificate.get('ProbationCredits') 294 dict = {'Title': certificate['Description']} 295 dict['code'] = code 296 dict['faculty'] = certificate.get('Faculty') 297 dict['department'] = certificate.get('Dept') 298 dict['max_pass'] = certificate.get('MaxPass') 299 dict['max_load'] = certificate.get('MaxLoad') 300 dict['admin_status'] = certificate.get('Admstatus') 301 dict['category'] = certificate.get('category') 302 dict['m_prefix'] = certificate.get('MPREFIX') 303 dict['nr_years'] = int(certificate.get('Nyears')) 304 nc = certificate.get('Ncore','1') 305 try: 306 dict['n_core'] = int(nc) 307 except: 308 dict['n_core'] = 1 309 dict['start_level'] = certificate.get('StartLevel') 310 dict['end_level'] = certificate.get('endLevel') 311 dict['promotion_credits'] = certificate.get('PromotionCredits') 312 dict['probation_credits'] = certificate.get('ProbationCredits') 313 else: 314 dict = {} 315 dict['original_code'] = certificate.get('CertCode') 316 print 314 317 c.getContent().edit(mapping=dict) 315 318 return self.academics.academics_contents() … … 478 481 def Title(self): 479 482 """compose title""" 480 print self.id.upper()481 483 ce = self.getCourseEntry(self.id.upper()) 482 484 if ce: -
WAeUP_SRP/trunk/profiles/default/layouts/certificate.xml
r337 r370 28 28 <property name="hidden_layout_modes"/> 29 29 <property name="hidden_readonly_layout_modes"/> 30 </widget>31 <widget name="code" meta_type="String Widget">32 <property name="title">Code</property>33 <property name="fields">34 <element value="code"/>35 </property>36 <property name="is_required">True</property>37 <property name="label">Code</property>38 <property name="label_edit">Code</property>39 <property name="readonly_layout_modes"/>40 <property name="hidden_layout_modes"/>41 <property name="hidden_readonly_layout_modes"/>42 <property name="size_max">20</property>43 30 </widget> 44 31 <widget name="end_level" meta_type="Select Widget"> … … 100 87 <property name="hidden_readonly_layout_modes"/> 101 88 </widget> 89 <widget name="original_code" meta_type="String Widget"> 90 <property name="title">Original Code</property> 91 <property name="fields"> 92 <element value="original_code"/> 93 </property> 94 <property name="label">Original Code</property> 95 <property name="label_edit">Original Code</property> 96 <property name="readonly_layout_modes"/> 97 <property name="hidden_layout_modes"/> 98 <property name="hidden_readonly_layout_modes"/> 99 </widget> 102 100 <widget name="probation_credits" meta_type="Int Widget"> 103 101 <property name="title">Probation Credits</property> … … 136 134 <table> 137 135 <row> 138 <cell name=" code"/>136 <cell name="original_code"/> 139 137 </row> 140 138 <row> -
WAeUP_SRP/trunk/profiles/default/layouts/course.xml
r336 r370 17 17 <property name="hidden_layout_modes"/> 18 18 <property name="hidden_readonly_layout_modes"/> 19 </widget>20 <widget name="code" meta_type="String Widget">21 <property name="title">Code</property>22 <property name="fields">23 <element value="code"/>24 </property>25 <property name="is_required">True</property>26 <property name="label">Code</property>27 <property name="label_edit">Code</property>28 <property name="display_width">10</property>29 19 </widget> 30 20 <widget name="credits" meta_type="Int Widget"> … … 75 65 <table> 76 66 <row> 77 <cell name="code"/>78 </row>79 <row>80 <cell name="org_code"/>81 </row>82 <row>83 <cell name="category"/>84 </row>85 <row>86 67 <cell name="credits"/> 87 </row>88 <row>89 <cell name="semester"/>90 68 </row> 91 69 <row> -
WAeUP_SRP/trunk/profiles/default/layouts/department.xml
r199 r370 28 28 <property name="size_max">200</property> 29 29 </widget> 30 <widget name="code" meta_type="String Widget"> 31 <property name="title">Object ID</property> 32 <property name="fields"> 33 <element value="code"/> 34 </property> 35 <property name="label">Object ID</property> 36 <property name="label_edit">Object ID</property> 37 <property name="readonly_layout_modes"/> 38 <property name="hidden_layout_modes"> 39 <element value="edit"/> 40 <element value="view"/> 41 </property> 42 <property name="hidden_readonly_layout_modes"/> 43 </widget> 30 44 <table> 45 <row> 46 <cell name="code"/> 47 </row> 31 48 <row> 32 49 <cell name="Title"/> -
WAeUP_SRP/trunk/profiles/default/layouts/faculty.xml
r369 r370 64 64 <table> 65 65 <row> 66 <cell name="Title"/>67 </row>68 <row>69 66 <cell name="institution_type"/> 70 67 </row> -
WAeUP_SRP/trunk/profiles/default/layouts/study_level.xml
r199 r370 4 4 <property name="layout_edit_method"></property> 5 5 <property name="layout_view_method"></property> 6 <property name="style_prefix">layout_ slregister_</property>6 <property name="style_prefix">layout_waeup_</property> 7 7 <property name="flexible_widgets"/> 8 8 <property name="validate_values_expr"></property> 9 <widget name="Title" meta_type="String Widget"> 10 <property name="title">Title</property> 11 <property name="fields"> 12 <element value="Title"/> 13 </property> 14 <property name="label">Level Nr</property> 15 <property name="label_edit">Level Nr</property> 16 <property name="readonly_layout_modes"/> 17 <property name="hidden_layout_modes"/> 18 <property name="hidden_readonly_layout_modes"/> 19 <property name="display_width">40</property> 20 </widget> 9 21 <widget name="sc_id" meta_type="String Widget"> 10 22 <property name="title">SC ID</property> … … 55 67 <table> 56 68 <row> 57 <cell name="sc_value"/> 58 </row> 59 <row> 60 <cell name="sc_pin"/> 69 <cell name="Title"/> 61 70 </row> 62 71 </table> -
WAeUP_SRP/trunk/profiles/default/layouts/waeup_common.xml
r348 r370 15 15 <property name="label_edit">Title</property> 16 16 <property name="readonly_layout_modes"/> 17 <property name="hidden_layout_modes"> 18 <element value="view"/> 19 </property> 17 <property name="hidden_layout_modes"/> 20 18 <property name="hidden_readonly_layout_modes"/> 21 19 <property name="display_width">40</property> 22 20 <property name="size_max">200</property> 23 21 </widget> 22 <widget name="code" meta_type="String Widget"> 23 <property name="title">Object ID</property> 24 <property name="fields"> 25 <element value="code"/> 26 </property> 27 <property name="is_required">True</property> 28 <property name="label">Object ID</property> 29 <property name="label_edit">Object ID</property> 30 <property name="readonly_layout_modes"/> 31 <property name="hidden_layout_modes"> 32 <element value="edit"/> 33 <element value="view"/> 34 </property> 35 <property name="hidden_readonly_layout_modes"/> 36 </widget> 24 37 <table> 38 <row> 39 <cell name="code"/> 40 </row> 25 41 <row> 26 42 <cell name="Title"/> -
WAeUP_SRP/trunk/profiles/default/schemas/faculty.xml
r369 r370 2 2 <object name="faculty" meta_type="CPS Schema"> 3 3 <field name="bank_code" meta_type="CPS String Field"/> 4 <field name="code" meta_type="CPS String Field"/> 4 5 <field name="degree_grade" meta_type="CPS String Field"/> 5 6 <field name="institution_type" meta_type="CPS String Field"/> -
WAeUP_SRP/trunk/profiles/default/types/AcademicsFolder.xml
r353 r370 23 23 <element value="folder"/> 24 24 </property> 25 <property name="layouts"> 26 <element value="common"/> 27 <element value="metadata"/> 28 </property> 25 <property name="layouts"/> 29 26 <property name="layout_clusters"> 30 27 <element value="metadata:metadata"/> … … 43 40 url_expr="string:${object/absolute_url}/content_create?type_name=Faculty" 44 41 visible="True"> 45 46 42 <permission value="Modify portal content"/> 43 </action> 47 44 <action title="action_folder_contents" action_id="contents" category="object" 48 45 condition_expr="" url_expr="string:${object/absolute_url}/folder_contents" … … 52 49 visible="True"> 53 50 <permission value="Modify portal content"/> 54 55 51 </action> 52 <action title="Faculties" action_id="import_faculties" category="import" 56 53 condition_expr="" url_expr="string:${object_url}/loadFacultiesFromCSV" 57 54 visible="True"/> -
WAeUP_SRP/trunk/profiles/default/types/Certificate.xml
r353 r370 34 34 <property name="cps_is_portlet">False</property> 35 35 <alias from="(Default)" to="academics_contents"/> 36 <alias from="create_do" to="waeup_document_create_do"/> 36 37 <alias from="view" to="academics_contents"/> 37 38 <action title="View" action_id="view" category="object" condition_expr="" … … 61 62 </action> 62 63 </object> 64 -
WAeUP_SRP/trunk/profiles/default/types/CertificateCourse.xml
r353 r370 22 22 </property> 23 23 <property name="layouts"> 24 <element value="common"/>25 24 <element value="certificate_course"/> 26 25 </property> … … 32 31 <property name="cps_is_portlet">False</property> 33 32 <alias from="(Default)" to="cpsdocument_view"/> 33 <alias from="create_do" to="waeup_document_create_do"/> 34 34 <alias from="view" to="cpsdocument_view"/> 35 <action title="View" action_id="view" category="object" 36 condition_expr="" url_expr="string:${object_url}/cpsdocument_view" 37 visible="True"> 35 <action title="View" action_id="view" category="object" condition_expr="" 36 url_expr="string:${object_url}/cpsdocument_view" visible="True"> 38 37 <permission value="View"/> 39 38 </action> … … 42 41 visible="True"> 43 42 <permission value="Modify portal content"/> 44 43 </action> 45 44 <action title="action_metadata" action_id="metadata" category="object" 46 45 condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata" … … 48 47 <action title="Delegate" action_id="localroles" category="object" 49 48 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 50 visible="True" 51 52 49 visible="True"> 50 <permission value="Modify portal content"/> 51 </action> 53 52 </object> 53 -
WAeUP_SRP/trunk/profiles/default/types/CertificatesFolder.xml
r353 r370 22 22 <element value="metadata"/> 23 23 </property> 24 <property name="layouts"> 25 <element value="common"/> 26 <element value="metadata"/> 27 </property> 24 <property name="layouts" /> 28 25 <property name="layout_clusters"> 29 26 <element value="metadata:metadata"/> -
WAeUP_SRP/trunk/profiles/default/types/Course.xml
r319 r370 22 22 </property> 23 23 <property name="layouts"> 24 <element value=" common"/>24 <element value="waeup_common"/> 25 25 <element value="course"/> 26 26 </property> … … 32 32 <property name="cps_is_portlet">False</property> 33 33 <alias from="(Default)" to="cpsdocument_view"/> 34 <alias from="create_do" to="waeup_document_create_do"/> 34 35 <alias from="view" to="cpsdocument_view"/> 35 <action title="View" action_id="view" category="object" 36 condition_expr="" url_expr="string:${object_url}/cpsdocument_view" 37 visible="True"> 36 <action title="View" action_id="view" category="object" condition_expr="" 37 url_expr="string:${object_url}/cpsdocument_view" visible="True"> 38 38 <permission value="View"/> 39 39 </action> -
WAeUP_SRP/trunk/profiles/default/types/CoursesFolder.xml
r353 r370 22 22 <element value="metadata"/> 23 23 </property> 24 <property name="layouts"> 25 <element value="common"/> 26 <element value="metadata"/> 27 </property> 24 <property name="layouts" /> 28 25 <property name="layout_clusters"> 29 26 <element value="metadata:metadata"/> -
WAeUP_SRP/trunk/profiles/default/types/Faculty.xml
r366 r370 24 24 </property> 25 25 <property name="layouts"> 26 <element value="waeup_common"/> 26 27 <element value="faculty"/> 27 28 </property> … … 33 34 <property name="cps_is_portlet">False</property> 34 35 <alias from="(Default)" to="academics_contents"/> 36 <alias from="create_do" to="waeup_document_create_do"/> 35 37 <alias from="edit" to="faculty_edit"/> 36 38 <alias from="edit_form" to="faculty_edit_form"/> … … 60 62 visible="True"> 61 63 <permission value="Modify portal content"/> 62 64 </action> 63 65 </object> -
WAeUP_SRP/trunk/profiles/default/types/Semester.xml
r353 r370 12 12 <property name="filter_content_types">True</property> 13 13 <property name="allowed_content_types"> 14 <element value="CertificateCourse"/> 14 15 <element value="Course"/> 15 16 <element value="CourseTicket"/> … … 23 24 <element value="common"/> 24 25 </property> 25 <property name="layouts"> 26 <element value="waeup_common"/> 27 </property> 26 <property name="layouts"/> 28 27 <property name="layout_clusters"> 29 28 <element value="metadata:metadata"/> … … 34 33 <alias from="(Default)" to="academics_contents"/> 35 34 <alias from="view" to="academics_contents"/> 36 <action title="View" action_id="view" category="object" 37 condition_expr="" url_expr="string:${object_url}/academics_contents" 38 visible="True"> 35 <action title="View" action_id="view" category="object" condition_expr="" 36 url_expr="string:${object_url}/academics_contents" visible="True"> 39 37 <permission value="View"/> 40 38 </action> … … 57 55 condition_expr="" 58 56 url_expr="string:${object_url}/content_create?type_name=CertificateCourse" 59 visible="True" 57 visible="True"> 60 58 <permission value="Modify portal content"/> 61 59 </action> 62 60 </object> -
WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml
r348 r370 21 21 <element value="metadata"/> 22 22 <element value="common"/> 23 <element value="study_level"/> 23 24 </property> 24 25 <property name="layouts"> 25 <element value=" waeup_common"/>26 <element value="study_level"/> 26 27 </property> 27 28 <property name="layout_clusters"> -
WAeUP_SRP/trunk/profiles/default/vocabularies/courselevel.xml
r311 r370 9 9 <item key="300" msgid="">Year 3 (300 Level)</item> 10 10 <item key="400" msgid="">Year 4 (400 Level)</item> 11 <item key="500" msgid="">Year 5 ( 400 Level)</item>11 <item key="500" msgid="">Year 5 (500 Level)</item> 12 12 </object> -
WAeUP_SRP/trunk/profiles/default/workflows.xml
r362 r370 52 52 </type> 53 53 <type type_id="Department"> 54 <bound-workflow workflow_id=" section_folder_wf"/>54 <bound-workflow workflow_id="waeup_base_wf"/> 55 55 </type> 56 56 <type type_id="Faculty"> 57 <bound-workflow workflow_id=" section_folder_wf"/>57 <bound-workflow workflow_id="waeup_base_wf"/> 58 58 </type> 59 59 <type type_id="Jamb"> … … 84 84 <bound-workflow workflow_id="waeup_base_wf"/> 85 85 </type> 86 <type type_id="StudentStudyCourse"> 87 <bound-workflow workflow_id="section_folder_wf"/> 88 </type> 86 89 <type type_id="StudentsFolder"> 87 90 <bound-workflow workflow_id="section_folder_wf"/> -
WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt
r353 r370 48 48 <span tal:define="redirect python: response.redirect(url)"></span> 49 49 </div> 50 <span tal:omit-tag="" tal:condition=" not: display_buttons"50 <span tal:omit-tag="" tal:condition="python:display_buttons or (context.portal_type in ('Certificate',))" 51 51 tal:content="structure doc/render" /> 52 52 … … 69 69 <td align="left" valign="top" rowspan="3"></td> 70 70 <td align="left" valign="top"> 71 <span tal:condition="display_buttons" 71 <span tal:condition="display_buttons"> 72 72 <span tal:condition="can_del"> 73 73 <input type="button" value="button_select_all" class="context" … … 76 76 tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')' 77 77 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" /> 78 <input type="submit" name="approve_checked:method" 78 <span tal:omit-tag="" tal:condition="python: context.portal_type != 'Certificate'"> 79 <input type="submit" name="approve_checked:method" 79 80 class="context" value="Approve" /> 80 81 <input type="submit" name="retract_checked:method" 81 82 class="context" value="Retract" /> 82 <input type="submit" name="folder_delete:method" value="button_delete" 83 </span> 84 <input type="submit" name="folder_delete:method" value="button_delete" 83 85 class="destructive" i18n:attributes="value" 84 86 tal:attributes="onclick python:'return window.confirm(\'%s\')' % 85 87 (cpsmcat('description_confirm_delete'), )" /> 88 <input type="submit" name="id_rename_form:method" 89 class="context" value="button_rename" i18n:attributes="value" /> 86 90 </span> 87 91 </span> -
WAeUP_SRP/trunk/skins/waeup_academics/academics_contents_display_buttons.py
r332 r370 13 13 """ 14 14 15 if context.portal_type in ('Department','Certificate','StudyLevel'): 15 #if context.portal_type in ('Department','Certificate','StudyLevel'): 16 if context.portal_type in ('Department','StudyLevel'): 16 17 return None 17 18 return 1
Note: See TracChangeset for help on using the changeset viewer.