From 629dbb913785b5120af5d15bf3452aaf29432b1a Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 11 May 2022 11:30:08 +0200 Subject: [PATCH] admin: missing translations and css class --- .../views/ActivityPresence/index.html.twig | 2 +- .../views/ActivityReason/edit.html.twig | 2 +- .../views/ActivityReason/new.html.twig | 2 +- .../views/ActivityReason/show.html.twig | 2 +- .../ActivityReasonCategory/edit.html.twig | 2 +- .../ActivityReasonCategory/index.html.twig | 2 +- .../ActivityReasonCategory/new.html.twig | 2 +- .../ActivityReasonCategory/show.html.twig | 2 +- .../views/ActivityType/index.html.twig | 2 +- .../ActivityTypeCategory/index.html.twig | 2 +- .../src/translations/messages.fr.yml | 3 +- .../translations/messages.fr.yml | 1 + .../Menu/AdminMenuBuilder.php | 2 +- .../translations/messages.fr.yml | 1 + .../Menu/AdminMenuBuilder.php | 3 -- .../translations/messages.fr.yml | 2 + .../views/DocumentCategory/new.html.twig | 2 +- .../translations/messages.fr.yml | 1 + .../Controller/UserController.php | 42 +++++++++---------- .../views/PermissionsGroup/edit.html.twig | 2 +- .../views/PermissionsGroup/show.html.twig | 2 +- .../translations/messages.fr.yml | 5 ++- .../views/SocialWork/Result/index.html.twig | 6 +++ .../translations/messages.fr.yml | 8 +++- 24 files changed, 56 insertions(+), 44 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityPresence/index.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityPresence/index.html.twig index 954b7c653..87fa4221c 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityPresence/index.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityPresence/index.html.twig @@ -34,7 +34,7 @@ - + {{ 'Create a new activity presence'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/edit.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/edit.html.twig index 04bb46ca2..09ab25f7a 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/edit.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/edit.html.twig @@ -8,7 +8,7 @@ {{ form_row(edit_form.active) }} {{ form_row(edit_form.category) }} - + {{ 'Back to the list'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/new.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/new.html.twig index 9d078ec9a..7509ed651 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/new.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/new.html.twig @@ -8,7 +8,7 @@ {{ form_row(form.active) }} {{ form_row(form.category) }} - + {{ 'Back to the list'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/show.html.twig index eda4b787b..d15da7e9b 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReason/show.html.twig @@ -22,7 +22,7 @@ - + {{ 'Back to the list'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/edit.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/edit.html.twig index f3b6e49c6..8c588d7f8 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/edit.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/edit.html.twig @@ -7,7 +7,7 @@ {{ form_row(edit_form.name) }} {{ form_row(edit_form.active) }} - + {{ 'Back to the list'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/index.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/index.html.twig index 2d8a9560a..473059124 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/index.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/index.html.twig @@ -30,7 +30,7 @@ - + {{ 'Create a new activity category reason'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/new.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/new.html.twig index 3fb81c1b4..82a000968 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/new.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/new.html.twig @@ -7,7 +7,7 @@ {{ form_row(form.name) }} {{ form_row(form.active) }} - + {{ 'Back to the list'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/show.html.twig index 33b8c611b..1edca9838 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityReasonCategory/show.html.twig @@ -21,7 +21,7 @@ - + {{ 'Back to the list'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityType/index.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityType/index.html.twig index 65ba0e18f..b494ab7aa 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityType/index.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityType/index.html.twig @@ -34,7 +34,7 @@ - + {{ 'Create a new activity type'|trans }} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/ActivityTypeCategory/index.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/ActivityTypeCategory/index.html.twig index d3a030f50..c87e52c64 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/ActivityTypeCategory/index.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/ActivityTypeCategory/index.html.twig @@ -34,7 +34,7 @@ - + {{ 'Create a new activity type category'|trans }} diff --git a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml index 6d219626d..0a7be1fcd 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml +++ b/src/Bundle/ChillAsideActivityBundle/src/translations/messages.fr.yml @@ -38,7 +38,7 @@ crud: confirm_message_delete: Êtes-vous sûr de vouloir supprimer cette activité annexe? aside_activity_category: title_new: Nouvelle catégorie d'activité annexe - title_edit: Edition d'une catégorie de type d'activité + title_edit: Édition d'une catégorie de type d'activité #forms Create a new aside activity type: Nouvelle categorie d'activité annexe @@ -165,3 +165,4 @@ Phonecall: "Appel téléphonique" Aside activities: Activités annexes Aside activity types: Types d'activités annexes Aside activity type configuration: Configuration des categories d'activités annexes +Aside activity configuration: Configuration des activités annexes diff --git a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml index d0a65c5e4..aafa26622 100644 --- a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml @@ -27,6 +27,7 @@ From the day: Du to the day: au Transform to activity: Transformer en échange canceledBy: supprimé par +Canceled by: supprimé par Calendar configuration: Gestion des rendez-vous crud: diff --git a/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php index e3d19e68b..71d0d6275 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php @@ -39,7 +39,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface ->setAttribute('class', 'list-group-item-header') ->setExtras([ 'order' => 4500, - 'icons' => ['plus'] + 'icons' => ['plus'], ]); $menu->addChild('Custom fields group', [ diff --git a/src/Bundle/ChillCustomFieldsBundle/translations/messages.fr.yml b/src/Bundle/ChillCustomFieldsBundle/translations/messages.fr.yml index 31463fccb..6e20d3f60 100644 --- a/src/Bundle/ChillCustomFieldsBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillCustomFieldsBundle/translations/messages.fr.yml @@ -38,6 +38,7 @@ CustomFields Groups: Groupe de champs personnalisés #customfield administration Custom fields: Champs personnalisés +CustomFields configuration: Gestion des champs personnalisés CustomField edit: Modification d'un champ personnalisé CustomField creation: Nouveau champ personnalisé General informations: Informations générales diff --git a/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php index 675cd9e90..5eed2ae9f 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php @@ -16,8 +16,6 @@ use Knp\Menu\MenuItem; use Symfony\Component\Security\Core\Security; use Symfony\Contracts\Translation\TranslatorInterface; -use function in_array; - class AdminMenuBuilder implements LocalMenuBuilderInterface { private Security $security; @@ -33,7 +31,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface public function buildMenu($menuId, MenuItem $menu, array $parameters) { if ($this->security->isGranted('ROLE_ADMIN')) { - $menu->addChild($this->translator->trans('docgen.Document generation'), [ 'route' => 'chill_crud_docgen_template_index', ])->setExtras([ diff --git a/src/Bundle/ChillDocGeneratorBundle/translations/messages.fr.yml b/src/Bundle/ChillDocGeneratorBundle/translations/messages.fr.yml index b60a7d60e..bf37ff838 100644 --- a/src/Bundle/ChillDocGeneratorBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillDocGeneratorBundle/translations/messages.fr.yml @@ -18,3 +18,5 @@ crud: add_new: Créer +Show data instead of generating: Montrer les données au lieu de générer le document +Template file: Fichier modèle \ No newline at end of file diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/DocumentCategory/new.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/DocumentCategory/new.html.twig index cf1be4fdf..f670609e9 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/DocumentCategory/new.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/DocumentCategory/new.html.twig @@ -18,7 +18,7 @@ - {{ button_label|default('New')|trans }} + {{ button_label|default('Create')|trans }} {{ form_end(form) }} diff --git a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml index 009f4d987..17326b299 100644 --- a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml @@ -59,6 +59,7 @@ Document class: Classe de document no records found: Create new category: Créer une nouvelle catégorie Back to the category list: Retour à la liste +Create new DocumentCategory: Créer une nouvelle catégorie de document # WOPI EDIT online_edit_document: Éditer en ligne diff --git a/src/Bundle/ChillMainBundle/Controller/UserController.php b/src/Bundle/ChillMainBundle/Controller/UserController.php index ea2e187bd..af4c3b6ad 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserController.php @@ -21,9 +21,9 @@ use Chill\MainBundle\Form\UserType; use Chill\MainBundle\Pagination\PaginatorInterface; use Chill\MainBundle\Templating\Listing\FilterOrderHelper; use Chill\MainBundle\Templating\Listing\FilterOrderHelperFactoryInterface; +use LogicException; use Psr\Log\LoggerInterface; use RuntimeException; -use LogicException; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormInterface; @@ -38,14 +38,14 @@ class UserController extends CRUDController { public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter'; + private FilterOrderHelperFactoryInterface $filterOrderHelperFactory; + private LoggerInterface $logger; private UserPasswordEncoderInterface $passwordEncoder; private ValidatorInterface $validator; - private FilterOrderHelperFactoryInterface $filterOrderHelperFactory; - public function __construct( LoggerInterface $chillLogger, ValidatorInterface $validator, @@ -58,25 +58,6 @@ class UserController extends CRUDController $this->filterOrderHelperFactory = $filterOrderHelperFactory; } - - protected function buildFilterOrderHelper(string $action, Request $request): ?FilterOrderHelper - { - return $this->getFilterOrderHelperFactory() - ->create(self::class) - ->addSearchBox(['label']) - ->build(); - } - - protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int - { - if (null === $filterOrder) { - throw new LogicException('filterOrder should not be null'); - } - $count = parent::countEntities($action, $request, $filterOrder); - - return $count; - } - /** * @Route("/{_locale}/admin/main/user/{uid}/add_link_groupcenter", * name="admin_user_add_groupcenter") @@ -241,6 +222,23 @@ class UserController extends CRUDController ]); } + protected function buildFilterOrderHelper(string $action, Request $request): ?FilterOrderHelper + { + return $this->getFilterOrderHelperFactory() + ->create(self::class) + ->addSearchBox(['label']) + ->build(); + } + + protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int + { + if (null === $filterOrder) { + throw new LogicException('filterOrder should not be null'); + } + + return parent::countEntities($action, $request, $filterOrder); + } + protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface { // for "new", add special config diff --git a/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/edit.html.twig b/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/edit.html.twig index f61c8f2c8..0f854f7ed 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/edit.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/edit.html.twig @@ -74,7 +74,7 @@ {{ form_row(add_role_scopes_form.composed_role_scope.role) }} {{ form_row(add_role_scopes_form.composed_role_scope.scope) }} - + {{ form_row(add_role_scopes_form.submit, { 'attr' : { 'class': 'btn btn-create' } } ) }} diff --git a/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/show.html.twig b/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/show.html.twig index fbbe6245b..eb93c4968 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/show.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/PermissionsGroup/show.html.twig @@ -56,7 +56,7 @@