{% if item.projects is not empty %}
{% for project in item.projects %} {% set projectPopover %}

{{ project.name }}

{% if project.dateModified is not empty %} {{ 'mautic.project.popover.updated.on'|trans({'%date%': project.dateModified.date|date}) }} {% endif %}

{{ project.description|striptags|slice(0, 150) ~ (project.description|length > 150 ? '...' : '') }}

{% set buttons = [] %} {% if securityIsGranted('project:project:view') %} {% set buttons = buttons|merge([ { label: 'mautic.project.popover.view.details'|trans, href: path('mautic_project_action', {'objectAction': 'view', 'objectId': project.id}), icon: 'ri-arrow-right-line', variant: 'tertiary', size: 'sm', wide: true, attributes: { class: 'project-popover__action mb-xs' } } ]) %} {% endif %} {% if securityIsGranted('project:project:edit') %} {% set buttons = buttons|merge([ { label: 'mautic.project.popover.edit'|trans, href: path('mautic_project_action', {'objectAction': 'edit', 'objectId': project.id}), icon: 'ri-edit-line', variant: 'tertiary', size: 'sm', wide: true, attributes: { class: 'project-popover__action ml-0' } } ]) %} {% endif %} {% if buttons|length > 0 %} {% include '@MauticCore/Helper/button.html.twig' with { buttons: buttons } %} {% endif %}
{% endset %}
{% include '@MauticCore/Helper/_tag.html.twig' with { tags: [ { label: project.name, color: 'brand', size: 'sm', } ] } %}
{% endfor %}
{% endif %}