Files
iTop/templates/DI/object/view.html.twig
Benjamin Dalsass 245c1d0be5 poc form SDK
2023-08-22 16:10:53 +02:00

27 lines
992 B
Twig

{% extends "DI/base.html.twig" %}
{% block title %}
Object Edition
{% endblock %}
{% block actions %}
<a href="{{ path('object_view', {'class': class, 'id': id - 1}) }}" class="btn btn-light btn {% if id <= 1 %}disabled{% endif %}"><i class="fa-solid fa-arrow-left"></i></a>
<a href="{{ path('object_view', {'class': class, 'id': id + 1}) }}" class="btn btn-light btn"><i class="fa-solid fa-arrow-right"></i></a>
<a href="{{ path('object_edit', {'class' : class, 'id': object.id}) }}" class="btn-primary btn"><i class="fa-solid fa-pen-to-square"></i> Edit Object</a>
{% endblock %}
{% block body %}
<div>
<div class="text-center"><h3>{{ object.GetName() }}</h3></div>
{% for key,value in object.GetValues() %}
<div class="d-flex offset-4 col-4">
<div class="flex-grow-1 fw-bold">{{ key|replace({'_' : ' '}) }}</div>
<div>{{ value }}</div>
</div>
{% endfor %}
</div>
{% endblock %}