Release 2.0.27 (#4107)

This commit is contained in:
Kevin Papst
2023-07-04 17:01:29 +02:00
committed by GitHub
parent 6a99ad41ca
commit 651f812da8
62 changed files with 506 additions and 427 deletions

View File

@@ -13,7 +13,7 @@
{% endif %}
{% endset %}
{% from '@theme/components/alert.html.twig' import alert %}
{{ alert({type: 'info', description: warningMsg|raw}) }}
{{ alert({type: 'info', description: warningMsg|raw, important: true}) }}
{% endif %}
{% if summaries|length > 0 %}

View File

@@ -130,12 +130,28 @@
<td class="text-nowrap text-end">{{ percentReached|number_format(2) }}%</td>
</tr>
{% if not entity.isMonthlyBudget() and timeBudgetVisible and stats.duration > 0 and stats.duration|chart_duration > 0.00 %}
{% if stats.internalRate > 0 %}
{% set revenueTotal = stats.rateBillable - stats.internalRate %}
<tr>
<td>{{ 'stats.revenue'|trans }} ({{ 'billable'|trans }} - {{ 'internalRate'|trans }})</td>
<td class="text-nowrap text-end">{{ revenueTotal|money(currency) }}</td>
<td class="text-nowrap text-end">-</td>
</tr>
{% endif %}
{% set realHourlyRate = stats.rateBillable / stats.duration|chart_duration %}
<tr>
<td>{{ 'hourlyRate'|trans }} ({{ 'billable'|trans }} / {{ durationTrans|trans }})</td>
<td class="text-nowrap text-end">{{ realHourlyRate|money(currency) }}</td>
<td class="text-nowrap text-end">-</td>
</tr>
{% if stats.internalRate > 0 %}
{% set revenueHourlyRate = revenueTotal / stats.duration|chart_duration %}
<tr>
<td>{{ 'hourlyRate'|trans }} ({{ 'stats.revenue'|trans }} / {{ durationTrans|trans }})</td>
<td class="text-nowrap text-end">{{ revenueHourlyRate|money(currency) }}</td>
<td class="text-nowrap text-end">-</td>
</tr>
{% endif %}
{% endif %}
{% if entity.budget > 0 %}
<tr>

View File

@@ -0,0 +1,35 @@
{% import "macros/datatables.html.twig" as tables %}
{% from "macros/widgets.html.twig" import nothing_found %}
{% if not dataTable.hasResults() %}
{{ nothing_found(dataTable.getReloadEvents()) }}
{% else %}
{% block datatable_header %}
{{ tables.header(dataTable) }}
{% endblock %}
{% block datatable_before %}{% endblock %}
{% set sortedColumns = dataTable.sortedColumnNames %}
{% block datatable_outer %}
{% for entry in dataTable %}
{% block datatable_row %}
<tr{% block datatable_row_attr %}{% endblock %}>
{% for column, data in sortedColumns %}
{% block datatable_column %}
<td class="{{ tables.class(dataTable, column) }}"{% block datatable_column_attr %}{% endblock %}>
{% block datatable_column_value %}{{ column }}{% endblock %}
</td>
{% endblock %}
{% endfor %}
</tr>
{% endblock %}
{% endfor %}
{% endblock %}
{% block datatable_after %}{% endblock %}
{% block datatable_footer %}
{{ tables.footer(dataTable) }}
{% endblock %}
{% endif %}

View File

@@ -1,5 +1,5 @@
{% extends 'base.html.twig' %}
{% import "macros/widgets.html.twig" as widgets %}
{% from "macros/widgets.html.twig" import username %}
{% block table_actions %}
{# compare templates/macros/datatables.html.twig macro actions(dataTable) #}
@@ -14,7 +14,7 @@
{% if form.user is defined %}
{{ form_widget(form.user) }}
{% elseif user is defined and app.user != user %}
{{ widgets.username(user) }}
{{ username(user) }}
{% endif %}
{% for field in form %}
{% if not field.rendered %}

View File

@@ -9,7 +9,7 @@
} %}
{% embed formEditTemplate with formOptions %}
{% block form_body %}
<fieldset class="form-fieldset">
<fieldset class="form-fieldset pb-0">
<div class="row">
<div class="col-md-4">
{{ form_row(form.customer) }}
@@ -22,27 +22,27 @@
</div>
</div>
</fieldset>
<fieldset class="form-fieldset">
<fieldset class="form-fieldset pb-0">
{{ form_row(form.replaceTags) }}
{{ form_row(form.tags) }}
</fieldset>
{% if form.user is defined %}
<fieldset class="form-fieldset">
<fieldset class="form-fieldset pb-0">
{{ form_row(form.user) }}
</fieldset>
{% endif %}
{% if form.exported is defined %}
<fieldset class="form-fieldset">
<fieldset class="form-fieldset pb-0">
{{ form_row(form.exported) }}
</fieldset>
{% endif %}
{% if form.billable is defined %}
<fieldset class="form-fieldset">
<fieldset class="form-fieldset pb-0">
{{ form_row(form.billable) }}
</fieldset>
{% endif %}
{% if form.recalculateRates is defined %}
<fieldset class="form-fieldset">
<fieldset class="form-fieldset pb-0">
{{ form_row(form.recalculateRates) }}
<div class="row">
<div class="col-md-6">
@@ -55,7 +55,7 @@
</fieldset>
{% endif %}
{% if form.metaFields is defined %}
<fieldset class="form-fieldset">
<fieldset class="form-fieldset pb-0">
<div class="row">
<div class="col-md-6">
{{ form_row(form.updateMeta) }}

