Changeset 199 in products for SimpleBlog/branches/plone-2.1/skins/SimpleBlog/portlet_simpleblog.pt
- Timestamp:
- Jan 23, 2006 9:24:09 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SimpleBlog/branches/plone-2.1/skins/SimpleBlog/portlet_simpleblog.pt
- Property svn:eol-style deleted
r191 r199 2 2 xmlns:metal="http://xml.zope.org/namespaces/metal" 3 3 i18n:domain="SimpleBlog"> 4 4 5 5 <body> 6 6 7 <div metal:define-macro="portlet" tal:omit-tag=""> 8 <dl class="portlet" id="portlet-events" 9 tal:define="startpoint python:here.simpleblog_tool.getStartpointForSearch(here); 10 inBlog python:startpoint.portal_type=='Blog'; 11 solo python:0"> 12 <dt class="portletHeader" 13 tal:condition="inBlog"> 14 <a tal:attributes="href startpoint/absolute_url; 15 title startpoint/title_or_id" 16 tal:content="startpoint/title_or_id"/> 17 </dt> 18 <dt class="portletHeader" 19 tal:condition="not: inBlog"> 20 Blog 21 </dt> 22 <tal:calendar metal:use-macro="here/simpleblog_portlet_macros/macros/portletCalendar"/> 23 <tal:recent metal:use-macro="here/simpleblog_portlet_macros/macros/portletRecent"/> 24 <tal:categories metal:use-macro="here/simpleblog_portlet_macros/macros/portletCategories"/> 25 </dl> 26 </div> 27 28 <div metal:define-macro="portlet_no_calendar" tal:omit-tag=""> 29 <dl class="portlet" id="portlet-events" 30 tal:define="startpoint python:here.simpleblog_tool.getStartpointForSearch(here); 31 inBlog python:startpoint.portal_type=='Blog'; 32 solo python:0"> 33 <dt class="portletHeader" 34 tal:condition="inBlog"> 35 <a tal:attributes="href startpoint/absolute_url; 36 title startpoint/title_or_id" 37 tal:content="startpoint/title_or_id"/> 38 </dt> 39 <dt class="portletHeader" 40 tal:condition="not: inBlog"> 41 Blog 42 </dt> 43 <tal:recent metal:use-macro="here/simpleblog_portlet_macros/macros/portletRecent"/> 44 <tal:categories metal:use-macro="here/simpleblog_portlet_macros/macros/portletCategories"/> 45 </dl> 46 </div> 47 48 <div metal:define-macro="portlet-recent" tal:omit-tag=""> 49 <dl class="portlet" id="portlet-events" 50 tal:define="startpoint python:here.simpleblog_tool.getStartpointForSearch(here); 51 inBlog python:startpoint.portal_type=='Blog'; 52 solo python:1"> 53 <dt class="portletHeader" 54 tal:condition="inBlog"> 55 <a tal:attributes="href startpoint/absolute_url; 56 title startpoint/title_or_id" 57 tal:content="startpoint/title_or_id"/> 58 </dt> 59 <dt class="portletHeader" 60 tal:condition="not: inBlog"> 61 Blog 62 </dt> 63 <tal:recent metal:use-macro="here/simpleblog_portlet_macros/macros/portletRecent"/> 64 </dl> 65 </div> 66 <!-- portlet for in-context comments --> 67 <div metal:define-macro="portlet-comments" 68 tal:omit-tag="" 69 tal:define="startpoint python:here.simpleblog_tool.getStartpointForSearch(here); 70 inBlog python:startpoint.portal_type=='Blog'" 71 tal:condition="inBlog"> 72 <div class="portlet" 73 tal:define="fpPath python:'/'.join(startpoint.getPhysicalPath()); 74 results python:here.portal_catalog.searchResults( 75 path=fpPath 76 , meta_type='Discussion Item' 77 , sort_on='created' 78 , sort_order='reverse' 79 , sort_limit=5);" 80 tal:condition="results"> 81 <h5 i18n:translate="recent_comments">Recent Comments</h5> 82 <div class="portletBody"> 83 <tal:block tal:repeat="item results"> 84 <div class="portletContent odd" 85 tal:attributes="class python:test(repeat['item'].index % 2, 'portletContent even', 'portletContent odd')"> 86 87 <tal:block tal:define="result_url item/getURL; 88 url string:$result_url/view;"> 89 <a href="#" 90 tal:attributes="href url"> 91 <img src="#" height="16" width="16" alt="" 92 tal:on-error="structure python:path('here/linkOpaque.gif')" 93 tal:replace="structure python:path('here/%s' % item.getIcon)" /></a> <a 94 href="#" tal:attributes="href url; title item/Description" 95 tal:content="python:item.Title or item.getId" /> 96 <span class="discreet" 97 tal:define="modificationDate item/ModificationDate; 98 modificationDate python:here.toLocalizedTime(modificationDate)" 99 tal:content="string:(${item/Creator}) $modificationDate"> 100 creator 08/19/2001 03:01 AM </span> 101 </tal:block> 102 </div> 103 </tal:block> 104 <div class="portletContent odd"> 105 106 <a href="#" 107 class="portletMore" 108 i18n:translate="box_morelink" 109 i18n:domain="plone" 110 tal:attributes="href string:${startpoint/absolute_url}/search?path=${fpPath}&meta_type=Discussion+Item&sort_on=created&sort_order=reverse;"> 111 More...</a> 112 113 </div> 114 </div> 115 </div> 116 </div> 117 118 <!-- old portlets for compatibility reasons --> 7 <!-- local portlets, they will only show up inside a SimpleBlog --> 119 8 <div metal:define-macro="portletBlogFull_local" tal:omit-tag=""> 120 <div metal:use-macro="here/portlet_simpleblog/macros/portlet"/> 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> 121 24 </div> 122 25 123 26 <div metal:define-macro="portletBlogRecent_local" tal:omit-tag=""> 124 <div metal:use-macro="here/portlet_simpleblog/macros/portlet-recent"/> 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> 125 40 </div> 126 41 127 <div metal:define-macro="portletBlogFull_global" tal:omit-tag=""> 128 <div metal:use-macro="here/portlet_simpleblog/macros/portlet"/> 129 </div> 130 131 <div metal:define-macro="portletBlogRecent_global" tal:omit-tag=""> 132 <div metal:use-macro="here/portlet_simpleblog/macros/portlet-recent"/> 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> 133 86 </div> 134 87
Note: See TracChangeset
for help on using the changeset viewer.