diff --git a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php
index da024fa94..17dbbe7c5 100644
--- a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php
+++ b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php
@@ -175,7 +175,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\Column(type="boolean", nullable=true)
*/
- private ?bool $sendSMS = null;
+ private ?bool $sendSMS = false;
/**
* @ORM\Column(type="text", nullable=false, options={"default": Calendar::SMS_PENDING})
diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php
index 05fa11524..ebd62fb2e 100644
--- a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php
+++ b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php
@@ -78,7 +78,6 @@ class CalendarType extends AbstractType
// },
// ])
->add('sendSMS', ChoiceType::class, [
- 'required' => false,
'choices' => [
'Oui' => true,
'Non' => false,
diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig
index f5220d713..cdd6a096a 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig
+++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/listByAccompanyingCourse.html.twig
@@ -45,7 +45,7 @@
{{ calendar.startDate|format_datetime('short', 'short') }} - {{ calendar.endDate|format_datetime('none', 'short') }}
{% endif %}
-
+
{{ calendar.duration|date('%H:%I')}}
@@ -103,6 +103,27 @@
{% endif %}
+
+ {% if false == calendar.sendSMS or null == calendar.sendSMS %}
+
+
+
+
+ {% else %}
+ {% if calendar.smsStatus == 'sms_sent' %}
+
+
+
+
+ {% else %}
+
+
+
+
+ {% endif %}
+ {% endif %}
+
+
{% if (calendar.isInvited(app.user)) %}
{% set invite = calendar.inviteForUser(app.user) %}
@@ -110,21 +131,23 @@
{% endif %}
+ {% if false %}
-
-
+
+ {% endif %}
{# TOOD
{% if is_granted('CHILL_ACTIVITY_UPDATE', calendar) %}
#}
-
-
+
{# TOOD
{% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', calendar) %}
#}
-
-
+
{#
{% endif %}
diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
index 3a1bf03d5..bff4baa53 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
+++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
@@ -1,4 +1,13 @@
{{ "Calendar"|trans }}
+
+ {% if entity.endDate.diff(entity.startDate).days >= 1 %}
+ {{ "From the day"|trans }} {{ entity.startDate|format_datetime('medium', 'short') }}
+ {{ "to the day"|trans }} {{ entity.endDate|format_datetime('medium', 'short') }}
+ {% else %}
+ {{ entity.startDate|format_date('full') }},
+ {{ entity.startDate|format_datetime('none', 'short', locale='fr') }} - {{ entity.endDate|format_datetime('none', 'short', locale='fr') }}
+ {% endif %}
+
- {{ 'main user concerned'|trans }}
@@ -6,7 +15,7 @@
{{ 'Concerned groups'|trans }}
-{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'render': 'bloc' } %}
+{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': 'calendar_' ~ context, 'render': 'bloc' } %}
{{ 'Calendar data'|trans }}
@@ -79,8 +88,8 @@