Refactoring API de IndexIterator.
[Plinn.git] / skins / content / list_pending_contents.pt
1 <html metal:use-macro="here/main_template/macros/master">
2
3 <head>
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8">
5 <title>list_pending_contents</title>
6 </head>
7
8 <body metal:fill-slot="main_no_tabs" tal:omit-tag="" i18n:domain="plinn"
9 tal:define="b_start string:0;
10 checkPerm nocall: mtool/checkPermission;
11 b_start request/b_start | b_start;
12 items here/getPendingDocuments;
13 psf python:['title', 'actor', 'submitTime'] ;
14 rsorted_field request/form/sorted_field|nothing ;
15 sorted_field python: here.getOrSetSessionVar('sorted_field', rsorted_field, 'title');
16 sorted_field python: sorted_field in psf and sorted_field or here.getOrSetSessionVar('sorted_field', 'title');
17 rsorted_dir request/form/sorted_dir|nothing ;
18 sorted_dir python: here.getOrSetSessionVar('sorted_dir', rsorted_dir, 'up') ;
19 arrow python:test(sorted_dir=='up', 'arrowUp.gif', 'arrowDown.gif');
20 sortedItems python: here.sort_folder_contents(items, sorted_field, sorted_dir);
21 Batch python:modules['Products.Plinn'].Batch;
22 batch python:Batch(sortedItems, here.default_batch_size, request.get('b_start', 0), orphan=0)">
23 <h2 i18n:translate="">Pending documents</h2>
24 <div metal:use-macro="here/batch_macros/macros/navigation">batch navigation</div>
25 <table class="listing" cellspacing="0">
26 <tr>
27 <th><br/></th>
28 <th tal:define="col string:title;
29 dir python:test(sorted_field==col and sorted_dir=='up',
30 'down', 'up')" nowrap="nowrap">
31 <a tal:attributes="href string:$portal_url/list_pending_contents?sorted_field=$col&sorted_dir=$dir" i18n:translate="">Title</a>
32 <img tal:condition="python:sorted_field == col" tal:attributes="src arrow" />
33 </th>
34 <th tal:define="col string:actor;
35 dir python:test(sorted_field==col and sorted_dir=='up',
36 'down', 'up')" nowrap="nowrap">
37 <a href="." tal:attributes="href string:$portal_url/list_pending_contents?sorted_field=$col&sorted_dir=$dir" i18n:translate="">Submit by:</a>
38 <img tal:condition="python:sorted_field == col" tal:attributes="src arrow" />
39 </th>
40 <th tal:define="col string:submitTime;
41 dir python:test(sorted_field==col and sorted_dir=='up', 'down', 'up')" nowrap="nowrap">
42 <a tal:attributes="href string:$portal_url/list_pending_contents?sorted_field=$col&sorted_dir=$dir" i18n:translate="">Date</a>
43 <img tal:condition="python:sorted_field == col" tal:attributes="src arrow" />
44 </th>
45 </tr>
46
47 <div tal:repeat="item batch" tal:omit-tag="">
48 <tr valign="top" tal:define="icon python:here.restrictedTraverse(item.getIcon());
49 date python:wtool.getInfoFor(item, 'time').strftime(locale_date_fmt);
50 oddrow repeat/item/odd" tal:attributes="class python:test(oddrow, 'even', 'odd')">
51 <td>
52 <a tal:condition="icon" href="#" tal:attributes="href string:${item/getId}"><img alt="" border="0" tal:attributes="src icon/absolute_url; height icon/height; width icon/width; alt item/Type|nothing;" i18n:attributes="alt" /></a>
53 </td>
54 <td>
55 <div>
56 <a tal:attributes="href string:${item/absolute_url}" tal:content="item/title_or_id">ID</a>
57 </div>
58 <div tal:content="python:wtool.getInfoFor(item, 'comments')">comments</div>
59 </td>
60 <td tal:content="python:mtool.getMemberFullNameById(wtool.getInfoFor(item, 'actor'))"></td>
61 <td tal:content="date">
62 Date
63 </td>
64 </tr>
65 </div>
66 </table>
67 </body>
68
69 </html>