<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
      lang="en-US"
      metal:use-macro="here/main_template/macros/master"
      i18n:domain="plone">

  <metal:block fill-slot="base">
    <tal:block tal:define="dummy python:request.set('disable_border', 1)"
               tal:replace="nothing">
    Disable the tabs
    </tal:block>
  </metal:block>
    
<div metal:fill-slot="main"
     tal:define="results python:container.portal_catalog(meta_type='News Item',sort_on='created',sort_order='reverse',review_state='published');
                 Batch python:modules['Products.CMFPlone'].Batch;
                 DateTime python:modules['DateTime'].DateTime;
                 b_start python:request.get('b_start',0);">


    <h1 i18n:translate="heading_news">News</h1>
    
    <div i18n:translate="description_news" class="description">The latest news, sorted in reverse chronological order.</div>

    <form name="searchresults" action="" method="post" tal:condition="results"
                      tal:define="batch python:Batch(results, 15, int(b_start), orphan=1)">

        <metal:block tal:repeat="result batch">

            <tal:block  
             tal:define="resultObject result/getObject">
         
            <div class="box">

                <h6>
                    <img src="" alt="Folder" style="border: 0" 
                         tal:attributes="src result/getIcon; alt result/Type;" />
                
                    <span tal:omit-tag="" i18n:translate="posted_by">Posted by</span> 
                
                    <a href=""
                       tal:attributes="href python:here.portal_membership.getHomeUrl(result.Creator)">
    
                        <img tal:replace="structure here/user.gif" />
                    
                        <span tal:replace="result/Creator" > 
                        Author
                        </span>
    
                    </a>                                 
    
                  - <span tal:omit-tag="" i18n:translate="last_updated">Last Updated</span>: <span tal:replace="python:container.toPortalTime(result.Date)" /> 
                
                </h6>

                <div class="body">
                    <div class="content">
    
                        <h2 tal:content="result/Title">
                        Title
                        </h2>
        
                        <p tal:content="structure python:test(result.Description, result.Description, '(No Description)')">
                        Description
                        </p>
    
                    
                        <p>
                            <span style="float: right" 
                                  tal:condition="python: test( (here.portal_discussion.isDiscussionAllowedFor(resultObject) and here.portal_discussion.getDiscussionFor(resultObject).objectIds() ), 1, 0)">
                                <img tal:replace="structure here/discussionitem_icon.gif" /> 
                                <span tal:define="talkback python: here.portal_discussion.getDiscussionFor(resultObject)"> 
                                     <a href="" 
                                        tal:attributes="href string:${resultObject/absolute_url}#comments">
                                        <span tal:replace="python:talkback.replyCount(resultObject)" /> comments
                                     </a>
                                </span>
                            </span>
        
            
                            <a href="/view" tal:attributes="href resultObject/absolute_url" i18n:translate="read_more">
                            Read More
                            </a>
                        </p>
                    
                        
                    </div>

                </div>
                
            </div>
            
            </tal:block>

        </metal:block>
        
        <div class="spacer">
        &nbsp;
        </div>
            
        <!-- Navigation -->
        <div metal:use-macro="here/batch_macros/macros/navigation" />

        </form>
          
    <p tal:condition="not: results" i18n:translate="no_new_news">
        No news has been posted.
    </p>		
 
  </div>

  
</html>
