{% extends "trainings/library_base.html" %}

{% load i18n template_tools %}

{% block column_main %}
    <div class="clearfix">
        <div class="pull-left">
            {% if current_sub_section == 'training' %}
                <a class="btn btn-default back-button" href="{{ object.training.get_detail_url }}">
                    <i class="fa fa-arrow-left"></i> {% trans 'Back' %}
                </a>
            {% elif current_sub_section == 'private_library' %}
                <a class="btn btn-default back-button" href="{% url 'trainings:activities-private-library' %}">
                    <i class="fa fa-arrow-left"></i> {% trans 'Back' %}
                </a>
            {% else %}
                <a class="btn btn-default back-button" href="{% url 'trainings:activities-public-library' %}">
                    <i class="fa fa-arrow-left"></i> {% trans 'Back' %}
                </a>
            {% endif %}
                {% if object.verbose_activity_name %}
                    <i class="icon-{{ object.activity_type }} activity-type-icon"></i> {{ object.verbose_activity_name }}
                {% endif %}
        </div>
        <div class="pull-right">
            {% include 'trainings/trainingactivity_actions.html' with display='inline' activity=object activity_next_url=object.get_absolute_url %}
        </div>
    </div>
    <div class="scrolling-training-wrapper padded-top">
        <div class="clearfix separator-bottom">
            <h1 class="page-title">{{ object.name }}</h1>
            <p>{{ object.description }}</p>
            {% block activity_details %}{% endblock %}
            <div class="pull-right">
                {% if object.is_editable_by_user %}
                    <a href="{{ object.get_edit_url }}" class="btn btn-default pull-right dialog-box">
                        <i class="fa fa-pencil"></i>
                        {% trans 'Modify the information' %}
                    </a>
                {% endif %}
            </div>
        </div>
        <div class="clearfix padded-top">
            {% block activity_contents %}{% endblock %}
        </div>
    </div>
{% endblock %}
