{% trans %}part.table.manufacturingStatus{% endtrans %}
{% trans %}info_providers.table.provider.label{% endtrans %}
-
-
@@ -108,26 +106,7 @@
{{ dto.provider_id }}
-
- {# TODO: would like to have a sort of "part exists!" text here, but don't know how to style it
- also it would be nice to have these two buttons closer together, but when I put them in one cell
- they sometimes stack#}
- {% if localPart is not null %}
-
-
-
- {% endif %}
-
-
- {% if localPart is not null %}
-
-
-
- {% endif %}
-
-
+
{% if update_target %} {# We update an existing part #}
{% set href = path('info_providers_update_part',
@@ -137,10 +116,34 @@
{'providerKey': dto.provider_key, 'providerId': dto.provider_id}) %}
{% endif %}
-
-
-
+ {# If we have no local part, then we can just show the create button #}
+ {% if localPart is null %}
+
+
+
+ {% else %} {# Otherwise add a button group with all three buttons #}
+
+
+ {% trans %}info_providers.search.existing_part_found.short{% endtrans %}
+
+
+
{% endfor %}
diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf
index bd3484e9..655ec91a 100644
--- a/translations/messages.en.xlf
+++ b/translations/messages.en.xlf
@@ -12239,5 +12239,17 @@ Please note, that you can not impersonate a disabled user. If you try you will g
Edit existing part
+
+
+ info_providers.search.existing_part_found.short
+ Part already existing
+
+
+
+
+ info_providers.search.existing_part_found
+ This part (or a very similar one) was already found in the database. Please check if it is the same and if you want to create it again!
+
+