{% extends 'core_main_app/_render/admin/theme/tools/box.html' %}

{% block box_title %}{{data.title}}{% endblock %}

{% block box_tools %}
    <a href="{% url 'core-admin:core_dashboard_workspaces' %}" class="btn btn-secondary back-to-previous">
         <i class="fas fa-arrow-left"></i> Previous page
    </a>
{% endblock %}

{% block box_body %}
    {% if data.menu and not data.title %}
        <div class="dropdown" id="id_actions" style="display:none">
            <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                Choose action
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                {% for value, text in data.action_form.fields.actions.choices %}
                    <li style="cursor:  pointer;" onclick="action_dashboard({{value}});">{{text}}</li>
                {% endfor %}
            </ul>
        </div>
    {% endif %}
    <div class="tab-content">
        {% include data.template with objects=data.user_data group='user' %}
    </div>
{% endblock %}
