Ignore:
Timestamp:
3 May 2011, 08:29:34 (14 years ago)
Author:
Henrik Bettermann
Message:

Implement jQuery datatables on CertificatePage?. Remove redundant getCourseList view method. jQuery datatables makes sorting much easier.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatemanagepage.pt

    r6023 r6024  
    7777    <thead>
    7878      <tr>
    79         <th>&nbsp;</th><th>Level</th><th>Code</th><th>Course</th>
     79        <th>&nbsp;</th><th>Level</th><th>Semester</th><th>Referrer</th><th>Course</th><th>Title</th>
    8080        <th>Mandatory</th>
    8181      </tr>
     
    9393          </span>
    9494        </td>
     95        <td tal:content="cc/course/semester">SEMESTER</td>
    9596        <td>
    9697          <a tal:attributes="href python: view.url(cc)"
    9798             tal:content="cc/__name__">
    98                 CODE
     99                REFERRER CODE
    99100          </a>
    100101        </td>
     102        <td>
     103          <a tal:attributes="href python:view.url(cc.course)"
     104             tal:content="cc/course/code">
     105                COURSE CODE
     106          </a>
     107        </td>       
    101108        <td>
    102109          <span tal:content="cc/course/title">
    103110           COURSE TITLE
    104111          </span>
    105           (<span tal:content="cc/course/code">
    106            COURSE CODE
    107           </span>)         
    108112        </td>
    109113        <td>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt

    r6008 r6024  
    3333
    3434<h3><span tal:content="context/__name__">Code</span> Course Referrers</h3>
    35 
    36 <table class="zebra">
    37   <thead>
    38     <tr>
    39       <th>Course Referrer</th>
    40       <th>Course</th>
    41       <th>Title</th>
    42       <th>Level</th>
    43       <th>Semester</th>
    44       <th>Mandatory</th>
    45     </tr>     
    46   </thead>   
    47   <tbody>
    48   <span tal:omit-tag=""
    49         tal:repeat="level python: sorted(view.getCourseList().items())">
    50   <span tal:omit-tag=""
    51         tal:repeat="semester python: sorted(level[1].items())">
    52   <tr tal:repeat="courseref python:semester[1]">
    53     <td> <a href="" tal:attributes="href courseref/url"
    54             tal:content="courseref/code">courseref code</a></td>
    55     <td> <a href="" tal:attributes="href courseref/course_url"
    56             tal:content="courseref/course/code">course code</a></td>
    57     <td tal:content="courseref/title">title</td>
    58     <td tal:content="python:level[0]">level</td>
    59     <td tal:content="python:semester[0]">semester</td>
    60     <td tal:content="courseref/mandatory">mandatory</td>
     35<br />
     36<table class="display dataTable">
     37<thead>
     38  <tr>
     39    <th>Level</th><th>Semester</th><th>Referrer</th><th>Course</th>
     40    <th>Title</th><th>Mandatory</th>
    6141  </tr>
    62   </span>
    63   </span>
    64   </tbody>
     42</thead>
     43<tbody>
     44  <tr tal:repeat="cc context/values">
     45     <td>
     46      <span tal:content="cc/level">
     47           LEVEL
     48      </span>
     49    </td>
     50    <td tal:content="cc/course/semester">SEMESTER</td>
     51    <td>
     52      <a tal:attributes="href python: view.url(cc)"
     53             tal:content="cc/__name__">
     54        REFERRER CODE
     55      </a>
     56    </td>
     57    <td>
     58      <a tal:attributes="href python:view.url(cc.course)"
     59             tal:content="cc/course/code">
     60        COURSE CODE
     61      </a>     
     62    <td>
     63      <span tal:content="cc/course/title">
     64           COURSE TITLE
     65      </span>
     66    </td>
     67    <td>
     68      <span tal:content="cc/core_or_elective">
     69           MANDATORY
     70      </span>
     71    </td>               
     72  </tr>
     73</tbody>
    6574</table>
    6675
Note: See TracChangeset for help on using the changeset viewer.