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