Ignore:
Timestamp:
20 Nov 2006, 15:11:29 (18 years ago)
Author:
Henrik Bettermann
Message:

new local roles implemented
role SectionOfficer? not yet tested

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

Legend:

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

    r805 r911  
    99           
    1010        <div style="text-align: right"
    11              tal:condition="python:review_state in ('admission_applied','clearance_pin_entered','admitted',)">
     11             tal:condition="python:review_state not in ('created','application_pin_entered',)">
    1212        <a href="" target="slip" tal:attributes="href string:application_slip"
    1313            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')">
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form.pt

    r903 r911  
    22<tal:block define="
    33           info context/getStudentInfo;
    4            isSectionManager context/isSectionManager;
    5            isStaff context/isStaff;
    6            isClearanceOfficer context/isClearanceOfficer;
    7            isStudent context/isStudent;
     4           is_sm context/isSectionManager;
     5           is_staff context/isStaff;
     6           is_co context/isClearanceOfficer;
     7           is_student context/isStudent;
    88           review_state info/review_state;
    99           clear_review_state info/clear_review_state;
    10            editable python: (isStudent and clear_review_state == 'opened' or isSectionManager) and not isClearanceOfficer;
     10           editable python: (is_student and clear_review_state == 'opened' or is_sm) and not is_co;
    1111           mode python: test(editable,'edit','view');
    1212           rendered_main python:info['clear_doc'].render(request=request,
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_lib.pt

    r903 r911  
    44<metal:block define-macro="header">
    55  <!--  Administration -->
    6   <tal:block condition="python: not(isStaff or isSectionManager or isStudent)">
     6  <tal:block condition="python: not(is_staff or is_sm or is_student)">
    77    <metal:block use-macro="here/error_not_found/macros/not_found" />
    88  </tal:block>
    9   <tal:block condition="python: isStaff or isSectionManager">
    10     <a href="" tal:condition="python: 0"
    11        tal:attributes="href string:${here/academicsParent}">
    12       <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
    13       Up one level
    14     </a>
     9  <tal:block condition="is_staff">
    1510    <h3>
    1611      <span tal:condition="info">
     
    2116    <br />   
    2217  </tal:block>
    23   <!--  Student -->
    24   <tal:block condition="python: isStudent">
     18  <!-- Student -->
     19  <tal:block condition="python: is_student">
    2520    <a href=""
    2621       tal:attributes="href string:${here/academicsParent}">
     
    3429<!--  buttons -->
    3530<metal:block define-macro="buttons">
    36   <!--  isSectionManager -->
     31  <!-- SectionManager -->
    3732  <tal:block condition="context/isSectionManager">
    3833 
     
    6964           tal:condition="python:review_state in ('cleared_and_validated','clearance_requested',)" />
    7065  </tal:block>
    71   <!--  isClearanceOfficer -->
    72   <tal:block condition="context/isClearanceOfficer">
     66  <!--  ClearanceOfficer -->
     67  <tal:block condition="is_co">
    7368    <input type="submit" class="standalone"
    7469           name="clear_and_validate_button"
     
    8277           tal:condition="python:review_state in ('cleared_and_validated','clearance_requested',)" />
    8378  </tal:block>
    84   <!--  isStudent -->
    85   <tal:block condition="context/isStudent">
     79  <!--  Student -->
     80  <tal:block condition="is_student">
    8681 
    8782     <div tal:condition="python:info['review_state'] == 'clearance_pin_entered'">
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_view.pt

    r891 r911  
    11<metal:html tal:define="info context/getStudentInfo;
    2                         is_manager info/is_manager|nothing;
     2                        is_so info/is_so|nothing;
    33                        is_student info/is_student|nothing;
    44                        ">
     
    2222
    2323        <h3>
    24            <span tal:condition="python:is_manager and info">
     24           <span tal:condition="python:is_so and info">
    2525             <span tal:content="info/student/Title" />:
    2626           </span>
  • WAeUP_SRP/trunk/skins/waeup_student/contact_student_form.pt

    r895 r911  
    11<metal:html tal:define="member python:context.portal_membership.getAuthenticatedMember();
    22                        info context/getStudentInfo;
    3                         is_manager info/is_manager|nothing;
    4                         is_student info/is_student|nothing;
    5                         is_co info/is_co|nothing;
    63                        ">
    74  <metal:body use-macro="here/main_template/macros/master">
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r903 r911  
    2121
    2222info = {}
    23 info['is_manager'] = context.isSectionManager()
     23info['is_sm'] = context.isSectionManager()
    2424info['is_student'] = context.isStudent()
    2525info['is_co'] = context.isClearanceOfficer()
     26info['is_so'] = context.isSectionOfficer()
    2627member_id = str(member)
    2728if student is None:
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py

    r903 r911  
    1818
    1919info = {}
    20 info['is_manager'] = context.isSectionManager()
     20info['is_sm'] = context.isSectionManager()
     21info['is_so'] = context.isSectionOfficer()
    2122info['is_student'] = context.isStudent()
    2223info['action'] = "%s" % context.campus.absolute_url()
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py

    r903 r911  
    4444student_id = pt[-(3+p)]
    4545level_id = pt[-(1+p)]
    46 info['is_manager'] = context.isSectionManager()
     46info['is_sm'] = context.isSectionManager()
     47info['is_so'] = context.isSectionOfficer()
    4748info['is_student'] = context.isStudent()
    4849info['action'] = "%s" % context.absolute_url()
  • WAeUP_SRP/trunk/skins/waeup_student/pume_view.pt

    r805 r911  
    99           
    1010        <div style="text-align: right"
    11              tal:condition="python:review_state in ('admitted', 'pume_passed', 'pume_failed', 'clearance_pin_entered',)">
     11            >
    1212        <a href="" target="slip" tal:attributes="href string:pume_slip"
    1313            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')">
  • WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py

    r903 r911  
    1 ## Script (Python) "co_searchStudents"
     1## Script (Python) "searchStudents"
    22##bind container=container
    33##bind context=context
     
    4949pr = context.portal_registration
    5050path_info = request.get('PATH_INFO').split('/')
    51 is_manager = context.isSectionManager()
    5251validate = request.has_key("cpsdocument_edit_button")
    5352default = {'search_mode': 'name',
  • WAeUP_SRP/trunk/skins/waeup_student/student_view.pt

    r895 r911  
    11<metal:html tal:define="info context/getStudentInfo;
    2                 is_manager info/is_manager|nothing;
     2                is_so info/is_so|nothing;
     3                is_staff context/isStaff;
    34                is_student info/is_student|nothing">
    45  <metal:body use-macro="here/main_template/macros/master">
     
    1112                        rows python: info['items']">
    1213
    13       <a href="" tal:condition="is_manager"
     14      <a href="" tal:condition="is_staff"
    1415         tal:attributes="href string:${here/academicsParent}">
    1516        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
     
    2021        <br />
    2122
    22         <table tal:condition="is_manager" class="contentListing" width="100%" summary="content layout" id="folder_content">     
     23        <table tal:condition="is_staff" class="contentListing" width="100%" summary="content layout" id="folder_content">     
    2324          <tr tal:repeat="row rows"
    2425            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
  • WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt

    r805 r911  
    11<metal:html tal:define="info context/getStudyCourseInfo;
    2             is_manager info/is_manager|nothing;
     2            is_so info/is_so|nothing;
    33            s_info context/getStudentInfo;"
    44            >
     
    1111      </a>
    1212      <h3>
    13          <span tal:condition="python:is_manager and s_info">
     13         <span tal:condition="python:is_so and s_info">
    1414           <span tal:content="s_info/student/Title" />:
    1515         </span>
     
    3030            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    3131            <td align="left" valign="middle" style="width: 5px;"
    32                 tal:condition="python: 0 and is_manager">
     32                tal:condition="python: 0 and is_so">
    3333              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    34                      tal:condition="is_manager"
     34                     tal:condition="is_so"
    3535                     tal:define="id row/id"
    3636                     tal:attributes="value id;
     
    4949            <td align="left" valign="top" rowspan="3"></td>
    5050            <td align="left" valign="top">
    51               <span tal:condition="python:0 and is_manager">
     51              <span tal:condition="python:0 and is_so">
    5252                <input type="button" value="button_select_all" class="context"
    5353                       onclick="someJavaScriptFunctionThatWillBeReplaced"
  • WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt

    r805 r911  
    11<metal:html tal:define="info context/getStudyLevelInfo;
    2             is_manager info/is_manager|nothing;
     2            is_so info/is_so|nothing;
    33            s_info context/getStudentInfo;"
    44            >
     
    1111      </a>
    1212      <h3>
    13          <span tal:condition="python:is_manager and s_info">
     13         <span tal:condition="python:is_so and s_info">
    1414           <span tal:content="s_info/student/Title" />:
    1515         </span>
     
    3434                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    3535              <td align="left" valign="middle" style="width: 5px;"
    36                   tal:condition="python:1 and is_manager">
     36                  tal:condition="python:1 and is_so">
    3737                <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    38                        tal:condition="is_manager"
     38                       tal:condition="is_so"
    3939                       tal:define="id row/id"
    4040                       tal:attributes="value id;
     
    4848                <td tal:content="row/semester"></td>
    4949                <td tal:content="row/credits"></td>
    50                 <td tal:condition="is_manager" tal:content="row/score"></td>
     50                <td tal:condition="is_so" tal:content="row/score"></td>
    5151                <td tal:content="row/grade"></td>
    5252                <td tal:content="row/weight"></td>
     
    7070            <td align="left" valign="top" rowspan="3"></td>
    7171            <td align="left" valign="top">
    72               <span tal:condition="python:1 and is_manager">
     72              <span tal:condition="python:1 and is_so">
    7373                <input type="button" value="button_select_all" class="context"
    7474                       onclick="someJavaScriptFunctionThatWillBeReplaced"
  • WAeUP_SRP/trunk/skins/waeup_student/support_form.pt

    r890 r911  
    11<metal:html tal:define="info context/getStudentInfo;
    2                 is_manager info/is_manager|nothing;
    3                 is_student info/is_student|nothing">
     2                ">
    43  <metal:body use-macro="here/main_template/macros/master">
    54    <metal:main fill-slot="main">
Note: See TracChangeset for help on using the changeset viewer.