{!# $Id: templates.sql,v 1.37 2003/07/06 12:50:43 glen Exp $ !}
{!#if '({allow_ratings}+0)&&(iseditor({doc_user_id})||{doc_rating_count}>4)'
    '<p class="rating">Current rating: {doc_rating}/{doc_rating_count} &bull;
     <a href="{site_path}/ratings.php?id={doc_id}">View all ratings</a> &bull;
     <a href="{site_path}/deleterating.php?id={doc_id}">Delete my rating</a></p>'
!}
{!#if defined(doc_share_count)
    '<p class="info">This {doc_type} has been shared {doc_share_count} time(s).</p>'
!}
<p class="action">
{!if '{_COOKIE_hideinfo}+0&&("{doc_type}"=="Image")'
  '<a href="{site_path}/document.php?id={doc_id}"
      title="Show complete {doc_type_display} information"
      onClick="setCookie(&#34;hideinfo&#34;,0);">{doc_type_display} Information</a> {sep}'
!}
{!if '({allow_comments}+0)&&({comment_inline}+0)'
    '<a href="{site_path}/comment.php?id={doc_id}"
        title="Add rating/comment to this {doc_type_display}">Comment/Rate</a> {sep}'
!}
{!if '({allow_comments}+0)&&(!{comment_inline}+0)'
   '<a href="#"
    title="Add rating/comment to this {doc_type_display}"
    onClick="javascript:var x=screen.availWidth-420;
            var f=&#34;left=&#34;+x+&#34;,top=20,width=400,height=500,toolbar=no,scrollbars=yes,status=no,copyhistory=no&#34;
            window.open(&#34;{site_path}/comment.php?id={doc_id}&#34;,
            &#34;comment_window&#34;,f)">
    Comment/Rate</a> {sep}'
!}
<a href="{site_path}/email.php?id={doc_id}"
   title="Send an email to someone about this {doc_type_display}">Share this {doc_type_display}</a>
{!if '{subscription_enable}'
  '{sep} <a href="{site_path}/subscribe.php?type=D&amp;obj={doc_id}">Subscribe</a>'
!}
{!if editor(doc_owner_id)
    '{sep} <a href="{site_path}/edit.php?id={doc_id}">Edit {doc_type_display}</a>
     {sep} <a href="{site_path}/delete.php?id={doc_id}">Delete {doc_type_display}</a>
     {sep} <a href="{site_path}/rotate.php?id={doc_id}&rot=L">&laquo;&laquo;</a><a href="#"
     >Rotate</a><a href="{site_path}/rotate.php?id={doc_id}&rot=R">&raquo;&raquo;</a>'
!}
</p>
<div class="Comments">
    {BEGIN:doc_comments doc_id}
    {!bookmark "comment{comment_id}"!}
    {!if defined(comment_subject) '<p class="subject">{comment_subject}</p>'
     '<p class="subject">NO SUBJECT</p>'!}
    <div class="comment">{comment_body}</div>
    <p class="info">
        {!if '{comment_owner_id}+0'
            '<a href="{site_path}/user.php?id={comment_owner_id}">{comment_user_name}</a>'
            '{comment_name} [<a href="{comment_url}">home</a>|<a href="mailto:{comment_email}">mail</a>]'
        !}{!user_indicators comment!}
        at {!date '{site_time_format}' '{comment_created}'!}
        on {!date '{site_date_format}' '{comment_created}'!}
        {!if editor({comment_owner_id})
            '[<a href="{site_path}/delete.php?comment={comment_id}">Delete</a>]'
        !}
        {!if '({allow_comments}+0)&&({comment_inline}+0)'
        '[<a href="{site_path}/comment.php?id={doc_id}&amp;reply={comment_id}">Reply</a>]'
        !}
        {!if '({allow_comments}+0)&&(!{comment_inline}+0)'
        '[<a href="#"
        onClick="javascript:var x=screen.availWidth-420;
              var f=&#34;left=&#34;+x+&#34;,top=20,width=400,height=500,toolbar=no,scrollbars=yes,status=no,copyhistory=no&#34;
              window.open(&#34;{site_path}/comment.php?id={doc_id}&amp;reply={comment_id}&#34;,
              &#34;comment_window&#34;,f)"
        >Reply</a>]'
        !}
    </p>
    {END:doc_comments}
    {!if '{trackback_enable}'
        '<p class="info">The Trackback URL for this document is {trackback_url}</p>'
    !}
    {BEGIN:tb_pings doc_id}
    {!if '{row_number}==1'
        '<h3>Trackback pings received</h3>'!}
    <p><a href="{tb_url}">{tb_title}</a><br/>
    {tb_excerpt}<br/>
    <small>From {tb_site} on {!date 'F j, Y h:ia' '{created}'!}</small></p>
    {END:tb_pings}
</div>
{!#include 'templates/edit.ihtml'!}