Files
iTop/templates/DI/object/view.html.twig
2023-09-06 11:31:27 +02:00

47 lines
1.1 KiB
Twig

{% extends "DI/base.html.twig" %}
{# page actions #}
{% set aPageAction = {
previous: {
rank: 0,
type: 'link',
disabled: id <= 1,
href: path('object_view', {'class': class, 'id': id - 1}),
icon: 'fa-solid fa-arrow-left'
},
next: {
rank: 1,
type: 'link',
href: path('object_view', {'class': class, 'id': id + 1}),
icon: 'fa-solid fa-arrow-right'
},
edit: {
rank: 2,
type: 'link',
href: path('object_edit', {'class' : class, 'id': object.id}),
icon: 'fa-solid fa-pen-to-square',
label: 'Edit Object',
primary: true
}
}
%}
{% block title %}
Object Edition
{% endblock %}
{% block body %}
<div>
<div class="text-center h3">{{ object.GetName() }}</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 %}