financial year setting + new users working time per year report (#2547)
This commit is contained in:
@@ -82,9 +82,7 @@
|
||||
<th class="text-nowrap text-center total">{{ total|duration }}</th>
|
||||
{% for day in days %}
|
||||
<th class="text-nowrap text-center day-total{% if day.day is weekend %} weekend{% endif %}">
|
||||
{% if day.totalDuration > 0 %}
|
||||
{{ day.totalDuration|duration }}
|
||||
{% endif %}
|
||||
{{ day.totalDuration|duration }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
{% endblock %}
|
||||
{% block box_body_class %}{{ box_id }} table-responsive no-padding{% endblock %}
|
||||
{% block box_body %}
|
||||
{% set absoluteTotals = 0 %}
|
||||
<table class="table table-bordered table-hover dataTable">
|
||||
<tr>
|
||||
<th> </th>
|
||||
@@ -37,15 +38,14 @@
|
||||
{% for day in userDay.days %}
|
||||
{% if day.totalDuration > 0 %}
|
||||
{% set usersTotalDuration = usersTotalDuration + day.totalDuration %}
|
||||
{% set absoluteTotals = absoluteTotals + day.totalDuration %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<th class="text-nowrap text-center total">
|
||||
{% if usersTotalDuration > 0 %}
|
||||
{{ usersTotalDuration|duration }}
|
||||
{% endif %}
|
||||
{{ usersTotalDuration|duration }}
|
||||
</th>
|
||||
{% for day in userDay.days %}
|
||||
<td class="text-nowrap day-total{% if day.day is weekend %} weekend{% endif %}">
|
||||
<td class="text-nowrap text-center day-total{% if day.day is weekend %} weekend{% endif %}">
|
||||
{% if day.totalDuration > 0 %}
|
||||
{{ day.totalDuration|duration }}
|
||||
{% endif %}
|
||||
@@ -53,6 +53,17 @@
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th class="text-center text-nowrap">
|
||||
{{ absoluteTotals|duration }}
|
||||
</th>
|
||||
{% for id, duration in totals %}
|
||||
<th class="text-center text-nowrap">
|
||||
{{ duration|duration }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
86
templates/reporting/report_user_list_monthly.html.twig
Normal file
86
templates/reporting/report_user_list_monthly.html.twig
Normal file
@@ -0,0 +1,86 @@
|
||||
{% extends 'reporting/layout.html.twig' %}
|
||||
|
||||
{% block report_title %}{{ report_title|trans({}, 'reporting') }}{% endblock %}
|
||||
|
||||
{% block report %}
|
||||
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_before %}
|
||||
{{ form_start(form, {'attr': {'class': 'form-inline'}}) }}
|
||||
{% endblock %}
|
||||
{% block box_after %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
{% block box_title %}
|
||||
{{ form_widget(form.date) }}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}{{ box_id }} table-responsive no-padding{% endblock %}
|
||||
{% block box_body %}
|
||||
<table class="table table-bordered table-hover dataTable">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
{% for id, month in months %}
|
||||
<th class="text-center text-nowrap">
|
||||
<a href="{{ path('report_monthly_users', {'date': month|date_short}) }}">
|
||||
{{ month|month_name }}<br>
|
||||
{{ month|date_format('Y') }}
|
||||
</a>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for userYear in rows %}
|
||||
{% set usersTotalDuration = 0 %}
|
||||
<tr class="user">
|
||||
<td class="text-nowrap">
|
||||
<strong>{{ widgets.username(userYear.user) }}</strong>
|
||||
</td>
|
||||
{% for yid, year in userYear.years %}
|
||||
{% for mid, month in year.months %}
|
||||
{% if month.totalDuration > 0 %}
|
||||
{% set usersTotalDuration = usersTotalDuration + month.totalDuration %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<th class="text-nowrap text-center total">
|
||||
{{ usersTotalDuration|duration }}
|
||||
</th>
|
||||
{% for yid, year in userYear.years %}
|
||||
{% for mid, month in year.months %}
|
||||
<td class="text-nowrap text-center day-total">
|
||||
{% if month.totalDuration > 0 %}
|
||||
<a href="{{ path('report_user_month', {'date': (year.year ~'-'~month.month~'-01')|date_short, 'user': userYear.user.id}) }}" data-toggle="tooltip" title="{{ 'label.billable'|trans }}: {{ month.billableDuration|duration }}">
|
||||
{{ month.totalDuration|duration }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
{% for id, duration in totals %}
|
||||
<th class="text-center text-nowrap">
|
||||
{{ duration|duration }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('kimai.initialized', function() {
|
||||
$('#{{ form.date.vars.id }}').on('change', function(ev) {
|
||||
$(this).closest('form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user