{% import "helper.twig" as helper %}
{% if project.masterPictureAttachment %} {% else %} Part main image {% endif %}

{{ project.name }} {# You need edit permission to use the edit button #} {% if is_granted('edit', project) %} {% endif %}

{{ project.description|format_markdown(true) }}
{% if project.buildPart %}
{% trans %}project.edit.associated_build_part{% endtrans %}:
{{ project.buildPart.name }} {% endif %}
{# Sidebar panel with infos about last creation date, etc. #}
{{ helper.date_user_combination(project, true) }}
{{ helper.date_user_combination(project, false) }}
{{ helper.project_status_to_badge(project.status) }}
{{ project.bomEntries | length }} {% trans %}project.info.bom_entries_count{% endtrans %}
{% set n = number_of_builds ?? 1 %} {% set total_build_price = buildHelper.roundedTotalBuildPrice(project, n, app.user.currency ?? null) %} {% set unit_build_price = buildHelper.roundedUnitBuildPrice(project, n, app.user.currency ?? null) %} {% if total_build_price is not null %}
{% trans %}project.info.total_build_price{% endtrans %}: {{ total_build_price | format_money(app.user.currency ?? null, 2) }} {% if n > 1 and unit_build_price is not null %} ({% trans %}project.info.per_unit_price{% endtrans %}: {{ unit_build_price | format_money(app.user.currency ?? null, 2) }}) {% endif %}
{% endif %}
{% trans %}project.builds.number_of_builds{% endtrans %}
{% if project.children is not empty %}
{{ project.children | length }} {% trans %}project.info.sub_projects_count{% endtrans %}
{% endif %}
{% if project.comment is not empty %}
{% trans %}comment.label{% endtrans %}:
{{ project.comment|format_markdown }}
{% endif %}