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

{% block table_data %} 

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

<thead>
  <tr>
    <th>#</th>
    <th>ID</th>
    <th>Type</th>
    <th>Name</th>
  </tr>
</thead>
<tbody>
  {% for repository in page.object_list %}
  <tr class="{% cycle odd,even %}">
    <td>{{ forloop.counter|row_count:page }}</td>
    <td><a href="/{{view}}/{{repository.handle|escape}}{{args}}" class="noThumb browsecell">
           <span class="grampsid">[{{repository.gramps_id}}]</span></a>
    {% if user.is_authenticated or repository.public %}
    <td><a href="/{{view}}/{{repository.handle|escape}}{{args}}" class="browsecell">{{repository.repository_type|escape|nbsp}}</a>
    <td><a href="/{{view}}/{{repository.handle|escape}}{{args}}" class="browsecell">{{repository.name|escape|nbsp}}</a>
    {% 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 Repository" "/repository/add" args %}
   </div>
{% endif %}
{% endblock %}
