diff --git a/src/Form/Part/PartLotType.php b/src/Form/Part/PartLotType.php
index 2e23c94a..2c46df1a 100644
--- a/src/Form/Part/PartLotType.php
+++ b/src/Form/Part/PartLotType.php
@@ -27,6 +27,7 @@ use App\Entity\Parts\PartLot;
use App\Entity\Parts\Storelocation;
use App\Form\Type\SIUnitType;
use App\Form\Type\StructuralEntityType;
+use App\Form\Type\UserSelectType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
@@ -98,6 +99,12 @@ class PartLotType extends AbstractType
'required' => false,
'empty_data' => '',
]);
+
+ $builder->add('owner', UserSelectType::class, [
+ 'label' => 'part_lot.owner',
+ 'required' => false,
+ 'help' => 'part_lot.owner.help',
+ ]);
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/templates/helper.twig b/templates/helper.twig
index 1957864f..137dd792 100644
--- a/templates/helper.twig
+++ b/templates/helper.twig
@@ -159,11 +159,7 @@
{% endif %}
{% if user is not null %}
- {% if user.fullName is not empty %}
- ({{ _self.user_icon(user) }} {{ user.fullName }})
- {% else %}
- ({{ _self.user_icon(user) }} @{{ user.name }})
- {% endif %}
+ ({{ _self.user_icon_link(user) }})
{% endif %}
{% endif %}
{% endmacro %}
@@ -180,6 +176,14 @@
{% endmacro %}
+{% macro user_icon_link(user) %}
+ {% if user.fullName is not empty %}
+ {{ _self.user_icon(user) }} {{ user.fullName }}
+ {% else %}
+ {{ _self.user_icon(user) }} @{{ user.name }}
+ {% endif %}
+{% endmacro %}
+
{% macro entity_preview_sm(entity) %}
{# @var entity \App\Entity\Contracts\HasMasterAttachmentInterface #}
{% if entity.masterPictureAttachment and entity.masterPictureAttachment.picture and attachment_manager.fileExisting(entity.masterPictureAttachment) %}
diff --git a/templates/parts/info/_part_lots.html.twig b/templates/parts/info/_part_lots.html.twig
index e6d8637f..1d11b1a4 100644
--- a/templates/parts/info/_part_lots.html.twig
+++ b/templates/parts/info/_part_lots.html.twig
@@ -41,21 +41,26 @@