Changeset 599
- Timestamp:
- 10/23/06 13:30:32
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
SimpleBlog/branches/plone-2.5/skins/SimpleBlog/portlet_simpleblog.pt
r598 r599 2 2 xmlns:metal="http://xml.zope.org/namespaces/metal" 3 3 i18n:domain="SimpleBlog"> 4 4 5 5 <body> 6 6 … … 10 10 inBlog python:startpoint.portal_type=='Blog'; 11 11 solo python:0"> 12 13 12 <dt class="portletHeader" 14 13 tal:condition="inBlog"> … … 21 20 Blog 22 21 </dt> 23 24 22 <tal:calendar metal:use-macro="here/simpleblog_portlet_macros/macros/portletCalendar"/> 25 23 <tal:recent metal:use-macro="here/simpleblog_portlet_macros/macros/portletRecent"/> 26 24 <tal:categories metal:use-macro="here/simpleblog_portlet_macros/macros/portletCategories"/> 27 25 </dl> 28 29 26 </div> 30 27 … … 34 31 inBlog python:startpoint.portal_type=='Blog'; 35 32 solo python:1"> 36 37 33 <dt class="portletHeader" 38 34 tal:condition="inBlog"> … … 47 43 <tal:recent metal:use-macro="here/simpleblog_portlet_macros/macros/portletRecent"/> 48 44 </dl> 49 50 45 </div> 51 52 46 <!-- portlet for in-context comments --> 53 47 <div metal:define-macro="portlet-comments" … … 62 56 , meta_type='Discussion Item' 63 57 , sort_on='created' 64 , sort_order='reverse')[:5];" 58 , sort_order='reverse' 59 , sort_limit=5);" 65 60 tal:condition="results"> 66 61 <h5 i18n:translate="recent_comments">Recent Comments</h5> … … 113 108 <div metal:use-macro="here/portlet_simpleblog/macros/portlet"/> 114 109 </div> 115 110 116 111 <div metal:define-macro="portletBlogRecent_global" tal:omit-tag=""> 117 112 <div metal:use-macro="here/portlet_simpleblog/macros/portlet-recent"/> SimpleBlog/branches/plone-2.5/skins/SimpleBlog/simpleblog_portlet_macros.pt
r598 r599 3 3 <div metal:define-macro="portletCategories" 4 4 tal:define="cats python:here.simpleblog_tool.getAvailableCategories(here, startpoint)" tal:omit-tag=""> 5 6 5 <tal:toggle tal:define="global toggle python:toggle or 0"/> 7 8 6 <tal:cats tal:repeat="cat python:here.simpleblog_tool.getSortedKeys(cats)"> 9 7 <dd class="" tal:define="oddrow repeat/cat/odd" … … 12 10 <strong i18n:translate="blog_categories">Categories:</strong> 13 11 </dd> 14 <dd class="" 12 <dd class="" 13 tal:condition="python:cats[cat]>0" 15 14 tal:define="oddrow repeat/cat/odd; 16 15 pss modules/Products.PythonScripts.standard; 17 16 quotedCat python:pss.url_quote(cat)" 18 17 tal:attributes="class python:test(toggle, 'portletItem even','portletItem odd')"> 19 20 <a tal:condition="python:cats[cat]>0" href="#" 21 tal:attributes="href string:${here/absolute_url}/SimpleBlogCatSearch?category=${quotedCat}; 22 title cat" 23 title="category"><span tal:content="cat"/></a> 24 <span tal:condition="python:cats[cat]==0" tal:content="cat"/> 18 <a href="#" 19 tal:attributes="href string:${startpoint/absolute_url}/SimpleBlogCatSearch?category=${quotedCat}; 20 title cat" title="category"><span tal:content="cat"/></a> 25 21 (<span tal:content="python:cats[cat]"/>) 26 </dd> 27 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 28 </tal:cats> 22 </dd><tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/></tal:cats> 29 23 </div> 30 24 31 25 <!-- macro used by the portlets to compile a list of recent additions --> 32 <div metal:define-macro="portletRecent" 33 tal:define="recent python:here.simpleblog_tool.collectEntries(startpoint);" 34 tal:omit-tag=""> 35 36 <tal:toggle tal:define="global toggle python:1"/> 26 <div metal:define-macro="portletRecent"> 27 <tal:x tal:condition="maxItems|nothing"><tal:x tal:define="global maxResults maxItems"/> 28 </tal:x><tal:x tal:condition="not: maxItems|nothing"><tal:x tal:define="global maxResults python:0"/> 29 </tal:x><tal:block tal:define="maxResults python:test(maxResults==0,here.simpleblog_tool.getMaxItemsInPortlet(),maxResults); 30 recent python:startpoint.getEntries(maxResults=maxResults,skipOnTop=1, join=1); 31 global showIcons startpoint/getShowIcons;" 32 tal:omit-tag=""><tal:toggle tal:define="global toggle python:1"/> 37 33 <tal:entries tal:repeat="entry recent"> 34 <tal:start tal:condition="python:inBlog and not solo"> 38 35 <dd class="" tal:define="oddrow repeat/entry/odd" 39 36 tal:condition="repeat/entry/start" 40 37 tal:attributes="class python:test(toggle, 'portletItem odd','portletItem even')"> 41 38 <tal:frontpage> 42 <a tal:condition="python:inBlog" href="#" tal:attributes="href startpoint/absolute_url;title startpoint/title_or_id" title=""><strong><span tal:replace="startpoint/title_or_id"/>:</strong></a> 43 <strong tal:condition="python:not inBlog" i18n:translate="recent_additions">Recent additions:</strong> 39 <strong i18n:translate="recent_additions">Recent entries:</strong> 44 40 </tal:frontpage> 45 </dd> 46 47 <dd class="" 41 </dd></tal:start> 42 <dd class="" 48 43 tal:define="oddrow repeat/entry/odd; 49 item_type entry/portal_type;50 item_type_class python:'contenttype-' + normalizeString(item_type);"44 item_type entry/portal_type; 45 item_type_class python:'contenttype-' + normalizeString(item_type);" 51 46 tal:attributes="class python:test(toggle, 'portletItem even','portletItem odd')"> 52 47 <a href="#" 53 48 tal:attributes="href entry/absolute_url;" 54 49 title="entry"> 55 <span tal:attributes="class string:simpleBlogPortletIcons ${item_type_class}" tal:content="entry/title_or_id"/> 56 </a> 57 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 58 50 <span tal:attributes="class python:showIcons and 'simpleBlogPortletIcons '+item_type_class or ''" tal:content="entry/title_or_id"/> 51 </a><tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 59 52 </dd> 60 <dd class="" 53 <dd class="" 61 54 tal:define="oddrow repeat/entry/odd; 62 55 solo solo|python:0; … … 64 57 tal:condition="repeat/entry/end" 65 58 tal:attributes="class python:test(toggle, className + ' even', className + ' odd')"> 66 <a href="#" tal:attributes="href string:${ here/absolute_url}/SimpleBlogFullSearch"59 <a href="#" tal:attributes="href string:${startpoint/absolute_url}/SimpleBlogFullSearch" 67 60 title="more..." 68 61 i18n:attributes="title box_morelink" 69 62 i18n:translate="box_morelink" 70 63 i18n:domain="plone">More...</a> 71 </dd> 72 </tal:entries> 73 64 </dd></tal:entries> 74 65 <tal:no-items tal:condition="not: recent"> 75 66 <dd class="portletItem even"> … … 79 70 <span i18n:translate="no_published_blog_entries">No blog entries are published.</span> 80 71 <tal:toggle tal:define="global toggle python:0"/> 81 </dd> 82 </tal:no-items> 72 </dd></tal:no-items></tal:block> 83 73 </div> 84 74 … … 163 153 tal:omit-tag="" 164 154 ><a href="" 165 tal:attributes="href python: here.absolute_url()+'/SimpleBlogDaySearch?startdate:date=%s'%(end);155 tal:attributes="href python:startpoint.absolute_url()+'/SimpleBlogDaySearch?startdate:date=%s'%(end); 166 156 title python:'\n'.join([toLocalizedTime(cur_date)]+[getEventString(e) for e in day['eventslist']]);" 167 157 tal:content="python:int_daynumber or default">
