phpstan level 3, fixed deprecations, code cleanup (#811)
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
{{ tables.data_table_header(tableName, columns) }}
|
||||
{% for entry in entries %}
|
||||
{% set currency = entry.project.customer.currency %}
|
||||
{% set duration = entry.duration|duration() %}
|
||||
{% set duration = entry.duration|duration %}
|
||||
{% if entry.fixedRate is not null %}
|
||||
{% set rate = entry.fixedRate %}
|
||||
{% set duration = 1 %}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
{{ tables.data_table_header(tableName, columns) }}
|
||||
{% for entry in entries %}
|
||||
{% set duration = entry.duration|duration() %}
|
||||
{% set duration = entry.duration|duration %}
|
||||
{% if entry.fixedRate is not null %}
|
||||
{% set rate = entry.fixedRate %}
|
||||
{% set duration = 1 %}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in model.calculator.entries %}
|
||||
{% set duration = entry.duration|duration() %}
|
||||
{% set duration = entry.duration|duration %}
|
||||
{% if entry.fixedRate is not null %}
|
||||
{% set rate = entry.fixedRate %}
|
||||
{% set duration = 1 %}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in model.calculator.entries %}
|
||||
{% set duration = entry.duration|duration() %}
|
||||
{% set duration = entry.duration|duration %}
|
||||
{% if entry.fixedRate is not null %}
|
||||
{% set rate = entry.fixedRate %}
|
||||
{% set duration = 1 %}
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro timesheet(timesheet, view) %}
|
||||
{%- filter spaceless -%}
|
||||
{%- apply spaceless -%}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% set actions = {} %}
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
{% else %}
|
||||
{{ widgets.entity_actions(event.payload.actions) }}
|
||||
{% endif %}
|
||||
{%- endfilter -%}
|
||||
{%- endapply -%}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro timesheets_team(view) %}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro data_table_column_class(name, columns, column) %}
|
||||
{% spaceless %}
|
||||
{% apply spaceless %}
|
||||
{% set class = '' %}
|
||||
{% set always = false %}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
{% if not class is empty %}
|
||||
{{ class }}
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro data_table_header_options(name, columns, options) %}
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">{{ 'label.actions'|trans }}
|
||||
<span class="fa fa-caret-down"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
{%- filter spaceless -%}
|
||||
{%- apply spaceless -%}
|
||||
{%- for icon,values in actions %}
|
||||
{% set class = '' %}
|
||||
{% if icon == 'trash' %}
|
||||
@@ -197,7 +197,7 @@
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor -%}
|
||||
{% endfilter %}
|
||||
{% endapply %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
{% macro action_button(icon, values, type) %}
|
||||
{%- import _self as macro -%}
|
||||
{%- filter spaceless -%}
|
||||
{%- apply spaceless -%}
|
||||
{% set id = null %}
|
||||
{% set onclick = null %}
|
||||
{% set modal = null %}
|
||||
@@ -278,17 +278,17 @@
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
>{% if title is not null %}{{ title }}{% else %}{{ macro.icon(icon) }}{% endif %}</a>
|
||||
{% endfilter %}
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro button_group(actions, type) %}
|
||||
{%- import _self as macro -%}
|
||||
<div class="btn-group">
|
||||
{%- filter spaceless -%}
|
||||
{%- apply spaceless -%}
|
||||
{%- for icon,values in actions %}
|
||||
{{ macro.action_button(icon, values, type) }}
|
||||
{% endfor -%}
|
||||
{% endfilter %}
|
||||
{% endapply %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
{% if entries.count == 0 %}
|
||||
{{ widgets.callout('warning', 'error.no_entries_found') }}
|
||||
{% else %}
|
||||
{{ tables.data_table_header(tableName, columns) }}
|
||||
{{ tables.data_table_header(tableName, columns, false, 'kimai.userUpdate') }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr{% if is_granted('edit', entry) %} class="open-edit alternative-link" data-href="{{ path('user_profile_edit', {'username': entry.username}) }}"{% endif %}>
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
|
||||
var userProfileChartCanvas{{ year }} = $("#userProfileChart{{ year }}").get(0).getContext("2d");
|
||||
|
||||
{% if tab == 'charts' %}
|
||||
var userProfileChart{{ year }} = new Chart(
|
||||
userProfileChartCanvas{{ year }}, {
|
||||
type: 'bar',
|
||||
@@ -72,17 +71,6 @@
|
||||
options: userProfileChartOptions()
|
||||
}
|
||||
);
|
||||
{% endif %}
|
||||
|
||||
$('a[href="#charts"]').on('shown.bs.tab', function(event){
|
||||
var userProfileChart{{ year }} = new Chart(
|
||||
userProfileChartCanvas{{ year }}, {
|
||||
type: 'bar',
|
||||
data: userProfileChartData{{ year }},
|
||||
options: userProfileChartOptions()
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user