improved dark mode, automatic theme switch (#5720)

This commit is contained in:
Kevin Papst
2025-12-19 23:51:27 +01:00
committed by GitHub
parent b61420d633
commit 8c1ed68817
90 changed files with 1855 additions and 1956 deletions

View File

@@ -1,4 +1,4 @@
{% extends '@theme/layout/default-layout.html.twig' %}
{% extends tabler_bundle.isBoxedLayout() ? '@Tabler/layout_horizontal.html.twig' : '@Tabler/layout_vertical.html.twig' %}
{% block body_start %}
data-title="{{- get_title()|e('html_attr') -}}"
@@ -25,8 +25,6 @@
<div id="toast-container" class="toast-container position-fixed top-0 start-50 translate-middle-x p-3" style="z-index: 11"></div>
{% endblock %}
{% block page_content_class %}{{ parent() }} {% block page_class %}{% endblock %}{% endblock %}
{% block page_content_start %}
{% if app.session and app.session.started and app.session.flashbag.peekAll|length > 0 %}
{% set domain = 'flashmessages' %}
@@ -57,10 +55,11 @@
<div class="d-print-none hidden-no-space">
{% block main_before %}{% endblock %}
</div>
<section class="content {% block page_class %}{% endblock %}">
{% endblock %}
{% block page_content_after %}
{% block main_after %}{% endblock %}
</section>
{% set event = trigger(constant('App\\Event\\ThemeEvent::CONTENT_AFTER')) %}
{{ event.content|raw }}
{% if page_setup is defined and page_setup.help is not null %}
@@ -142,7 +141,7 @@
{% set mylogo %}{{ parent() }}{% endset %}
{# only for mobile view #}
<div class="d-flex justify-content-start flex-fill d-lg-none">
<h2 class="page-title d-lg-none ps-2 text-white">
<h2 class="page-title d-lg-none ps-2">
{{- block('page_title') -}}
</h2>
{{ mylogo }}

View File

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

View File

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

View File

@@ -1,5 +1,10 @@
{% block dd_timesheet %}
{% import "macros/widgets.html.twig" as widgets %}
{% import "calendar/widgets.html.twig" as calendar %}
{{ calendar.dd_event(widgets.label_color(entry.title, entry.color), entry.project ? widgets.label_customer(entry.project.customer) : null, entry.project ? widgets.label_project(entry.project) : null, null) }}
{% if entry.activity is not null %}
{% set title = widgets.label_activity(entry.activity, entry.activity.color) %}
{% else %}
{% set title = widgets.label_color(entry.title, entry.color) %}
{% endif %}
{{ calendar.dd_event(title, entry.project ? widgets.label_customer(entry.project.customer) : null, entry.project ? widgets.label_project(entry.project) : null, null) }}
{% endblock %}

View File

@@ -35,13 +35,13 @@
{% block box_body %}
<div class="list-group list-group-flush external-events" data-method="{{ source.method }}" data-route="{{ path(source.route, source.routeParams) }}" data-route-replacer="{{ source.routeReplacer|json_encode|e('html_attr') }}">
{% for entry in source.entries|slice(0, config.dragDropAmount) %}
<div class="p-1 ps-2 list-group-item external-event draggable" data-entry="{{ entry.data|json_encode|e('html_attr') }}"{% if entry.project is not null %} data-toggle="tooltip" title="{{ entry.project.customer.name }}"{% endif %}>
<div class="p-2 ps-3 lh-lg list-group-item external-event draggable" data-entry="{{ entry.data|json_encode|e('html_attr') }}"{% if entry.project is not null %} data-toggle="tooltip" title="{{ entry.project.customer.name }}"{% endif %}>
<div class="row align-items-center">
<div class="col text-truncate">
{% if source.blockInclude is not null and entry.blockName is not null and block(entry.blockName, source.blockInclude) is defined %}
{{ block(entry.blockName, source.blockInclude) }}
{% else %}
<span class="d-block text-body-secondary text-truncate mt-n1">{{ entry.title }}</span>
<span class="d-block text-body-secondary text-truncate">{{ entry.title }}</span>
{% endif %}
</div>
</div>

View File

@@ -2,6 +2,6 @@
{% import "macros/widgets.html.twig" as widgets %}
{{ title }}
{% if project is not null %}
<small class="d-block text-body-secondary text-truncate mt-n1">{{ project }}{% if customer is not null %}, {{ customer }}{% endif %}</small>
<small class="d-block text-body-secondary text-truncate">{{ project }}{% if customer is not null %}, {{ customer }}{% endif %}</small>
{% endif %}
{% endmacro %}

View File

@@ -3,7 +3,7 @@
{% block status %}
{% from "macros/status.html.twig" import status %}
{{ status(constant('App\\Constants::VERSION')) }}
{{ status(environment, environment == 'dev' ? 'danger' : 'success') }}
{{ status(environment, environment == 'dev' ? 'danger-lt' : 'success-lt') }}
{% endblock %}
{% block main %}

View File

@@ -135,13 +135,13 @@
{% if btnTitle2 != ('button.' ~ title) %}
{% set btnTitle = btnTitle2 %}
{% endif %}
<button type="button" id="export-{{ id }}-button" class="btn btn-success startExportBtn" data-type="{{ id }}">
<button type="button" id="export-{{ id }}-button" class="btn btn-primary startExportBtn" data-type="{{ id }}">
{{ btnTitle }}
</button>
{% endfor %}
{% else %}
<div class="btn-group">
<button type="button" class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ btnTitle }}
</button>
<div class="dropdown-menu">
@@ -287,7 +287,7 @@
{% if is_granted('edit_export', entry) %}
{% if entry.exported %}
{% if editExported %}
<button type="button" class="btn btn-outline-secondary exportBtn active" data-toggle="button" aria-pressed="true"
<button type="button" class="btn btn-default exportBtn" data-toggle="button" aria-pressed="true"
data-exported-text="{{ 'entryState.exported'|trans }}" data-clean-text="{{ 'entryState.not_exported'|trans }}" data-timesheet="{{ entry.id }}">
{{ 'entryState.exported'|trans }}
</button>
@@ -295,7 +295,7 @@
{{ 'entryState.exported'|trans }}
{% endif %}
{% else %}
<button type="button" class="btn btn-light exportBtn" data-toggle="button" aria-pressed="false"
<button type="button" class="btn btn-default exportBtn" data-toggle="button" aria-pressed="false"
data-exported-text="{{ 'entryState.exported'|trans }}" data-clean-text="{{ 'entryState.not_exported'|trans }}" data-timesheet="{{ entry.id }}">
{{ 'entryState.not_exported'|trans }}
</button>

