mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 20:18:52 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
||||
|
||||
{% import _self as helper %}
|
||||
|
||||
{% block toolbar %}
|
||||
{% if collector.messages|length %}
|
||||
{% set icon %}
|
||||
{{ include('@WebProfiler/Icon/translation.svg') }}
|
||||
{{ source('@WebProfiler/Icon/translation.svg') }}
|
||||
{% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' %}
|
||||
{% set error_count = collector.countMissings + collector.countFallbacks %}
|
||||
<span class="sf-toolbar-value">{{ error_count ?: collector.countDefines }}</span>
|
||||
@@ -44,7 +42,7 @@
|
||||
|
||||
{% block menu %}
|
||||
<span class="label label-status-{{ collector.countMissings ? 'error' : collector.countFallbacks ? 'warning' }} {{ collector.messages is empty ? 'disabled' }}">
|
||||
<span class="icon">{{ include('@WebProfiler/Icon/translation.svg') }}</span>
|
||||
<span class="icon">{{ source('@WebProfiler/Icon/translation.svg') }}</span>
|
||||
<strong>Translation</strong>
|
||||
{% if collector.countMissings or collector.countFallbacks %}
|
||||
{% set error_count = collector.countMissings + collector.countFallbacks %}
|
||||
@@ -72,7 +70,7 @@
|
||||
<h2>Messages</h2>
|
||||
|
||||
{% if collector.messages is empty %}
|
||||
<div class="empty">
|
||||
<div class="empty empty-panel">
|
||||
<p>No translations have been called.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
@@ -105,7 +103,7 @@
|
||||
</div>
|
||||
{% else %}
|
||||
{% block defined_messages %}
|
||||
{{ helper.render_table(messages_defined) }}
|
||||
{{ _self.render_table(messages_defined) }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -126,7 +124,7 @@
|
||||
</div>
|
||||
{% else %}
|
||||
{% block fallback_messages %}
|
||||
{{ helper.render_table(messages_fallback, true) }}
|
||||
{{ _self.render_table(messages_fallback, true) }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -148,29 +146,27 @@
|
||||
</div>
|
||||
{% else %}
|
||||
{% block missing_messages %}
|
||||
{{ helper.render_table(messages_missing) }}
|
||||
{{ _self.render_table(messages_missing) }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>Sfjs.createFilters();</script>
|
||||
|
||||
{% endblock messages %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% macro render_table(messages, is_fallback) %}
|
||||
<table data-filters>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-filter="locale">Locale</th>
|
||||
<th>Locale</th>
|
||||
{% if is_fallback %}
|
||||
<th>Fallback locale</th>
|
||||
{% endif %}
|
||||
<th data-filter="domain">Domain</th>
|
||||
<th>Domain</th>
|
||||
<th>Times used</th>
|
||||
<th>Message ID</th>
|
||||
<th>Message Preview</th>
|
||||
@@ -178,7 +174,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for message in messages %}
|
||||
<tr data-filter-locale="{{ message.locale }}" data-filter-domain="{{ message.domain }}">
|
||||
<tr>
|
||||
<td class="font-normal text-small nowrap">{{ message.locale }}</td>
|
||||
{% if is_fallback %}
|
||||
<td class="font-normal text-small nowrap">{{ message.fallbackLocale|default('-') }}</td>
|
||||
@@ -186,7 +182,7 @@
|
||||
<td class="font-normal text-small text-bold nowrap">{{ message.domain }}</td>
|
||||
<td class="font-normal text-small nowrap">{{ message.count }}</td>
|
||||
<td>
|
||||
<span class="nowrap">{{ message.id }}</span>
|
||||
<span class="{{ message.id|length < 64 ? 'nowrap' }}">{{ message.id }}</span>
|
||||
|
||||
{% if message.transChoiceNumber is not null %}
|
||||
<small class="newline">(pluralization is used)</small>
|
||||
|
||||
Reference in New Issue
Block a user