{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "macros/datatables.html.twig" as tables %} {% block page_title %}{{ 'admin_project.title'|trans }}{% endblock %} {% block page_subtitle %}{{ 'admin_project.subtitle'|trans }} {{ 'subtitle.amount'|trans({'%count%': entries.count}) }}{% endblock %} {% block main %} {% if entries.count == 0 %} {{ widgets.callout('warning', 'error.no_entries_found') }} {% endif %} {{ tables.data_table_header({ 'label.name': '', 'label.customer': '', 'label.comment': 'hidden-xs hidden-sm', 'label.budget': 'hidden-xs', 'label.visible': '', 'label.actions': '', }, toolbarForm, {'plus-square': path('admin_project_create')}) }} {% for entry in entries %} {{ entry.name }} {{ widgets.label_customer(entry.customer) }} {{ entry.comment }} {{ entry.budget|money(entry.customer.currency) }} {{ widgets.label_visible(entry.visible) }} {% set actionButtons = {} %} {% if is_granted('edit', entry) %} {% set actionButtons = {'edit': path('admin_project_edit', {'id': entry.id})}|merge(actionButtons) %} {% endif %} {% if is_granted('delete', entry) %} {% set actionButtons = actionButtons|merge({'trash': path('admin_project_delete', {'id': entry.id})}) %} {% endif %} {{ widgets.button_group(actionButtons) }} {% endfor %} {{ tables.data_table_footer(entries, 'admin_project_paginated') }} {% endblock %}