View File

@@ -1,10 +1,6 @@
{% set favorites = favorite_timesheets(app.user, 10) %}
{% if favorites|length > 0 %}
{% from 'macros/widgets.html.twig' import label_customer, label_project, label_activity %}
{% set class = "btn-outline-white" %}
{% if tabler_bundle.isDarkMode() or tabler_bundle.isNavbarOverlapping() %}
{% set class = "btn-dark" %}
{% endif %}
<div class="list-group list-group-flush list-group-hoverable menu">
{% set counter = 0 %}
{% for favorite in favorites %}
@@ -18,7 +14,7 @@
data-event="kimai.timesheetStart kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.start.error"
data-msg-success="timesheet.start.success" data-bs-dismiss="modal">
{{ label_activity(entry.activity) }}
<div class="d-block text-truncate mt-n1">
<div class="d-block text-truncate">
{{ label_project(entry.project) }}
{{ label_customer(entry.project.customer) }}
</div>

View File

@@ -136,35 +136,28 @@
{% set jsFormat = format|js_format %}
{% set attr = attr|merge({'pattern': format|pattern, 'autocomplete': 'off', 'data-datepicker': 'on', 'data-format': jsFormat, 'placeholder': jsFormat}) -%}
<div class="input-group">
<div class="input-group-text">
<a href="#" data-form-widget="date-now" data-format="{{ jsFormat }}" data-target="{{ id }}">{{ icon('calendar') }}</a>
</div>
<a class="btn" href="#" data-form-widget="date-now" data-format="{{ jsFormat }}" data-target="{{ id }}">{{ icon('calendar') }}</a>
{{- block('form_widget_simple') -}}
{% if not required %}
<span class="input-group-text">
<a href="javascript: void(0)" class="link-secondary fs-5" onclick="document.getElementById('{{ id }}').value = ''">
{{ icon('cancel') }}
</a>
</span>
<a href="javascript: void(0)" class="btn link-secondary fs-5" onclick="document.getElementById('{{ id }}').value = ''">
{{ icon('cancel') }}
</a>
{% endif %}
</div>
{%- endblock date_widget %}
{# this is used for auto-forms using the correct format for HTML5 compatibility, e.g. in the calendar #}
{% block day_widget -%}
{% set format = 'y-MM-D' %}
{% set jsFormat = format|js_format %}
{% set attr = attr|merge({'pattern': format|pattern, 'autocomplete': 'off', 'data-format': jsFormat}) -%}
<div class="input-group">
<div class="input-group-text">
<a href="#" data-form-widget="date-now" data-format="{{ jsFormat }}" data-target="{{ id }}">{{ icon('calendar') }}</a>
</div>
<a class="btn" href="#" data-form-widget="date-now" data-format="{{ jsFormat }}" data-target="{{ id }}">{{ icon('calendar') }}</a>
{{- block('form_widget_simple') -}}
{% if not required %}
<span class="input-group-text">
<a href="javascript: void(0)" class="link-secondary fs-5" onclick="document.getElementById('{{ id }}').value = ''">
{{ icon('cancel') }}
</a>
</span>
<a href="javascript: void(0)" class="btn link-secondary fs-5" onclick="document.getElementById('{{ id }}').value = ''">
{{ icon('cancel') }}
</a>
{% endif %}
</div>
{%- endblock day_widget %}
@@ -172,13 +165,11 @@
{% block time_widget -%}
{%- set attr = attr|merge({'pattern': time_format|pattern, 'autocomplete': 'off', 'data-timepicker': 'on', 'data-format': js_format, 'placeholder': time_format}) -%}
<div class="input-group">
<div class="input-group-text">
<a href="#" data-form-widget="date-now" data-format="{{ js_format }}" data-target="{{ id }}">{{ icon('clock') }}</a>
</div>
<a class="btn" href="#" data-form-widget="date-now" data-format="{{ js_format }}" data-target="{{ id }}">{{ icon('clock') }}</a>
{{ block('form_widget_simple') }}
{% set time_presets = form_time_presets(app.user.timezone) %}
{% if time_presets|length > 0 and form.vars.disabled is same as (false) %}
<button type="button" class="input-group-text dropdown-toggle btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
<button type="button" class="btn dropdown-toggle dropdown-toggle-split btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
<div class="dropdown-menu dropdown-menu-end pre-scrollable">
<div class="dropdown-menu-columns">
{% for index in [0, 1, 2, 3] %}
@@ -202,7 +193,7 @@
{% set attr = attr|merge({'data-daterangepicker': 'on', 'autocomplete': 'off', 'data-format': format, 'placeholder': format ~ attr['data-separator'] ~ format}) -%}
<div class="input-group">
{% if ranges is defined %}
<button type="button" class="input-group-text dropdown-toggle btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
<button type="button" class="btn dropdown-toggle dropdown-toggle-split btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
<div class="dropdown-menu dropdown-menu-start pre-scrollable">
{% for title, range in ranges %}
{% if range|length == 0 %}
@@ -228,11 +219,12 @@
{% endif %}
{{ block('form_widget_simple') }}
{% if form.vars.toggle is defined and form.vars.toggle %}
{# this feature was never actually developed #}
<div class="input-group-text">
<a href="#" id="{{ form.vars.id }}_toggle" class="text-success">{{ icon('link') }}</a>
</div>
{% endif %}
<button type="button" class="input-group-text dropdown-toggle btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
<button type="button" class="btn dropdown-toggle dropdown-toggle-split btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
<div class="dropdown-menu dropdown-menu-end pre-scrollable">
<div class="dropdown-menu-columns">
{% for index in [0, 1, 2, 3] %}

View File

@@ -1,2 +1,2 @@
{% extends '@theme/layout/form-theme-horizontal.html.twig' %}
{% extends '@theme/layout/form_theme_horizontal.html.twig' %}
{% use 'form/blocks.html.twig' %}

View File

@@ -1,4 +1,4 @@
{% extends '@theme/layout/form-theme-horizontal.html.twig' %}
{% extends '@theme/layout/form_theme_horizontal.html.twig' %}
{% block form_label_class -%}
col-sm-4 col-xs-5

View File

@@ -1,2 +1,2 @@
{% extends '@theme/layout/form-theme.html.twig' %}
{% extends '@theme/layout/form_theme.html.twig' %}
{% use 'form/blocks.html.twig' %}

View File

@@ -137,7 +137,7 @@
<td class="w-min text-center actions alwaysVisible">
{% for attrs in [{'class': 'd-inline-flex d-md-none'}, {'icon': false, 'class': 'd-none d-md-inline-flex'}] %}
{{ widgets.action_button('print', {'url': '#', 'onclick': 'return singleInvoice(this, true)', 'title': 'preview'|trans, 'target': '_blank', 'attr': {'data-customer': model.customer.id, 'data-href': path('invoice_preview', {'customer': model.customer.id, 'token': csrf_token('invoice.preview')})}}|merge(attrs)) }}
{{ widgets.action_button('invoice', {'url': '#', 'onclick': 'return singleInvoice(this, false)', 'title': 'action.save'|trans, 'attr': {'data-customer': model.customer.id, 'data-href': path('invoice_create', {'customer': model.customer.id, 'token': csrf_token('invoice.create')})}}|merge(attrs), 'success') }}
{{ widgets.action_button('invoice', {'url': '#', 'onclick': 'return singleInvoice(this, false)', 'title': 'action.save'|trans, 'attr': {'data-customer': model.customer.id, 'data-href': path('invoice_create', {'customer': model.customer.id, 'token': csrf_token('invoice.create')})}}|merge(attrs), 'primary') }}
{% endfor %}
</td>
</tr>

View File

@@ -36,7 +36,7 @@
<div class="input-group inline-search position-static">
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-haspopup="true" aria-expanded="false" id="search-dropdown-btn" title="{{ 'search_filter'|trans }}">
{{ icon('filter', true) }}
{% if filterCount > 0 %}<span class="badge badge-pill bg-primary text-primary-fg ms-1 d-none d-md-inline">{{ filterCount }}</span>{% endif %}
{% if filterCount > 0 %}<span class="badge badge-notification bg-primary text-primary-fg ms-1 d-none d-sm-inline">{{ filterCount }}</span>{% endif %}
</button>
<div class="dropdown-menu p-3 search-dropdown" data-popper-placement="bottom-start" aria-labelledby="search-dropdown-btn">
{{ form_rest(form) }}
@@ -60,7 +60,7 @@
{{ searchTerm|raw }}
<span class="input-group-text">
{% set bookmarkToken = csrf_token('search') %}
{% set searchBtnClass = 'btn btn-icon btn-sm btn-ghost-secondary' %}
{% set searchBtnClass = 'btn btn-icon btn-sm btn-ghost-secondary p-1' %}
<input type="hidden" name="_token" value="{{ bookmarkToken }}">
<button type="submit" class="{{ searchBtnClass }}" data-toggle="tooltip" title="{{ 'search'|trans }}">
{{ icon('search') }}

View File

@@ -6,7 +6,7 @@
{{ icon('bookmarked', true) }}
{{ 'action.save'|trans }}
</button>
<a class="btn btn-icon btn-outline-warning" href="?_token={{ csrf_token('search') }}&removeDefaultQuery={{ form.vars.data.bookmark.name }}" data-toggle="tooltip" title="{{ 'remove_default'|trans }}" id="removeDefaultQuery">
<a class="btn btn-icon btn-outline-secondary" href="?_token={{ csrf_token('search') }}&removeDefaultQuery={{ form.vars.data.bookmark.name }}" data-toggle="tooltip" title="{{ 'remove_default'|trans }}" id="removeDefaultQuery">
{{ icon('delete', true) }}
</a>
{% else %}

View File

@@ -1,6 +1,6 @@
{% macro status(title, color) %}
{% from '@theme/components/status.html.twig' import status %}
{{ status(title, {'color': color|default('primary')}) }}
{{ status(title, {'color': color|default('primary-lt'), lite: true}) }}
{% endmacro %}
{% macro status_duration(duration) %}

View File

@@ -22,31 +22,13 @@
{% endmacro %}
{%- macro page_actions(actions) -%}
{% set btnClasses = 'btn-primary' %}
{% set helpClasses = '' %}
{% if tabler_bundle.isNavbarOverlapping() %}
{% set helpClasses = 'btn-dark' %}
{% elseif not tabler_bundle.isDarkMode() %}
{% set btnClasses = 'btn-white' %}
{% endif %}
{% set later = {} %}
{% set help = null %}
{% set btnClasses = '' %}
<div class="page-actions">
<div class="pa-desktop d-none d-sm-inline-flex btn-list">
{{ _self.actions(actions, {large: true, button_class: btnClasses}) }}
{% if help is not null %}
{% set help = help|merge({class: helpClasses ~ ' action-help ' ~ (help.class|default(''))}) %}
{{ _self.action_button('help', help) }}
{% endif %}
</div>
<div class="pa-mobile d-inline-flex d-sm-none btn-list">
{% set btnClass = 'btn btn-icon ' %}
{% if tabler_bundle.isNavbarOverlapping() %}
{% set btnClass = 'btn btn-icon btn-dark' %}
{% elseif not tabler_bundle.isDarkMode() %}
{% set btnClass = 'btn btn-icon btn-white' %}
{% endif %}
{{ _self.table_actions(actions, btnClass) }}
{{ _self.table_actions(actions, 'btn btn-icon') }}
</div>
</div>
{%- endmacro -%}
@@ -80,10 +62,6 @@
{% endfor -%}
{%- endmacro -%}
{% macro page_header(title) %}
<h2 class="page-header">{{ title|trans }}</h2>
{% endmacro %}
{% macro label_boolean(visible) %}
{% if visible %}
{{ _self.label('yes'|trans, 'success') }}
@@ -282,9 +260,9 @@
{{ alert({type: type, description: description|trans, title: title|trans, icon: icon, dismissible: dismissible, important: true}) }}
{% endmacro %}
{% macro callout(type, description, title, icon) %}
{% macro callout(type, description, title, icon, important) %}
{% from '@theme/components/alert.html.twig' import alert %}
{{ alert({type: type|default('danger'), description: description|trans, title: title|trans, icon: icon, dismissible: false, important: true}) }}
{{ alert({type: type|default('danger'), description: description|trans, title: title|trans, icon: icon, dismissible: false, important: important ?? true}) }}
{% endmacro %}
{% macro table_actions(actions, class) %}
@@ -425,7 +403,7 @@
{% endmacro %}
{% macro nothing_found(events) %}
{{ _self.callout('warning', 'error.no_entries_found') }}
{{ _self.callout('info', 'error.no_entries_found', null, 'info', false) }}
{% if events is not empty %}
<script type="text/javascript">
document.addEventListener('kimai.initialized', function() {

View File

@@ -15,3 +15,6 @@
<meta name="application-name" content="{{ constant('App\\Constants::SOFTWARE') }}">
<meta name="msapplication-config" content="{{ asset('browserconfig.xml') }}">
<meta name="theme-color" content="#1d273b">
{% if tabler_bundle.isThemeAuto() %}
<script>if (window.matchMedia) { document.documentElement.setAttribute('data-bs-theme', (window.matchMedia("(prefers-color-scheme: dark)").matches) ? 'dark': 'light'); }</script>
{% endif %}

View File

@@ -6,19 +6,15 @@
{% endif %}
<div class="nav-item d-flex me-1 ticktac">
<div class="btn-list">
{% set class = "btn-outline-white" %}
{% if tabler_bundle.isDarkMode() or tabler_bundle.isNavbarOverlapping() %}
{% set class = "btn-dark" %}
{% endif %}
{% set entry = active_timesheets[0] %}
<div class="ticktac-menu" data-api="{{ path('active_timesheet') }}" data-href="{{ path('stop_timesheet', {'id' : '000'}) }}" style="{% if not hasActiveRecords %}display:none{% endif %}">
<a title="{{ 'timesheet.stop'|trans }}" data-replacer="url" class="api-link ticktac-running ticktac-stop btn {{ class }} btn-icon px-sm-2" href="#" data-href="{{ path('stop_timesheet', {'id' : entry.id}) }}" data-event="kimai.timesheetStop kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.stop.error" data-msg-success="timesheet.stop.success"{% if hasActiveRecords %} accesskey="s"{% endif %}>
<a title="{{ 'timesheet.stop'|trans }}" data-replacer="url" class="api-link ticktac-running ticktac-stop btn btn-default btn-icon px-sm-2" href="#" data-href="{{ path('stop_timesheet', {'id' : entry.id}) }}" data-event="kimai.timesheetStop kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.stop.error" data-msg-success="timesheet.stop.success"{% if hasActiveRecords %} accesskey="s"{% endif %}>
<i class="text-red {{ 'stop-small'|icon(false) }} me-0 me-sm-1"></i>
<span class="d-none d-sm-block" data-replacer="duration" data-title="true" data-since="{{ entry.begin is null ? '' : entry.begin|date_format(constant('DATE_ISO8601')) }}">{{ entry is iterable ? 0|duration : entry|duration }}</span>
</a>
</div>
<div class="ticktac-menu-empty" style="{% if hasActiveRecords %}display:none{% endif %}">
<a title="{{ 'timesheet.start'|trans }}" href="{{ path('timesheet_create') }}" class="modal-ajax-form ticktac-start btn {{ class }} btn-icon px-sm-2" accesskey="n">
<a title="{{ 'timesheet.start'|trans }}" href="{{ path('timesheet_create') }}" class="modal-ajax-form ticktac-start btn btn-default btn-icon px-sm-2" accesskey="n">
<i class="text-green {{ 'start'|icon(false) }} me-0 me-sm-1"></i>
<span class="d-none d-sm-block">{{ 0|duration }}</span>
</a>

View File

@@ -23,6 +23,7 @@
{% import "macros/widgets.html.twig" as widgets %}
{{ tables.datatable_header(tableName, columns, null, {columnConfig: false}) }}
{% for plugin in plugins|sort((p1, p2) => p1.name|lower <=> p2.name|lower) %}
{% set pluginClass = 'success' %}
<tr>
<td class="{{ tables.data_table_column_class(tableName, columns, 'name') }}">
<a href="{{ plugin.metadata.homepage }}" title="{{ 'homepage'|trans }}" target="_blank">{{ plugin.name }}</a>
@@ -30,11 +31,12 @@
<td class="{{ tables.data_table_column_class(tableName, columns, 'description') }}">
{{ plugin.metadata.description }}
{% if updates[plugin.id] is defined and updates[plugin.id] == true %}
{% set pluginClass = 'warning' %}
{{ widgets.alert('warning', 'update_available'|trans({'%version%': bundles[plugin.id]['latest_release']}, 'plugins')) }}
{% endif %}
</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'version') }}">
{{ widgets.label(plugin.metadata.version, 'primary', plugin.id) }}
{{ widgets.label(plugin.metadata.version, pluginClass, plugin.id) }}
</td>
</tr>
{% endfor %}
@@ -49,7 +51,7 @@
{% block box_title %}{{ 'plugin.marketplace'|trans({}, 'plugins') }}{% endblock %}
{% block box_body_class %}p-0{% endblock %}
{% block box_tools %}
{{ card_tool_button('shop', {'title': 'shop', 'translation_domain': 'plugins', 'target': '_blank', 'url': constant('App\\Constants::HOMEPAGE') ~ '/store/', 'icon': false, 'class': 'btn-warning'}) }}
{{ card_tool_button('shop', {'title': 'shop', 'translation_domain': 'plugins', 'target': '_blank', 'url': constant('App\\Constants::HOMEPAGE') ~ '/store/', 'icon': false, 'class': 'btn-primary'}) }}
{% endblock %}
{% block box_body %}
{% set columns = {

View File

@@ -5,7 +5,7 @@
{{ form_widget(form.customer, {'label': false, 'placeholder': 'customer'}) }}
{{ form_widget(form.sumType) }}
{% from '@theme/components/buttons.html.twig' import submit_button %}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}, 'primary') }}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}) }}
{% endblock %}
{% block report %}

