mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-05 02:35:16 +02:00
Refactored TwigExtensions Part 1
This commit is contained in:
parent
8e6300079a
commit
b078389381
21 changed files with 301 additions and 89 deletions
|
@ -143,11 +143,11 @@
|
|||
{% if attach.secure and not is_granted('show_private', attach) %}
|
||||
{# Leave blank #}
|
||||
{% elseif attach.picture %}
|
||||
<a href="{{ attach | entityURL('file_view') }}" rel="noopener" target="_blank" data-turbo="false">
|
||||
<a href="{{ entity_url(attach, 'file_view') }}" rel="noopener" target="_blank" data-turbo="false">
|
||||
<img class="img-fluid img-thumbnail thumbnail-sm" src="{{ attachment_thumbnail(attach, 'thumbnail_md') }}" alt="{% trans %}attachment.preview.alt{% endtrans %}" />
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ attach | entityURL('file_view') }}" rel="noopener" target="_blank" data-turbo="false" class="link-external">{% trans %}attachment.view{% endtrans %}</a>
|
||||
<a href="{{ entity_url(attach, 'file_view') }}" rel="noopener" target="_blank" data-turbo="false" class="link-external">{% trans %}attachment.view{% endtrans %}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<br><br>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{% block card_title %}
|
||||
<i class="fas fa-edit fa-fw" aria-hidden="true"></i>
|
||||
{% trans with {'%name%': part.name} %}part.edit.card_title{% endtrans %}
|
||||
<b><a href="{{ part|entityURL('info') }}" class="text-white">{{ part.name }}</a></b>
|
||||
<b><a href="{{ entity_url(part, 'info') }}" class="text-white">{{ part.name }}</a></b>
|
||||
<div class="float-end">
|
||||
{% trans %}id.label{% endtrans %}: {{ part.id }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue