{% extends "multitenancy/admin/base.html" %}

{% load bootstrap4 %}
{% load thumbnail %}
{#% load wiki_tags %#}

{% block page_title %}{{ team.name }}{% endblock %}
{%block breadcrumbs%}
<li class="breadcrumb-item " ><a href="{% url 'pinax_teams:team_list' %}">Teams</a></li>
<li class="breadcrumb-item active">{{team.name}}</li>
{% endblock%}

{% block main_content %}
<section class="content">
    <div class="container text-dark">
        <div class="row">
            <div class="col-md-4">
                {% if team.avatar %}
                    <img class="img-polaroid avatar hidden-phone" src="{% thumbnail team.avatar 160x160 crop %}" alt="{{ team.name }}">
                {% else %}
                    <div class="default-avatar-big">
                        <i class="fa fa-group fa-5x"></i>
                    </div>
                {% endif %}
    
                <h2>{{ team.name }}</h2>
                {% if role %}<p><span class="label label-default">{{ role }}</span></p>{% endif %}
    
                {% if team.description %}<p>{{ team.description }}</p>{% endif %}
    
                {% include "pinax/teams/_team_actions.html" %}
    
                <h4>Owners</h4>
                {% for membership in team.owners %}
                    <a href="{% url 'profiles_detail' membership.user.username %}">{{ membership.user }}</a>
                    {% if not forloop.last %}&bull;{% endif %}
                {% empty %}
                    <p>None.</p>
                {% endfor %}
    
                <h4>Managers</h4>
                {% for membership in team.managers %}
                    <a href="{% url 'profiles_detail' membership.user.username %}">{{ membership.user }}</a>
                    {% if not forloop.last %}&bull;{% endif %}
                {% empty %}
                    <p>None.</p>
                {% endfor %}
    
                <h4>Members</h4>
                {% for membership in team.members %}
                    <a href="{% url 'profiles_detail' membership.user.username %}">{{ membership.user }}</a>
                    {% if not forloop.last %}&bull;{% endif %}
                {% empty %}
                    <p>None.</p>
                {% endfor %}
    
            </div>
            {#% wiki_for team as wiki %#}
            {#% include "_latest_wikis.html" %#}
        </div>
    </div>
</section>
{% endblock %}