Changeset 199 in products
- Timestamp:
- Jan 23, 2006 9:24:09 PM (20 years ago)
- Location:
- SimpleBlog/branches/plone-2.1/skins/SimpleBlog
- Files:
-
- 2 edited
-
SimpleBlog_macros.pt (modified) (1 diff, 1 prop)
-
portlet_simpleblog.pt (modified) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
SimpleBlog/branches/plone-2.1/skins/SimpleBlog/SimpleBlog_macros.pt
- Property svn:eol-style deleted
r191 r199 4 4 <body> 5 5 6 <div metal:define-macro="blogGlobals" 7 tal:define="global blog python:here.simpleblog_tool.getFrontPage(here); 8 global isDeliciousEnaled blog/isDeliciousEnabled; 9 global isDiggEnabled blog/isDiggEnabled; 10 global isYahooEnabled blog/isYahooEnabled; 11 global isGoogleEnabled blog/isGoogleEnabled; 12 global isSpurlEnabled blog/isSpurlEnabled; 13 global isTagsEnabled blog/isTagsEnabled; 14 global isAllowTrackback blog/getAllowTrackback; 15 global showIcons blog/getShowIcons; 16 global showByline blog/getShowByline; 17 global isTopAdsenceEnabled blog/isTopAdsenceEnabled; 18 global isBottomAdsenceEnabled blog/isBottomAdsenceEnabled; 19 global bottomAdsence blog/getBottomAdsence; 20 global topAdsence blog/getTopAdsence;" 6 <div metal:define-macro="full" tal:define="showReadMore python:0" class="simpleBlogEntry"> 7 <div tal:define="size headerSize | python:1;title obj/title_or_id; 8 showIcons obj/simpleblog_tool/getShowIcons" 9 class="simpleBlogTitle"> 10 <tal:x replace='structure string:<h${size} class="noMargin">'/> 11 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;"> 12 <img alt="" tal:condition="showIcons" src="#" tal:attributes="src string:${obj/portal_url}/${obj/getIcon};alt obj/title" /> 13 <span tal:replace="title"/> 14 </a> 15 <tal:x replace="structure string:</h${size}>"/> 16 17 </div> 18 <div class="simpleBlogDescription documentDescription description" tal:content="structure python:obj.Description()"> 19 description 20 </div> 21 <div tal:replace="structure python:obj.getBody()" class="simpleBlogBody"/><br/><br/> 22 <tal:tags metal:use-macro="obj/SimpleBlog_macros/macros/technoratiTags"/> 23 <tal:byLine metal:use-macro="obj/SimpleBlog_macros/macros/ByLineFoot"/> 24 </div> 25 26 <div metal:define-macro="descriptionOnly" tal:define="showReadMore python:1" class="simpleBlogEntry"> 27 <div tal:define="size headerSize | python:1;title obj/title_or_id; 28 showIcons obj/simpleblog_tool/getShowIcons" 29 class="simpleBlogTitle"> 30 <tal:x replace='structure string:<h${size} class="noMargin">'/> 31 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;"> 32 <img alt="" tal:condition="showIcons" src="#" tal:attributes="src string:${obj/portal_url}/${obj/getIcon};alt obj/title" /> 33 <span tal:replace="title"/> 34 </a> 35 <tal:x replace="structure string:</h${size}>"/> 36 </div> 37 <div tal:content="structure python:obj.Description()" class="simpleBlogDescriptionOnly"> 38 description 39 </div> 40 <tal:tags metal:use-macro="obj/SimpleBlog_macros/macros/technoratiTags"/> 41 <tal:byLine metal:use-macro="obj/SimpleBlog_macros/macros/ByLineFoot"/> 42 43 </div> 44 45 <div metal:define-macro="titleOnly" tal:define="showReadMore python:1" class="simpleBlogTitle"> 46 <tal:block tal:define="size headerSize | python:1;title obj/title_or_id; 47 showIcons obj/simpleblog_tool/getShowIcons"> 48 <tal:x replace='structure string:<h${size} class="noMargin">'/> 49 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;"> 50 <img alt="" tal:condition="showIcons" src="#" tal:attributes="src string:${obj/portal_url}/${obj/getIcon};alt obj/title" /> 51 <span tal:replace="title"/> 52 </a> 53 <tal:x replace="structure string:</h${size}>"/> 54 </tal:block> 55 <tal:tags metal:use-macro="obj/SimpleBlog_macros/macros/technoratiTags"/> 56 <tal:byLine metal:use-macro="obj/SimpleBlog_macros/macros/ByLineFoot"/> 57 <p /> 58 </div> 59 60 <div metal:define-macro="ByLine" class="BlogByLine"> 61 <span i18n:translate="blog_by_line"> 62 Submitted by 63 <a href="" i18n:name="author" tal:attributes="href python:container.portal_membership.getHomeUrl(obj.Creator());" tal:content="obj/Creator">author</a>. 64 on <span i18n:name="date" tal:replace="python:here.toPortalTime(obj.simpleblog_tool.getEntryDate(obj), long_format=1)">Jun 2, 2002 2:42 pm</span>. 65 </span> 66 <span tal:define="cats python:obj.EntryCategory(); 67 pss modules/Products.PythonScripts.standard;" 68 class="simpleBlogBylineCats"> 69 <tal:categories tal:repeat="cat cats" tal:condition="cats"> 70 <span tal:omit-tag="" tal:condition="not: repeat/cat/start">| </span> 71 <strong><a href="#" 72 tal:define="quotedCat python:pss.url_quote(cat)" 73 tal:attributes="href string:${here/absolute_url}/SimpleBlogCatSearch?category=${quotedCat}" 74 title="category"><span tal:omit-tag="" tal:content="cat"/></a></strong> 75 </tal:categories> 76 </span> 77 </div> 78 79 80 <div metal:define-macro="technoratiTags" 81 tal:define="cats python:obj.EntryTag();" 82 tal:condition="python:here.isTagsEnabled() and cats" 21 83 tal:omit-tag=""> 22 </div> 23 24 <div metal:define-macro="full" class="simpleBlogFull"> 25 <h2 class="noMargin" 26 tal:condition="showIcons"> 27 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;"> 28 <span tal:define="item_type obj/portal_type; 29 item_type_class python:'contenttype-' + normalizeString(item_type);" 30 tal:attributes="class string:simpleBlogIcons ${item_type_class}" tal:content="obj/Title"/></a> 31 </h2> 32 <h2 class="noMargin" tal:condition="not:showIcons"> 33 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;" 34 tal:content="obj/title"></a> 35 </h2> 36 <p class="simpleBlogDescription" 37 tal:content="structure obj/Description" 38 tal:condition="obj/Description">Description</p> 39 <div tal:replace="structure obj/getBody" class="simpleBlogBody"/> 40 <tal:tags metal:use-macro="obj/simpleblog_byline/macros/technoratiTags"/> 41 <tal:byline tal:condition="showByline"> 42 <tal:x metal:use-macro="obj/simpleblog_byline/macros/byline-foot"/> 43 </tal:byline> 44 </div> 45 46 <div metal:define-macro="descriptionOnly" class="simpleBlogDescriptionOnly"> 47 <h2 class="noMargin" 48 tal:condition="showIcons"> 49 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;"> 50 <span tal:define="item_type obj/portal_type; 51 item_type_class python:'contenttype-' + normalizeString(item_type);" 52 tal:attributes="class string:simpleBlogIcons ${item_type_class}" tal:content="obj/title"/></a> 53 </h2> 54 <h2 class="noMargin" tal:condition="not:showIcons"> 55 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;" 56 tal:content="obj/title"></a> 57 </h2> 58 <p class="simpleBlogDescription" 59 tal:content="structure obj/Description" 60 tal:condition="obj/Description">Description</p> 61 <tal:tags metal:use-macro="obj/simpleblog_byline/macros/technoratiTags"/> 62 <tal:byline tal:condition="showByline"> 63 <tal:x metal:use-macro="obj/simpleblog_byline/macros/byline-foot"/> 64 </tal:byline> 65 </div> 66 67 <div metal:define-macro="titleOnly" class="simpleBlogTitleOnly"> 68 <h2 class="noMargin" 69 tal:condition="showIcons"> 70 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;"> 71 <span tal:define="item_type obj/portal_type; 72 item_type_class python:'contenttype-' + normalizeString(item_type);" 73 tal:attributes="class string:simpleBlogIcons ${item_type_class}" tal:content="obj/title"/></a> 74 </h2> 75 <h2 class="noMargin" tal:condition="not:showIcons"> 76 <a href="" tal:attributes="href obj/absolute_url" style="cursor:pointer;" 77 tal:content="obj/title"></a> 78 </h2> 79 <tal:tags metal:use-macro="obj/simpleblog_byline/macros/technoratiTags"/> 80 <tal:byline tal:condition="showByline"> 81 <tal:x metal:use-macro="obj/simpleblog_byline/macros/byline-foot"/> 82 </tal:byline> 83 </div> 84 _____<br/> 85 tags: 86 <span class="simpleBlogBylineCats"> 87 <tal:categories tal:repeat="cat cats" tal:condition="cats"><span tal:omit-tag="" tal:condition="not: repeat/cat/start">| 88 </span><strong><a href="#" 89 rel="tag" 90 tal:define="quotedCat python:cat.lower().replace(' ', '+')" 91 tal:attributes="href string:http://www.technorati.com/tag/${quotedCat}"><span tal:omit-tag="" tal:content="cat"/></a></strong> 92 </tal:categories> 93 </span> 94 </div> 95 96 <div metal:define-macro="ByLineFoot" class="BlogByLine"> 97 <tal:x define="allowed python:obj.portal_discussion.isDiscussionAllowedFor(obj); 98 ccount python:allowed and obj.portal_discussion.getDiscussionFor(obj).replyCount(obj); 99 tballowed python:here.getAllowTrackback(); 100 tbcount python:len(obj.getTrackbacks())"> 101 <span i18n:translate="blog_by_line"> 102 <span tal:define="edate python:obj.simpleblog_tool.getEntryDate(obj)" 103 i18n:name="date" tal:replace="python:DateTime(edate).strftime('%A, %B %d, %Y')">Jun 2, 2002 2:42 pm</span> 104 </span> 105 <span tal:define="cats python:obj.EntryCategory(); 106 pss modules/Products.PythonScripts.standard;" 107 tal:omit-tag=""> 108 <tal:x tal:condition="cats"> in </tal:x> 109 <tal:categories tal:repeat="cat cats" tal:condition="cats"> 110 <span tal:omit-tag="" tal:condition="not: repeat/cat/start">| </span> 111 <strong><a href="#" 112 tal:define="quotedCat python:pss.url_quote(cat)" 113 tal:attributes="href string:${here/absolute_url}/SimpleBlogCatSearch?category=${quotedCat}" 114 title="category"><span tal:omit-tag="" tal:content="cat"/></a></strong> 115 </tal:categories> 116 </span> | 117 <strong><a href="" 118 tal:attributes="href obj/absolute_url" 119 i18n:translate="permalink">Permalink</a></strong> | 120 <tal:block condition="allowed"> 121 <strong><a href="" 122 tal:attributes="href string:${obj/absolute_url}#comments" 123 tal:content="string:Comments (${ccount})">Comments</a></strong> 124 <tal:x condition="tbcount"> | </tal:x> 125 </tal:block> 126 <strong tal:condition="python:tballowed and tbcount"> 127 <tal:x tal:replace="string:TrackBack (${tbcount})">TrackBack</tal:x></strong> 128 <div tal:condition="tballowed"> trackback URL: 129 <tal:x replace="string:${obj/absolute_url}/sbtrackback"/> 130 </div> 131 132 </tal:x> 133 </div> 134 135 <!-- macro for the commandline showing the categories for the current entry and the comments plus actions to read more and add comments --> 136 <div tal:condition="not: standardButtons" metal:define-macro="commandLineNonStandard" tal:define="allowed python:obj.portal_discussion.isDiscussionAllowedFor(obj)" class="BlogCommandLine"> 137 <tal:comments tal:condition="allowed"> 138 <tal:block tal:define="comments python:obj.portal_discussion.getDiscussionFor(obj); 139 tb_number python:len(obj.getTrackbacks())"> 140 <a href="" tal:attributes="href obj/absolute_url" 141 i18n:translate="comments">Comments</a>: <span tal:content="python:comments.replyCount(obj)" /> 142 | <a href="" tal:attributes="href obj/absolute_url" 143 i18n:translate="trackbacks">Trackbacks</a>: <span tal:content="tb_number" /> 144 <span tal:condition="python:obj.portal_membership.checkPermission('Reply to item', obj)"> 145 | <a href="" tal:attributes="href string:${obj/absolute_url}/discussion_reply_form?backurl=${obj/absolute_url}" title="Add new comment" 146 i18n:translate="add_new_comment" 147 i18n:attributes="title add_new_comment">Add new comment</a> 148 </span> 149 </tal:block> 150 </tal:comments> 151 <tal:readmore tal:condition="showReadMore | python:0"> 152 <span tal:condition="allowed">|</span> 153 <a href="" tal:attributes="href obj/absolute_url" title="Read more" 154 i18n:attributes="title read_full_blog" 155 i18n:translate="read_full_blog">Read more</a> 156 </tal:readmore> 157 <span tal:condition="python:obj.portal_membership.checkPermission('Modify portal content', obj)">| 158 <a href="" tal:attributes="href string:${obj/absolute_url}/base_edit" title="Edit" 159 i18n:translate="edit_blog">Edit</a> 160 </span> 161 </div> 162 163 <div tal:condition="standardButtons" metal:define-macro="commandLine" tal:define="allowed python:obj.portal_discussion.isDiscussionAllowedFor(obj)" class="BlogCommandLine"> 164 <div class="simpleBlogLinkButtons"> 165 <tal:comments tal:condition="allowed"> 166 <tal:block tal:define="comments python:obj.portal_discussion.getDiscussionFor(obj); 167 tb_number python:len(obj.getTrackbacks())"> 168 <a href="" tal:attributes="href obj/absolute_url" 169 i18n:translate="comments">Comments</a>: <span tal:content="python:comments.replyCount(obj)" /> 170 | <a href="" tal:attributes="href obj/absolute_url" 171 i18n:translate="trackbacks">Trackbacks</a>: <span tal:content="tb_number" /> 172 </tal:block> 173 </tal:comments> 174 <tal:readmore tal:condition="showReadMore | python:0"> 175 <span tal:condition="allowed">|</span> 176 <a href="" tal:attributes="href obj/absolute_url" title="Read more">Read more</a> 177 </tal:readmore> 178 </div> 179 <form action="" 180 method="post" 181 tal:condition="python:allowed and here.portal_membership.checkPermission('Reply to item', obj)" 182 tal:attributes="action string:${obj/absolute_url}/discussion_reply_form"> 183 <input type="Hidden" name="backurl" value="" tal:attributes="value obj/absolute_url"> 184 <input class="standalone" type="submit" value="Add Comment" i18n:attributes="value add_new_comment"/> 185 </form> 186 <form action="" 187 method="post" 188 tal:condition="python:obj.portal_membership.checkPermission('Modify portal content', obj)" 189 tal:attributes="action string:${obj/absolute_url}/base_edit"> 190 <input class="standalone" type="submit" value="Edit" i18n:attributes="value edit_blog"/> 191 </form> 192 </div> 193 194 195 196 <!-- macro used by the portlets to compile a list of available categories --> 197 <div metal:define-macro="portletCategories" 198 tal:define="cats python:here.simpleblog_tool.getAvailableCategories(here)" 199 tal:omit-tag=""> 200 <tal:toggle tal:define="global toggle python:toggle or 0"/> 201 <dd tal:attributes="class python:test(toggle, 'portletItem even', 'portletItem odd')"> 202 <strong i18n:translate="blog_categories">Categories:</strong> 203 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 204 </dd> 205 <tal:cats tal:repeat="cat python:here.simpleblog_tool.getSortedKeys(cats)"> 206 <dd tal:define="pss modules/Products.PythonScripts.standard; 207 quotedCat python:pss.url_quote(cat); 208 category python:'%s (%s)' %(cat,cats[cat])" 209 tal:attributes="class python:test(toggle, 'portletItem even', 'portletItem odd')"> 210 <a tal:condition="python:cats[cat]>0" href="#" 211 tal:attributes="href string:${here/absolute_url}/SimpleBlogCatSearch?category=${quotedCat}; 212 title cat"><span tal:content="category"/></a> 213 <span tal:condition="python:cats[cat]==0" tal:content="category"/> 214 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 215 </dd> 216 </tal:cats> 217 </div> 218 219 <!-- macro used by the portlets to compile a list of recent additions --> 220 <div metal:define-macro="portletRecent" 221 tal:define="recent python:here.simpleblog_tool.searchForEntries(here)" 222 tal:omit-tag=""> 223 <tal:toggle tal:define="global toggle python:toggle or 0"/> 224 <tal:block tal:condition="recent"> 225 <dd tal:attributes="class python:test(toggle, 'portletItem even', 'portletItem odd')"> 226 <strong i18n:translate="recent_additions">Recent entries:</strong> 227 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 228 </dd> 229 <tal:entries tal:repeat="entry recent"> 230 <dd tal:attributes="class python:test(toggle, 'portletItem even', 'portletItem odd')"> 231 <a href="#" 232 tal:attributes="href entry/getURL;" 233 title="entry"> 234 <img src="#" tal:attributes="src string:${portal_url}/${entry/getIcon};" alt="" /> 235 <span tal:content="python:entry.Title or entry.getId"/> 236 </a> 237 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 238 </dd> 239 </tal:entries> 240 <dd tal:attributes="class python:test(toggle, 'portletItem even', 'portletItem odd')" 241 style="text-align:right;"> 242 <a title="More..." 243 tal:attributes="href string:${here/absolute_url}/SimpleBlogFullSearch" 244 i18n:attributes="title box_morelink" 245 i18n:translate="box_morelink" 246 i18n:domain="plone">More...</a> 247 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 248 </dd> 249 </tal:block> 250 <dd tal:condition="not: recent" 251 tal:attributes="class python:test(toggle, 'portletItem even', 'portletItem odd')"> 252 <span i18n:translate="no_published_blog_entries">No blog entries are published.</span> 253 <tal:toggle tal:define="global toggle python:test(toggle==1,0,1)"/> 254 </dd> 255 </div> 256 257 <div metal:define-macro="portletCalendar" 258 tal:omit-tag="" 259 tal:define="DateTime python:modules['DateTime'].DateTime; 260 current python:DateTime(); 261 anchor_url request/anchor_url | here_url; 262 anchor_method request/anchor_method | template/getId; 263 yearmonth here/getYearAndMonthToDisplay; 264 nextYearMax python: current+365; 265 prevYearMin python: current-365; 266 year python:yearmonth[0]; 267 month python:yearmonth[1]; 268 prevMonthTime python:here.getPreviousMonth(month, year); 269 nextMonthTime python:here.getNextMonth(month, year); 270 weeks python:here.simpleblog_tool.getEventsForCalendar(month=month, year=year, context=here); 271 translation_service nocall:here/translation_service; 272 day_msgid nocall:translation_service/day_msgid; 273 weekday_english nocall:translation_service/weekday_english; 274 utranslate nocall:here/utranslate; 275 toLocalizedTime nocall:here/toLocalizedTime; 276 published_state python:here.simpleblog_tool.getPublishedState()" 277 i18n:domain="plone"> 278 <!-- The calendar, rendered as a table --> 279 280 <table cellspacing="0" class="simpleBlogCalendar" id="thePloneCalendar" summary="Calendar" i18n:attributes="summary"> 281 <thead> 282 <tr> 283 <th id="calendar-previous"> 284 <a href="#" rel="nofollow" 285 title="Previous month" 286 tal:attributes="href python:'%s/%s?month:int=%d&year:int=%d' % (anchor_url, anchor_method, prevMonthTime.month(),prevMonthTime.year())" 287 tal:condition="python: yearmonth > (prevYearMin.year(), prevYearMin.month())" 288 i18n:attributes="title title_previous_month;">«</a> 289 </th> 290 <th colspan="5"> 291 <span i18n:translate="" tal:omit-tag=""> 292 <span i18n:name="monthname" 293 tal:define="month_english python:translation_service.month_english(month);" 294 tal:attributes="id string:calendar-month-$month_english" 295 tal:content="python: utranslate(translation_service.month_msgid(month), default=month_english)" 296 tal:omit-tag="" 297 id="calendar-month-month">monthname</span> 298 <span i18n:name="year" 299 tal:content="string:$year" 300 tal:attributes="id string:calendar-year-$year;" 301 tal:omit-tag="" 302 id="calendar-year">year</span> 303 </span> 304 </th> 305 <th id="calendar-next"> 306 <a href="#" rel="nofollow" 307 title="Next month" 308 tal:attributes="href python:'%s/%s?month:int=%d&year:int=%d' % (anchor_url, anchor_method, nextMonthTime.month(),nextMonthTime.year())" 309 tal:condition="python: yearmonth < (nextYearMax.year(), nextYearMax.month())" 310 i18n:attributes="title title_next_month;">»</a> 311 </th> 312 </tr> 313 <tr tal:define="weekdaynumbers here/portal_calendar/getDayNumbers" class="weekdays"> 314 <tal:data tal:repeat="daynumber weekdaynumbers"> 315 <td tal:define="weekday_english python:weekday_english(daynumber,format='a');" 316 tal:content="python: utranslate(day_msgid(daynumber, format='s'), default=weekday_english)">Su</td> 317 </tal:data> 318 </tr> 319 </thead> 320 <tbody> 321 <tr tal:repeat="week weeks"> 322 <tal:block repeat="day week"> 323 <tal:block define="daynumber day/day; 324 datestring python: '%d%0.2d%0.2d' % (year, month, daynumber); 325 javascriptstring string:javascript:%sDay('%s');"> 326 <td class="event" tal:condition="day/event" 327 tal:attributes="onmouseout python: javascriptstring % ('hide', datestring); 328 onmouseover python: javascriptstring % ('show', datestring); 329 class python:test(current.year()==year and current.month()==month and current.day()==int(daynumber), 'todayevent', 'event')"> 330 <span tal:define="begEndTimes python:here.getBeginAndEndTimes(day=daynumber, month=month, year=year)" tal:omit-tag=""> 331 <span tal:define="begin python:DateTime(begEndTimes[0].timeTime()+86400).ISO(); 332 end python:DateTime(begEndTimes[1].strftime('%m/%d/%y')).ISO(); 333 pss python:modules['Products'].PythonScripts.standard" tal:omit-tag=""> 334 <a href="" tal:attributes="href python:here.absolute_url()+'/SimpleBlogDaySearch?startdate=%s'%(pss.url_quote(end))"> 335 <span tal:replace="python: daynumber or default"> </span> 336 </a> 337 </span> 338 </span> 339 </td> 340 <tal:notdayevent tal:condition="not: day/event"> 341 <td tal:condition="python: current.year()==year and current.month()==month and current.day()==int(daynumber)" 342 tal:content="python: daynumber or default" class="todaynoevent"> 343 344 </td> 345 <td tal:condition="not: python: current.year()==year and current.month()==month and current.day()==int(daynumber)" 346 tal:content="python: daynumber or default"> 347 348 </td> 349 </tal:notdayevent> 350 </tal:block> 351 </tal:block> 352 </tr> 353 </tbody> 354 </table> 355 356 357 <!-- The sticky notes --> 358 <tal:week repeat="week weeks"><tal:day repeat="day week"> 359 <div class="dayPopup" 360 id="dummy" 361 tal:attributes="id python:'day%d%0.2d%0.2d' % (year, month, day['day']) " 362 tal:condition="day/event"> 363 <div class="date" tal:content="python:here.toLocalizedTime('%d/%0.2d/%0.2d' % (year, month, day['day']))"> 364 2001-04-11 365 </div> 366 <tal:event repeat="anevent day/eventslist"> 367 <div class="appointment" tal:content="python: here.getEventString(event=anevent)">an event</div> 368 </tal:event> 369 </div> 370 </tal:day> 371 </tal:week> 372 373 </div> 374 84 375 85 376 </body> -
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.
![(please configure the [header_logo] section in trac.ini)](/trac/chrome/common/qtrac_logo.png)