Changeset 329


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

=level_view

Location:
WAeUP_SRP/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Academics.py

    r324 r329  
    380380                certificate.invokeFactory('StudyLevel', level)
    381381                l = getattr(certificate, level)
     382                l.getContent().edit(mapping={'Title': "Level %s" % level})
    382383                l.invokeFactory('Semester','first')
    383384                l.invokeFactory('Semester','second')
  • WAeUP_SRP/trunk/profiles/default/layouts/certificate.xml

    r256 r329  
    33 <property name="layout_create_method"></property>
    44 <property name="layout_edit_method"></property>
    5  <property name="layout_view_method"></property>
     5 <property name="layout_view_method">layout_waeup_fancy_view</property>
    66 <property name="style_prefix">layout_default_</property>
    77 <property name="flexible_widgets"/>
  • WAeUP_SRP/trunk/profiles/default/types/Certificate.xml

    r319 r329  
    2424 </property>
    2525 <property name="layouts">
    26   <element value="common"/>
    2726  <element value="certificate"/>
    2827 </property>
     
    3332 <property name="storage_methods"/>
    3433 <property name="cps_is_portlet">False</property>
    35  <alias from="(Default)" to="certificate_view"/>
    36  <alias from="view" to="certificate_view"/>
     34 <alias from="(Default)" to="academics_contents"/>
     35 <alias from="view" to="academics_contents"/>
    3736 <action title="View" action_id="view" category="object" condition_expr=""
    38     url_expr="string:${object_url}/certificate_view" visible="True">
     37    url_expr="string:${object_url}/academics_contents" visible="True">
    3938  <permission value="View"/>
    4039 </action>
     
    5453  <permission value="Modify portal content"/>
    5554 </action>
     55 <action title="Add Level" action_id="new_entry" category="object"
     56    condition_expr=""
     57    url_expr="string:${object/absolute_url}/content_create?type_name=StudyLevel"
     58    visible="True"/>
    5659</object>
  • 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.