<!-- Channel content ******************************************************* -->
  {% include "common/content-bookend.tpl.html" ignore missing %}
  <script type="text/javascript">
    Post0 = new APost(0);
  </script>
  <table class="post_bounds">
    <tr>
      <td class="post">
      {% if Content|length > 0 %}
        <a href="javascript:void(0)" onclick="Post0.toggleDisplayOf('refineSearch', this)" title="Show this section"><code>+</code> Refine your search</a>
        <div class="quote" id="post_0$refineSearch" style="visibility:hidden; display:none">
      {% else %}
        <a href="javascript:void(0)" onclick="Post0.toggleDisplayOf('refineSearch', this)" title="Hide this section"><code>-</code> Refine your search</a>
        <div class="quote" id="post_0$refineSearch">
      {% endif %}
          {% include "site/search/posts/search.tpl.html" ignore missing %}
        </div>
      </td>
    </tr>
  </table>  
  <table class="post">
  {% for Post in Content %}
    <tr>
      <td rowspan="4" class="{{ loop.cycle('search_result_count_odd', 'search_result_count_even') }}">{{ loop.index + Script.Request.offset.value }}</td>           
      <td>
        <a href="{{ Site.url(channel=Site.Channels.default, view='post/single', id=Post.id) }}" title="View post"><strong>{{ Post.title }}</strong></a>
      </td>
      <td rowspan="3">
        <a href="{{ Site.url(channel=Site.Channels.default, view='post/single', id=Post.id) }}" title="View post">
      {% if Post.icon %}
        <img src="{{ Script.path(Post.icon) }}" alt="Post icon" class="post_icon" />
      {% else %}
        <img src="{{ Script.path(Site.icon.large) }}" alt="Post icon" class="post_icon" />
      {% endif %}
        </a>
      </td>
     </tr>
    <tr>
      <td>
        {{ Post.description }} | <a href="{{ Site.url(channel=Channel.name, view='post/single', id=Post.id) }}" title="View post">View post</a>        
      </td>
    </tr>
    <tr>
      <td class="post_attributes">
        <table>
          <tr>
            <td class="field_name">Published:</td>
            <td>{{ Time.localString(Post.published) }}</td>
          </tr>
          <tr>
            <td class="field_name">Tags:</td>
            <td>
              {%- for keyword in Post.keywords -%}
                {%- if loop.index0 > 0 -%}
                  ,
                {%- endif %}
                <a href="{{ Site.url(channel=Channel.name, view='site/search/posts/results', title=keyword, what='tags') }}" title="Search for other posts that are tagged with &quot;{{ keyword }}&quot;">{{- keyword -}}</a>
              {%- endfor -%}              
            </td>
          </tr>
        </table>
      </td>
    </tr>
    {% else %}
    <tr>
      <td>
      {% if User.has(Right.toPost, Channel.name) %}
        You can <a href="{{ Site.url(channel='$site/posts/edit', title=Script.Request.title.value) }}" title="Create this post">create a post with this title</a>.
      {% endif %}
      </td>
    </tr>
  {% endfor %}
</table>

