{% if is_granted('edit', part) %}
    <a href="{{ part|entityURL('edit') }}" class="btn btn-primary mt-3">
        <i class="fas fa-fw fa-edit"></i>
        {% trans %}part.edit.btn{% endtrans %}
    </a>
{% endif %}


{% if is_granted('create', part) %}
    <br>
    <div class="btn-group mt-2">
        <a class="btn btn-primary" href="{{ part|entityURL('clone') }}">
            <i class="fas fa-clone"></i>
            {% trans %}part.clone.btn{% endtrans %}
        </a>
        <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
            <span class="caret"></span>
        </button>
        <div class="dropdown-menu" role="menu">
            <a class="dropdown-item" href="{{ part|entityURL('create') }}">
                <i class="fas fa-plus-square"></i>
                {% trans %}part.create.btn{% endtrans %}
            </a>
        </div>
    </div>
{% endif %}

<form method="post" class="mt-2" action="{{ part|entityURL('delete') }}"
      data-delete-form data-title="{% trans  with {'%name%': part.name }%}part.delete.confirm_title{% endtrans %}"
      data-message="{% trans %}part.delete.message{% endtrans %}">
    <input type="hidden" name="_method" value="DELETE">
    <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ part.id) }}">
    <div class="form-group">
        <button class="btn btn-danger" {% if not is_granted("delete", part) %}disabled{% endif %}>
        <i class="fa fa-trash fa-fw"></i>
        {% trans %}part.delete{% endtrans %}
        </button>
    </div>
</form>