{% extends "base.html" %}
{% load i18n %}

{% block actions %}
    <a class="btn btn-success" href="{% url 'metaplans:create_proposition' metaplan_id=object.id %}"><i class="fa fa-plus"></i> {% trans 'Add proposition' %}</a>
    <a class="btn btn-default" href="{% url 'metaplans:list_by_session' session_id=object.session.id %}">{% trans 'Back to metaplan list' %}</a>
{% endblock %}

{% block subtitle %}
    {% blocktrans with title=object %}Metaplan Propositions List of "{{ title }}"{% endblocktrans %}
    <small>"{{ object.training_session.training }}" - {{ object.training_session.date|date:"j F Y" }}</small>
{% endblock subtitle %}

{% block main %}
    <div class="row-fluid">
        {% for group, propositions in object.get_grouped_propositions.items %}
            <div class="col-md-6">
                <div class="panel panel-default">

                    <div class="panel-heading text-center metaplan_type{{ group }}">{% trans 'Group' %} {{ group }}</div>

                    <ul class="list-group">
                        {% for proposition in propositions %}
                            <li class="list-group-item">"{{ proposition.text }}" <i>{% trans 'by' %} {{ proposition.user }}</i></li>
                        {% empty %}
                            <li class="list-group-item"><em>{% trans 'Not yet propositions' %}.</em></li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
        {% endfor %}
    </div>
{% endblock main %}
