{!# $Id: templates.sql,v 1.37 2003/07/06 12:50:43 glen Exp $
### Copyright (c)2001-2003, Broadpool, LLC. All rights reserved. See LICENSE.txt for details.
### displays ratings
#!}
{!set page_title '{doc_title:Ratings for "%s"}'!}
<p class="info">
<a href="{site_path}/document.php?id={doc_id}">{!if '"{doc_type}"=="Image"'
    '<img src="{doc_file_150}" border="0" alt="" title="{doc_title}">'
    'Return to {doc_type}'
!}
</a></p>
<p>Current rating: {doc_rating:%1.1f}/{doc_rating_count}</p>
<h3>Distribution</h3>
<table border="0">
<tr>
    <th>Rating</th>
    <th width="40px">#</th>
    <th width="40px">%</th>
    <th>Graph</th>
</tr>
{BEGIN:ratings}
<tr>
    <td align="right">{rating}</td>
    <td align="right">{rating_count}</td>
    <td align="right">{rating_percent:%5.1f}%</td>
    <td><span class="pollbar">{rating_bar}</span></td>
</tr>
{END:ratings}
</table>
<h3>Ratings</h3>
<table border="0">
<tr>
    <th>User</th>
    <th>Rating</th>
</tr>
{BEGIN:rating_users}
<tr class="{row_class}">
    <td><a href="{site_path}/user.php?id={rating_user_id}">{rating_user_name}</a></td>
    <td align="right">{user_rating}</td>
</tr>
{END:rating_users}
</table>