mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 14:27:28 +01:00
51 lines
2.5 KiB
Twig
51 lines
2.5 KiB
Twig
{# @todo Refactor this template #}
|
|
{% extends "frames/default.html.twig" %}
|
|
{% set layer = requested_action_service.getLayer()%}
|
|
{% set headline = (layer|trans|capitalize)~': ' %}
|
|
{% if requested_action_service.hasRequestedEntity()%}
|
|
{% set entity = requested_action_service.getRequestedEntity().getEntity() %}
|
|
{% if entity.hasSlug is defined and entity.hasSlug %}
|
|
{% set headline = headline~entity.slug %}
|
|
{% endif %}
|
|
{% set headline = headline~'#'~entity.id %}
|
|
{% endif %}
|
|
{% block title %}
|
|
{{ headline }}
|
|
{% 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)} %}
|
|
</h1>
|
|
{% if action_template_data_store_service.getAllStoredData().count() > 0 %}
|
|
<div id="accordion">
|
|
{% set aria_expanded = 'true' %}
|
|
{% for action in layer_action_map.getActions(layer) %}
|
|
{% 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">
|
|
<button class="btn btn-link collapsed" data-toggle="collapse"
|
|
data-target="#collapse_{{ action }}" aria-expanded="{{ aria_expanded }}"
|
|
aria-controls="collapse_{{ action }}">
|
|
<i class="{{ action_icon_class_map.getIconClass(action) }}"></i> {{ action|trans }}
|
|
</button>
|
|
</h5>
|
|
</div>
|
|
<div id="collapse_{{ action }}" class="collapse {{ (aria_expanded == 'true')?'show':'' }}"
|
|
aria-labelledby="heading_{{ action }}" data-parent="#accordion">
|
|
<div class="card-body">
|
|
{% include [action_template_name_service.getAtomTemplateName(),'entity/_entity_'~action~'.html.twig'] %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% set aria_expanded = 'false' %}
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-warning" role="alert">
|
|
<i class="fas fa-exclamation-triangle"></i> {{ 'This entity doesn\'t offer you any options. It seems like you don\'t have any right to perform actions on this entity.'|trans }}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %} |