Release 2.10 (#4549)
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
{{ event.content|raw }}
|
||||
{% if page_setup is defined and page_setup.help is not null %}
|
||||
<div class="float-help">
|
||||
<a href="{% if '://' in page_setup.help %}{{ page_setup.help }}{% else %}{{ page_setup.help|docu_link }}{% endif %}" target="_blank" accesskey="h">
|
||||
<a href="{% if '://' in page_setup.help %}{{ page_setup.help }}{% else %}{{ page_setup.help|docu_link }}{% endif %}" target="_blank" accesskey="h" title="{{ 'help'|trans }}">
|
||||
<i class="fas fa-question"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{% extends 'page_setup.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
|
||||
{% block form_addon %}
|
||||
{% set event = actions(app.user, 'contract_links', 'index', {year: year, user: user}) %}
|
||||
{{ widgets.actions(event.actions, {button_class: '', large: false}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
{% set withWorkHourConfiguration = user.hasWorkHourConfiguration() %}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
<link rel="stylesheet" href="{{ asset('bundles/tabler/tabler.css') }}">
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{% endif %}
|
||||
<div class="btn-list">
|
||||
{% if dataTable.hasConfiguration() %}
|
||||
<a class="btn btn-icon {{ btnClass }}" href="#" data-bs-toggle="modal" data-bs-target="#modal_{{ dataTable.getTableName() }}">
|
||||
<a class="btn btn-icon {{ btnClass }}" href="#" data-bs-toggle="modal" data-bs-target="#modal_{{ dataTable.getTableName() }}" title="{{ 'modal.columns.title'|trans }}">
|
||||
{{ icon('columns', true) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -40,7 +40,7 @@
|
||||
{% set order = form_widget(form.order) %}
|
||||
{% set filterCount = dataTable.getQuery().countFilter() %}
|
||||
<div class="input-group inline-search position-static">
|
||||
<button type="button" class="btn {{ btnClass }} dropdown-toggle" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-haspopup="true" aria-expanded="false" id="search-dropdown-btn">
|
||||
<button type="button" class="btn {{ btnClass }} 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-blue ms-1 d-none d-md-inline">{{ filterCount }}</span>{% endif %}
|
||||
</button>
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
{% else %}
|
||||
{% if headerOptions.batchUpdate is defined %}
|
||||
<input type="checkbox" id="multi_update_all" class="multiupdater form-check-input m-0 align-middle">
|
||||
<input type="checkbox" id="multi_update_all" class="multiupdater form-check-input m-0 align-middle" title="{{ 'batch_table_checkbox_all'|trans }}">
|
||||
{% endif %}
|
||||
{{ headerTitle }}
|
||||
{% if headerOptions.html_after is defined %}
|
||||
@@ -285,5 +285,5 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro datatable_multiupdate_row(id) %}
|
||||
<input type="checkbox" name="id" value="{{ id }}" class="multi_update_single multiupdater form-check-input m-0 align-middle">
|
||||
<input type="checkbox" name="id" value="{{ id }}" class="multi_update_single multiupdater form-check-input m-0 align-middle" title="{{ 'batch_table_checkbox'|trans }}">
|
||||
{% endmacro %}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{%- macro page_actions(actions) -%}
|
||||
{% set large = true %}
|
||||
{% set btnClasses = 'btn-primary' %}
|
||||
{% set helpClasses = '' %}
|
||||
{% if tabler_bundle.isNavbarOverlapping() %}
|
||||
@@ -11,30 +10,7 @@
|
||||
{% set help = null %}
|
||||
<div class="page-actions">
|
||||
<div class="pa-desktop d-none d-sm-inline-flex btn-list">
|
||||
{%- for icon, values in actions %}
|
||||
{% if 'help' in icon %}
|
||||
{% set help = values %}
|
||||
{% elseif 'divider' in icon and values is null %}
|
||||
{# what to do here ? #}
|
||||
{% else %}
|
||||
{% if values.children is defined and values.children|length > 0 %}
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn {{ btnClasses}} dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ icon(icon, true) }}{% if large %} {{ values.title is defined ? values.title|trans : icon|trans({}, 'actions') }}{% endif %}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
{%- for icon, values in values.children %}
|
||||
{% set values = values|merge({class: 'dropdown-item action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
|
||||
{{ _self.action_button(false, values, false) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% set values = values|merge({combined: large, class: btnClasses ~ ' action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
|
||||
{{ _self.action_button(icon, values) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor -%}
|
||||
{{ _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) }}
|
||||
@@ -52,6 +28,35 @@
|
||||
</div>
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro actions(actions, options) -%}
|
||||
{% set large = options.large ?? true %}
|
||||
{% set btnClasses = options.button_class ?? 'btn-primary' %}
|
||||
{%- for icon, values in actions %}
|
||||
{% if 'help' in icon %}
|
||||
{% set help = values %}
|
||||
{% elseif 'divider' in icon and values is null %}
|
||||
{# what to do here ? #}
|
||||
{% else %}
|
||||
{% if values.children is defined and values.children|length > 0 %}
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn {{ btnClasses }} dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ icon(icon, true) }}{% if large %} {{ values.title is defined ? values.title|trans : icon|trans({}, 'actions') }}{% endif %}
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
{%- for icon, values in values.children %}
|
||||
{% set values = values|merge({class: 'dropdown-item action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
|
||||
{{ _self.action_button(false, values, false) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% set values = values|merge({combined: large, class: btnClasses ~ ' action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
|
||||
{{ _self.action_button(icon, values) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% macro page_header(title) %}
|
||||
<h2 class="page-header">{{ title|trans }}</h2>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
{{ form_widget(field) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% block form_addon %}{% endblock %}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% if is_granted('start_own_timesheet') %}
|
||||
<div class="nav-item d-flex me-1 recent-activities">
|
||||
<a href="{{ path('favorites_timesheets') }}" class="nav-link px-0 remote-modal-load recent-activities-btn" data-modal-title="{{ 'recent.activities'|trans }}" tabindex="-1" aria-label="{{ 'recent.activities'|trans }}">
|
||||
<a href="{{ path('favorites_timesheets') }}" class="nav-link px-0 remote-modal-load recent-activities-btn" data-modal-title="{{ 'recent.activities'|trans }}" tabindex="-1" title="{{ 'recent.activities'|trans }}">
|
||||
{{ icon('repeat', true) }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
{% 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 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 {{ 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 %}>
|
||||
<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 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 {{ class }} 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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% set user_shortcuts = user_shortcuts(app.user) %}
|
||||
{% if user_shortcuts|length > 0 %}
|
||||
<div class="nav-item dropdown d-flex me-1 user-shortcuts">
|
||||
<a class="nav-link px-0 user-shortcuts-toggle" href="javascript:void(0);" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="true">
|
||||
<a class="nav-link px-0 user-shortcuts-toggle" href="javascript:void(0);" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="true" title="{{ 'favorite_routes'|trans }}">
|
||||
{{ icon('far fa-bookmark', true) }}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow dropdown-menu-card" data-bs-popper="static">
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
{{ widgets.badge_team_access(entry.teams) }}
|
||||
{% elseif column == 'active' %}
|
||||
{{ widgets.label_visible(entry.enabled) }}
|
||||
{% elseif column == 'system_account' %}
|
||||
{{ widgets.label_boolean(entry.systemAccount) }}
|
||||
{% elseif column == 'actions' %}
|
||||
{{ actions.user(entry, 'index') }}
|
||||
{% elseif column starts with 'mf_' %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% embed '@theme/embeds/card.html.twig' with {'margin_bottom': 0} %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% from '@theme/components/buttons.html.twig' import action_cardtoolbutton %}
|
||||
{% block box_title %}
|
||||
{% if not title is empty %}{{ title|trans }}{% endif %}
|
||||
{% endblock %}
|
||||
@@ -23,8 +23,8 @@
|
||||
{% else %}
|
||||
{% set nextWeek = nextWeek + 1 %}
|
||||
{% endif %}
|
||||
{{ widgets.card_tool_button('left', {'class': 'pagination-link', 'onclick': 'myChart.destroy()', 'url': path('widgets_working_time_chart', {'year': prevYear, 'week': prevWeek})}) }}
|
||||
{{ widgets.card_tool_button('right', {'class': 'pagination-link', 'onclick': 'myChart.destroy()', 'url': path('widgets_working_time_chart', {'year': nextYear, 'week': nextWeek})}) }}
|
||||
{{ action_cardtoolbutton('left', {'title': 'stats.workingTimeWeekShort'|trans({'%week%': (prevWeek ~ '/' ~ prevYear)}), 'class': 'pagination-link', 'onclick': 'myChart.destroy()', 'url': path('widgets_working_time_chart', {'year': prevYear, 'week': prevWeek})}) }}
|
||||
{{ action_cardtoolbutton('right', {'title': 'stats.workingTimeWeekShort'|trans({'%week%': (nextWeek ~ '/' ~ nextYear)}), 'class': 'pagination-link', 'onclick': 'myChart.destroy()', 'url': path('widgets_working_time_chart', {'year': nextYear, 'week': nextWeek})}) }}
|
||||
{% endblock %}
|
||||
{% block box_body %}
|
||||
{{ render_widget('DailyWorkingTimeChart', options|merge({'begin': data.begin, 'end': data.end})) }}
|
||||
|
||||
Reference in New Issue
Block a user