source: WAeUP_SRP/base/skins/waeup_academics/courses_view.pt @ 3702

Last change on this file since 3702 was 3474, checked in by joachim, 16 years ago

introduce breadcrumbs for the academic-section, use them instead of up one
level.

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