Ignore:
Timestamp:
1 Oct 2006, 10:21:09 (18 years ago)
Author:
Henrik Bettermann
Message:

batch of fixes to open the frontend for the first time

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/application_slip.pt

    r544 r603  
    66      </span>
    77      <span tal:condition="info">
     8     
     9      <div style="text-align: right">
     10       <a href="javascript:window.print('media=screen')">
     11         Print Slip</a>
     12      </div>
     13
     14     
    815        <h3>Post UME Acknowledegement Slip</h3>
    916        <br />     
  • WAeUP_SRP/trunk/skins/waeup_student/application_view.pt

    r548 r603  
    99           
    1010        <div style="text-align: right">
    11         <a href="" target=_blank tal:attributes="href string:application_slip">
     11        <a href="" target="slip" tal:attributes="href string:application_slip"
     12            onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
    1213            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
    1314            Application Slip
    1415        </a>
     16       
    1517        </div>
    1618
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r584 r603  
    2121roles = member.getRoles()
    2222info = {}
    23 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
     23info['is_manager'] = context.isManager
    2424member_id = str(member)
    2525if student is None:
  • WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py

    r599 r603  
    2222info['wf_states'] = student_wf_states
    2323info['wf_states'][0] = " ----- "
    24 mtool = context.portal_membership
    25 member = mtool.getAuthenticatedMember()
    2624lt = context.portal_layouts
    2725pr = context.portal_registration
    2826path_info = request.get('PATH_INFO').split('/')
    29 roles = member.getRoles()
    30 is_manager = 'Manager' in roles or 'SectionManager' in roles
     27is_manager = context.isManager
    3128validate = request.has_key("cpsdocument_edit_button")
    3229items = []
    33 default = {'search_mode': 'name', 
    34         'review_state': 'admission_applied ',
     30default = {'search_mode': 'name',
     31        'review_state': 'created',
    3532        'search_string': ''
    3633        }
    37        
     34
    3835rend,psm,ds = lt.renderLayout(layout_id= 'student_search',
    3936                      schema_id= 'student_search',
     
    5754with_review = state != "all"
    5855if not term and not with_review:
    59     psm = "You must specify a search string when searching in 'All States'"
     56    psm = "You must specify a search string when searching 'all states'."
    6057    err = True
    6158elif '*' in term:
    6259    psm = "you cannot use the '*' alone"
    6360    err = True
    64 if err: 
     61if err:
    6562    return context.students_manager_view(rendered = rend,
    6663                             psm = psm,
     
    7370res = []
    7471portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']}
    75 st_queries = ('jamb_id','matric_no','name')
     72st_queries = ('jamb_reg_no','matric_no','name')
    7673onlyreview = with_review and not term
    7774if onlyreview:
     
    8683        res = catalog(portal_type='Student',
    8784                      id = term.strip())
    88 elif what in st_queries: 
    89     if what == "jamb_id":
     85elif what in st_queries:
     86    if what == "jamb_reg_no":
    9087        pt = 'StudentApplication'
    9188        st = "%s*" % term.strip().lower()
     
    10299        except:
    103100            return context.students_manager_view(rendered = rend,
    104                                  psm = 'Searchstring "%s" not allowed' % term,
     101                                 psm = 'Search string "%s" not allowed.' % term,
    105102                                 #psm = "%s, %s" % (psm,ds),
    106103                                 students = items,
     
    117114                                 is_manager = is_manager,
    118115                                 )
    119            
     116
    120117if res:
    121118    for r in res:
  • WAeUP_SRP/trunk/skins/waeup_student/student_index.py

    r544 r603  
    1717pm = context.portal_membership
    1818
    19 
    2019if pm.isAnonymousUser():
    2120    return redirect("%s/srp_anonymous_view" % context.absolute_url())
    2221
    23 
    24 member = pm.getAuthenticatedMember()
    25 roles = member.getRoles()
    26 isManager = "Manager" in roles or "SectionManager" in roles
    27 isStudent = "Student" in roles
    28 
    29 if isManager:
     22if context.isManager():
    3023    return redirect("%s/academics_contents" % context.absolute_url())
    31 if isStudent:
     24if context.isStudent():
    3225    info = context.getStudentInfo()
    3326    student = info['student']
  • WAeUP_SRP/trunk/skins/waeup_student/students_index.py

    r584 r603  
    1717pm = context.portal_membership
    1818
    19 
    2019if pm.isAnonymousUser():
    2120    return redirect("%s/srp_anonymous_view" % context.absolute_url())
    2221
     22campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    2323
    24 campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    25 member = pm.getAuthenticatedMember()
    26 roles = member.getRoles()
    27 isManager = "Manager" in roles or "SectionManager" in roles
    28 isStudent = "Student" in roles
    29 
    30 if isManager:
     24if context.isManager():
    3125    return redirect("%s/searchStudents" % campus.students.absolute_url())
    32 if isStudent:
     26if context.isStudent():
    3327    info = context.getStudentInfo()
    3428    student = info['student']
  • WAeUP_SRP/trunk/skins/waeup_student/students_manager_view.pt

    r584 r603  
    2929        tal:omit-tag=""
    3030        >
     31     
     32        <h3> Search Student Section</h3>
     33       
     34        <br />
     35     
    3136        <span tal:replace="structure rendered" />
    3237        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
Note: See TracChangeset for help on using the changeset viewer.