{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% block main %} {% set can_edit = is_granted('edit', project) %} {% embed '@theme/embeds/card.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "customer/actions.html.twig" as customerActions %} {% block box_attributes %}id="project_details_box"{% endblock %} {% block box_tools %} {% if can_edit %} {{ widgets.card_tool_button('edit', {'class': 'modal-ajax-form open-edit', 'title': 'action.edit', 'url': path('admin_project_edit', {'id': project.id})}) }} {% endif %} {% endblock %} {% block box_title %} {{ widgets.label_dot(project.name, project.color) }} {% endblock %} {% block box_body_class %}p-0{% endblock %} {% block box_body %} {% if project.comment is not empty %}
{{ project.comment|comment2html(true) }}
{% endif %} {% if not project.visible %} {% endif %} {% if is_granted('details', project) %} {% if not project.billable %} {% endif %} {% if project.orderNumber is not empty %} {% endif %} {% if project.orderDate is not empty %} {% endif %} {% if project.start is not empty %} {% endif %} {% if project.end is not empty %} {% endif %} {% if project.number is not empty %} {% endif %} {% endif %} {% if project.hasBudget() and is_granted('budget', project) %} {% endif %} {% if project.hasTimeBudget() and is_granted('time', project) %} {% endif %} {% if not project.globalActivities %} {% endif %} {% for metaField in project.visibleMetaFields|filter(field => field.defined)|sort((a, b) => a.order <=> b.order) %} {% endfor %}
{{ 'visible'|trans }} {{ widgets.label_boolean(project.visible) }}
{{ 'customer'|trans }} {{ widgets.label_customer(project.customer) }} {{ widgets.badge_team_access(project.customer.teams) }} {{ customerActions.customer(project.customer, 'custom') }}
{{ 'billable'|trans }} {{ widgets.label_boolean(project.billable) }}
{{ 'orderNumber'|trans }} {{ project.orderNumber }}
{{ 'orderDate'|trans }} {{ project.orderDate|date_short }}
{{ 'project_start'|trans }} {{ project.start|date_short }}
{{ 'project_end'|trans }} {{ project.end|date_short }}
{{ 'project_number'|trans }} {{ project.number }}
{{ 'budget'|trans }} {% if project.isMonthlyBudget() %} ({{ 'budgetType_month'|trans }}) {% endif %} {{ project.getBudget()|money(project.customer.currency) }}
{{ 'timeBudget'|trans }} {% if project.isMonthlyBudget() %} ({{ 'budgetType_month'|trans }}) {% endif %} {{ project.getTimeBudget()|duration }}
{{ 'globalActivities'|trans }} {{ widgets.label_boolean(project.globalActivities) }}
{{ metaField.label|trans }} {{ widgets.form_type_value(metaField.type, metaField.value, project) }}
{% endblock %} {% endembed %} {{ render(controller('App\\Controller\\ProjectController::activitiesAction', {'project': project.id, 'page': 1})) }} {% if can_edit %} {{ include('embeds/rates-table.html.twig', {'id': 'project_rates_box', 'entity': project, 'create_url': path('admin_project_rate_add', {'id': project.id}), 'delete_route': 'delete_project_rate', 'currency': project.customer.currency, 'edit_route': 'admin_project_rate_edit'}) }} {% endif %} {% if stats is not null %} {{ include('embeds/budgets.html.twig', {'entity': project, 'stats': stats, 'currency': project.customer.currency}) }} {% endif %} {% for controller in boxes %} {{ render(controller(controller, {'project': project, 'page': 1})) }} {% endfor %} {% if teams is not null%} {% set options = {'teams': teams, 'team': team} %} {% if is_granted('permissions', project) %} {% set options = options|merge({'route_create': path('project_team_create', {'id': project.id}), 'route_edit': path('admin_project_permissions', {'id': project.id})}) %} {% endif %} {% if project.customer.teams|length > 0 %} {% set options = options|merge({'empty_message': 'team.project_visibility_inherited'}) %} {% endif %} {{ include('embeds/teams.html.twig', options) }} {% endif %} {% if comments is not null %} {% set options = {'form': commentForm, 'comments': comments} %} {% if can_edit %} {% set options = options|merge({'route_pin': 'project_comment_pin', 'route_delete': 'project_comment_delete'}) %} {% endif %} {{ include('embeds/comments.html.twig', options) }} {% endif %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}