{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %} {% import "activity/actions.html.twig" as actions %} {% block page_title %}{{ 'admin_activity.title'|trans }}{% endblock %} {% block page_actions %}{{ actions.activity(activity, 'delete') }}{% endblock %} {% block main %} {% set inUse = (stats.recordAmount > 0) %} {% set params = { '%activity%': activity.name, '%project%': '-', '%customer%': '-', '%records%': stats.recordAmount, '%duration%': stats.recordDuration|duration } %} {% if activity.project is not null %} {% set params = params|merge({ '%project%': activity.project.name, '%customer%': activity.project.customer.name, }) %} {% endif %} {{ include(app.request.xmlHttpRequest ? 'default/_form_delete_modal.html.twig' : 'default/_form_delete.html.twig', { 'message': ("admin_activity.short_stats"|trans(params) ~ "admin_entity.delete_confirm"|trans), 'form': form, 'used': inUse, 'back': path('admin_activity') }) }} {% endblock %}