1 | <html xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
2 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
3 | i18n:domain="SimpleBlog"> |
---|
4 | |
---|
5 | <body> |
---|
6 | |
---|
7 | <!-- local portlets, they will only show up inside a SimpleBlog --> |
---|
8 | <div metal:define-macro="portletBlogFull_local" tal:omit-tag=""> |
---|
9 | <tal:toggle tal:define="global toggle python:0"/> |
---|
10 | <dl class="portlet" id="portlet-simpleblog" |
---|
11 | tal:define="fp python:here.simpleblog_tool.getFrontPage(here)" |
---|
12 | tal:condition="python:fp!=None"> |
---|
13 | <dt class="portletHeader"> |
---|
14 | <a tal:attributes="href fp/absolute_url; |
---|
15 | title fp/title_or_id" |
---|
16 | tal:content="fp/title_or_id"/> |
---|
17 | </dt> |
---|
18 | <dd class="portletItem"> |
---|
19 | <div metal:use-macro="here/SimpleBlog_macros/macros/portletCalendar"/> |
---|
20 | <div metal:use-macro="here/SimpleBlog_macros/macros/portletRecent"/> |
---|
21 | <div metal:use-macro="here/SimpleBlog_macros/macros/portletCategories"/> |
---|
22 | </dd> |
---|
23 | </dl> |
---|
24 | </div> |
---|
25 | |
---|
26 | <div metal:define-macro="portletBlogRecent_local" tal:omit-tag=""> |
---|
27 | <tal:toggle tal:define="global toggle python:0"/> |
---|
28 | <dl class="portlet" id="portlet-simpleblog" |
---|
29 | tal:define="fp python:here.simpleblog_tool.getFrontPage(here)" |
---|
30 | tal:condition="python: here.meta_type in ['Blog', 'BlogEntry', 'BlogFolder']"> |
---|
31 | <dt class="portletHeader"> |
---|
32 | <a tal:attributes="href fp/absolute_url; |
---|
33 | title fp/title_or_id" |
---|
34 | tal:content="fp/title_or_id"/> |
---|
35 | </dt> |
---|
36 | <dd class="portletItem"> |
---|
37 | <div metal:use-macro="here/SimpleBlog_macros/macros/portletRecent"/> |
---|
38 | </dd> |
---|
39 | </dl> |
---|
40 | </div> |
---|
41 | |
---|
42 | <div metal:define-macro="portletRecentComments_local" |
---|
43 | tal:omit-tag="" |
---|
44 | tal:define="fp python:here.simpleblog_tool.getFrontPage(here);" |
---|
45 | tal:condition="python:fp!=None"> |
---|
46 | <tal:toggle tal:define="global toggle python:0"/> |
---|
47 | <dl class="portlet" id="portlet-simpleblog" |
---|
48 | tal:define="fpPath python:'/'.join(fp.getPhysicalPath()); |
---|
49 | results python:here.portal_catalog.searchResults(path=fpPath, meta_type='Discussion Item', sort_on='created', sort_order='reverse')[:5]; |
---|
50 | toLocalizedTime nocall:here/toLocalizedTime;" |
---|
51 | tal:condition="results"> |
---|
52 | <dt class="portletHeader"> |
---|
53 | <a tal:attributes="href fp/absolute_url; |
---|
54 | title fp/title_or_id" |
---|
55 | tal:content="fp/title_or_id"/> |
---|
56 | </dt> |
---|
57 | <tal:comments tal:repeat="item results"> |
---|
58 | <dd tal:define="oddrow repeat/item/odd" |
---|
59 | tal:attributes="class python:test(oddrow, 'portletItem even', 'portletItem odd')"> |
---|
60 | <tal:block tal:define="result_url item/getURL; |
---|
61 | url string:$result_url/view;"> |
---|
62 | <a href="#" |
---|
63 | tal:attributes="href url"> |
---|
64 | <img src="#" height="16" width="16" alt="" |
---|
65 | tal:on-error="structure python:path('here/linkOpaque.gif')" |
---|
66 | tal:replace="structure python:path('here/%s' % item.getIcon)" /></a> <a |
---|
67 | href="#" tal:attributes="href url; title item/Description" |
---|
68 | tal:content="python:item.Title or item.getId" /> |
---|
69 | <span class="discreet" |
---|
70 | tal:define="modificationDate item/ModificationDate; |
---|
71 | modificationDate python:toLocalizedTime(modificationDate)" |
---|
72 | tal:content="string:(${item/Creator}) $modificationDate"> |
---|
73 | creator 08/19/2001 03:01 AM </span> |
---|
74 | </tal:block> |
---|
75 | </dd> |
---|
76 | </tal:comments> |
---|
77 | </dl> |
---|
78 | <dd class="portletFooter"> |
---|
79 | <a href="#" |
---|
80 | class="portletMore" |
---|
81 | i18n:translate="box_morelink" |
---|
82 | i18n:domain="plone" |
---|
83 | tal:attributes="href string:${fp/absolute_url}/search?path=${fpPath}&meta_type=Discussion+Item&sort_on=created&sort_order=reverse;"> |
---|
84 | More...</a> |
---|
85 | </dd> |
---|
86 | </div> |
---|
87 | |
---|
88 | </body> |
---|
89 | </html> |
---|