Skip to content

Commit

Permalink
[Admin] Event - add visibility column (#11363)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano authored Jan 24, 2025
1 parent 6630137 commit 28a1d9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
31 changes: 10 additions & 21 deletions src/Admin/EventAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ protected function configureShowFields(ShowMapper $show): void
'label' => 'Nom',
'format_title_case' => true,
])
->add('category', null, [
'label' => 'Catégorie',
])
->add('type', 'trans', [
'format' => 'event_type.%s',
])
->add('committee', null, [
'label' => 'Comité organisateur',
'virtual_field' => true,
'template' => 'admin/event/show_committee.html.twig',
])
->add('visibility', null, [
'label' => 'Visibilité',
])
->add('category', null, [
'label' => 'Catégorie',
])
->add('description', null, [
'label' => 'Description',
'attr' => [
Expand All @@ -103,9 +103,6 @@ protected function configureShowFields(ShowMapper $show): void
->add('published', null, [
'label' => 'Publié',
])
->add('private', null, [
'label' => 'Réservé aux adhérents',
])
->add('electoral', null, [
'label' => 'Électoral',
])
Expand Down Expand Up @@ -338,9 +335,6 @@ protected function configureDatagridFilters(DatagridMapper $filter): void
->add('published', BooleanFilter::class, [
'label' => 'Publié',
])
->add('private', BooleanFilter::class, [
'label' => 'Réservé aux adhérents',
])
->add('electoral', BooleanFilter::class, [
'label' => 'Électoral',
])
Expand All @@ -353,9 +347,6 @@ protected function configureListFields(ListMapper $list): void
->add('id', null, [
'label' => 'Id',
])
->add('type', 'trans', [
'format' => 'event_type.%s',
])
->add('name', null, [
'label' => 'Nom',
])
Expand All @@ -364,6 +355,10 @@ protected function configureListFields(ListMapper $list): void
'virtual_field' => true,
'template' => 'admin/event/list_committee.html.twig',
])
->add('visibility', null, [
'label' => 'Visibilité',
'class' => EventVisibilityEnum::class,
])
->add('organizer', null, [
'label' => 'Organisateur',
'template' => 'admin/event/list_organizer.html.twig',
Expand All @@ -386,12 +381,6 @@ protected function configureListFields(ListMapper $list): void
'label' => 'Statut',
'template' => 'admin/event/list_status.html.twig',
])
->add('private', null, [
'label' => 'Réservé aux adhérents',
])
->add('electoral', null, [
'label' => 'Électoral',
])
->add(ListMapper::NAME_ACTIONS, null, [
'virtual_field' => true,
'template' => 'admin/event/list_actions.html.twig',
Expand Down
3 changes: 0 additions & 3 deletions translations/messages+intl-icu.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,6 @@ event.cancel: Annuler l'événement
event.manage_participants: Gérer les participants
event.back_to_list: Retour à la liste des événements
event.personal_data_collect: J’accepte que LaREM traite mes données personnelles ci-dessus et les partage avec l’organisateur de l’événement {organisator_name}
event_type.municipal: Municipal
event_type.committee: Comité
event_type.default: Standard
event.visibility.public: Public
event.visibility.private: Interne
event.visibility.adherent: Adhérents
Expand Down

0 comments on commit 28a1d9b

Please sign in to comment.