{% if menu|length %}
  {% if menu|length > 1 %}
    <a class="dropdown-trigger no-autoinit btn btn-floating red" title="{{ _('actions').capitalize() }}" data-target="row-actions-{{ object.pk }}"><i class="material-icons">menu</i></a>

    <ul class="dropdown-content" id="row-actions-{{ object.pk }}">
      {% for view in menu %}
      <li>
          <a
            href="{{ view.url }}"
            title="{{ view.title }}"
            {% if view.controller %}
            data-controller="{{ view.controller }}"
            {% endif %}
            {% if view.action %}
            data-action="{{ view.action }}"
            {% endif %}
            ><i class="{% for color in (view.color|default('')).split(' ') %}{{ color }}-text {% endfor %} material-icons">{{ view.material_icon }}</i> {{ view.title_menu }}
          </a>
      </li>
      {% endfor %}
    </ul>
  {% else %}
    {% for view in menu %}
     <a
       class="btn btn-floating {{ view.color }}"
       href="{{ view.url }}"
       title="{{ view.title }}"
       {% if view.controller %}
       data-controller="{{ view.controller }}"
       {% endif %}
       {% if view.action %}
       data-action="{{ view.action }}"
       {% endif %}
       ><i class="material-icons">{{ view.material_icon }}</i>
     </a>
    {% endfor %}
  {% endif %}
{% endif %}
