{% extends 'layout.html' %}

{% load tags %}

{% block title %}
    Depots by organization
{% endblock %}

{% block content %}
    <h1>Depots by organization</h1>

    {% for organization in organization_depots %}
        <h2>
            {{ organization.model.name }}
            {% if organization.managed_by_user %}
                <a href="{% url 'admin:depot_organization_change' organization.model.id %}"
                        class="btn btn-default" target="_blank">
                    Manage
                </a>
            {% endif %}
        </h2>

        <div class="alert alert-info">
            This organization is managed by {% concat_with_and organization.model.managers.all %}.
        </div>

        <table class="table">
            <tr>
                <th>Name</th>
                <th>Items</th>
                {% if organization.managed_by_user %}
                    <th>Active</th>
                {% endif %}
            </tr>

            {% for depot in organization.depots %}
                <tr>
                    <td>
                        <a href="{% url 'depot:detail' depot.id %}">{{ depot.name }}</a>
                    </td>
                    <td>
                        {{ depot.public_items.count }}
                    </td>
                    {% if organization.managed_by_user %}
                        <td>{{ depot.active }}</td>
                    {% endif %}
                </tr>
            {% endfor %}
        </table>
    {% empty %}
        <div class="alert alert-danger" role="alert">
            No depots available :(
        </div>
    {% endfor %}
{% endblock %}

{% extends 'layout.html' %}

{% load tags %}

{% block title %}
    Depots by organization
{% endblock %}

{% block content %}
    <h1>Depots by organization</h1>

    <hr>

    {% for organization in organization_depots %}
        <h2>
            {{ organization.model.name }}
            {% if organization.managed_by_user %}
                <a href="{% url 'admin:depot_organization_change' organization.model.id %}"
                        class="btn btn-default" target="_blank">
                    Manage
                </a>
            {% endif %}
        </h2>

        <div class="alert alert-info">
            This organization is managed by {% concat_with_and organization.model.managers.all %}.
        </div>

        <table class="table">
            <tr>
                <th>Name</th>
                <th>Items</th>
                {% if organization.managed_by_user %}
                    <th>Active</th>
                {% endif %}
            </tr>

            {% for depot in organization.depots %}
                <tr>
                    <td>
                        <a href="{% url 'depot:detail' depot.id %}">{{ depot.name }}</a>
                    </td>
                    <td>
                        {{ depot.public_items.count }}
                    </td>
                    {% if organization.managed_by_user %}
                        <td>{{ depot.active }}</td>
                    {% endif %}
                </tr>
            {% endfor %}
        </table>
    {% empty %}
        <div class="alert alert-danger" role="alert">
            No depots available :(
        </div>
    {% endfor %}
{% endblock %}

Add horizontal ruler between heading and organization list
Add horizontal ruler between heading and organization list
