{% extends 'multitenancy/admin/base.html' %}
{#% load thumbnail %#}
{% block page_title %}Teams{% endblock %}
{%block breadcrumbs%}
<li class="breadcrumb-item active">Teams</li>
{% endblock%}
{% block main_content %}
<div class="container">
    <div class="row">
        <div class="col-md-6 text-dark">
            <h1>Teams </h1>
        </div>
        {%if user.type == 'Admin' %}
        <div class="col-md-6 text-dark">
            <a class="btn btn-success text-white shadow" href="{% url 'pinax_teams:team_create' %}"><i class="fa fa-plus"></i> Create Team</a>
        </div>
        {%endif%}
    </div>
    <div class="row">
        {% for team in teams %}
            <div class="col-md-3">
                <div class="media" style="margin-bottom: 16px;">
                    {% if team.avatar %}
                        <img width="72" height="72" class="media-object pull-left" src="{{ team.avatar }}" alt="{{ profile.name|default:user.username }}">
                    {% else %}
                        <div class="default-avatar media-object pull-left">
                            <i class="fa fa-group fa-3x"></i>
                        </div>
                    {% endif %}

                    <div class="media-body">
                        <h4 class="media-heading"><a href="{% url 'pinax_teams:team_detail' slug=team.slug %}">{{ team.name }}</a></h4>
                        {{ team.get_access_display }}
                    </div>
                </div>
            </div>
        {% endfor %}
    </div>
</div>
{% endblock %}