Optimized implementation of create

This commit is contained in:
Kevin Frantz
2019-02-25 20:45:15 +01:00
parent 6d146c8478
commit 90b14a1ef5
6 changed files with 35 additions and 14 deletions

View File

@@ -0,0 +1,6 @@
{% set icon_class = layer_icon_class_map.getIconClass(layer) %}
<i class="{{ icon_class }}"></i>
<a href="{{
path('infinito_api_rest_layer_create',{'layer':layer,'_format':'html'})}}">
{{ layer|trans|capitalize }}
</a>

View File

@@ -1,9 +1,3 @@
{% set icon_class = layer_icon_class_map.getIconClass(layer) %}
<i class="{{ icon_class }}"></i>
{# <a href="{{
path('infinito_api_rest_layer_read',{'layer':layer,'_format':'html'})}}">
#}
{{ layer|trans|capitalize }}: {# </a>#}
{% if slug is defined and slug%}
<a
href="{{ path('infinito_api_rest_layer_read',{'identity':slug,'layer':layer,'_format':'html'}) }}">

View File

@@ -2,7 +2,7 @@
{% extends "frames/default.html.twig" %}
{% set layer = requested_action_service.getLayer()%}
{% set headline = (layer|trans|capitalize)~': ' %}
{% if requested_action_service.hasRequestedEntity()%}
{% if requested_action_service.hasRequestedEntity() and requested_action_service.getRequestedEntity().hasIdentity() %}
{% set entity = requested_action_service.getRequestedEntity().getEntity() %}
{% if entity.hasSlug is defined and entity.hasSlug %}
{% set headline = headline~entity.slug %}
@@ -14,7 +14,10 @@
{% endblock %}
{% block content %}
<h1>
{% include "element/link/_layer_link.html.twig" with {'id':entity.getId(),'layer':layer,'slug':((entity.hasSlug() is defined and entity.hasSlug())?entity.getSlug():null)} %}
{% include "element/link/_layer_create_link.html.twig" with {'layer':layer} %}
{% if entity is defined%}
:{% include "element/link/_layer_read_link.html.twig" with {'id':entity.getId(),'layer':layer,'slug':((entity.hasSlug() is defined and entity.hasSlug())?entity.getSlug():null)} %}
{% endif %}
</h1>
{% if action_template_data_store_service.getAllStoredData().count() > 0 %}
<div id="accordion">