{% load i18n %}
{% if display == 'inline' %}
    <div class="btn-group dropdown">
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            {% trans 'Actions' %} <i class="fa fa-caret-down"></i>
        </button>
        <ul class="dropdown-menu dropdown-menu-right">
{% else %}
    <div class="btn-group activity-actions dropdown">
        <button type="button" class="btn btn-link btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            <i class="fa fa-ellipsis-h fa-2x"></i>
        </button>
        <ul class="dropdown-menu">
{% endif %}
        {% if current_sub_section == "private_library" %}
            <li>
                <a href="{{ activity.get_private_library_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                    {% trans 'Duplicate' %}
                </a>
            </li>
            <li>
                <a href="{{ activity.get_trainings_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                    {% trans 'Create a copy in a scenario' %}
                </a>
            </li>
            <li>
                <a href="{{ activity.get_public_library_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                    {% trans 'Create a copy in Shared activities' %}
                </a>
            </li>
            <li>
                <a href="{{ activity.get_delete_url }}" class="dialog-box">
                    {% trans 'Delete' %}
                </a>
            </li>
        {% elif current_sub_section == "public_library" %}
            <li>
                <a href="{{ activity.get_private_library_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                    {% trans 'Create a copy in My activities' %}
                </a>
            </li>
            <li>
                <a href="{{ activity.get_trainings_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                    {% trans 'Create a copy in a scenario' %}
                </a>
            </li>
            {% if activity.is_owned %}
                <li>
                    <a href="{{ activity.get_delete_url }}" class="dialog-box">
                        {% trans 'Delete' %}
                    </a>
                </li>
            {% endif %}
        {% else %}
            {% if training.is_editable %}
                <li>
                    <a href="{{ activity.get_training_duplicate_url }}" class="dialog-box">
                        {% trans 'Duplicate' %}
                    </a>
                </li>
                <li>
                    <a href="{{ activity.get_trainings_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                        {% trans 'Create a copy in a scenario' %}
                    </a>
                </li>
            {% endif %}
            <li>
                <a href="{{ activity.get_private_library_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                    {% trans 'Create a copy in My activities' %}
                </a>
            </li>
            <li>
                <a href="{{ activity.get_public_library_duplicate_url }}?next_url={{ activity_next_url }}" class="dialog-box">
                    {% trans 'Create a copy in Shared activities' %}
                </a>
            </li>
            {% if training.is_editable %}
                <li>
                    <a href="{{ activity.get_delete_url }}" class="dialog-box">
                        {% trans 'Delete' %}
                    </a>
                </li>
            {% endif %}
        {% endif %}
    </ul>
</div>
