Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -1,22 +1,52 @@
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
{% import "system-configuration/actions.html.twig" as actions %}
{% block page_title %}{{ 'menu.system_configuration'|trans }}{% endblock %}
{% block page_actions %}{{ actions.system_configuration('index') }}{% endblock %}
{% extends 'base.html.twig' %}
{% block main %}
<div class="row">
{% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
<div class="col-12 col-md-3 mb-3 d-none d-md-block">
<div class="card">
<div class="list-group list-group-flush">
{% set sorted = [] %}
{% for section in sections %}
{% set title = section.model.translation|trans({}, section.model.translationDomain) %}
{% if title == section.model.translation %}
{% set title = section.model.section|trans %}
{% endif %}
{% set sorted = sorted|merge([{'name': title, 'id': section.model.section, 'counter': section.form.children.configuration|length}]) %}
{% endfor %}
{% for section in sorted|sort((a, b) => a.name <=> b.name) %}
<a class="list-group-item d-flex" href="#conf_{{ section.id }}">
{{ section.name }}
<small class="text-muted ms-auto">{{ section.counter }}</small>
</a>
{% endfor %}
</div>
</div>
</div>
{% for section in sections %}
{% set title = section.model.translation|trans({}, section.model.translationDomain) %}
{% if title == section.model.translation %}
{% set title = ('label.' ~ section.model.section)|trans %}
{% endif %}
{{ include(formEditTemplate, {
'title': title,
'form': section.form,
}) }}
{% endfor %}
<div class="col-12 col-md-9">
<div class="row">
<div class="col-12">
{% set formEditTemplate = kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
{% for section in sections %}
{% set title = section.model.translation|trans({}, section.model.translationDomain) %}
{% if title == section.model.translation %}
{% set title = section.model.section|trans %}
{% endif %}
{% embed formEditTemplate with {'title': title, 'form': section.form} %}
{% block form_before %}<span id="conf_{{ section.model.section }}"></span>{% endblock %}
{% block form_body %}
{% for pref in form.children.configuration %}
{{ form_widget(pref) }}
{% endfor %}
{{ form_rest(form) }}
{% endblock %}
{% endembed %}
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}