source: WAeUP_SRP/trunk/skins/waeup_academics/courses_view.pt @ 1779

Last change on this file since 1779 was 1366, checked in by joachim, 18 years ago

M profiles/default/schemas/certificate_course.xml
make level searchable
M profiles/default/layouts/course.xml
add code to course layout to allow creation
M skins/waeup_default/waeup_edit.py
M skins/waeup_default/waeup_document_create_do.py
M skins/waeup_custom/folder_delete.py
fix that courses_catalog also get updated
M skins/waeup_academics/courses_view.pt
M skins/waeup_academics/getCoursesInfo.py
use courses catalog.

  • Property svn:keywords set to Id
File size: 7.7 KB
Line 
1<metal:html>
2  <metal:body use-macro="here/waeup_content_master/macros/master">
3    <metal:block fill-slot="header"
4                 tal:define="global info context/getCoursesInfo;
5                 global is_so context/isSectionOfficer;"
6                 >
7      <a href=""
8         tal:attributes="href string:${here/academicsParent}">
9        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
10        Up one level
11      </a>
12      <h3 tal:content="here/title_or_id">
13        Page Title
14      </h3>
15      <div tal:condition="python:0" tal:content="info/container_path"/>
16      <div tal:condition="python:0" tal:content="info/dep_id"/>
17    </metal:block>
18    <metal:main fill-slot="main" tal:condition="python: 1">
19      <span tal:content="structure python: info['doc'].render(layout_mode='view')"
20            tal:omit-tag=""/>
21        <span tal:define="items python: info['courses'];
22        columns python:3;
23        items_per_page python:50;
24        zoom python:0;
25        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
26        batches python:batches_all[0];
27        batch_info python:batches_all[1];
28        zoomed python:batches_all[2];
29        mq nocall:modules/ZTUtils/make_query;"
30        tal:omit-tag=""
31        >
32          <form action="" method="post" class="group"
33                tal:attributes="action info/action"
34                >
35            <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
36              <div class="batchLayout">
37                <span i18n:translate="">
38                  Objects:
39                  <strong>
40                    <tal:block replace="batch_info/start"
41                               i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
42                                                                       i18n:name="batch_limit" />
43                  </strong>
44                  of <tal:block replace="batch_info/length"
45                                i18n:name="batch_length" />
46                </span>
47              </div>
48              <br />
49            </tal:block>
50            <span tal:condition="python: 0" tal:content="structure rows" />
51            <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
52            <span tal:repeat="rows batches" tal:omit-tag="">
53              <tr tal:repeat="row rows"
54                  tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
55                <td align="left" valign="middle" style="width: 5px;"
56                    tal:condition="is_so">
57                  <input type="checkbox" name="ids:list" value="" id="" class="noborder"
58                         tal:condition="is_so"
59                         tal:define="id row/id"
60                         tal:attributes="value id;
61                         id python:'cb_' + id;
62                         checked python:id in info['choosen_ids'];"
63                         />
64                </td>
65                <td><a href="view" tal:attributes="href string:${row/url}">
66                    <strong tal:content="row/title" /></a> </td>
67                <td tal:content="row/id"> </td>
68                <td tal:content="row/semester"> </td>
69                <td tal:condition="row/is_editable" tal:content="row/review_state"> </td>
70                <td>
71                <a tal:condition="row/is_editable"
72                    href="edit" tal:attributes="href string:${row/url}/external_edit_form"
73                    target="edit"
74                    onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
75                    [edit]
76                    </a>
77                </td>               
78              </tr>
79            </span>
80            </table>
81            <table width="100%" cellspacing="0" cellpadding="2"
82                   summary="contents of the folder"
83                   class="folderButtons">
84              <tr>
85                <td align="left" valign="top" rowspan="3"></td>
86                <td align="left" valign="top">
87                  <span tal:condition="is_so">
88                    <input type="button" value="button_select_all" class="context"
89                           onclick="someJavaScriptFunctionThatWillBeReplaced"
90                           i18n:attributes="value"
91                           tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
92                           % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
93                           />
94                    <input type="submit" name="approve_checked:method"
95                           class="context" value="Approve" />
96                    <input type="submit" name="retract_checked:method"
97                           class="context" value="Retract" />
98                    <input type="submit" name="folder_delete:method" value="button_delete"
99                           class="destructive" i18n:attributes="value"
100                           tal:attributes="onclick python:'return window.confirm(\'%s\')' %
101                           (cpsmcat('description_confirm_delete'), )"
102                           />
103                    <input tal:condition="python: context.portal_type not in ('Semester','Certificate')"
104                           type="submit" name="id_rename_form:method"
105                           class="context" value="Change Object ID" i18n:attributes="value"
106                           />
107                  </span>
108                </td>
109              </tr>
110            </table>
111          <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
112            <div class="pageNavigationLayout">
113              <a tal:define="previous batch_info/previous"
114                 tal:condition="python:previous is not None"
115                 tal:attributes="href python:'%s?%s'%(request['URL'],
116                 mq(request.form, b_start=0))"
117                 >
118              (&lt;&lt;)</a>
119              <a tal:define="previous batch_info/previous"
120                 tal:condition="python:previous is not None"
121                 tal:attributes="href python:'%s?%s'%(request['URL'],
122                 mq(request.form, b_start=previous))"
123                 i18n:translate="batch_previous">Previous</a>
124              <tal:block repeat="page batch_info/pages">
125                <tal:block condition="python:page != batch_info['start'] - 1">
126                  <a tal:attributes="href python:'%s?%s'%(request['URL'],
127                  mq(request.form, b_start=page))"
128                  tal:content="repeat/page/number">1</a>&nbsp;
129                </tal:block>
130                <tal:block condition="python:page == batch_info['start'] - 1">
131                  <span tal:content="string:${repeat/page/number}" />&nbsp;
132                </tal:block>
133              </tal:block>
134              <a tal:define="next batch_info/next"
135                 tal:condition="python:next is not None"
136                 tal:attributes="href python:'%s?%s'%(request['URL'],
137                 mq(request.form, b_start=next))"
138                 i18n:translate="batch_next">Next</a>
139              <a tal:define="next batch_info/next;
140                             last_page python:batch_info['pages'][-1]"
141                             tal:condition="python:next is not None"
142                             tal:attributes="href python:'%s?%s'%(request['URL'],
143                             mq(request.form, b_start=last_page))"
144                             >
145              (&gt;&gt;)</a>
146            </div>
147          </tal:block>
148         
149        </form>
150        </span>
151      </metal:main>
152     
153    <metal:sub fill-slot="sub"/>
154  </metal:body>
155</metal:html>
Note: See TracBrowser for help on using the repository browser.