Changeset 106 for waeup_product/trunk
- Timestamp:
- 27 Oct 2005, 19:30:56 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r103 r106 71 71 ########################################## 72 72 waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'" 73 waeup_ptypes += ",'AccoFolder','Accommodation' "73 waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal'" 74 74 if CPSSubscriptions: ###( 75 75 -
waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
r103 r106 512 512 ###) 513 513 514 accobook = { ###( 515 'widgets': { 516 'sc_id': { 517 'type': 'String Widget', 518 'data': { 519 'title': 'SC ID', 520 'fields': ('accommodation_sc_id',), 521 'is_required': False, 522 'label': 'Card Serial Number ', 523 'label_edit': 'Card Serial Number', 524 'description': 'Card Serial Number ', 525 'help': 'This can be found on the bottom right of the reverse side of your Scratch Card', 526 'is_i18n': False, 527 'readonly_layout_modes': (), 528 'hidden_layout_modes': (), 529 'hidden_readonly_layout_modes': (), 530 'hidden_empty': False, 531 'hidden_if_expr': 'python:1', 532 'css_class': '', 533 'widget_mode_expr': '', 534 'display_width': 10, 535 'size_max': 0, 536 }, 537 }, 538 'sc_pin': { 539 'type': 'Scratchcard Pin Widget', 540 'data': { 541 'title': 'SC Pin', 542 'fields': ('accommodation_sc_pin'), 543 'is_required': True, 544 'label': 'PIN', 545 'label_edit': 'PIN', 546 'description': '', 547 'help': 'PIN-(Personal Identification Number) is an 8 or 12 digit number on the reverse side of the scratch card which you can purchase from many Banks', 548 'is_i18n': False, 549 'readonly_layout_modes': (), 550 'hidden_layout_modes': (), 551 'hidden_readonly_layout_modes': (), 552 'hidden_empty': False, 553 'hidden_if_expr': '', 554 'css_class': '', 555 'widget_mode_expr': '', 556 'display_width': 10, 557 'size_max': 10, 558 }, 559 }, 560 }, 561 'layout': { 562 'style_prefix': 'layout_accobook_', 563 'flexible_widgets': (), 564 'ncols': 1, 565 'rows': [ 566 #[{'widget_id': 'sc_id', 'ncols': 1},], 567 [{'widget_id': 'sc_pin', 'ncols': 1},], 568 [{'widget_id': 'jamb_id', 'ncols': 1},], 569 ] 570 }, 571 } 572 ###) 573 514 574 admission_status = { ###( 515 575 'widgets': { … … 645 705 'title': 'Faculty', 646 706 'fields': ('faculty',), 647 'is_required': False,707 'is_required': True, 648 708 'label': 'faculty', 649 709 'label_edit': 'faculty', … … 652 712 'is_i18n': False, 653 713 'vocabulary': 'faculties', 714 }, 715 }, 716 'course': { 717 'type': 'String Widget', 718 'data': { 719 'title': 'Study Course', 720 'fields': ('course',), 721 'is_required': True, 722 'label': 'Study Course', 723 'label_edit': 'Study Course', 724 'description': '', 725 'help': 'The course to study', 726 'is_i18n': False, 654 727 }, 655 728 }, … … 789 862 [{'widget_id': 'aggregate', 'ncols': 1},], 790 863 [{'widget_id': 'faculty', 'ncols': 1},], 864 [{'widget_id': 'course', 'ncols': 1},], 791 865 [{'widget_id': 'listing_date', 'ncols': 1},], 792 866 #[{'widget_id': '2nd_choice', 'ncols': 1},], … … 816 890 [{'widget_id': 'aggregate', 'ncols': 1},], 817 891 [{'widget_id': 'faculty', 'ncols': 1},], 892 [{'widget_id': 'course', 'ncols': 1},], 818 893 [{'widget_id': 'listing_date', 'ncols': 1},], 819 894 #[{'widget_id': '2nd_choice', 'ncols': 1},], -
waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
r103 r106 47 47 }, 48 48 }, 49 'course': { 50 'type': 'CPS String Field', 51 'data': { 52 'default_expr': 'string:', 53 'is_searchabletext': True, 54 'acl_read_permissions': '', 55 'acl_read_roles': '', 56 'acl_read_expr': '', 57 'acl_write_permissions': '', 58 'acl_write_roles': '', 59 'acl_write_expr': '', 60 'read_ignore_storage': False, 61 'read_process_expr': '', 62 'read_process_dependent_fields': (), 63 'write_ignore_storage': False, 64 'write_process_expr': '', 65 }, 66 }, 67 'accomodation_sc_id': { 68 'type': 'CPS String Field', 69 'data': { 70 'default_expr': 'string:', 71 'is_searchabletext': True, 72 'acl_read_permissions': '', 73 'acl_read_roles': '', 74 'acl_read_expr': '', 75 'acl_write_permissions': '', 76 'acl_write_roles': '', 77 'acl_write_expr': '', 78 'read_ignore_storage': False, 79 'read_process_expr': '', 80 'read_process_dependent_fields': (), 81 'write_ignore_storage': False, 82 'write_process_expr': '', 83 }, 84 }, 85 'accomodation_sc_pin': { 86 'type': 'CPS String Field', 87 'data': { 88 'default_expr': 'string:', 89 'is_searchabletext': True, 90 'acl_read_permissions': '', 91 'acl_read_roles': '', 92 'acl_read_expr': '', 93 'acl_write_permissions': '', 94 'acl_write_roles': '', 95 'acl_write_expr': '', 96 'read_ignore_storage': False, 97 'read_process_expr': '', 98 'read_process_dependent_fields': (), 99 'write_ignore_storage': False, 100 'write_process_expr': '', 101 }, 102 }, 49 103 } 50 104 # … … 178 232 }, 179 233 'faculty': { 234 'type': 'CPS String Field', 235 'data': { 236 'default_expr': 'string:', 237 'is_searchabletext': False, 238 }, 239 }, 240 'course': { 180 241 'type': 'CPS String Field', 181 242 'data': { -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r103 r106 36 36 {'id': 'add_faculty', 37 37 'name': 'Add a Faculty', 38 'condition': "python:member and not 'Student'in member.getRoles()", 38 39 'action' : 'string:${object/absolute_url}/create_common?type_name=Faculty', 39 40 #'action': 'folder_factories', 40 'permissions': ( ModifyPortalContent,UniversityManage,)},41 'permissions': (UniversityManage,)}, 41 42 {'id': 'add_accommodation', 42 'name': 'Add an Accomodation Hall', 43 'name': 'Add an Accommodation Hall', 44 'condition': "python:member and not 'Student'in member.getRoles()", 43 45 'action' : 'string:${object/absolute_url}/add_accommodation', 44 46 #'action': 'folder_factories', 45 'permissions': ( ModifyPortalContent,UniversityManage,)},47 'permissions': (UniversityManage,)}, 46 48 {'id': 'contents', 47 49 'name': 'action_folder_contents', … … 62 64 'name': 'delegate', 63 65 'action': 'folder_localrole_form', 64 'permissions': (UniversityManage, )66 'permissions': (UniversityManage,StudentManage) 65 67 }, 66 68 ) … … 286 288 'description': '', 287 289 'content_icon': '', 288 'content_meta_type': ' CPS Document',290 'content_meta_type': 'StudentPersonal', 289 291 'product': 'WAeUP', 290 292 'factory': 'addStudentPersonal', … … 298 300 'cps_display_as_document_in_listing': True, 299 301 'cps_is_portalbox': False, 300 #'schemas': ['common','metadata','jamb'],301 302 'schemas': ['student_personal'], 302 303 'layouts': ['student_personal'], … … 310 311 'action': 'string:${object_url}/student_personal_index_html', 311 312 #'action': 'string:${object_url}/cpsdocument_view', 312 'condition': '',313 313 'permission': ('View',), 314 314 'category': 'object', -
waeup_product/trunk/skins/waeup_default/portlet_session_info.pt
r95 r106 11 11 tal:attributes="href string:${here/portal_url}/sections/waeup/students/${member}">goto your personal area</a> 12 12 </span><br /> 13 <a href="" tal:condition="python: 0" tal:attributes="href string:${context/portal_url}/cpsdirectory_entry_view?dirname=members&id=${member}">Edit your Preferences</a><br /> 14 <br /> 13 15 (<a href="" i18n:translate="" 14 16 tal:attributes="href string:${here/portal_url}/sections/waeup/logout">log out</a>) -
waeup_product/trunk/skins/waeup_student/check_admission.py
r55 r106 35 35 elif psm == 'valid': 36 36 s_id = "s%s" % ds.get('jamb_id') 37 sf = getattr(context,s_id,None) 38 if sf is None: 37 catalog = context.portal_catalog 38 search = catalog(SearchableText = "%s*" % s_id) 39 if len(search) < 1: 39 40 psm = "Your not admitted" 40 41 return context.check_admission_form(rendered = res, 41 psm = psm ,42 psm = psm + str(search), 42 43 ds = ds, 43 44 ) 44 elif hasattr(sf,'PERSONAL'): 45 psm = "Your already admitted" 45 sf = getattr(context,s_id,None) 46 if sf and getattr(sf,'PERSONAL',None): 47 psm = "Your already admitted, pleae login" 46 48 return context.check_admission_form(rendered = res, 47 49 psm = psm, … … 52 54 return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=UnSeT&sc_pin=%s" 53 55 % (context.absolute_url(),s_id,sc_pin)) 54 return context.student_admitted_form(rendered = res,55 psm = psm,56 ds = ds,57 student = student,58 jamb = jamb,59 pd = pd,60 )61 62 return res,psm,ds56 ## return context.student_admitted_form(rendered = res, 57 ## psm = psm, 58 ## ds = ds, 59 ## student = student, 60 ## jamb = jamb, 61 ## pd = pd, 62 ## ) 63 ## 64 ##return res,psm,ds 63 65 -
waeup_product/trunk/skins/waeup_student/create_jamb.py
r103 r106 52 52 noCPSMember = False 53 53 try: 54 pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student' ))54 pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student','Contributor')) 55 55 except: 56 56 noCPSMember = True 57 57 if noCPSMember: 58 pr.addMember(s_id, 'UnSeT',roles=('Member', ))58 pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor')) 59 59 ## groups = context.portal_directories.groups 60 60 ## gm = list(groups.getEntry('Students')['members']) -
waeup_product/trunk/skins/waeup_student/process_waeup_login.py
r88 r106 18 18 jkw = {'admission_sc_pin': sc_pin} 19 19 jamb = getattr(ma,'JAMB') 20 jamb. edit(mapping=jkw)20 jamb.getContent().edit(mapping=jkw) 21 21 #pdid = 'personal%s' % member_id 22 22 pdid = 'PERSONAL' -
waeup_product/trunk/skins/waeup_student/student_personal_view_student.pt
r76 r106 13 13 <metal:block fill-slot="main"> 14 14 <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" /> 15 <p>16 <a href="" tal:attributes="href string:${context/absolute_url}/student_personal_edit_form">edit</a>17 </p>18 15 </metal:block> 19 16 <metal:block fill-slot="sub"> -
waeup_product/trunk/skins/waeup_student/students_folder_view.py
r96 r106 14 14 return context.students_folder_view_manager(psm=psm) 15 15 elif 'Student' in roles: 16 return context.students_folder_view_student(psm=psm) 16 return getattr(context, str(member))() 17 context_ti = context.portal_types['University'] 18 index = context_ti.getActionById('view','university_view') 19 return getattr(context,index)(psm=psm) 17 20 return context.students_folder_view_all(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.