feat: adopt E&P corporate design in admin

This commit is contained in:
fromme committed 2026-11-13 11:51:46 +01:00
1 parent 55378b2bbc
commit c660bd68de
36 files changed
+866 -544

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
{% if app.session.flashBag.peek('error')|length > 0 %}
{% include '_partials/_toast.html.twig' with { level: 'warning', messages: app.flashes('error') } %}
{% include '_partials/_toast.html.twig' with { level: 'error', messages: app.flashes('error') } %}
{% endif %}
{% if app.session.flashBag.peek('success')|length > 0 %}
{% include '_partials/_toast.html.twig' with { level: 'success', messages: app.flashes('success') } %}
@@ -28,9 +28,10 @@
name="q"
value="{{ filter.q }}"
placeholder="{{ form.q.vars.attr.placeholder|default('Suchen…') }}"
class="block w-64 rounded-md border-0 py-1.5 pl-9 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-primary text-sm">
aria-label="Suchen"
class="input w-64 pl-9">
<div class="absolute inset-y-0 left-0 flex items-center pl-2.5 pointer-events-none">
{{ icon('search', 'w-4 h-4 text-gray-500') }}
{{ icon('search', 'w-4 h-4 text-muted') }}
</div>
</div>
</form>
@@ -39,13 +40,13 @@
hx-get="{{ path(modal_route, app.request.query.all) }}"
hx-target="body"
hx-swap="beforeend"
class="button button--secondary button--small inline-flex items-center gap-1.5">
class="btn-tool">
{{ icon('filter', 'w-4 h-4') }}
Filter{% if filter.activeCount > 0 %} ({{ filter.activeCount }}){% endif %}
</button>
{% if filter.isActive %}
<a href="{{ path(route) }}" class="text-sm text-gray-600 underline hover:text-gray-900">
<a href="{{ path(route) }}" class="text-sm text-brand underline hover:text-brand-dark">
zurücksetzen
</a>
{% endif %}
@@ -54,11 +55,11 @@
{% if chips|length > 0 %}
<div class="flex flex-wrap items-center gap-2 pt-3">
{% for chip in chips %}
<span class="inline-flex items-center gap-1.5 rounded-full bg-gray-100 border border-gray-300 pl-3 {{ chip.isRemovable ? 'pr-1' : 'pr-3' }} py-1 text-xs text-gray-700">
<span class="inline-flex items-center gap-1.5 rounded-full bg-brand-light border border-line pl-3 {{ chip.isRemovable ? 'pr-1' : 'pr-3' }} py-1 text-xs text-ink">
<span><span class="font-bold">{{ chip.label }}:</span> {{ chip.value }}</span>
{% if chip.isRemovable %}
<a href="{{ path(route, filter_query_without(chip.removeKeys)) }}"
class="inline-flex items-center justify-center w-4 h-4 rounded-full hover:bg-gray-300"
class="inline-flex items-center justify-center w-4 h-4 rounded-full hover:bg-white"
aria-label="Filter „{{ chip.label }}“ entfernen">
{{ icon('close', 'w-3 h-3') }}
</a>
-83
View File
@@ -1,83 +0,0 @@
{% extends 'knp_menu.html.twig' %}
{% block list %}
{% if item.hasChildren and options.depth is not same as(0) and item.displayChildren %}
{% if item.level == 0 %}
<div class="min-h-full flex grow flex-col gap-y-5 lg:border-r border-gray-200 bg-white md:pr-6">
<nav class="flex flex-1 flex-col">
<ul role="list" class="space-y-1">
{{ block('children') }}
</ul>
</nav>
</div>
{% else %}
<ul class="{{ html_classes('mt-1 px-2', { 'hidden': not matcher.isCurrent(item) }) }}" {{ stimulus_target('sidebar-menu', 'submenu') }}>
{{ block('children') }}
</ul>
{% endif %}
{% endif %}
{% endblock %}
{% block item %}
{% if item.displayed %}
<li>
{%- if item.hasChildren and item.displayChildren %}
<div {{ stimulus_controller('sidebar-menu', {'expanded': matcher.isAncestor(item)}, {'closed': 'hidden', 'iconClosed': 'text-gray-400', 'iconExpanded': 'text-gray-500'}) }}>
{%- endif %}
{%- if item.uri is not empty %}
{{ block('linkElement') }}
{%- else %}
{{ block('spanElement') }}
{%- endif %}
{{ block('list') }}
{%- if item.hasChildren and item.displayChildren %}
</div>
{%- endif %}
</li>
{% endif %}
{% endblock %}
{% block linkElement %}
{% import _self as knp_menu %}
<a href="{{ item.uri }}"
class="{{ html_classes('', {
'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold': item.level == 1,
'block rounded-md py-2 pr-2 pl-9 text-sm leading-6': item.level > 1,
'text-gray-700 hover:bg-gray-50': not (matcher.isCurrent(item) or matcher.isAncestor(item)),
'bg-gray-100 text-gray-900': matcher.isCurrent(item) or matcher.isAncestor(item),
}) }}"
{{ knp_menu.attributes(item.linkAttributes) }}>
{{ block('label') }}
</a>
{% endblock %}
{% block spanElement %}
{% import _self as knp_menu %}
{% if item.hasChildren %}
<button type="button"
{{ stimulus_action('sidebar-menu', 'toggleSubmenu') }}
{{ stimulus_target('sidebar-menu', 'button') }}
{{ knp_menu.attributes(item.linkAttributes) }}
class="{{ html_classes('hover:bg-gray-50 flex items-center w-full text-left rounded-md p-2 gap-x-3 text-sm leading-6 font-semibold text-gray-700', { 'bg-gray-50': matcher.isAncestor(item) }) }}"
aria-expanded="false">
{{ block('label') }}
</button>
{% elseif item.extras.divider is defined %}
<hr class="my-4 h-px bg-gray-200">
{% else %}
<div class="hover:bg-gray-50 group flex gap-x-3 rounded-md p-2 text-sm leading-5 font-semibold text-gray-700"
role="button">
{{ block('label') }}
</div>
{% endif %}
{% endblock %}
{% block label %}
{% if item.extras.icon is defined %}
{{ icon(item.extras.icon, 'h-5 w-5 shrink-0 ' ~ ((matcher.isCurrent(item) or matcher.isAncestor(item)) ? 'text-gray-600' : 'text-gray-400')) }}
<span class="flex-1">{{ item.label|raw }}</span>
{% else %}
{{ item.label|raw }}
{% endif %}
{% endblock %}
@@ -1,12 +1,13 @@
{% if pageCount > 0 %}
<div class="bg-gray-100 border border-gray-300 border-t-0 px-4 py-3 flex items-center justify-between sm:px-4">
<div class="border-t border-line px-5 py-3 flex items-center justify-between">
<div class="flex-1 flex items-center justify-between">
<div class="flex items-center space-x-4">
<div class="text-sm leading-5 text-gray-700">
<div class="text-sm leading-5 text-muted">
{{ 'paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}
</div>
<select name="limit"
class="text-sm py-1 border-gray-300"
aria-label="Einträge pro Seite"
class="input w-auto py-1"
hx-get="{{ path(route, query|merge({(pageParameterName): 1})) }}"
hx-replace-url="{{ path(route, query|merge({(pageParameterName): 1})) }}"
hx-target="body">
@@ -19,43 +20,43 @@
<nav class="relative z-0 inline-flex">
{% if pageCount > 1 %}
{% if first is defined and current != first %}
<a href="{{ path(route, query|merge({(pageParameterName): first})) }}" class="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white">
<a href="{{ path(route, query|merge({(pageParameterName): first})) }}" class="relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 text-brand hover:bg-brand hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
<path stroke-linecap="round" stroke-linejoin="round" d="m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5" />
</svg>
</a>
{% endif %}
{% if previous is defined %}
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Previous">
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 text-brand hover:bg-brand hover:text-white" aria-label="Vorherige Seite">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5" />
</svg>
</a>
{% endif %}
{% if current > 3 %}
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-line bg-white text-sm leading-5 text-muted">
...
</span>
{% endif %}
{% for page in pagesInRange %}
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 hover:bg-secondary {% if page == current %}bg-primary text-white hover:text-white{% else %}bg-white text-gray-700 hover:text-white{% endif %}">
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border text-sm leading-5 focus:z-10 {% if page == current %}border-brand bg-brand font-bold text-white{% else %}border-line bg-white text-brand hover:bg-brand hover:text-white{% endif %}"{% if page == current %} aria-current="page"{% endif %}>
{{ page }}
</a>
{% endfor %}
{% if current < pageCount - 3 %}
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-line bg-white text-sm leading-5 text-muted">
...
</span>
{% endif %}
{% if next is defined %}
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Next">
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 text-brand hover:bg-brand hover:text-white" aria-label="Nächste Seite">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
</svg>
</a>
{% endif %}
{% if last is defined and current != last %}
<a href="{{ path(route, query|merge({(pageParameterName): last})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white">
<a href="{{ path(route, query|merge({(pageParameterName): last})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-line bg-white text-sm leading-5 text-brand hover:bg-brand hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
<path stroke-linecap="round" stroke-linejoin="round" d="m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5" />
</svg>