Added links to part_lists on part info page.

This commit is contained in:
Jan Böhmer 2019-09-08 16:20:53 +02:00
parent 2040178460
commit 429a4ebd17
5 changed files with 76 additions and 33 deletions

View file

@ -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 %}