Changeset 1096


Ignore:
Timestamp:
19 Dec 2006, 21:56:55 (18 years ago)
Author:
Henrik Bettermann
Message:

redirect to illegal_view.py

Location:
WAeUP_SRP/trunk
Files:
2 added
1 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/actions.xml

    r983 r1096  
    1414  <action title="Staff Login" action_id="login_staff" category="student"
    1515     condition_expr="not: member"
    16      url_expr="python:&quot;%s/login_staff?%s&quot; % (portal_url, modules[&quot;urllib&quot;].urlencode({&quot;came_from&quot;: request.URL}))"
     16     url_expr="string:${portal_url}/login_staff"
    1717     visible="True">
    1818   <permission>View</permission>
     
    3838  <action title="Student Login" action_id="login_student" category="student"
    3939     condition_expr="not:member"
    40      url_expr="python:&quot;%s/login_student?%s&quot; % (portal_url, modules[&quot;urllib&quot;].urlencode({&quot;came_from&quot;: request.URL}))"
     40     url_expr="string:${portal_url}/login_student"
    4141     visible="True">
    4242   <permission>View</permission>
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r1094 r1096  
    4646        #set_trace()
    4747        if s_review_state in ("student_created","admitted") and\
    48         a_review_state == 'created' :
     48                             a_review_state == 'created' :
    4949            wftool.doActionFor(student_app,'open')
    5050            if student_pume is not None:
     
    6868            app_doc.edit(mapping = da)
    6969        elif s_review_state in ("admitted") and a_review_state == 'opened' and\
    70         not app_doc.app_ac_pin:
     70                                            not app_doc.app_ac_pin:
    7171            jamb_reg_no = app_doc.jamb_reg_no
    7272            for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
     
    8989        elif s_review_state == "clearance_pin_entered":
    9090            redirect_url = "%s/clearance_edit_form" % student.absolute_url()
    91         redirect_url = "%s/student_index" % student.absolute_url()
     91        else:
     92            redirect_url = "%s/student_index" % student.absolute_url()
    9293    else:
    9394        logger.info('"%s", "logged in"' % (member))
  • WAeUP_SRP/trunk/skins/waeup_student/accommodation_slip.pt

    r805 r1096  
    11<metal:html tal:define="info context/getStudentInfo">
     2  <span tal:condition="not: info">
     3    <span tal:content="here/illegal_view" />
     4  </span>
     5<metal:block tal:condition="info">
    26  <metal:body use-macro="here/main_template/macros/master">
    37    <metal:main fill-slot="main">
     
    1923    </metal:main>
    2024  </metal:body>
     25</metal:block> 
    2126</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/accommodation_view.pt

    r805 r1096  
    11<metal:html tal:define="info context/getStudentInfo">
     2  <span tal:condition="not: info">
     3    <span tal:content="here/illegal_view" />
     4  </span>
     5<metal:block tal:condition="info">
    26  <metal:body use-macro="here/waeup_content_master/macros/master">
    37    <metal:main fill-slot="main">
     
    2832    </metal:main>
    2933  </metal:body>
     34</metal:block>   
    3035</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/admission_form.pt

    r984 r1096  
    11<metal:html tal:define="info context/getStudentInfo">
     2  <span tal:condition="not: info">
     3    <span tal:content="here/illegal_view" />
     4  </span>
     5<metal:block tal:condition="info">
    26  <metal:body use-macro="here/waeup_content_master/macros/master">
    37    <metal:main fill-slot="main">
     
    6367      <form action="." method="post" class="group">
    6468
    65                 <input  tal:condition="python:review_state!='objection_raised'" type="submit" name="raise_objection:method" value="Raise an Objection"
     69                <input  tal:condition="python:review_state=='admitted'" type="submit" name="raise_objection:method" value="Raise an Objection"
    6670                       class="destructive"
    6771                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    6872                       (cpsmcat('Confirm that you want to raise an objection.'), )"
    6973                       />
    70                 <input type="submit" name="application_edit:method"
     74                <input tal:condition="python:review_state in ('admitted', 'objection_raised',)" type="submit" name="application_edit:method"
    7175                       class="context" value="Continue"
    7276                       />
     
    7579    </metal:main>
    7680  </metal:body>
     81</metal:block>     
    7782</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/admission_rejected_view.pt

    r833 r1096  
    1 <metal:html tal:define="info context/getStudentInfo">
    2   <metal:body use-macro="here/main_template/macros/master">
    3     <metal:main fill-slot="main">
    4     <span tal:condition="not: info">
    5       <metal:block use-macro="here/error_not_found/macros/not_found" />
    6     </span>
    7     <span tal:condition="info">
    8       <h3>You are not admitted into the University of Benin!</h3>
    9     </span>
    10     </metal:main>
    11   </metal:body>
    12 </metal:html>
     1<metal:body use-macro="here/main_template/macros/master">
     2  <metal:main fill-slot="main">
     3
     4    <h3>You are not admitted into the University of Benin!</h3>
     5
     6  </metal:main>
     7</metal:body>
  • WAeUP_SRP/trunk/skins/waeup_student/admission_slip.pt

    r984 r1096  
    11<metal:html tal:define="info context/getStudentInfo">
     2  <span tal:condition="not: info">
     3    <span tal:content="here/illegal_view" />
     4  </span>
     5<metal:block tal:condition="info">
    26  <metal:body use-macro="here/main_template/macros/master">
    37    <metal:main fill-slot="main">
     
    5357    </metal:main>
    5458  </metal:body>
     59</metal:block>     
    5560</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt

    r1071 r1096  
    11<metal:html tal:define="info context/getApplicationInfo">
    22  <span tal:condition="not: info">
    3     <metal:block use-macro="here/illegal_view/macros/illegal_view" />
     3    <span tal:content="here/illegal_view" />
    44  </span>
    55<metal:block tal:condition="info">
  • WAeUP_SRP/trunk/skins/waeup_student/application_view.pt

    r1082 r1096  
    11<metal:html tal:define="info context/getStudentInfo">
    22  <span tal:condition="not: info">
    3     <metal:block use-macro="here/illegal_view/macros/illegal_view" />
     3    <span tal:content="here/illegal_view" />
    44  </span>
    55  <metal:block tal:condition="info">
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form.pt

    r1085 r1096  
    22<metal:block tal:define="info context/getClearanceInfo">
    33  <span tal:condition="not: info">
    4     <metal:block use-macro="here/illegal_view/macros/illegal_view" />
     4    <span tal:content="here/illegal_view" />
    55  </span>
    66<metal:block tal:condition="info">
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_slip.pt

    r1069 r1096  
    33    <metal:main fill-slot="main">
    44      <span tal:condition="not: info">
    5         <metal:block use-macro="here/error_not_found/macros/not_found" />
     5        <span tal:content="here/illegal_view" />
    66      </span>
    77      <span tal:condition="info">
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_view.pt

    r915 r1096  
    33                        is_student context/isStudent;
    44                        ">
     5  <span tal:condition="not: info">
     6    <span tal:content="here/illegal_view" />
     7  </span>
     8<metal:block tal:condition="info">                         
    59  <metal:body use-macro="here/waeup_content_master/macros/master">
    610    <metal:main fill-slot="main">
     
    4044    </metal:main>
    4145  </metal:body>
     46</metal:block>     
    4247</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/contact_student_form.pt

    r942 r1096  
    22                        info context/getStudentInfo;
    33                        ">
     4  <span tal:condition="not: info">
     5    <span tal:content="here/illegal_view" />
     6  </span>
     7<metal:block tal:condition="info">                         
    48  <metal:body use-macro="here/main_template/macros/master">
    59    <metal:main fill-slot="main">
     
    7377    </metal:main>
    7478  </metal:body>
     79</metal:block>     
    7580</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/no_booking_allowed.pt

    r942 r1096  
    1 <metal:html tal:define="info context/getStudentInfo">
    2   <metal:body use-macro="here/main_template/macros/master">
    3     <metal:main fill-slot="main">
    4     <span tal:condition="not: info">
    5       <metal:block use-macro="here/error_not_found/macros/not_found" />
    6     </span>
    7     <span tal:condition="info">
    8       <h3>You are not eligible to book accommodation!</h3>
    9     </span>
    10     </metal:main>
    11   </metal:body>
    12 </metal:html>
     1<metal:body use-macro="here/main_template/macros/master">
     2  <metal:main fill-slot="main">
     3
     4    <h3>You are not eligible to book accommodation!</h3>
     5
     6  </metal:main>
     7</metal:body>
     8
  • WAeUP_SRP/trunk/skins/waeup_student/objection_raised_form.pt

    r891 r1096  
    11<metal:html tal:define="info options/info|context/getStudentInfo;
    22                        review_state info/review_state">
     3  <span tal:condition="not: info">
     4    <span tal:content="here/illegal_view" />
     5  </span>
     6<metal:block tal:condition="info">                         
    37  <metal:body use-macro="here/waeup_content_master/macros/master">
    48    <metal:main fill-slot="main">
     
    6670    </metal:main>
    6771  </metal:body>
     72</metal:block>     
    6873</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r1095 r1096  
    1818mtool = context.portal_membership
    1919member = mtool.getAuthenticatedMember()
     20is_anon = mtool.isAnonymousUser()
    2021#roles = member.getRolesInContext(context)
    2122lt = context.portal_layouts
    2223#pr = context.portal_registration
    2324path_info = request.get('PATH_INFO').split('/')
     25
     26allowed = True
     27if is_anon:
     28    allowed = False
     29
    2430try:
    2531    from Products.AdvancedQuery import Eq, Between, Le,In
     
    9197                             info = user_info,
    9298                             students = [],
    93                              allowed = True,
     99                             allowed = allowed,
    94100                             )
    95101what = ds.get('search_mode')
     
    112118                             info = user_info,
    113119                             students = items,
    114                              allowed = True,
     120                             allowed = allowed,
    115121                             )
    116122st_queries = ('jamb_reg_no','matric_no','name')
     
    129135                             psm = "No student found!",
    130136                             students = [],
    131                              allowed = True,
     137                             allowed = allowed,
    132138                             )
    133139    elif what == "department":
     
    154160    #set_trace()
    155161    only_review = False
    156     query = In('faculty',faculties) | In('department',departments) 
     162    query = In('faculty',faculties) | In('department',departments)
    157163    res = aq_students(query)
    158164    search_set = [r.id for r in res]
     
    203209                             info = user_info,
    204210                             students = students,
    205                              allowed = True,
     211                             allowed = allowed,
    206212                             co_view = co_view,
    207213                             )
     
    210216                             info = user_info,
    211217                             students = students,
    212                              allowed = True,
    213                              )
    214 
    215 
     218                             allowed = allowed,
     219                             )
     220
     221
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r1086 r1096  
    1515    <metal:main fill-slot="main">
    1616      <span tal:condition="not: allowed">
    17         <metal:block use-macro="here/error_not_found/macros/not_found" />
     17        <span tal:content="here/illegal_view" />
    1818      </span>
    1919      <span tal:condition="allowed" tal:omit-tag="">
  • WAeUP_SRP/trunk/skins/waeup_student/statistics_view.pt

    r1086 r1096  
    33                        member mtool/getAuthenticatedMember;"
    44                        >
     5  <span tal:condition="not: departments">
     6    <span tal:content="here/illegal_view" />
     7  </span>
     8<metal:block tal:condition="departments">                         
    59  <metal:body use-macro="here/main_template/macros/master">
    610    <metal:main fill-slot="main">
     
    3842    </metal:main>
    3943  </metal:body>
     44</metal:block>     
    4045</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/student_view.pt

    r1049 r1096  
    66    <metal:main fill-slot="main">
    77      <span tal:condition="not: info">
    8         <metal:block use-macro="here/error_not_found/macros/not_found" />
     8        <span tal:content="here/illegal_view" />
    99      </span>
    1010      <span tal:condition="info"
  • WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt

    r1025 r1096  
    1 <metal:html tal:define="info context/getStudyCourseInfo;
    2             is_so context/isSectionOfficer;
    3             s_info context/getStudentInfo;"
    4             >
     1<metal:html tal:define="is_so context/isSectionOfficer;
     2                        s_info context/getStudentInfo;"
     3                        >
     4  <span tal:condition="not: s_info">
     5    <span tal:content="here/illegal_view" />
     6  </span>
     7  <metal:block tal:condition="s_info">             
     8  <span tal:define="info context/getStudyCourseInfo">
    59  <metal:body use-macro="here/waeup_content_master/macros/master">
    610    <metal:block fill-slot="header">
     
    9195      </form>
    9296    </metal:main>
    93    
    94     <metal:sub fill-slot="sub"/>
     97 
    9598  </metal:body>
     99  </span> 
     100  </metal:block>
    96101</metal:html>
Note: See TracChangeset for help on using the changeset viewer.