{% extends "view_page.html" %}
{% load my_tags %}

{% block table_data %} 

<table cellspacing="0" class="infolist surname" width="95%">

<thead>
  <tr>
    <th>#</th>
    <th>Text</th>
    <th>Color</th>
    <th>Priority</th>
  </tr>
</thead>
<tbody>
  {% for tag in page.object_list %}
  <tr class="{% cycle odd,even %}">
    <td>{{ forloop.counter|row_count:page }}</td>
    <td><a href="/{{view}}/{{tag.handle|escape}}{{args}}" class="noThumb browsecell">
           <span class="grampsid">[{{tag.name}}]</span></a>
    {% if user.is_authenticated %}
      <td><a href="/{{view}}/{{tag.handle}}{{args}}" class="browsecell">{{tag.color|nbsp}}</a></td>
      <td><a href="/{{view}}/{{tag.handle}}{{args}}" class="browsecell">{{tag.priority|nbsp}}</a></td>
    {% else %}
      <td></td>
      <td></td>
    {% endif %}
  </tr>
  {% endfor %}
</tbody>
</table>

{% endblock %}

{% block admin_functions %}
{% if user.is_superuser %}
   <div style="background-color: lightgray; padding: 2px 0px 0px 2px">
   {% make_button "+Add Tag" "/tag/add" args %}
   </div>
{% endif %}
{% endblock %}
