Ignore:
Timestamp:
27 Oct 2005, 19:30:56 (19 years ago)
Author:
joachim
Message:

=fixes for Henrik

Location:
waeup_product/trunk/skins
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py

    r103 r106  
    512512###)
    513513
     514accobook = { ###(
     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
    514574admission_status = { ###(
    515575    'widgets': {       
     
    645705                'title': 'Faculty',
    646706                'fields': ('faculty',),
    647                 'is_required': False,
     707                'is_required': True,
    648708                'label': 'faculty',
    649709                'label_edit': 'faculty',
     
    652712                'is_i18n': False,
    653713                '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,
    654727            },
    655728        },
     
    789862            [{'widget_id': 'aggregate', 'ncols': 1},],
    790863            [{'widget_id': 'faculty', 'ncols': 1},],
     864            [{'widget_id': 'course', 'ncols': 1},],
    791865            [{'widget_id': 'listing_date', 'ncols': 1},],
    792866            #[{'widget_id': '2nd_choice', 'ncols': 1},],
     
    816890            [{'widget_id': 'aggregate', 'ncols': 1},],
    817891            [{'widget_id': 'faculty', 'ncols': 1},],
     892            [{'widget_id': 'course', 'ncols': 1},],
    818893            [{'widget_id': 'listing_date', 'ncols': 1},],
    819894            #[{'widget_id': '2nd_choice', 'ncols': 1},],
  • waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py

    r103 r106  
    4747        },
    4848    },
     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    },
    49103}
    50104#
     
    178232    },
    179233    'faculty': {
     234        'type': 'CPS String Field',
     235        'data': {
     236            'default_expr': 'string:',
     237            'is_searchabletext': False,
     238        },
     239    },
     240    'course': {
    180241        'type': 'CPS String Field',
    181242        'data': {
  • waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py

    r103 r106  
    3636                {'id': 'add_faculty',
    3737                 'name': 'Add a Faculty',
     38                 'condition': "python:member and not 'Student'in member.getRoles()",
    3839                 'action'    : 'string:${object/absolute_url}/create_common?type_name=Faculty',
    3940                 #'action': 'folder_factories',
    40                  'permissions': (ModifyPortalContent,UniversityManage,)},
     41                 'permissions': (UniversityManage,)},
    4142                {'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()",
    4345                 'action'    : 'string:${object/absolute_url}/add_accommodation',
    4446                 #'action': 'folder_factories',
    45                  'permissions': (ModifyPortalContent,UniversityManage,)},
     47                 'permissions': (UniversityManage,)},
    4648                {'id': 'contents',
    4749                 'name': 'action_folder_contents',
     
    6264          'name': 'delegate',
    6365          'action': 'folder_localrole_form',
    64           'permissions': (UniversityManage,)
     66          'permissions': (UniversityManage,StudentManage)
    6567          },
    6668                 )
     
    286288    'description': '',
    287289    'content_icon': '',
    288     'content_meta_type': 'CPS Document',
     290    'content_meta_type': 'StudentPersonal',
    289291    'product': 'WAeUP',
    290292    'factory': 'addStudentPersonal',
     
    298300    'cps_display_as_document_in_listing': True,
    299301    'cps_is_portalbox': False,
    300     #'schemas': ['common','metadata','jamb'],
    301302    'schemas': ['student_personal'],
    302303    'layouts': ['student_personal'],
     
    310311          'action': 'string:${object_url}/student_personal_index_html',
    311312          #'action': 'string:${object_url}/cpsdocument_view',
    312           'condition': '',
    313313          'permission': ('View',),
    314314          'category': 'object',
  • waeup_product/trunk/skins/waeup_default/portlet_session_info.pt

    r95 r106  
    1111         tal:attributes="href string:${here/portal_url}/sections/waeup/students/${member}">goto your personal area</a>
    1212    </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 />
    1315    (<a href="" i18n:translate=""
    1416        tal:attributes="href string:${here/portal_url}/sections/waeup/logout">log out</a>)
  • waeup_product/trunk/skins/waeup_student/check_admission.py

    r55 r106  
    3535elif psm == 'valid':
    3636    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:
    3940        psm = "Your not admitted"
    4041        return context.check_admission_form(rendered = res,
    41                                  psm = psm,
     42                                 psm = psm + str(search),
    4243                                 ds = ds,
    4344                                 )
    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"
    4648        return context.check_admission_form(rendered = res,
    4749                                 psm = psm,
     
    5254    return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=UnSeT&sc_pin=%s"
    5355                                    % (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,ds
     56##    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
    6365
  • waeup_product/trunk/skins/waeup_student/create_jamb.py

    r103 r106  
    5252    noCPSMember = False
    5353    try:
    54         pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student'))
     54        pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student','Contributor'))
    5555    except:
    5656        noCPSMember = True
    5757    if noCPSMember:
    58         pr.addMember(s_id, 'UnSeT',roles=('Member',))
     58        pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
    5959##    groups = context.portal_directories.groups
    6060##    gm = list(groups.getEntry('Students')['members'])
  • waeup_product/trunk/skins/waeup_student/process_waeup_login.py

    r88 r106  
    1818jkw = {'admission_sc_pin': sc_pin}
    1919jamb = getattr(ma,'JAMB')
    20 jamb.edit(mapping=jkw)
     20jamb.getContent().edit(mapping=jkw)
    2121#pdid = 'personal%s' % member_id
    2222pdid = 'PERSONAL'
  • waeup_product/trunk/skins/waeup_student/student_personal_view_student.pt

    r76 r106  
    1313    <metal:block fill-slot="main">
    1414      <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>
    1815    </metal:block>
    1916    <metal:block fill-slot="sub">
  • waeup_product/trunk/skins/waeup_student/students_folder_view.py

    r96 r106  
    1414        return context.students_folder_view_manager(psm=psm)
    1515    elif 'Student' in roles:
    16         return context.students_folder_view_student(psm=psm)
     16        return getattr(context, str(member))()
     17context_ti = context.portal_types['University']
     18index = context_ti.getActionById('view','university_view')
     19return getattr(context,index)(psm=psm)
    1720return context.students_folder_view_all(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.