mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-24 20:09:31 +00:00
Added links to part_lists on part info page.
This commit is contained in:
parent
2040178460
commit
429a4ebd17
5 changed files with 76 additions and 33 deletions
|
|
@ -73,4 +73,23 @@
|
|||
{{ ("m_status." ~ status) | trans }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro structural_entity_link(entity, link_type = "list_parts") %}
|
||||
{# @var entity \App\Entity\Base\StructuralDBElement #}
|
||||
{% if entity %}
|
||||
<ul class="structural_link d-inline">
|
||||
{% for e in entity.pathArray %}
|
||||
<li>
|
||||
{% if link_type is not empty %}
|
||||
<a href="{{ e | entityURL(link_type) }}">{{ e.name }}</a>
|
||||
{% else %}
|
||||
{{ e.name }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue