[Zope-CVS] CVS: Products/OSCOM/NOTSite/skins/NOTSite - index_html.pt:1.1 index_html_utils.html:1.1

Tres Seaver tseaver@zope.com
Tue, 27 May 2003 00:49:43 -0400


Update of /cvs-repository/Products/OSCOM/NOTSite/skins/NOTSite
In directory cvs.zope.org:/tmp/cvs-serv30159/skins/NOTSite

Added Files:
	index_html.pt index_html_utils.html 
Log Message:
 - Adapt 'index_html' (for site root only).

=== Added File Products/OSCOM/NOTSite/skins/NOTSite/index_html.pt ===
<html metal:use-macro="here/main_template/macros/master" >
<body style="position: relative">

<div metal:fill-slot="main"
     tal:define="has_local python: 'local_pt' in here.objectIds();
                 util_macros here/index_html_utils/macros;
                " >

  <div id="content_well"
       style="float: left; top: 0; width: 80%;">

    <div tal:condition="not: has_local">

      <br />

      <div metal:use-macro="util_macros/index_content" />
  
      <div metal:use-macro="util_macros/index_links" />

      <div metal:use-macro="util_macros/index_folders" />

    </div>

    <div tal:condition="has_local">

      <div metal:use-macro="here/local_pt/macros/body | default">
        'local_pt' body goes here.
      </div>

    </div>

  </div>

  <div id="right_sidebar"
       style="width: 20%">

    <div metal:use-macro="util_macros/news_box" />

  </div>

</div>

</body>
</html>


=== Added File Products/OSCOM/NOTSite/skins/NOTSite/index_html_utils.html ===
<div metal:define-macro="index_content">

  <div tal:define="auth_filter nocall: modules/ZTUtils/LazyFilter;
                   default_types python:( 'News Story', );
                   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> Stories </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:( 'Story Tease', );
                   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> Teases </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:( 'News Section', );
                   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> Sections </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>