Ignore:
Timestamp:
15 Nov 2005, 16:28:29 (19 years ago)
Author:
joachim
Message:

=added Faculties and Departments in install + other cosmetics

Location:
waeup_product/trunk/skins
Files:
2 added
7 edited
2 moved

Legend:

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

    r171 r173  
    365365                },
    366366            }
     367username_hidden = { ###(
     368            'type': 'String Widget',
     369            'data': {
     370                'title': 'Username',
     371                'fields': ('username',),
     372                'hidden_layout_modes': ['create',],
     373                },
     374            }
    367375
    368376###)
     
    882890                'javascript_expr': '',
    883891                'deletable': True,
    884                 'size_max': 40960,
     892                'size_max': 204800,
    885893                'display_width': 90,
    886894                'display_height': 180,
     
    912920                'javascript_expr': '',
    913921                'deletable': True,
    914                 'size_max': 40960,
     922                'size_max': 204800,
    915923                'display_width': 300,
    916924                'display_height':600,
     
    939947                'javascript_expr': '',
    940948                'deletable': True,
    941                 'size_max': 40960,
     949                'size_max': 204800,
    942950                'display_width': 300,
    943951                'display_height':600,
     
    966974                'javascript_expr': '',
    967975                'deletable': True,
    968                 'size_max': 40960,
     976                'size_max': 204800,
    969977                'display_width': 300,
    970978                'display_height':600,
     
    10231031        'sex': sex,
    10241032        'email': email,
     1033        'username': username_hidden,
    10251034        'pw': pw,
    10261035        'rpw': rpw,
     
    10341043            #[{'widget_id': 'middlename', 'ncols': 1},],
    10351044            #[{'widget_id': 'lastname', 'ncols': 1},],
    1036             #[{'widget_id': 'sex', 'ncols': 1},],
     1045            #[{'widget_id': 'username', 'ncols': 1},],
    10371046            [{'widget_id': 'email', 'ncols': 1},],
    1038             [{'widget_id': 'pw', 'ncols': 1},],
    1039             [{'widget_id': 'rpw', 'ncols': 1},],
     1047            #[{'widget_id': 'pw', 'ncols': 1},],
     1048            #[{'widget_id': 'rpw', 'ncols': 1},],
    10401049        ]
    10411050    },
     
    14571466                'help': '',
    14581467                'is_i18n': False,
    1459                 'vocabulary': 'faculties',
     1468                'vocabulary': 'get_faculties_voc',
    14601469            },
    14611470        },
    14621471        'course': {
    1463             'type': 'String Widget',
     1472            'type': 'Select Widget',
    14641473            'data': {
    14651474                'title': 'Study Course',
     
    14701479                'description': '',
    14711480                'help': 'The course to study',
     1481                'vocabulary': 'get_departments_voc',
    14721482                'is_i18n': False,
    14731483            },
  • waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py

    r166 r173  
    488488        'data': {
    489489            'is_searchabletext': 1,
     490        },
     491    },
     492     'username': {
     493        'type': 'CPS String Field',
     494        'data': {
     495            'is_searchabletext': 0,
    490496        },
    491497    },
  • waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py

    r170 r173  
    7373###)
    7474
     75academics_folder_type = { ###(
     76    'title': 'WAeUP Academics Folder',
     77    'description': 'The WAeUP Academics Folder',
     78    'content_icon': '',
     79    'content_meta_type': 'AcademicsFolder',
     80    'product': 'CPSDefault',
     81    'factory': 'addFolder',
     82    'immediate_view': 'folder_view',
     83    'global_allow': 1,
     84    'filter_content_types': 1,
     85    'allowed_content_types': ('Faculty',),
     86    'allow_discussion': 0,
     87    'cps_is_searchable': 1,
     88    'cps_display_as_document_in_listing': 1,
     89    'cps_proxy_type': 'folder',
     90    'schemas': ['metadata', 'common', 'folder'],
     91    'layouts': ['waeup_common','folder'],
     92    'layout_clusters': ['metadata:metadata'],
     93    'cps_section_wf': 'waeup_section_wf',
     94    'actions': ({'id': 'view',
     95                 'name': 'Standard View',
     96                 #'action': 'academics_view',
     97                 'action': 'temporary_view_all',
     98                 'condition': "",
     99                 'permissions': (View,)},
     100                {'id': 'add_faculty',
     101                 'name': 'Add Faculty',
     102                 'condition': "python:member and 'UniversityManager'in member.getRoles()",
     103                 'action'    : 'string:${object/absolute_url}/create_common?type_name=Faculty',
     104                 'permissions': (UniversityManage,)},
     105                 {'id': 'localroles',
     106                 'name': 'delegate',
     107                 'action': 'folder_localrole_form',
     108                 'permissions': (UniversityManage,),
     109                 'visible': False,
     110                 },
     111                )
     112      }
     113###)
     114
     115scratch_card = { ###(
     116    'title': 'WAeUP Scratchcard',
     117    'description': '',
     118    'content_icon': 'student.gif',
     119    'content_meta_type': 'Scratch Card',
     120    'product': 'CPSDocument',
     121    'factory': 'addCPSDocument',
     122    'immediate_view': 'cpsdocument_view',
     123    'global_allow': True,
     124    'filter_content_types': True,
     125    'allowed_content_types': (),
     126    'allow_discussion': False,
     127    'cps_is_searchable': True,
     128    'cps_proxy_type': 'document',
     129    'cps_display_as_document_in_listing': True,
     130    'schemas': ('scratch_card'),
     131    'layouts': ('scratch_card'),
     132    'cps_workspace_wf': 'waeup_workspace_wf',
     133    'cps_section_wf': 'waeup_section_wf',
     134##    'actions': (
     135##         {'id': 'view',
     136##          'name': 'Standard View',
     137##          'action': 'string:${object_url}/document_view',
     138##          'condition': '',
     139##          'permission': ('View',),
     140##          'category': 'object',
     141##          'visible': True,},
     142##         {'id': 'new_content',
     143##          'name': 'Add a scratch card',
     144##          'action': 'string:${object_url}/folder_factories',
     145##          'condition': "python:len(object.contentItems()) == 0 ",
     146##          'permission': ('Modify portal content',),
     147##          'category': 'object',
     148##          'visible': True,},
     149##         {'id': 'contents',
     150##          'name': 'action_folder_contents',
     151##          'action': 'string:${object_url}/folder_contents',
     152##          'condition': "python:object.getTypeInfo().cps_proxy_type != 'document'",
     153##          'permission': ('Modify portal content',),
     154##          'category': 'object',
     155##          'visible': True,},
     156##         {'id': 'edit',
     157##          'name': 'action_edit',
     158##          'action': 'string:${object_url}/cpsdocument_edit_form',
     159##          'condition': '',
     160##          'permission': ('Modify portal content',),
     161##          'category': 'object',
     162##          'visible': True,},
     163##    )
     164}
     165#
     166###)
     167
    75168students_folder_type = { ###(
    76169    'title': 'WAeUP Student Folder',
     
    116209                {
    117210                'id'        : 'admission_list',
    118                 'name'      : 'Clearence Elegibility Process',
    119                 'action'    : 'string:${object/absolute_url}/clearence',
     211                'name'      : 'Clearance Eligibility Process',
     212                'action'    : 'string:${object/absolute_url}/clearance',
    120213                'condition':  'object/portal_membership/isAnonymousUser',
    121214                'permission': (View,)},
     
    152245###)
    153246
    154 academics_folder_type = { ###(
    155     'title': 'WAeUP Academics Folder',
    156     'description': 'The WAeUP Academics Folder',
    157     'content_icon': '',
    158     'content_meta_type': 'AcademicsFolder',
    159     'product': 'CPSDefault',
    160     'factory': 'addFolder',
    161     'immediate_view': 'folder_view',
    162     'global_allow': 1,
    163     'filter_content_types': 1,
    164     'allowed_content_types': ('Faculty',),
    165     'allow_discussion': 0,
    166     'cps_is_searchable': 1,
    167     'cps_display_as_document_in_listing': 1,
    168     'cps_proxy_type': 'folder',
    169     'schemas': ['metadata', 'common', 'folder'],
    170     'layouts': ['waeup_common','folder'],
    171     'layout_clusters': ['metadata:metadata'],
    172     'cps_section_wf': 'waeup_section_wf',
    173     'actions': ({'id': 'view',
    174                  'name': 'Standard View',
    175                  #'action': 'academics_view',
    176                  'action': 'temporary_view_all',
    177                  'condition': "",
    178                  'permissions': (View,)},
    179                 {'id': 'add_faculty',
    180                  'name': 'Add Faculty',
    181                  'condition': "python:member and 'UniversityManager'in member.getRoles()",
    182                  'action'    : 'string:${object/absolute_url}/create_common?type_name=Faculty',
    183                  'permissions': (UniversityManage,)},
    184                  {'id': 'localroles',
    185                  'name': 'delegate',
    186                  'action': 'folder_localrole_form',
    187                  'permissions': (UniversityManage,),
    188                  'visible': False,
    189                  },
    190                 )
    191       }
    192 ###)
    193 
    194 scratch_card = { ###(
    195     'title': 'WAeUP Scratchcard',
    196     'description': '',
    197     'content_icon': 'student.gif',
    198     'content_meta_type': 'Scratch Card',
    199     'product': 'CPSDocument',
    200     'factory': 'addCPSDocument',
    201     'immediate_view': 'cpsdocument_view',
    202     'global_allow': True,
    203     'filter_content_types': True,
    204     'allowed_content_types': (),
    205     'allow_discussion': False,
    206     'cps_is_searchable': True,
    207     'cps_proxy_type': 'document',
    208     'cps_display_as_document_in_listing': True,
    209     'schemas': ('scratch_card'),
    210     'layouts': ('scratch_card'),
    211     'cps_workspace_wf': 'waeup_workspace_wf',
    212     'cps_section_wf': 'waeup_section_wf',
    213 ##    'actions': (
    214 ##         {'id': 'view',
    215 ##          'name': 'Standard View',
    216 ##          'action': 'string:${object_url}/document_view',
    217 ##          'condition': '',
    218 ##          'permission': ('View',),
    219 ##          'category': 'object',
    220 ##          'visible': True,},
    221 ##         {'id': 'new_content',
    222 ##          'name': 'Add a scratch card',
    223 ##          'action': 'string:${object_url}/folder_factories',
    224 ##          'condition': "python:len(object.contentItems()) == 0 ",
    225 ##          'permission': ('Modify portal content',),
    226 ##          'category': 'object',
    227 ##          'visible': True,},
    228 ##         {'id': 'contents',
    229 ##          'name': 'action_folder_contents',
    230 ##          'action': 'string:${object_url}/folder_contents',
    231 ##          'condition': "python:object.getTypeInfo().cps_proxy_type != 'document'",
    232 ##          'permission': ('Modify portal content',),
    233 ##          'category': 'object',
    234 ##          'visible': True,},
    235 ##         {'id': 'edit',
    236 ##          'name': 'action_edit',
    237 ##          'action': 'string:${object_url}/cpsdocument_edit_form',
    238 ##          'condition': '',
    239 ##          'permission': ('Modify portal content',),
    240 ##          'category': 'object',
    241 ##          'visible': True,},
    242 ##    )
    243 }
    244 #
    245 ###)
    246 
    247247student_type = { ###(
    248248    'title': 'WAeUP Student',
     
    271271          #'action': 'string:${object_url}/student_index_html',
    272272          'action': 'string:${object_url}/temporary_view_all',
    273           'condition':  "python:object.getContent().memberIsOwner() or 'UniversityManager'in member.getRoles()",
     273          'condition':  "python:object.getContent().memberIsOwner() or (member and 'UniversityManager'in member.getRoles())",
    274274          'permission': (View,),
    275275          'category': 'object',
  • waeup_product/trunk/skins/waeup_default/getWAeUPVocabularies.py

    r164 r173  
    7676vocabularies['faculties'] = faculties
    7777###)
     78get_faculties_voc = { ###(
     79        'type': 'CPS Method Vocabulary',
     80        'data': {'get_vocabulary_method': 'get_faculties_voc',}
     81        }
     82vocabularies['get_faculties_voc'] = get_faculties_voc
     83###)
     84get_departments_voc = { ###(
     85        'type': 'CPS Method Vocabulary',
     86        'data': {'get_vocabulary_method': 'get_departments_voc',}
     87        }
     88vocabularies['get_departments_voc'] = get_departments_voc
     89###)
    7890
    7991level = { ###(
  • waeup_product/trunk/skins/waeup_student/check_admission.py

    r166 r173  
    6060                               schema_id = 'jamb')
    6161
    62 return jamb.admission_slip_form(rendered = res, dict = ds)
     62return context.admission_slip_form(rendered = res, dict = ds)
    6363
  • waeup_product/trunk/skins/waeup_student/clearance.py

    r172 r173  
    2626                      ob={},
    2727                      layout_mode='create',
    28                       action = "clearence",
     28                      action = "clearance",
    2929                      submit = "submit",
    3030                      )
    3131
    3232if psm == 'invalid':
    33     return context.clearence_form(rendered = res,
     33    return context.clearance_form(rendered = res,
    3434                                 psm = "Please correct your input",
    3535                                 ds = ds,
    3636                                 )
    3737elif psm == '':
    38     return context.clearence_form(rendered = res,
     38    return context.clearance_form(rendered = res,
    3939                                 psm = None,
    4040                                 ds = ds,
     
    4646    if len(search) < 1:
    4747        psm = "Your not admitted"
    48         return context.clearence_form(rendered = res,
     48        return context.clearance_form(rendered = res,
    4949                                 psm = psm,
    5050                                 ds = ds,
     
    5353    if sf and getattr(sf,'PERSONAL',None):
    5454        psm = "Your already admitted, please login"
    55         return context.clearence_form(rendered = res,
     55        return context.clearance_form(rendered = res,
    5656                                 psm = psm,
    5757                                 ds = ds,
     
    6060    student = getattr(context,s_id)
    6161    ds.set('sc_date',current)
    62     student.getContent().setScratchCardData('clearence',ds)
     62    student.getContent().setScratchCardData('clearance',ds)
    6363    sc_pin =  ds.get('sc_pin')
    64     return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=UnSeT&sc_pin=%s"
     64    #return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=UnSeT&sc_pin=%s"
     65    return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=123456&sc_pin=%s"
    6566                                    % (context.absolute_url(),s_id,sc_pin))
  • waeup_product/trunk/skins/waeup_student/clearance_form.pt

    r172 r173  
    1414    </metal:block>
    1515      <metal:block fill-slot="main">
    16         <h1>Clearence and Eligibility Processing </h1>
     16        <h1>Clearance and Eligibility Processing </h1>
    1717        <div tal:replace="structure rendered_main" />
    1818          Instructions :<br />
  • waeup_product/trunk/skins/waeup_student/create_jamb.py

    r152 r173  
    5151    noCPSMember = False
    5252    try:
    53         pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student','Contributor'))
     53        #pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student','Contributor'))
     54        pr.addMember(s_id, '123456',roles=('Member','CPSMember','Student','Contributor'))
    5455    except:
    5556        noCPSMember = True
    5657    if noCPSMember:
    57         pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
     58        #pr.addMember(s_id, 'UnSeT',roles=('Member','Student','Contributor'))
     59        pr.addMember(s_id, '123456',roles=('Member','Student','Contributor'))
    5860    student.manage_setLocalRoles(s_id, ['Owner'])
    5961    jamb.manage_setLocalRoles(s_id, ['Owner'])
  • waeup_product/trunk/skins/waeup_student/eligibility.py

    r164 r173  
    4444    s_personal = context.PERSONAL.getContent()
    4545    s_personal.edit(mapping={'email': ds.get('email')})
    46     pm.setPassword(REQUEST.get("widget__pw"))
    47    
     46    #pw = REQUEST.get("widget__pw")
     47    #pm.setPassword(pw)
     48psm = 'Email hay been successfully set.'
     49#psm += 'please <a href="login_form">Login</a> with username %s and password %s' % (context.getId(),pw)
    4850return context.eligibility_form(rendered = res,
    49                                  psm = 'Password and Email have been successfully set',
     51                                 psm = psm,
    5052                                 ds = ds,
    5153                                 )
Note: See TracChangeset for help on using the changeset viewer.