source: WAeUP_SRP/trunk/skins/waeup_academics/courses_index_view.pt @ 556

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

new views for academic data,

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