
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3842 fd906abe-77d9-0310-91a1-e0d9ade77398
74 lines
2.9 KiB
XML
Executable file
74 lines
2.9 KiB
XML
Executable file
<!-- ZPT macros for loops.compound.blog views
|
|
$Id$ -->
|
|
|
|
<metal:block define-macro="blog">
|
|
<div>
|
|
<metal:title use-macro="view/concept_macros/concepttitle" />
|
|
<div tal:repeat="related item/blogPosts"
|
|
class="blog">
|
|
<tal:child define="data related/data">
|
|
<h1 class="headline">
|
|
<a href="#"
|
|
tal:content="related/title"
|
|
tal:attributes="href python: view.getUrlForTarget(related);">Post</a>
|
|
</h1>
|
|
<div class="info"
|
|
tal:define="url data/creatorUrl|nothing">
|
|
<span tal:content="data/date">2008-01-02</span> /
|
|
<a tal:omit-tag="not:url"
|
|
tal:content="data/creator"
|
|
tal:attributes="href url">Will Smith</a>
|
|
</div>
|
|
<div class="text"
|
|
tal:define="description related/renderedDescription"
|
|
tal:condition="description">
|
|
<span tal:content="structure description">Description</span></div>
|
|
<div class="text"
|
|
tal:condition="nothing"
|
|
xtal:condition="python: repeat['related'].index() < 3">
|
|
<span tal:content="structure python:
|
|
item.renderText(data['text'], related.adapted.textContentType)"></span>
|
|
</div>
|
|
<div class="text"
|
|
tal:condition="data/text">
|
|
<a tal:attributes="href python: view.getUrlForTarget(related);">
|
|
<b i18n:translate="">more...</b></a></div>
|
|
</tal:child>
|
|
</div>
|
|
<metal:resources use-macro="view/concept_macros/conceptchildren" />
|
|
<metal:resources use-macro="view/concept_macros/conceptresources" />
|
|
</div>
|
|
</metal:block>
|
|
|
|
|
|
<div metal:define-macro="blogpost"
|
|
tal:define="data item/data"
|
|
class="blogpost">
|
|
<metal:block use-macro="view/concept_macros/concepttitle_only" />
|
|
<div class="info"
|
|
tal:define="url data/creatorUrl|nothing">
|
|
<span tal:content="data/date">2008-01-02</span> /
|
|
<a tal:omit-tag="not:url"
|
|
tal:content="data/creator"
|
|
tal:attributes="href url">Will Smith</a>
|
|
<span tal:condition="item/adapted/private">
|
|
(<span i18n:translate="">Private</span>)
|
|
</span>
|
|
</div>
|
|
<div class="description"
|
|
tal:define="description description|item/renderedDescription"
|
|
tal:condition="description">
|
|
<span tal:content="structure description">Description</span>
|
|
</div>
|
|
<div class="text"
|
|
tal:content="structure item/render">Here comes the text...</div>
|
|
<div class="comment"
|
|
tal:define="comment data/privateComment"
|
|
tal:condition="comment">
|
|
<h4 i18n:translate="" class="headline">Private Comment</h4>
|
|
<div tal:content="structure python:
|
|
item.renderText(comment, 'text/restructured')">Comment</div></div>
|
|
<metal:resources use-macro="view/concept_macros/conceptchildren" />
|
|
<metal:resources use-macro="view/concept_macros/conceptresources" />
|
|
<metal:block use-macro="view/comment_macros/comments" />
|
|
</div>
|