View File

@@ -2,35 +2,22 @@
{% block form_content %}
<div class="mb-3">
<label class="form-label">{{ 'work_times_should'|trans }}</label>
<table class="table table-borderless">
<thead>
<tr>
<th>{{ 'Monday'|trans({}, 'system-configuration') }}</th>
<th>{{ 'Tuesday'|trans({}, 'system-configuration') }}</th>
<th>{{ 'Wednesday'|trans({}, 'system-configuration') }}</th>
<th>{{ 'Thursday'|trans({}, 'system-configuration') }}</th>
<th>{{ 'Friday'|trans({}, 'system-configuration') }}</th>
<th>{{ 'Saturday'|trans({}, 'system-configuration') }}</th>
<th>{{ 'Sunday'|trans({}, 'system-configuration') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ form_widget(form.workHoursMonday) }}</td>
<td>{{ form_widget(form.workHoursTuesday) }}</td>
<td>{{ form_widget(form.workHoursWednesday) }}</td>
<td>{{ form_widget(form.workHoursThursday) }}</td>
<td>{{ form_widget(form.workHoursFriday) }}</td>
<td>{{ form_widget(form.workHoursSaturday) }}</td>
<td>{{ form_widget(form.workHoursSunday) }}</td>
</tr>
</tbody>
</table>
<div class="form-text mb-0 help-text">{{ 'work_times_should.help'|trans }}</div>
</div>
{% form_theme form 'form/horizontal.html.twig' %}
{{ form_rest(form) }}
<fieldset class="form-fieldset">
<legend>{{ 'work_times_should'|trans }}</legend>
<div class="form-text mb-3 help-text">{{ 'work_times_should.help'|trans }}</div>
{{ form_row(form.workHoursMonday) }}
{{ form_row(form.workHoursTuesday) }}
{{ form_row(form.workHoursWednesday) }}
{{ form_row(form.workHoursThursday) }}
{{ form_row(form.workHoursFriday) }}
{{ form_row(form.workHoursSaturday) }}
{{ form_row(form.workHoursSunday) }}
</fieldset>
<fieldset class="form-fieldset">
{{ form_rest(form) }}
</fieldset>
{% endblock %}