Optimized EntityDomService

This commit is contained in:
Kevin Frantz
2019-02-25 10:05:42 +01:00
parent 4385e84cc7
commit d0adc9b42a
18 changed files with 109 additions and 17 deletions

View 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>

View File

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