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

{% load i18n template_tools %}

{% block activity_details %}
    <table class="table table-bordered">
        <tr>
            <td>
                {% get_verbose_field_name roleplay "criteria_rating_scale" %}:
                <b>{{ roleplay.criteria_rating_scale }}</b>
            </td>
            <td>
                {% get_verbose_field_name roleplay "criteria_rating_type" %}:
                <b>{{ roleplay.get_criteria_rating_type_display }}</b>
            </td>
        </tr>
    </table>
{% endblock %}
{% block activity_contents %}
    <div class="panel panel-default">
			<div class="panel-heading">
				<h4>{% trans 'Steps' %}</h4>
			</div>
			<ul class="list-group">
				{% for step in steps %}
					<li class="list-group-item clearfix">
						{{ step.name }}
                        {% if roleplay.training.is_editable %}
                            <div class="pull-right">
                                <a href="{{ step.get_edit_url }}" class="btn btn-sm btn-primary">
                                    <i class="fa fa-pencil icon-white"></i> {% trans 'Edit' %}
                                </a>
                                <a href="{{ step.get_delete_url }}" class="btn btn-sm btn-danger dialog-box">
                                    <i class="fa fa-trash icon-white"></i> {% trans 'Delete' %}
                                </a>
                            </div>
                        {% endif %}
					</li>
				{% endfor %}
			</ul>
            {% if roleplay.training.is_editable %}
                <div class="panel-footer clearfix">
                    <div class="pull-right">
                        <a href="{{ roleplay.get_step_create_url }}" class="btn btn-primary">
                            {% trans 'Add a new step' %}
                        </a>
                        <a href="{{ roleplay.get_steps_sort_url }}" class="btn btn-default">
                            <i class="fa fa-sort"></i> {% trans 'Sort steps' %}
                        </a>
                    </div>
                </div>
            {% endif %}
		</div>
{% endblock %}