View File

@@ -19,5 +19,5 @@
</ul>
</div>
{% from '@theme/components/buttons.html.twig' import submit_button %}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}, 'primary') }}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}) }}
{% endblock %}

View File

@@ -10,7 +10,7 @@
{% endif %}
{{ form_widget(form.sumType) }}
{% from '@theme/components/buttons.html.twig' import submit_button %}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}, 'primary') }}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}) }}
{% endblock %}
{% block report %}

View File

@@ -10,7 +10,7 @@
{% endif %}
{{ form_widget(form.sumType) }}
{% from '@theme/components/buttons.html.twig' import submit_button %}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}, 'primary') }}
{{ submit_button('download', {'attr': {'formaction': path(export_route)}, 'icon': 'download', 'combined': false}) }}
{% endblock %}
{% block report %}

View File

@@ -1,4 +1,4 @@
{% extends '@theme/security/password-reset.html.twig' %}
{% extends '@theme/security/password_reset.html.twig' %}
{% block logo_login %}{% include 'partials/logo_login.html.twig' %}{% endblock %}
{% block title %}{{- get_title() -}}{% endblock %}

View File

@@ -2,13 +2,14 @@
{% if options.route is defined %}
{% set url = path(options.route, options.routeOptions|default([])) %}
{% endif %}
{% set color = options.color|default('green') %}
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
{% if not url is empty %}<a href="{{ url }}">{% endif %}
<span class="bg-{{ options.color|default('green') }} text-white avatar">
<span class="bg-{{ color }} text-{{ color }}-fg avatar">
{{ icon(options.icon, true) }}
</span>
{% if not url is empty %}</a>{% endif %}

View File

@@ -2,12 +2,13 @@
{% if options.route is defined %}
{% set url = path(options.route, options.routeOptions|default([])) %}
{% endif %}
{% set color = options.color|default('green') %}
<div class="card card-sm">
<div class="card-body">
<div class="row align-items-center">
<div class="col-auto">
<span class="bg-{{ options.color|default('green') }} text-white avatar">
<span class="bg-{{ color }} text-{{ color }}-fg avatar">
{{ icon(options.icon, true) }}
</span>
</div>

View File

@@ -21,7 +21,7 @@
{% block wizard_progress_bar %}
{% if percent is defined and percent is not null %}
{{ progress_bar({current: percent, max: 100, min: 0}) }}
{{ progress_bar({value: percent, max: 100, min: 0}) }}
{% endif %}
{% endblock %}