Changeset 329 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
17 Jul 2006, 22:35:13 (18 years ago)
Author:
joachim
Message:

=level_view

Location:
WAeUP_SRP/trunk/skins
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt

    r326 r329  
    44                        direction params/direction;
    55                        format string:detail_tab;
    6                        
    76                        displayed python:request.get('displayed', None);
     7                        display_buttons context/academics_contents_display_buttons;
    88                       ">
    99
     
    4848    <span tal:define="redirect python: response.redirect(url)"></span>
    4949  </div>
     50    <span tal:omit-tag="" tal:condition="not: display_buttons"
     51          tal:content="structure doc/render" />
    5052
    5153  <form action="" method="post" class="group"
     
    6365      tal:define="can_add python:checkPerm('Add portal content', here);
    6466                  can_del python:checkPerm('Delete objects', here);
    65                   display_buttons context/academics_contents_display_buttons;">
     67                  ">
    6668      <tr>
    6769        <td align="left" valign="top" rowspan="3"></td>
     
    7375                   tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
    7476                                   % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" />
    75           </span>
    7677          <span tal:condition="can_del">
    7778            <input type="submit" name="approve_checked:method"
     
    8384              tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    8485              (cpsmcat('description_confirm_delete'), )" />
     86          </span>
    8587          </span>
    8688        </td>
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_contents_display_buttons.py

    r326 r329  
    1313"""
    1414
    15 if context.portal_type in ('Department'):
     15if context.portal_type in ('Department','Certificate'):
    1616    return None
    1717return 1
  • WAeUP_SRP/trunk/skins/waeup_academics/level_created.py

    r326 r329  
    2121else:
    2222    dep = context.getContent()
     23dep.getContent().edit(mapping={'Title': "Level %s" % dep.getId()})
    2324dep.invokeFactory('Semester','first')
    2425o = getattr(dep,'first')
  • WAeUP_SRP/trunk/skins/waeup_academics/level_view_form.pt

    r282 r329  
    1717               items python:context.filterContents(items=context.contentValues());"
    1818               >
    19     <h1>Level  <span tal:content="context/title_or_id" /></h1>     
     19    <h3><span tal:content="context/title_or_id" /></h3> 
    2020 
    21     <p>The courses for this level:</p>
    2221    <tal:block condition="python: len(items)"> 
    2322      <table>
    2423        <span tal:repeat="item items">
    2524          <span tal:define="courses python:item.filterContents(items=item.contentValues())">
    26           <tr>
    27             <th> <span tal:content="item/id" tal:omit-tag="" /> Semester
    28             </th>
    29           </tr>
    30          <tr tal:repeat="course courses">
    31             <td> <a href="coures" tal:content="course/id" tal:attributes="href course/coursepath"></a>
    32             </td>
    33             <td tal:content="course/Title"></td>
    34             <td tal:content="course/core_or_elective"></td>
    35             <td tal:content="course/credits"></td>
    36             <td tal:content="course/passmark"></td>
    37           </tr>
     25            <tr>
     26              <th> <span tal:content="item/id" tal:omit-tag="" /> Semester
     27              </th>
     28            </tr>
     29            <tr>
     30              <th>Title
     31              </th>
     32              <th>
     33              </th>
     34              <th>Credits</th>
     35              <th>Pass</th>
     36            </tr>
     37            <span tal:repeat="course courses">
     38              <tr tal:define="info course/getContentInfo;
     39                  wf_status info/review_state;
     40                  wf_action python: test(wf_status == 'unchecked', 'approve', 'retract')">
     41                <td align="center"><span tal:content="string: ${course/getId} ${course/Title}" tal:omit-tag=""/></td>
     42                <td align="center" tal:content="python: test(path('course/core_or_elective'),'Core','elective')"></td>
     43                <td align="center" tal:content="course/credits"></td>
     44                <td align="center" tal:content="course/passmark"></td>
     45                <td align="center" tal:content="wf_status"></td>
     46                <td><a href="changestatus"
     47                       tal:attributes="href string: ${course/absolute_url}/content_status_modify?workflow_action=${wf_action}"
     48                       tal:content="string:[${wf_action}]"></a>
     49                </td>
     50                <td><a href="changestatus"
     51                       tal:attributes="href string: ${course/absolute_url}/cpsdocument_edit_form">[edit]</a>
     52                </td>
     53                <td><a href="coures" tal:content="string:goto Course"
     54                       tal:attributes="href course/coursepath"></a>
     55                </td>
     56              </tr>
     57            </span>
    3858            <tr> <td></td></tr>
     59          </span>
    3960        </span>
    40         </span>
    41       </table>
    42     </tal:block>
     61        </table>
     62      </tal:block>
    4363   
    4464    <tal:block condition="python: not len(items)">
Note: See TracChangeset for help on using the changeset viewer.