Adjust templates and translations

This commit is contained in:
Julie Lenaerts 2025-04-29 10:03:57 +02:00
parent 2ac59ad763
commit 2bbf97f53b
6 changed files with 112 additions and 97 deletions

View File

@ -17,9 +17,6 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
class AdminMenuBuilder implements LocalMenuBuilderInterface
{
/**
* @var AuthorizationCheckerInterface
*/
protected AuthorizationCheckerInterface $authorizationChecker;
public function __construct(AuthorizationCheckerInterface $authorizationChecker)
@ -53,7 +50,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
'route' => 'chill_event_admin_role',
])->setExtras(['order' => 6530]);
$menu->addChild('Theme', [
$menu->addChild('event.theme.label', [
'route' => 'chill_crud_event_theme_index',
])->setExtras(['order' => 6540]);
}

View File

@ -17,6 +17,7 @@
{{ form_row(edit_form.date) }}
{{ form_row(edit_form.type, { label: "Event type" }) }}
{{ form_row(edit_form.themes) }}
{{ form_row(edit_form.moderator) }}
{{ form_row(edit_form.location) }}
{{ form_row(edit_form.organizationCost) }}

View File

@ -13,10 +13,12 @@
{{ form_start(form) }}
{{ form_errors(form) }}
{{ form_row(form.circle) }}
{# {{ form_row(form.circle) }}#}
{{ form_row(form.name) }}
{{ form_row(form.circle) }}
{{ form_row(form.date) }}
{{ form_row(form.type, { label: "Event type" }) }}
{{ form_row(form.themes) }}
{{ form_row(form.moderator) }}
{{ form_row(form.location) }}
{{ form_row(form.organizationCost) }}

View File

@ -41,6 +41,11 @@ block js %}
{{ e.moderator | chill_entity_render_box }}
</p>
{% endif %}
<div>
{% for t in e.themes %}
<span>{{ t|chill_entity_render_box }}</span>
{% endfor %}
</div>
</div>
<div class="item-col">
<div class="container" style="text-align: right">

View File

@ -38,6 +38,14 @@
<th>{{ 'Event type'|trans }}</th>
<td>{{ event.type.name|localize_translatable_string }}</td>
</tr>
<tr>
<th>{{ 'event.theme.label'|trans }}
<td>
{% for t in event.themes %}
{{ t|chill_entity_render_box }}
{% endfor %}
</td>
</tr>
<tr>
<th>{{ 'Moderator'|trans }}</th>
<td>{{ event.moderator|trans|default('-') }}</td>
@ -80,27 +88,7 @@
</div>
{% endif %}
<ul class="record_actions">
{% set returnPath = app.request.get('return_path') %}
{% set returnLabel = app.request.get('return_label') %}
<li class="cancel">
<a href="{{ chill_return_path_or('chill_event_event_list') }}" class="btn btn-cancel">{{ 'Back to the list'|trans|chill_return_path_label }}</a>
</li>
<li>
<a href="{{ chill_path_add_return_path('chill_event__event_edit', {'event_id': event.id }, false, 'See'|trans) }}" class="btn btn-edit">
{{ 'Edit'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_event__event_delete', {'event_id' : event.id } ) }}"
class="btn btn-delete">{{ 'Delete event'|trans }}</a>
</li>
</ul>
<div class="participations-wrapper" style="background-color: whitesmoke; padding: 1rem; margin-bottom: .5rem;">
<h2>{{ 'Participations'|trans }}</h2>
{% set count = event.participations|length %}
<p>{{ 'count participations to this event'|trans({'count': count}) }}</p>
@ -156,13 +144,7 @@
{% endif %}
<ul class="record_actions">
{% if count > 0 %}
<li><a href="{{ path('chill_event_participation_edit_multiple', { 'event_id' : event.id } ) }}" class="btn btn-edit">{{ 'Edit all the participations'|trans }}</a></li>
{% endif %}
</ul>
<div class="row" style="margin-bottom: 10em;">
<div class="row">
<div class="col-8">
{{ form_start(form_add_participation_by_person) }}
<div class="input-group">
@ -174,8 +156,11 @@
<input type="hidden" name="returnPath" value="{{ app.request.requestUri }}" />
{{ form_end(form_add_participation_by_person) }}
</div>
</div>
<div class="col-4">
<ul class="record_actions">
{% if count > 0 %}
<li>
{{ form_start(form_export, {'attr': {'id': 'export_tableur'}}) }}
<div class="input-group">
{{ form_widget(form_export.format, { 'attr' : { 'class': 'custom-select' } }) }}
@ -186,11 +171,33 @@
</div>
{{ form_rest(form_export) }}
{{ form_end(form_export) }}
</li>
<li><a href="{{ path('chill_event_participation_edit_multiple', { 'event_id' : event.id } ) }}" class="btn btn-edit">{{ 'Edit all the participations'|trans }}</a></li>
{% endif %}
</ul>
</div>
</div>
<div class="post_show">
{{ chill_delegated_block('block_footer_show', { 'event': event }) }}
</div>
<ul class="record_actions">
{% set returnPath = app.request.get('return_path') %}
{% set returnLabel = app.request.get('return_label') %}
<li class="cancel">
<a href="{{ chill_return_path_or('chill_event_event_list') }}" class="btn btn-cancel">{{ 'Back to the list'|trans|chill_return_path_label }}</a>
</li>
<li>
<a href="{{ chill_path_add_return_path('chill_event__event_edit', {'event_id': event.id }, false, 'See'|trans) }}" class="btn btn-edit">
{{ 'Edit'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_event__event_delete', {'event_id' : event.id } ) }}"
class="btn btn-delete">{{ 'Delete event'|trans }}</a>
</li>
</ul>
</div>
{% endblock %}

View File

@ -128,6 +128,8 @@ Create a new type: Créer un nouveau type
Create a new status: Créer un nouveau statut
event:
theme:
label: Thématiques
fields:
organizationCost: Coût d'organisation
location: Localisation
@ -136,6 +138,7 @@ event:
organisationCost_help: Coût d'organisation pour la structure. Utile pour les statistiques.
add_document: Ajouter un document
remove_document: Supprimer le document
Select one or more themes: Selectionnez une ou plusieurs thématiques
filter:
event_types: Par types d'événement
event_dates: Par date d'événement