{% load beam_tags %}
{% load i18n %}

{% get_visible_links request.user links link_layout object as link_urls %}

{% if link_urls %}
    <div class="btn-group" role="group" aria-label="{% trans "Actions" %}">
        {% for link, url in link_urls %}
        <a href="{{ url }}" class="btn btn-type-{{ link.name }}
            {% if list %}btn-small{% endif %}
                {% if link.name == 'delete' %}btn-outline-danger
                {% elif link.name == 'create' or link.name == 'update' %}btn-primary
                {% else %}btn-outline-secondary{% endif %}
              ">{{ link.verbose_name|capfirst }}</a>
        {% endfor %}
    </div>
{% endif %}
