{% extends "template.html" %}
{% block content %}
    <div class="row">
      <div class="span9">
        <h2>{{class_name}}</h2>
        <h3>{{ item }}</h3>
      </div>

      <div class="span3">
        {% if deletable %}
          <a class="btn pull-right" href="/delete/{{class_name}}/{{pk}}">
            <i class="icon-remove"></i>Delete
          </a>
        {% endif %}
        {% if editable %}
          <a class="btn pull-right" href="/edit/{{class_name}}/{{pk}}">
            <i class="icon-edit"></i>Edit
          </a>
        {% endif %}
      </div>
    </div>
    <table class="table table-bordered table-striped">
    {% for attr in attrs %}
        <tr>
            <td>
                {% if attr.2 %}
                    <strong>{{ attr.0 }}</strong>
                {% else %}
                    {{ attr.0 }}
                {% endif %}
            </td>
            <td>
                {% if attr.3 %}
                    <a href="{{ attr.3 }}">{{ attr.1 }}</a>
                {% else %}
                    {{ attr.1|safe }}
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    </table>
    <ul class="pager">
      <li class="previous">
        <a href="/{{ class_name }}">← Back</a>
      </li>
    </ul>
{% endblock %}
