On va faire autrement pour le PUT, car passer par NullRessource ne résoudra pas le...
[Plinn.git] / skins / generic / recent_news.pt
1 <html xmlns:tal="http://xml.zope.org/namespaces/tal"
2 xmlns:metal="http://xml.zope.org/namespaces/metal"
3 metal:use-macro="here/main_template/macros/master">
4 <head>
5 <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
6 </head>
7 <body>
8 <div metal:fill-slot="header" tal:replace="nothing"/>
9 <div tal:omit-tag="" metal:fill-slot="main"
10 id="mainCell"
11 i18n:domain="plinn"
12 tal:define="b_start string:0;
13 b_start request/b_start | b_start;
14 brains python: here.portal_catalog(portal_type='News Item', sort_on='Date', sort_order='reverse', review_state='published');
15 newsitems python:[b.getObject() for b in brains];
16 Batch python:modules['Products.Plinn'].Batch;
17 batch python:Batch(newsitems, 10, int(b_start), orphan=1);
18 ListPortalMembers modules/Products/CMFCore/permissions/ListPortalMembers;
19 checkPerm nocall:mtool/checkPermission">
20
21 <h1 i18n:translate="">News</h1>
22 <div tal:repeat="newsitem batch" tal:condition="newsitems" tal:omit-tag="">
23
24 <div class="newsItem">
25 <h2 class="newsTitle">
26 <img src="newsitem_icon.gif" alt="newsitem/Title" />
27 <a tal:attributes="href newsitem/absolute_url"
28 tal:content="newsitem/Title">Title</a>
29 </h2>
30
31 <p class="newsDescription"
32 tal:content="structure newsitem/Description">Description</p>
33
34 <ul class="newsAbout">
35 <li tal:condition="python:checkPerm(ListPortalMembers, portal_object)">
36 <span tal:omit-tag="" i18n:translate="">by:</span>
37 <span class="news-creator"
38 tal:define="creator python:mtool.getMemberById(newsitem.Creator())"
39 tal:content="python:creator.getMemberFullName(nameBefore=0)">
40 </span>,
41 </li>
42 <li>
43 <span i18n:translate="at_(date)">at</span>
44 <span tal:replace="python: DateTime(newsitem.Date()).strftime(locale_date_fmt)">date</span>
45 </li>
46 </ul>
47 <ul class="newsFooter">
48 <li>
49 <a tal:attributes="href newsitem/absolute_url"
50 i18n:translate="read_more">Read More</a>
51 </li>
52 </ul>
53 </div>
54 </div>
55
56 <div tal:condition="python:not(newsitems)">
57 <p class="Desktop" i18n:translate="">No news is good news!</p>
58 </div>
59 <!-- Navigation -->
60 <div metal:use-macro="here/batch_macros/macros/navigation" />
61
62 </div>
63
64 </body>
65 </html>
66