From 74e25e706e4349d1df4da46ef24616543498b8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 28 Sep 2023 12:12:17 +0200 Subject: [PATCH] [ThirdParty] Fix display of civility in page "view" https://gitlab.com/Chill-Projet/chill-bundles/-/issues/164 --- .changes/unreleased/Fixed-20230928-120910.yaml | 5 +++++ .../Resources/views/ThirdParty/view.html.twig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixed-20230928-120910.yaml diff --git a/.changes/unreleased/Fixed-20230928-120910.yaml b/.changes/unreleased/Fixed-20230928-120910.yaml new file mode 100644 index 000000000..72c9dd9b4 --- /dev/null +++ b/.changes/unreleased/Fixed-20230928-120910.yaml @@ -0,0 +1,5 @@ +kind: Fixed +body: 'View a third party: avoid errors when a contact has a civility' +time: 2023-09-28T12:09:10.199359071+02:00 +custom: + Issue: "164" diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig index f330246fc..4e7fd159d 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig @@ -25,7 +25,7 @@
{{ 'Name'|trans }}
- {% if thirdParty.isLeaf == true %}{{ thirdParty.civility }}{% endif %} + {% if thirdParty.isLeaf == true and thirdParty.civility is not same as null %}{{ thirdParty.civility.name|localize_translatable_string }}{% endif %} {{ thirdParty.firstname ~ ' ' ~ thirdParty.name }}