diff --git a/src/DataTables/ProjectBomEntriesDataTable.php b/src/DataTables/ProjectBomEntriesDataTable.php index 50586749..7fabff8b 100644 --- a/src/DataTables/ProjectBomEntriesDataTable.php +++ b/src/DataTables/ProjectBomEntriesDataTable.php @@ -76,7 +76,7 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface ]) ->add('quantity', TextColumn::class, [ - 'label' => $this->translator->trans('project.bom.quantity'), + 'label' => $this->translator->trans('project.bom.quantity'), 'className' => 'text-center', 'render' => function ($value, ProjectBOMEntry $context) { //If we have a non-part entry, only show the rounded quantity @@ -132,7 +132,15 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface ]) ->add('mountnames', TextColumn::class, [ + 'label' => 'project.bom.mountnames', + 'render' => function ($value, ProjectBOMEntry $context) { + $html = ''; + foreach (explode(',', $context->getMountnames()) as $mountname) { + $html .= sprintf('%s ', htmlspecialchars($mountname)); + } + return $html; + }, ]) diff --git a/templates/Parts/info/_projects.html.twig b/templates/Parts/info/_projects.html.twig index a4c265c8..0538347a 100644 --- a/templates/Parts/info/_projects.html.twig +++ b/templates/Parts/info/_projects.html.twig @@ -1,4 +1,5 @@ {% import "components/attachments.macro.html.twig" as attachments %} +{% import "helper.twig" as helper %}
{% if bom_entry.project.masterPictureAttachment is not null %}{{ attachments.attachment_icon(bom_entry.project.masterPictureAttachment, attachment_manager) }}{% endif %} | {{ bom_entry.project.name }} | {# Name #}{{ bom_entry.project.description|format_markdown }} | {# Description #}{{ bom_entry.quantity | format_amount(part.partUnit) }} | -{{ bom_entry.mountnames }} | +{% for tag in bom_entry.mountnames|split(',') %} + {{ tag | trim }} + {% endfor %} |