mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-28 20:21:41 +00:00
Refactored TwigExtensions Part 1
This commit is contained in:
parent
8e6300079a
commit
b078389381
21 changed files with 301 additions and 89 deletions
|
|
@ -8,7 +8,7 @@
|
|||
<h5 class="text-muted pt-2" title="{% trans %}manufacturer.label{% endtrans %}">
|
||||
{% if part.manufacturer %}
|
||||
{% if part.manufacturer.id is not null %}
|
||||
<a href="{{ part.manufacturer | entityURL('list_parts') }}">{{ part.manufacturer.name}}</a>
|
||||
<a href="{{ entity_url(part.manufacturer, 'list_parts') }}">{{ part.manufacturer.name}}</a>
|
||||
{% else %}
|
||||
{{ part.manufacturer.name }}
|
||||
{% endif %}
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
<h3 class="w-fit" title="{% trans %}name.label{% endtrans %}">{{ part.name }}
|
||||
{# You need edit permission to use the edit button #}
|
||||
{% if timeTravel is not null %}
|
||||
<a href="{{ part|entityURL('info') }}"><i title="{% trans %}part.back_to_info{% endtrans %}" class="fas fa-fw fa-arrow-circle-left"></i></a>
|
||||
<a href="{{ entity_url(part, 'info') }}"><i title="{% trans %}part.back_to_info{% endtrans %}" class="fas fa-fw fa-arrow-circle-left"></i></a>
|
||||
{% elseif is_granted('edit', part) %}
|
||||
<a href="{{ part|entityURL('edit') }}"><i class="fas fa-fw fa-sm fa-edit"></i></a>
|
||||
<a href="{{ entity_url(part, 'edit') }}"><i class="fas fa-fw fa-sm fa-edit"></i></a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<h6 class="text-muted w-fit" title="{% trans %}description.label{% endtrans %}"><span>{{ part.description|markdown(true) }}</span></h6>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue