{% extends "base.html" %}

{% load i18n %}
{% load tags %}

{% block title %}{% trans group.name %} – {{ block.super }}{% endblock %}

{% block content %}

<h1>{% trans group.name %}
    <small class="pull-right">
    <a href="{% url 'user_group_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
    <!-- activate projector -->
    {% if perms.projector.can_manage_projector %}
        <a href="{% url 'projector_activate_slide' group.sid  %}" class="activate_link btn {% if group.active %}btn-primary{% endif %} btn-mini" rel="tooltip" data-original-title="{% trans 'Show group' %}">
            <i class="icon-facetime-video {% if group.active %}icon-white{% endif %}"></i>
        </a>
    {% endif %}
    {% if perms.participant.can_manage_participant and group.pk != 1 and group.pk != 2 %}
    <div class="btn-group">
        <a data-toggle="dropdown" class="btn btn-mini dropdown-toggle">
            {% trans 'More actions' %} <span class="caret"></span>
        </a>
        <ul class="dropdown-menu pull-right">
            <!-- edit -->
            <li><a href="{% url 'user_group_edit' group.id  %}"><i class="icon-pencil"></i> {% trans 'Edit group' %}</a></li>
            <!-- delete -->
            <li><a href="{% url 'user_group_delete' group.id  %}"><i class="icon-remove"></i> {% trans 'Delete group' %}</a></li>
        </ul>
    </div>
    {% endif %}
    </small>
</h1>

<p>{{ group.description }}</p>

<h4>{% trans "Members" %}</h4>

<ol>
{% for member in group_members %}
    <li><a href="{% model_url member 'view' %}">{{ member }}</a></li>
{% empty %}
    <p>{% trans "No members available." %}</p>
{% endfor %}
</ol>

{% endblock %}
