mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-04 10:14:44 +02:00
101 lines
4.2 KiB
Twig
101 lines
4.2 KiB
Twig
{% extends "main_card.html.twig" %}
|
|
|
|
{% import "info_providers/providers.macro.html.twig" as providers_macro %}
|
|
{% import "helper.twig" as helper %}
|
|
|
|
{% block title %}{% trans %}info_providers.search.title{% endtrans %}{% endblock %}
|
|
|
|
{% block card_title %}
|
|
<i class="fas fa-cloud-arrow-down"></i> {% trans %}info_providers.search.title{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block card_content %}
|
|
|
|
|
|
|
|
{{ form_start(form) }}
|
|
|
|
{{ form_row(form.keyword) }}
|
|
{{ form_row(form.providers) }}
|
|
|
|
<div class="row mb-2">
|
|
<div class="col-sm-9 offset-sm-3">
|
|
<a href="{{ path('info_providers_list') }}">{% trans %}info_providers.search.info_providers_list{% endtrans %}</a>
|
|
</div>
|
|
</div>
|
|
|
|
{{ form_row(form.submit) }}
|
|
|
|
{{ form_end(form) }}
|
|
|
|
{% if results is not null %}
|
|
<table class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>{% trans %}name.label{% endtrans %} / {% trans %}part.table.mpn{% endtrans %}</th>
|
|
<th>{% trans %}description.label{% endtrans %} / {% trans %}category.label{% endtrans %}</th>
|
|
<th>{% trans %}manufacturer.label{% endtrans %} / {% trans %}footprint.label{% endtrans %}</th>
|
|
<th>{% trans %}part.table.manufacturingStatus{% endtrans %}</th>
|
|
<th>{% trans %}info_providers.table.provider.label{% endtrans %}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for result in results %}
|
|
<tr>
|
|
<td>
|
|
<img src="{{ result.preview_image_url }}" data-thumbnail="{{ result.preview_image_url }}"
|
|
class="hoverpic" style="max-width: 45px;" {{ stimulus_controller('elements/hoverpic') }}>
|
|
</td>
|
|
<td>
|
|
{% if result.provider_url is not null %}
|
|
<a href="{{ result.provider_url }}" target="_blank" rel="noopener">{{ result.name }}</a>
|
|
{% else %}
|
|
{{ result.name }}
|
|
{% endif %}
|
|
|
|
{% if result.mpn is not null %}
|
|
<br>
|
|
<small class="text-muted" title="{% trans %}part.table.mpn{% endtrans %}">{{ result.mpn }}</small>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ result.description }}
|
|
{% if result.category is not null %}
|
|
<br>
|
|
<small class="text-muted">{{ result.category }}</small>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ result.manufacturer ?? '' }}
|
|
{% if result.footprint is not null %}
|
|
<br>
|
|
<small class="text-muted">{{ result.footprint }}</small>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ helper.m_status_to_badge(result.manufacturing_status) }}</td>
|
|
<td>
|
|
{% if result.provider_url %}
|
|
<a href="{{ result.provider_url }}" target="_blank" rel="noopener">
|
|
{{ info_provider_label(result.provider_key)|default(result.provider_key) }}
|
|
</a>
|
|
{% else %}
|
|
{{ info_provider_label(result.provider_key)|default(result.provider_key) }}
|
|
{% endif %}
|
|
<br>
|
|
<small class="text-muted">{{ result.provider_id }}</small>
|
|
<td>
|
|
<a class="btn btn-primary" href="{{ path('info_providers_create_part', {'providerKey': result.provider_key, 'providerId': result.provider_id}) }}"
|
|
target="_blank" title="{% trans %}part.create.btn{% endtrans %}">
|
|
<i class="fa-solid fa-plus-square"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|