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,15 +1,25 @@
{% extends 'base.html.twig' %}
{% import "macros/widgets.html.twig" as widgets %}
{% block page_title %}{{ 'menu.doctor'|trans }}{% endblock %}
{% block page_subtitle %}{{ 'label.version'|trans }}: {{ constant('App\\Constants::VERSION') }} {{ constant('App\\Constants::STATUS') }} ({{ environment }}){% endblock %}
{% block page_actions %}
{% set event = actions(app.user, 'doctor', 'index') %}
{{ widgets.page_actions(event.actions) }}
{% block status %}
{% from "macros/status.html.twig" import status %}
{{ status(constant('App\\Constants::VERSION')) }}
{{ status(environment, environment == 'dev' ? 'red' : 'green') }}
{% endblock %}
{% block main %}
{% if release is not null and release is iterable %}
{% embed '@theme/embeds/card.html.twig' with release %}
{% block box_title %}Kimai {{ release.version }} available (released on {{ release.date|date_short }}){% endblock %}
{% block box_body %}
{{ release.content|md2html }}
<p>
<a class="btn btn-primary" href="{{ release.url }}" target=_blank">Read more</a>
</p>
{% endblock %}
{% endembed %}
{% endif %}
{% set permissionOpts = {collapsed: true, boxtype: 'success'} %}
{% for name, value in directories %}
{% if value is same as (false) %}
@@ -17,11 +27,11 @@
{% endif %}
{% endfor %}
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with permissionOpts %}
{% embed '@theme/embeds/card.html.twig' with permissionOpts %}
{% block box_title %}File permissions{% endblock %}
{% block box_body %}
<p>
If you see a warning icon <i class="{{ 'warning'|icon }} text-red"></i> in the list below, you should talk to your administrator.
If you see a warning icon <i class="{{ 'warning'|icon(false) }} text-red"></i> in the list below, you should talk to your administrator.
The path is either not readable or not writable and Kimai might not work as expected.
</p>
<table class="table">
@@ -30,9 +40,9 @@
<th style="width:15%">{{ name }}</th>
<td>
{% if value is same as (false) %}
<i class="{{ 'warning'|icon }} text-red"></i>
<i class="{{ 'warning'|icon(false) }} text-red"></i>
{% else %}
<i class="{{ 'success'|icon }} text-green"></i>
<i class="{{ 'success'|icon(false) }} text-green"></i>
{% endif %}
</td>
</tr>
@@ -48,12 +58,11 @@
{% endif %}
{% endfor %}
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with extensionOpts %}
{% block box_title %}Required PHP extensions{% endblock %}
{% embed '@theme/embeds/card.html.twig' with extensionOpts %}
{% block box_title %}PHP extensions{% endblock %}
{% block box_body %}
<p>
If you see a warning icon <i class="{{ 'warning'|icon }} text-red"></i> in the list below, you should talk to your administrator.
There is a missing PHP extension and Kimai might not work as expected.
If you see a warning icon <i class="{{ 'warning'|icon(false) }} text-red"></i> in the list below, you should talk to your administrator, as there is a missing PHP extension causing Kimai not to work as expected.
</p>
<table class="table">
{% for name, value in extensions %}
@@ -61,9 +70,9 @@
<th style="width:15%">{{ name }}</th>
<td>
{% if value is same as (false) %}
<i class="{{ 'warning'|icon }} text-red"></i>
<i class="{{ 'warning'|icon(false) }} text-red"></i>
{% else %}
<i class="{{ 'success'|icon }} text-green"></i>
<i class="{{ 'success'|icon(false) }} text-green"></i>
{% endif %}
</td>
</tr>
@@ -76,11 +85,12 @@
{% if logSize > 52428800 %}
{% set logOpts = {boxtype: 'danger'} %}
{% endif %}
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with logOpts %}
{% embed '@theme/embeds/card.html.twig' with logOpts %}
{% import "macros/widgets.html.twig" as widgets %}
{% block box_title %}Logfile (max. {{ logLines }} last lines){% endblock %}
{% block box_tools %}
{% if log_delete %}
<a class="btn-box-tool confirmation-link" href="{{ path('doctor_flush_log', {'token': csrf_token('doctor.flush_log')}) }}" data-question="confirm.delete"><i class="{{ 'delete'|icon }}"></i></a>
{{ widgets.card_tool_button('delete', {'class': 'confirmation-link', 'title': 'delete', 'url': path('doctor_flush_log', {'token': csrf_token('doctor.flush_log')}), 'attr': {'data-question': 'confirm.delete'}}) }}
{% endif %}
{% endblock %}
{% block box_body %}
@@ -103,38 +113,43 @@
{% endblock %}
{% endembed %}
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {collapsed: true} %}
{% block box_title %}Composer packages{% endblock %}
{% block box_body_class %}no-padding{% endblock %}
{% embed '@theme/embeds/card.html.twig' with {collapsed: true} %}
{% import "macros/widgets.html.twig" as widgets %}
{% block box_title %}Composer{% endblock %}
{% block box_body_class %}{% if composer|length > 0 %}p-0{% endif %}{% endblock %}
{% block box_body %}
<table class="table table-hover">
{% for name, value in composer %}
<tr>
<th style="width:15%">{{ name }}</th>
<td>{{ value }}</td>
</tr>
{% endfor %}
</table>
{% if composer|length == 0 %}
{{ widgets.alert('warning', 'Could not detect installed composer packages, please upgrade your Composer installation to version 2.x.') }}
{% else %}
<table class="table table-hover">
{% for name, value in composer %}
<tr>
<th class="text-nowrap w-min">{{ name }}</th>
<td class="text-break">{{ value }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endblock %}
{% endembed %}
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {collapsed: true} %}
{% embed '@theme/embeds/card.html.twig' with {collapsed: true} %}
{% block box_title %}PHP{% endblock %}
{% block box_body_class %}no-padding{% endblock %}
{% block box_body_class %}p-0{% endblock %}
{% block box_body %}
<table class="table table-hover">
<tr>
<th style="width:15%">Version</th>
<th class="text-nowrap w-min">{{ 'version'|trans }}</th>
<td>{{ constant('PHP_VERSION') }}</td>
</tr>
<tr>
<th style="width:15%;max-width:25%">Modules</th>
<td>{{ modules|join(', ') }}</td>
<th class="text-nowrap w-min">Modules</th>
<td class="text-break">{{ modules|join(', ') }}</td>
</tr>
{% for name, value in settings %}
<tr>
<th style="width:15%">{{ name }}</th>
<td>
<th class="text-nowrap w-min">{{ name }}</th>
<td class="text-break">
{% if value is empty %}
<i>unknown</i>
{% else %}
@@ -143,19 +158,10 @@
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% endembed %}
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {collapsed: true} %}
{% block box_title %}Server{% endblock %}
{% block box_body_class %}no-padding{% endblock %}
{% block box_body %}
<table class="table table-hover">
{% for name, value in info %}
<tr>
<th style="width:15%">{{ name }}</th>
<td>{{ value|raw }}</td>
<th class="text-nowrap w-min">{{ name }}</th>
<td class="text-break">{{ value|raw }}</td>
</tr>
{% endfor %}
</table>