{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "activity/actions.html.twig" as actions %} {% block page_title %}{{ 'admin_activity.title'|trans }}{% endblock %} {% block page_actions %}{{ actions.activity(activity, 'details') }}{% endblock %} {% block main %} {% set can_edit = is_granted('edit', activity) %} {% set currency = null %} {% if activity.project is not null %} {% set currency = activity.project.customer.currency %} {% endif %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "customer/actions.html.twig" as customerActions %} {% import "project/actions.html.twig" as projectActions %} {% block box_attributes %}id="activity_details_box"{% endblock %} {% block box_title %} {{ widgets.label_activity(activity) }} {% endblock %} {% block box_tools %} {% if can_edit %} {% endif %} {% endblock %} {% block box_body %} {% if activity.comment is not empty %} {{ activity.comment|comment2html(true) }} {% endif %} {% if not activity.visible %} {% endif %} {% if not activity.global %} {% endif %} {% for metaField in activity.visibleMetaFields %} {% endfor %}
{{ 'label.visible'|trans }} {{ widgets.label_boolean(activity.visible) }}
{{ 'label.customer'|trans }} {{ widgets.label_customer(activity.project.customer) }} {% if activity.project.customer.teams|length == 0 %} {{ widgets.icon('unlocked') }} {% endif %}   {{ customerActions.customer(activity.project.customer, 'custom') }}
{{ 'label.project'|trans }} {{ widgets.label_project(activity.project) }} {% if activity.project.teams|length == 0 %} {{ widgets.icon('unlocked') }} {% endif %}   {{ projectActions.project(activity.project, 'custom') }}
{{ metaField.label }} {{ widgets.form_type_value(metaField.type, metaField.value, activity) }}
{% endblock %} {% endembed %} {% if stats is not null %} {{ include('activity/embed_budget.html.twig', {'activity': activity, 'stats': stats}) }} {% endif %} {% if can_edit %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% block box_attributes %}id="activity_rates_box"{% endblock %} {% block box_title %} {{ 'rates.title'|trans }} {% endblock %} {% block box_tools %} {% endblock %} {% block box_body %} {% if rates is empty %} {{ 'rates.empty'|trans }} {% else %} {% for rate in rates %} {% endfor %}
{{ 'label.user'|trans }} {{ 'label.hourlyRate'|trans }} {{ 'label.fixedRate'|trans }}
{% if rate.user is not null %} {{ widgets.user_avatar(rate.user) }} {% else %} – {% endif %} {% if not rate.fixed %} {{ rate.rate|money(currency) }} {% endif %} {% if rate.fixed %} {{ rate.rate|money(currency) }} {% endif %}
{% endif %} {% endblock %} {% endembed %} {% endif %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}