From: Danny B. <dan...@us...> - 2004-01-12 10:48:58
|
Update of /cvsroot/plone/CMFPlone/skins/plone_3rdParty/CMFTopic In directory sc8-pr-cvs1:/tmp/cvs-serv10989/skins/plone_3rdParty/CMFTopic Modified Files: Tag: Plone-2_0-branch topic_view.pt Log Message: Added macro declarations so in the near future you can tell an object to render itself inside your own templates. So forms like discussion_reply_form can display the full context of what you are replying to. Basically, every content type should have a main macro called 'main' defined. Index: topic_view.pt =================================================================== RCS file: /cvsroot/plone/CMFPlone/skins/plone_3rdParty/CMFTopic/topic_view.pt,v retrieving revision 1.16.6.4 retrieving revision 1.16.6.5 diff -u -d -r1.16.6.4 -r1.16.6.5 --- topic_view.pt 17 Nov 2003 06:25:47 -0000 1.16.6.4 +++ topic_view.pt 12 Jan 2004 10:48:54 -0000 1.16.6.5 @@ -6,86 +6,86 @@ <body> <div metal:fill-slot="main"> - - <h1 tal:content="structure here/title_or_id" class="documentFirstHeading"> - Title or id - </h1> - - <div class="documentDescription" tal:content="structure here/Description"> - description - </div> - - <metal:block tal:define=" - b_start string:0;b_start request/b_start | b_start; - results here/queryCatalog; - Batch python:modules['Products.CMFPlone'].Batch; - global batch python:Batch(results, 20, int(b_start), orphan=1)"> - - - <!-- Navigation --> - <div metal:use-macro="here/batch_macros/macros/navigation" /> - - <table class="listing" - id="sortable" - tal:condition="batch"> - - <thead> - <tr> - <th> <tal:block i18n:translate="heading_title">Title</tal:block> </th> - <th> <tal:block i18n:translate="heading_type">Type</tal:block> </th> - <th> <tal:block i18n:translate="heading_last_modified">Last Modified</tal:block> </th> - <th> <tal:block i18n:translate="heading_description">Description</tal:block> </th> + <tal:main-macro metal:define-macro="main"> + <h1 tal:content="structure here/title_or_id" class="documentFirstHeading"> + Title or id + </h1> + + <div class="documentDescription" tal:content="structure here/Description"> + description + </div> + + <metal:block tal:define=" + b_start string:0;b_start request/b_start | b_start; + results here/queryCatalog; + Batch python:modules['Products.CMFPlone'].Batch; + global batch python:Batch(results, 20, int(b_start), orphan=1)"> + + + <!-- Navigation --> + <div metal:use-macro="here/batch_macros/macros/navigation" /> + + <table class="listing" + id="sortable" + tal:condition="batch"> + + <thead> + <tr> + <th> <tal:block i18n:translate="heading_title">Title</tal:block> </th> + <th> <tal:block i18n:translate="heading_type">Type</tal:block> </th> + <th> <tal:block i18n:translate="heading_last_modified">Last Modified</tal:block> </th> + <th> <tal:block i18n:translate="heading_description">Description</tal:block> </th> + </tr> + </thead> + + <tbody> + <metal:block tal:repeat="match batch"> + <tr class="even" + tal:define="oddrow repeat/match/odd" + tal:attributes="class python:test(oddrow, 'even', 'odd')" > + <td> + <a href="#" + tal:attributes="href string:${match/getURL}/view" > + <img src="#" tal:attributes="src string:${here/portal_url}/${match/getIcon}" /> + <span tal:replace="match/Title|match/id">Title or id</span> + </a> + </td> + <td tal:content="match/Type">Type</td> + <td tal:content="match/ModificationDate">Modification Date</td> + <td tal:content="match/Description">Description</td> </tr> - </thead> - - <tbody> - <metal:block tal:repeat="match batch"> - <tr class="even" - tal:define="oddrow repeat/match/odd" - tal:attributes="class python:test(oddrow, 'even', 'odd')" > - <td> - <a href="#" - tal:attributes="href string:${match/getURL}/view" > - <img src="#" tal:attributes="src string:${here/portal_url}/${match/getIcon}" /> - <span tal:replace="match/Title|match/id">Title or id</span> - </a> - </td> - <td tal:content="match/Type">Type</td> - <td tal:content="match/ModificationDate">Modification Date</td> - <td tal:content="match/Description">Description</td> - </tr> + </metal:block> + </tbody> + </table> + + <!-- Navigation --> + <div metal:use-macro="here/batch_macros/macros/navigation" /> + + <metal:block tal:define="topics python:here.objectValues( [ 'Portal Topic' ] )" tal:condition="topics"> + + <h2 i18n:translate="heading_sub_topics">Sub-topics</h2> + + <ul> + <li tal:repeat="topic topics"> + <p> + <a href="" + tal:define="topictitle python:topic.Title() or topic.getId()" + tal:attributes="href topic/absolute_url" + tal:content="topictitle"> + Topic Title + </a> + </p> + </li> + </ul> + </metal:block> - </tbody> - </table> - - <!-- Navigation --> - <div metal:use-macro="here/batch_macros/macros/navigation" /> - - <metal:block tal:define="topics python:here.objectValues( [ 'Portal Topic' ] )" tal:condition="topics"> - - <h2 i18n:translate="heading_sub_topics">Sub-topics</h2> - - <ul> - <li tal:repeat="topic topics"> - <p> - <a href="" - tal:define="topictitle python:topic.Title() or topic.getId()" - tal:attributes="href topic/absolute_url" - tal:content="topictitle"> - Topic Title - </a> - </p> - </li> - </ul> - - </metal:block> - - <div tal:condition="not: results"> - <p><strong i18n:translate="no_results_found"> No results match your criteria. </strong></p> - </div> - - </metal:block> - + + <div tal:condition="not: results"> + <p><strong i18n:translate="no_results_found"> No results match your criteria. </strong></p> + </div> + + </metal:block> + </tal:main-macro> </div> </body> |