[CMF-checkins] CVS: CMF/CMFDefault/skins/zpt_generic - index_html_utils.html:1.2 index_html.pt:1.8
Tres Seaver
tseaver@zope.com
Thu, 25 Jul 2002 10:48:46 -0400
Update of /cvs-repository/CMF/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv3292/CMFDefault/skins/zpt_generic
Modified Files:
index_html.pt
Added Files:
index_html_utils.html
Log Message:
- Merge index_html improvements from 1.3 branch.
=== CMF/CMFDefault/skins/zpt_generic/index_html_utils.html 1.1 => 1.2 ===
+<div metal:define-macro="index_header">
+
+ <h1 id="DesktopTitle"
+ tal:content="here/Title">Document Title</h1>
+
+ <div id="DesktopDescription" tal:content="here/Description">
+ Document Description goes here.
+ </div>
+
+</div>
+
+<div metal:define-macro="index_content">
+
+ <div tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter;
+ default_types python:( 'Document'
+ , 'Image'
+ , 'File'
+ , 'FAQ'
+ , 'News Item'
+ );
+ types types | here/show_content_types | default_types;
+ raw_items python: here.contentValues(
+ filter={'portal_type': types } );
+ items python: auth_filter( raw_items, skip='View' );
+ ">
+ <div tal:condition="items">
+
+ <h4> Content </h4>
+
+ <ul>
+ <li tal:repeat="item items">
+ <a href="item_url" tal:attributes="href item/absolute_url"><img
+ align="middle" border="0"
+ tal:attributes="src string:${item/portal_url}/${item/getIcon};
+ alt string:${item/Type};
+ title string:${item/Type}"></a>
+ <a href="item_url" tal:attributes="href item/absolute_url"
+ tal:content="item/Title"> Title </a>
+ <blockquote tal:condition="exists: item/Description"
+ tal:content="item/Description">
+ Description <!--fmt="structured-text'-->
+ </blockquote>
+ </li>
+ </ul>
+
+ </div>
+ </div>
+
+</div>
+
+
+<div metal:define-macro="index_links">
+
+ <div tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter;
+ default_types python:( 'Link'
+ , 'Favorite'
+ , 'Topic'
+ );
+ types types | here/show_link_types | default_types;
+ raw_items python: here.contentValues(
+ filter={ 'portal_type': types } );
+ items python: auth_filter( raw_items, skip='View' );
+ ">
+ <div tal:condition="items">
+ <h4> Related Resources </h4>
+
+ <ul>
+ <li tal:repeat="item items">
+ <a href="item_url" tal:attributes="href item/absolute_url"><img
+ align="middle" border="0"
+ tal:attributes="src string:${item/portal_url}/${item/getIcon};
+ alt string:${item/Type};
+ title string:${item/Type}"></a>
+ <a href="item_url" tal:attributes="href item/absolute_url"
+ tal:content="item/Title"> Title </a>
+ <blockquote tal:condition="exists: item/Description"
+ tal:content="item/Description">
+ Description <!--fmt="structured-text'-->
+ </blockquote>
+ </li>
+ </ul>
+
+ </div>
+ </div>
+
+</div>
+
+<div metal:define-macro="index_folders">
+
+ <div tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter;
+ default_types python:( 'Folder'
+ ,
+ );
+ types types | here/show_folder_types | default_types;
+ raw_items python: here.contentValues(
+ filter={ 'portal_type': types } );
+ items python: auth_filter( raw_items, skip='View' );
+ ">
+ <div tal:condition="items">
+ <h4> Folders </h4>
+
+ <ul>
+ <li tal:repeat="item items">
+ <a href="item_url" tal:attributes="href item/absolute_url"><img
+ align="middle" border="0"
+ tal:attributes="src string:${item/portal_url}/${item/getIcon};
+ alt string:${item/Type};
+ title string:${item/Type}"></a>
+ <a href="item_url" tal:attributes="href item/absolute_url"
+ tal:content="item/TitleOrId"> Title </a>
+ <blockquote tal:condition="exists: item/Description"
+ tal:content="item/Description">
+ Description <!--fmt="structured-text'-->
+ </blockquote>
+ </li>
+ </ul>
+
+ </div>
+ </div>
+
+</div>
+
+<div metal:define-macro="news_box">
+
+ <table class="NewsItems"
+ cellspacing="0"
+ cellpadding="0"
+ border="0"
+ width="100%">
+ <tbody tal:define="news python: here.portal_catalog( meta_type='News Item'
+ , sort_on='Date'
+ , sort_order='reverse'
+ , review_state='published'
+ );
+ Batch python:modules['ZTUtils'].Batch;
+ global batch python:Batch(news, 10, 0, orphan=1)">
+ <tr>
+ <td class="NewsBorder" width="1" rowspan="13" bgcolor="#6699CC">
+ <img src="spacer.gif" alt=" " width="1" height="2" border="0">
+ </td>
+ <td valign="top" class="NewsTitle" width="100%">
+ <b>News</b>
+ </td>
+ </tr>
+ <tr class="NewsItemRow" tal:condition="news"
+ tal:repeat="news batch">
+ <td valign="top" wrap>
+ <a href="" tal:attributes="href python:news.getURL()"
+ tal:content="news/Title"></a><br>
+ <span tal:replace="news/Date">Date</span>
+ </td>
+ </tr>
+ <tr class="NewsItemRow" tal:condition="python:not(news)">
+ <td valign="top">
+ No news is no news.
+ </td>
+ </tr>
+ <tr class="NewsItemRow">
+ <td>
+ <a href="recent_news">More...</a>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+</div>
=== CMF/CMFDefault/skins/zpt_generic/index_html.pt 1.7 => 1.8 ===
<html metal:use-macro="here/main_template/macros/master" >
-<body>
+<body style="position: relative">
- <div metal:fill-slot="header"
- tal:define="global has_local python: 'local_html' in here.objectIds()"
- >
+<div metal:fill-slot="header"
+ tal:define="global has_local python: 'local_pt' in here.objectIds();
+ global util_macros here/index_html_utils/macros;
+ " >
<div tal:condition="not: has_local">
- <h1 id="DesktopTitle"
- tal:content="here/Title">Document Title</h1>
-
- <div id="DesktopDescription" tal:content="here/Description">
- Document Description goes here.
- </div>
+ <div metal:use-macro="util_macros/index_header" />
</div>
<div tal:condition="has_local">
- <div metal:use-macro="here/local_html/macros/header|default">
- 'local_html' body goes here.
- </div>
+ <div metal:use-macro="here/local_pt/macros/header | default">
+ 'local_pt' header goes here.
+ </div>
</div>
- </div><!-- header slot -->
+</div><!-- header slot -->
- <div metal:fill-slot="main"
- >
+<div metal:fill-slot="main">
- <div tal:condition="not: has_local"
- tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter"
- >
-
- <div tal:define="raw_items python: here.contentValues(
- filter={'portal_type':( 'Document'
- , 'Image'
- , 'File'
- , 'News Item'
- ) } );
- items python: auth_filter( raw_items, skip='View' );
- ">
- <div tal:condition="items">
-
- <h4> Documents, Images, Files, and News Items </h4>
-
- <ul>
- <li tal:repeat="item items">
- <a href="item_url" tal:attributes="href item/absolute_url"><img
- align="middle" border="0"
- tal:attributes="src string:${item/portal_url}/${item/getIcon};
- alt string:${item/Type};
- title string:${item/Type}"></a>
- <a href="item_url" tal:attributes="href item/absolute_url"
- tal:content="item/Title"> Title </a>
- <blockquote tal:condition="exists: item/Description"
- tal:content="item/Description">
- Description <!--fmt="structured-text'-->
- </blockquote>
- </li>
- </ul>
+ <div id="content_well"
+ style="float: left; top: 0; width: 80%;">
- </div>
- </div>
+ <div tal:condition="not: has_local">
+ <br />
- <div tal:define="raw_items python: here.contentValues(
- filter={'portal_type':( 'Link'
- , 'Favorite'
- , 'Topic'
- ) } );
- items python: auth_filter( raw_items, skip='View' );
- ">
- <div tal:condition="items">
- <h4> Related Resources </h4>
-
- <ul>
- <li tal:repeat="item items">
- <a href="item_url" tal:attributes="href item/absolute_url"><img
- align="middle" border="0"
- tal:attributes="src string:${item/portal_url}/${item/getIcon};
- alt string:${item/Type};
- title string:${item/Type}"></a>
- <a href="item_url" tal:attributes="href item/absolute_url"
- tal:content="item/Title"> Title </a>
- <blockquote tal:condition="exists: item/Description"
- tal:content="item/Description">
- Description <!--fmt="structured-text'-->
- </blockquote>
- </li>
- </ul>
+ <div metal:use-macro="util_macros/index_content" />
+
+ <div metal:use-macro="util_macros/index_links" />
- </div>
- </div>
+ <div metal:use-macro="util_macros/index_folders" />
+ </div>
- <div tal:define="raw_items python: here.contentValues(
- filter={ 'portal_type': 'Folder' } );
- items python: auth_filter( raw_items, skip='View' );
- ">
- <div tal:condition="items">
- <h4> Folders </h4>
-
- <ul>
- <li tal:repeat="item items">
- <a href="item_url" tal:attributes="href item/absolute_url"><img
- align="middle" border="0"
- tal:attributes="src string:${item/portal_url}/${item/getIcon};
- alt string:${item/Type};
- title string:${item/Type}"></a>
- <a href="item_url" tal:attributes="href item/absolute_url"
- tal:content="item/TitleOrId"> Title </a>
- <blockquote tal:condition="exists: item/Description"
- tal:content="item/Description">
- Description <!--fmt="structured-text'-->
- </blockquote>
- </li>
- </ul>
+ <div tal:condition="has_local">
- </div>
- </div>
+ <div metal:use-macro="here/local_pt/macros/body | default">
+ 'local_pt' body goes here.
+ </div>
- </div><!-- not: has_local -->
+ </div>
+ </div>
- <div tal:condition="has_local">
+ <div id="right_sidebar"
+ style="width: 20%">
- <div metal:use-macro="here/local_html/macros/body|default">
- 'local_html' body goes here.
- </div>
+ <div metal:use-macro="util_macros/news_box" />
- </div>
- </div><!-- main slot -->
+ </div>
+
+</div>
</body>
</html>
-