infinito/application/symfony/templates/entity/_entity_read.html.twig

27 lines
685 B
Twig
Raw Normal View History

2019-02-25 10:05:42 +01:00
<table class="Table">
<tr>
<th>{{'Attribut'|trans}}</th>
<th>{{'Value'|trans}}</th>
</tr>
{% for node in entity_dom_service.getDomDocument().childNodes %}
{% set id = node.getAttribute('id') %}
{% set layer = node.getAttribute('layer') %}
{% set content = node.getAttribute('value') %}
{% set name = node.getAttribute('name') %}
<tr>
<td>{{ name|trans }}</td>
<td>
{% if id and layer %}
2019-02-25 12:50:26 +01:00
<a href="{{ path('infinito_api_rest_layer_read',{'identity':id,'layer':layer,'_format':'html'}) }}">
<i class="fas fa-link"></i>
{% if id == content %}#{% endif %}{{ content }}
</a>
2019-02-25 10:05:42 +01:00
{% else %}
{{ content }}
{% endif %}
</td>
</tr>
{% endfor %}
</table>