diff --git a/assets/js/register_events.js b/assets/js/register_events.js index 383cf7bd..22e91fdf 100644 --- a/assets/js/register_events.js +++ b/assets/js/register_events.js @@ -62,7 +62,7 @@ class RegisterEventHelper { const handler = () => { $(".tooltip").remove(); //Exclude dropdown buttons from tooltips, otherwise we run into endless errors from bootstrap (bootstrap.esm.js:614 Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown.) - $('a[title], label[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i[title]') + $('a[title], label[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i[title], small[title]') //@ts-ignore .tooltip("hide").tooltip({container: "body", placement: "auto", boundary: 'window'}); }; diff --git a/src/Form/InfoProviderSystem/PartSearchType.php b/src/Form/InfoProviderSystem/PartSearchType.php index 5bbbf156..9d582ca4 100644 --- a/src/Form/InfoProviderSystem/PartSearchType.php +++ b/src/Form/InfoProviderSystem/PartSearchType.php @@ -30,10 +30,18 @@ use Symfony\Component\Form\FormBuilderInterface; class PartSearchType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options) + public function buildForm(FormBuilderInterface $builder, array $options): void { - $builder->add('keyword', SearchType::class); - $builder->add('providers', ProviderSelectType::class); - $builder->add('submit', SubmitType::class); + $builder->add('keyword', SearchType::class, [ + 'label' => 'info_providers.search.keyword', + ]); + $builder->add('providers', ProviderSelectType::class, [ + 'label' => 'info_providers.search.providers', + 'help' => 'info_providers.search.providers.help', + ]); + + $builder->add('submit', SubmitType::class, [ + 'label' => 'info_providers.search.submit' + ]); } } \ No newline at end of file diff --git a/templates/info_providers/search/part_search.html.twig b/templates/info_providers/search/part_search.html.twig index 1556530b..a3476575 100644 --- a/templates/info_providers/search/part_search.html.twig +++ b/templates/info_providers/search/part_search.html.twig @@ -11,36 +11,83 @@ {% block card_content %} - All info providers - {{ form(form) }} + + {{ form_start(form) }} + + {{ form_row(form.keyword) }} + {{ form_row(form.providers) }} + +
+
+ {% trans %}info_providers.search.info_providers_list{% endtrans %} +
+
+ + {{ form_row(form.submit) }} + + {{ form_end(form) }} {% if results is not null %} - - - - - - - - - - + + + + + + + + + {% for result in results %} - - - - - - - + + + + + diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 9e92eb7f..8312871e 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -11438,7 +11438,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g info_providers.providers_list.title - Info providers + Create parts from info provider @@ -11501,5 +11501,41 @@ Please note, that you can not impersonate a disabled user. If you try you will g Connect OAuth + + + info_providers.table.provider.label + Provider + + + + + info_providers.search.keyword + Keyword + + + + + info_providers.search.submit + Search + + + + + info_providers.search.providers.help + Select the providers in which should be searched. + + + + + info_providers.search.providers + Providers + + + + + info_providers.search.info_providers_list + Show all available info providers + +
NameDescriptionManufactuerMPNStatusProvider
{% trans %}name.label{% endtrans %} / {% trans %}part.table.mpn{% endtrans %}{% trans %}description.label{% endtrans %} / {% trans %}category.label{% endtrans %}{% trans %}manufacturer.label{% endtrans %} / {% trans %}footprint.label{% endtrans %}{% trans %}part.table.manufacturingStatus{% endtrans %}{% trans %}info_providers.table.provider.label{% endtrans %}
{{ result.name }}{{ result.description }}{{ result.manufacturer ?? '' }}{{ result.mpn ?? '' }}{{ helper.m_status_to_badge(result.manufacturing_status) }}{{ result.provider_key }}: {{ result.provider_id }} - + + + {% if result.provider_url is not null %} + {{ result.name }} + {% else %} + {{ result.name }} + {% endif %} + + {% if result.mpn is not null %} +
+ {{ result.mpn }} + {% endif %} +
+ {{ result.description }} + {% if result.category is not null %} +
+ {{ result.category }} + {% endif %} +
+ {{ result.manufacturer ?? '' }} + {% if result.footprint is not null %} +
+ {{ result.footprint }} + {% endif %} +
{{ helper.m_status_to_badge(result.manufacturing_status) }} + {% if result.provider_url %} + + {{ info_provider_label(result.provider_key)|default(result.provider_key) }} + + {% else %} + {{ info_provider_label(result.provider_key)|default(result.provider_key) }} + {% endif %} +
+ {{ result.provider_id }} +
+