source: WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_display_contents.pt @ 17946

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

svn -R propset svn:keywords "Id" .
added layout_application_/edit/create/view
and cleaned that up.

  • Property svn:keywords set to Id
File size: 4.9 KB
Line 
1<!-- a content_lib macro -->
2<!-- $Id: academics_content_lib_display_contents.pt 486 2006-09-06 10:09:39Z joachim $ -->
3
4<!-- List contents in 'items' in the specified number of columns
5  with the given format -->
6
7<metal:block define-macro="display_contents">
8<tal:block
9  define="tmp_format format|nothing;
10          tmp_sort_by sort_by|nothing;
11          tmp_direction direction|nothing;
12          tmp_columns columns|nothing;
13          tmp_items_per_page items_per_page|nothing;
14          tmp_nav_action nav_action|nothing;
15          tmp_filter filter|nothing;
16          tmp_detail_tab_columns detail_tab_columns|nothing;
17          params python:here.getDisplayParams(format=tmp_format,
18                          sort_by=tmp_sort_by,
19                          direction=tmp_direction,
20                          columns=tmp_columns,
21                          items_per_page=tmp_items_per_page,
22                          nav_action=tmp_nav_action,
23                          nb_items=len(items),
24                          filter=tmp_filter,
25                          detail_tab_columns=tmp_detail_tab_columns);
26          format params/format;
27          sort_by params/sort_by;
28          direction params/direction;
29          columns params/columns;
30          items_per_page params/items_per_page;
31          nav_action params/nav_action;
32          filter params/filter;
33          detail_tab_columns params/detail_tab_columns;
34          mq nocall:modules/ZTUtils/make_query;
35          form request/form;
36          zoom zoom|python:0;
37          batches_all python:here.getBatchList(items, columns, items_per_page,
38                                               zoom);
39          batches python:batches_all[0];
40          batch_info python:batches_all[1];
41          zoomed python:batches_all[2];
42     ">
43 <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
44    <div class="batchLayout">
45        <span i18n:translate="">
46          Objects:
47          <strong>
48            <tal:block replace="batch_info/start"
49            i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
50            i18n:name="batch_limit" />
51          </strong>
52          of <tal:block replace="batch_info/length"
53            i18n:name="batch_length" />
54         </span>
55    </div>
56  <br />
57 </tal:block>
58  <table width="100%" cellspacing="0" cellpadding="0"
59    summary="zoomed layout"
60    tal:condition="zoomed">
61    <tr tal:repeat="item zoomed">
62      <td align="left" valign="top">
63       <tal:block define="no_form not:nothing;
64         info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);">
65         <metal:block use-macro="here/content_lib_info_summary/macros/info_summary" />
66         <br /><br />
67       </tal:block>
68      </td>
69    </tr>
70  </table>
71  <table width="100%" cellspacing="0" cellpadding="0"
72    summary="content layout column"
73    tal:condition="batches">
74    <tr>
75      <td align="left" valign="top"
76          tal:repeat="batch_items batches">
77        <tal:block condition="batch_items">
78          <metal:block
79            use-macro="here/academics_content_lib_display_contents_column/macros/display_contents_column" />
80        </tal:block>
81      </td>
82    </tr>
83  </table>
84  <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
85      <div class="pageNavigationLayout">
86          <a tal:define="previous batch_info/previous"
87             tal:condition="python:previous is not None"
88             tal:attributes="href python:'%s?%s'%(request['URL'],
89                                            mq(request.form, b_start=0))">
90              (&lt;&lt;)</a>
91          <a tal:define="previous batch_info/previous"
92             tal:condition="python:previous is not None"
93             tal:attributes="href python:'%s?%s'%(request['URL'],
94                                            mq(request.form, b_start=previous))"
95             i18n:translate="batch_previous">Previous</a>
96          <tal:block repeat="page batch_info/pages">
97            <tal:block condition="python:page != batch_info['start'] - 1">
98              <a tal:attributes="href python:'%s?%s'%(request['URL'],
99                mq(request.form, b_start=page))"
100                tal:content="repeat/page/number">1</a>&nbsp;
101            </tal:block>
102            <tal:block condition="python:page == batch_info['start'] - 1">
103              <span tal:content="string:${repeat/page/number}" />&nbsp;
104            </tal:block>
105          </tal:block>
106          <a tal:define="next batch_info/next"
107             tal:condition="python:next is not None"
108             tal:attributes="href python:'%s?%s'%(request['URL'],
109                                                mq(request.form, b_start=next))"
110             i18n:translate="batch_next">Next</a>
111          <a tal:define="next batch_info/next;
112             last_page python:batch_info['pages'][-1]"
113             tal:condition="python:next is not None"
114             tal:attributes="href python:'%s?%s'%(request['URL'],
115                                            mq(request.form, b_start=last_page))">
116              (&gt;&gt;)</a>
117      </div>
118  </tal:block>
119</tal:block>
120</metal:block>
Note: See TracBrowser for help on using the repository browser.