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

@@ -0,0 +1,9 @@
{% macro avatar_image(user) %}
{% if user.avatar is not empty and kimai_config.themeAllowAvatarUrls %}
{% set avatar = asset(user.avatar, 'avatars') %}
<span class="avatar" style="background-image:url({{ avatar }})" title="{{ user.displayName }}">&nbsp;</span>
{% else %}
{% set color = user.color|colorize(user.displayName) %}
<span class="avatar" style="background-color: {{ color }}; color: {{ color|font_contrast }}" title="{{ user.displayName }}">{{ user.initials }}</span>
{% endif %}
{% endmacro %}

View File

@@ -0,0 +1,16 @@
{% if config('theme.show_about') %}
<div class="row text-center align-items-center flex-row">
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
<ul class="list-inline list-inline-dots mb-0">
<li class="list-inline-item">
Copyright &copy; <a href="https://www.kevinpapst.de/" target="_blank" class="link-secondary">Kevin Papst</a>
</li>
<li class="list-inline-item">
<a class="link-secondary" href="{{ path('about') }}">
{{ 'about.title'|trans }}
</a>
</li>
</ul>
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,14 @@
<a href="{{ path('tabler_welcome'|tabler_route) }}">
{% set logo = config('theme.branding.logo') %}
{% set company = config('theme.branding.company') %}
{% if company is not empty %}
<span>{{ company }}</span>
{% elseif logo is not empty %}
<img src="{{ logo }}" class="navbar-brand-image" style="max-height:32px" alt="{{ company }}">
{% elseif tabler_bundle.getLogoUrl() is not empty %}
<img class="navbar-brand-image" alt="{{ company }}" width="110" height="32"
src="{% if '://' in tabler_bundle.getLogoUrl() %}{{ tabler_bundle.getLogoUrl() }}{% else %}{{ asset(tabler_bundle.getLogoUrl()) }}{% endif %}">
{% else %}
<span>{{ get_title()|raw }}</span>
{% endif %}
</a>

View File

@@ -0,0 +1 @@
{% extends tabler_bundle.isBoxedLayout() ? '@Tabler/layout-horizontal.html.twig' : '@Tabler/layout-vertical.html.twig' %}

View File

@@ -0,0 +1 @@
{% extends '@Tabler/security.html.twig' %}

View File

@@ -1,39 +1 @@
{#
This template is used to render any error different from 403, 404 and 500.
This is the simplest way to customize error pages in Symfony applications.
In case you need it, you can also hook into the internal exception handling
made by Symfony. This allows you to perform advanced tasks and even recover
your application from some errors.
See http://symfony.com/doc/current/cookbook/controller/error_pages.html
#}
<!DOCTYPE html>
<html>
<head>
<meta charset="{{ _charset }}" />
<title>{{ 'http_error.title'|trans({}, 'exceptions') }}: {{ status_text }}</title>
</head>
<body>
{% set errorTitleKey = "http_error_#{status_code}.description" %}
{% set errorTitleTrans = errorTitleKey|trans({ '%status_code%': status_code }, 'exceptions') %}
{% if errorTitleKey == errorTitleTrans %}
{% set errorTitleKey = 'http_error.description' %}
{% set errorTitleTrans = errorTitleKey|trans({ '%status_code%': status_code }, 'exceptions') %}
{% endif %}
{% set errorMessageKey = "http_error_#{status_code}.suggestion" %}
{% set errorMessageTrans = errorMessageKey|trans({ '%status_code%': status_code }, 'exceptions') %}
{% if errorMessageKey == errorMessageTrans %}
{% set errorMessageKey = 'http_error.suggestion' %}
{% set errorMessageTrans = errorMessageKey|trans({ '%status_code%': status_code }, 'exceptions') %}
{% endif %}
<h1>{{ errorTitleTrans }}</h1>
<h2>{{ status_code }}: {{ status_text }}</h2>
<div>
{{ errorMessageTrans }}
</div>
</body>
</html>
{% extends '@Tabler/error.html.twig' %}

View File

@@ -1,5 +1 @@
{% extends 'error.html.twig' %}
{% block error_icon %}
<i class="fas fa-unlock-alt text-yellow"></i>
{% endblock %}
{% extends '@Tabler/error.html.twig' %}

View File

@@ -1,5 +1 @@
{% extends 'error.html.twig' %}
{% block error_icon %}
<i class="far fa-frown"></i>
{% endblock %}
{% extends '@Tabler/error.html.twig' %}

View File

@@ -1,7 +1 @@
{% extends 'error.html.twig' %}
{% block error_icon %}
<i class="fas fa-bug text-red"></i>
{% endblock %}
{% block error_class %}text-red{% endblock %}
{% extends '@Tabler/error.html.twig' %}