mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Added company quick links to supplier and manufactuerer parts lists
Also improved the styling.
This commit is contained in:
parent
915287de48
commit
53dd0c4228
6 changed files with 36 additions and 14 deletions
|
@ -340,6 +340,9 @@
|
|||
"phpstan/phpstan-symfony": {
|
||||
"version": "0.12.4"
|
||||
},
|
||||
"psalm/plugin-symfony": {
|
||||
"version": "v1.2.1"
|
||||
},
|
||||
"psr/cache": {
|
||||
"version": "1.0.1"
|
||||
},
|
||||
|
|
|
@ -22,16 +22,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block quick_links %}
|
||||
{% if entity.website is not empty %}
|
||||
<a href="{{ entity.website }}" title="{% trans %}company.edit.quick.website{% endtrans %}" data-no-ajax><i class="fas fa-globe fa-fw fa-lg"></i></a>
|
||||
{% endif %}
|
||||
{% if entity.emailAddress is not empty %}
|
||||
<a href="mailto:{{ entity.emailAddress }}" title="{% trans %}company.edit.quick.email{% endtrans %}" data-no-ajax><i class="fas fa-envelope-open-text fa-lg"></i></a>
|
||||
{% endif %}
|
||||
{% if entity.phoneNumber is not empty %}
|
||||
<a href="tel:{{ entity.phoneNumber | replace({' ': ''}) }}" title="{% trans %}company.edit.quick.phone{% endtrans %}" data-no-ajax><i class="fas fa-phone fa-lg"></i></a>
|
||||
{% endif %}
|
||||
{% if entity.faxNumber is not empty %}
|
||||
<a href="tel:{{ entity.faxNumber | replace({' ': ''}) }}" title="{% trans %}company.edit.quick.fax{% endtrans %}" data-no-ajax><i class="fas fa-fax fa-lg"></i></a>
|
||||
{% endif %}
|
||||
{% include 'QuickLinks/_company.html.twig' %}
|
||||
{% endblock %}
|
|
@ -66,6 +66,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
{% block quick_links %}{% endblock %}
|
||||
|
||||
<a class="btn btn-secondary btn-block mb-2" href="{{ entity | entityURL('edit') }}">
|
||||
<i class="fas fa-edit"></i> {% trans %}entity.edit.btn{% endtrans %}
|
||||
</a>
|
||||
|
|
|
@ -6,7 +6,13 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
{% include "Parts/lists/_info_card.html.twig" with {'header_label': 'manufacturer.label'} %}
|
||||
{% embed "Parts/lists/_info_card.html.twig" with {'header_label': 'manufacturer.label'} %}
|
||||
{% block quick_links %}
|
||||
<div class="mb-2">
|
||||
{% include 'QuickLinks/_company.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'manufacturer': entity.iD}} %}
|
||||
|
||||
|
|
|
@ -6,7 +6,13 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
{% include "Parts/lists/_info_card.html.twig" with {'header_label': 'supplier.label'} %}
|
||||
{% embed "Parts/lists/_info_card.html.twig" with {'header_label': 'supplier.label'} %}
|
||||
{% block quick_links %}
|
||||
<div class="mb-2">
|
||||
{% include 'QuickLinks/_company.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
{% include "Parts/lists/_action_bar.html.twig" with {'url_options': {'supplier': entity.iD}} %}
|
||||
|
||||
|
|
16
templates/QuickLinks/_company.html.twig
Normal file
16
templates/QuickLinks/_company.html.twig
Normal file
|
@ -0,0 +1,16 @@
|
|||
<div class="btn-toolbar">
|
||||
<div class="btn-group btn-block">
|
||||
{% if entity.website is not empty %}
|
||||
<a class="btn btn-outline-dark" href="{{ entity.website }}" title="{% trans %}company.edit.quick.website{% endtrans %}" data-no-ajax><i class="fas fa-globe fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% if entity.emailAddress is not empty %}
|
||||
<a class="btn btn-outline-dark" href="mailto:{{ entity.emailAddress }}" title="{% trans %}company.edit.quick.email{% endtrans %}" data-no-ajax><i class="fas fa-envelope-open-text"></i></a>
|
||||
{% endif %}
|
||||
{% if entity.phoneNumber is not empty %}
|
||||
<a class="btn btn-outline-dark" href="tel:{{ entity.phoneNumber | replace({' ': ''}) }}" title="{% trans %}company.edit.quick.phone{% endtrans %}" data-no-ajax><i class="fas fa-phone"></i></a>
|
||||
{% endif %}
|
||||
{% if entity.faxNumber is not empty %}
|
||||
<a class="btn btn-outline-dark" href="tel:{{ entity.faxNumber | replace({' ': ''}) }}" title="{% trans %}company.edit.quick.fax{% endtrans %}" data-no-ajax><i class="fas fa-fax"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue