mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 05:47:11 +02:00
Optimized EntityDomService
This commit is contained in:
23
application/symfony/templates/entity/_entity_read.html.twig
Normal file
23
application/symfony/templates/entity/_entity_read.html.twig
Normal file
@@ -0,0 +1,23 @@
|
||||
<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 %}
|
||||
<a href="{{ path('infinito_api_rest_layer_read',{'identity':id,'layer':layer,'_format':'html'}) }}">{{ content }}</a>
|
||||
{% else %}
|
||||
{{ content }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
@@ -15,8 +15,8 @@
|
||||
</h1>
|
||||
<div id="accordion">
|
||||
{% for action in layer_action_map.getActions(layer) %}
|
||||
{{ action_template_name_service.setActionType(action) }}
|
||||
{% if action_template_name_service.doesAtomTemplateExist() %}
|
||||
{% if action_template_data_store_service.isDataStored(action) %}
|
||||
{{ action_template_name_service.setActionType(action) }}
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading_{{ action }}">
|
||||
<h5 class="mb-0">
|
||||
@@ -30,7 +30,7 @@
|
||||
<div id="collapse_{{ action }}" class="collapse"
|
||||
aria-labelledby="heading_{{ action }}" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
{% include action_template_name_service.getAtomTemplateName() %}
|
||||
{% include [action_template_name_service.getAtomTemplateName(),'entity/_entity_'~action~'.html.twig'] %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user