{% extends "base.html" %}

{% load i18n template_tools %}

{% block head %}
    {{ super }}
    <script type="text/javascript" src="{{ STATIC_URL }}common/js/ajax-modal.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}common/js/ajaxForm.jquery.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}common/js/autoAjaxForm.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            var anchor = window.location.hash;
            $(anchor).collapse('toggle');
        });
    </script>
{% endblock %}

{% block actions %}
    <a class="btn btn-default" href="{{ object.training.get_activity_list_url }}">
        {% trans 'Back to the training contents' %}
    </a>
{% endblock %}

{% block subtitle %}
    {{ object.name }}
{% endblock %}

{% block main %}
    <div class="panel panel-default">
        <div class="panel-heading clearfix">
            <h4 class="pull-left">{% trans 'Details' %}</h4>
            {% if object.training.is_editable %}
                <a href="{{ object.get_edit_url }}" class="btn btn-primary pull-right dialog-box">
                    <i class="fa fa-pencil"></i>
                    {% trans 'Edit details' %}
                </a>
            {% endif %}
        </div>
        <div class="panel-body">
            <p>{{ object.description }}</p>
        </div>
        {% block activity_details %}{% endblock %}
    </div>
    {% block activity_contents %}{% endblock %}
{% endblock %}