diff --git a/templates/info_providers/search/part_search.html.twig b/templates/info_providers/search/part_search.html.twig index 78e06283..0de72587 100644 --- a/templates/info_providers/search/part_search.html.twig +++ b/templates/info_providers/search/part_search.html.twig @@ -38,81 +38,90 @@ {{ form_end(form) }} {% if results is not null %} - - - - - - - - - - - - - - {% for result in results %} + + {% if results|length > 0 %} + {% trans with {'%number%': results|length} %}info_providers.search.number_of_results{% endtrans %}: + +
{% 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 %}
+ - - - - - - + + + + + + + - {% endfor %} + + + {% for result in results %} + + + -
- - - {% 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 }} -
- {% if update_target %} {# We update an existing part #} - {% set href = path('info_providers_update_part', - {'providerKey': result.provider_key, 'providerId': result.provider_id, 'id': update_target.iD}) %} - {% else %} {# Create a fresh part #} - {% set href = path('info_providers_create_part', - {'providerKey': result.provider_key, 'providerId': result.provider_id}) %} - {% endif %} - - - - - {% 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 %}
+ + + {% 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 }} + + {% if update_target %} {# We update an existing part #} + {% set href = path('info_providers_update_part', + {'providerKey': result.provider_key, 'providerId': result.provider_id, 'id': update_target.iD}) %} + {% else %} {# Create a fresh part #} + {% set href = path('info_providers_create_part', + {'providerKey': result.provider_key, 'providerId': result.provider_id}) %} + {% endif %} + + + + + + + {% endfor %} + + + + {% else %} + + {% endif %} {% endif %} {% endblock %} diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 9c606df3..3c2c3253 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -242,7 +242,7 @@ part.info.timetravel_hint - This is how the part appeared before %timestamp%. <i>Please note that this feature is experimental, so the info may not be correct.</i> + Please note that this feature is experimental, so the info may not be correct.]]> @@ -731,10 +731,10 @@ user.edit.tfa.disable_tfa_message - This will disable <b>all active two-factor authentication methods of the user</b> and delete the <b>backup codes</b>! -<br> -The user will have to set up all two-factor authentication methods again and print new backup codes! <br><br> -<b>Only do this if you are absolutely sure about the identity of the user (seeking help), otherwise the account could be compromised by an attacker!</b> + all active two-factor authentication methods of the user and delete the backup codes! +
+The user will have to set up all two-factor authentication methods again and print new backup codes!

+Only do this if you are absolutely sure about the identity of the user (seeking help), otherwise the account could be compromised by an attacker!]]>
@@ -893,9 +893,9 @@ The user will have to set up all two-factor authentication methods again and pri entity.delete.message - This can not be undone! -<br> -Sub elements will be moved upwards. + +Sub elements will be moved upwards.]]> @@ -1449,7 +1449,7 @@ Sub elements will be moved upwards. homepage.github.text - Source, downloads, bug reports, to-do-list etc. can be found on <a href="%href%" class="link-external" target="_blank">GitHub project page</a> + GitHub project page]]> @@ -1471,7 +1471,7 @@ Sub elements will be moved upwards. homepage.help.text - Help and tips can be found in Wiki the <a href="%href%" class="link-external" target="_blank">GitHub page</a> + GitHub page]]> @@ -1713,7 +1713,7 @@ Sub elements will be moved upwards. email.pw_reset.fallback - If this does not work for you, go to <a href="%url%">%url%</a> and enter the following info + %url% and enter the following info]]> @@ -1743,7 +1743,7 @@ Sub elements will be moved upwards. email.pw_reset.valid_unit %date% - The reset token will be valid until <i>%date%</i>. + %date%.]]> @@ -3586,8 +3586,8 @@ Sub elements will be moved upwards. tfa_google.disable.confirm_message - If you disable the Authenticator App, all backup codes will be deleted, so you may need to reprint them.<br> -Also note that without two-factor authentication, your account is no longer as well protected against attackers! + +Also note that without two-factor authentication, your account is no longer as well protected against attackers!]]> @@ -3607,7 +3607,7 @@ Also note that without two-factor authentication, your account is no longer as w tfa_google.step.download - Download an authenticator app (e.g. <a class="link-external" target="_blank" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Google Authenticator</a> oder <a class="link-external" target="_blank" href="https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp">FreeOTP Authenticator</a>) + Google Authenticator oder FreeOTP Authenticator)]]> @@ -3849,8 +3849,8 @@ Also note that without two-factor authentication, your account is no longer as w tfa_trustedDevices.explanation - When checking the second factor, the current computer can be marked as trustworthy, so no more two-factor checks on this computer are needed. -If you have done this incorrectly or if a computer is no longer trusted, you can reset the status of <i>all </i>computers here. + all computers here.]]> @@ -5321,7 +5321,7 @@ If you have done this incorrectly or if a computer is no longer trusted, you can label_options.lines_mode.help - If you select Twig here, the content field is interpreted as Twig template. See <a href="https://twig.symfony.com/doc/3.x/templates.html">Twig documentation</a> and <a href="https://docs.part-db.de/usage/labels.html#twig-mode">Wiki</a> for more information. + Twig documentation and Wiki for more information.]]> @@ -9396,25 +9396,25 @@ Element 3 filter.parameter_value_constraint.operator.< - Typ. Value < + filter.parameter_value_constraint.operator.> - Typ. Value > + ]]> filter.parameter_value_constraint.operator.<= - Typ. Value <= + filter.parameter_value_constraint.operator.>= - Typ. Value >= + =]]> @@ -9522,7 +9522,7 @@ Element 3 parts_list.search.searching_for - Searching parts with keyword <b>%keyword%</b> + %keyword%]]> @@ -10182,13 +10182,13 @@ Element 3 project.builds.number_of_builds_possible - You have enough stocked to build <b>%max_builds%</b> builds of this project. + %max_builds% builds of this project.]]> project.builds.check_project_status - The current project status is <b>"%project_status%"</b>. You should check if you really want to build the project with this status! + "%project_status%". You should check if you really want to build the project with this status!]]> @@ -10290,7 +10290,7 @@ Element 3 entity.select.add_hint - Use -> to create nested structures, e.g. "Node 1->Node 1.1" + to create nested structures, e.g. "Node 1->Node 1.1"]]> @@ -10314,13 +10314,13 @@ Element 3 homepage.first_steps.introduction - Your database is still empty. You might want to read the <a href="%url%">documentation</a> or start to creating the following data structures: + documentation or start to creating the following data structures:]]> homepage.first_steps.create_part - Or you can directly <a href="%url%">create a new part</a>. + create a new part.]]> @@ -10332,7 +10332,7 @@ Element 3 homepage.forum.text - For questions about Part-DB use the <a href="%href%" class="link-external" target="_blank">discussion forum</a> + discussion forum]]> @@ -10986,7 +10986,7 @@ Element 3 parts.import.help_documentation - See the <a href="%link%">documentation</a> for more information on the file format. + documentation for more information on the file format.]]> @@ -11166,7 +11166,7 @@ Element 3 part.filter.lessThanDesired - In stock less than desired (total amount < min. amount) + @@ -11978,13 +11978,13 @@ Please note, that you can not impersonate a disabled user. If you try you will g part.merge.confirm.title - Do you really want to merge <b>%other%</b> into <b>%target%</b>? + %other% into %target%?]]> part.merge.confirm.message - <b>%other%</b> will be deleted, and the part will be saved with the shown information. + %other% will be deleted, and the part will be saved with the shown information.]]> @@ -12209,5 +12209,17 @@ Please note, that you can not impersonate a disabled user. If you try you will g Created %COUNT% entities successfully. + + + info_providers.search.number_of_results + %number% results + + + + + info_providers.search.no_results + No results found at the selected providers! Check your search term or try to choose additional providers. + +