- {% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' %}
+
+ {% if 'DRAFT' == accompanyingCourse.step %}
+
+ {% include '@ChillPerson/AccompanyingCourse/_still_draft.html.twig' %}
{% endif %}
- {% endif %}
- {% if accompanyingCourse.locationStatus == 'address'
- or accompanyingCourse.locationStatus == 'none' %}
-
- {% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %}
-
- {% endif %}
+ {% if 'DRAFT' != accompanyingCourse.step %}
+ {% if withoutHousehold|length > 0 %}
+
+ {% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' %}
+
+ {% endif %}
+ {% endif %}
-
-
+ {% if accompanyingCourse.locationStatus == 'address'
+ or accompanyingCourse.locationStatus == 'none' %}
+
+ {% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %}
+
+ {% endif %}
+
+
{% if accompanyingCourse.locationStatus == 'person' %}
{{ 'This course is located by'|trans }}
{{ accompanyingCourse.personLocation|chill_entity_render_string }}
@@ -54,28 +55,21 @@
{{ accompanyingCourse.location|chill_entity_render_box }}
{% endif %}
-
- {% if accompanyingCourse.scopes is not empty
- or (accompanyingCourse.requestorThirdParty is not null
- or accompanyingCourse.requestorPerson is not null)
- or accompanyingCourse.participations is not empty
- or accompanyingCourse.resources is not empty
- %}
-
-
+
{% if accompanyingCourse.scopes is not empty %}
{{ 'Scopes'|trans }}
-
+
{% for s in accompanyingCourse.scopes %}
{{ s.name|localize_translatable_string|capitalize }}{% if not loop.last %}, {% endif %}
{% endfor %}
-
+
{% else %}
{{ 'No scopes'|trans }}
{% endif %}
-
+
+
{% if accompanyingCourse.requestorPerson is not null %}
{{ 'Requestor'|trans }}
{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}
@@ -86,7 +80,8 @@
{{ 'No requestor'|trans }}
{% endif %}
-
+
+
{% if accompanyingCourse.participations is not empty %}
{{ 'Persons associated'|trans }}
{% for r in accompanyingCourse.participations %}
@@ -100,7 +95,8 @@
{{ 'No participations'|trans }}
{% endif %}
-
+
+
{% if accompanyingCourse.resources is not empty %}
{{ 'Resources'|trans }}
{% for r in accompanyingCourse.resources %}
@@ -115,15 +111,14 @@
{% endif %}
- {% endif %}
-
+
{{ 'Last social actions'|trans }}
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %}
{% block contentActivity %}
-
+
{% set person = null %}
{% set person_id = null %}
diff --git a/src/Bundle/ChillPersonBundle/chill.webpack.config.js b/src/Bundle/ChillPersonBundle/chill.webpack.config.js
index e033fc89d..7a8b79c7c 100644
--- a/src/Bundle/ChillPersonBundle/chill.webpack.config.js
+++ b/src/Bundle/ChillPersonBundle/chill.webpack.config.js
@@ -17,4 +17,5 @@ module.exports = function(encore, entries)
encore.addEntry('page_household_edit_metadata', __dirname + '/Resources/public/page/household_edit_metadata/index.js');
encore.addEntry('page_person', __dirname + '/Resources/public/page/person/index.js');
encore.addEntry('page_accompanying_course_index_person_locate', __dirname + '/Resources/public/page/accompanying_course_index/person_locate.js');
+ encore.addEntry('page_accompanying_course_index_masonry', __dirname + '/Resources/public/page/accompanying_course_index/masonry.js');
};