mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
accompanyingCourse: add activities in the accompanying course summary
This commit is contained in:
parent
ac47a75a75
commit
ab8deb036b
@ -75,7 +75,7 @@ class AccompanyingCourseController extends Controller
|
|||||||
return $this->redirectToRoute('chill_person_accompanying_course_edit', [
|
return $this->redirectToRoute('chill_person_accompanying_course_edit', [
|
||||||
'accompanying_period_id' => $period->getId()
|
'accompanying_period_id' => $period->getId()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -96,9 +96,15 @@ class AccompanyingCourseController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$activities = $this->getDoctrine()->getManager()->getRepository('ChillActivityBundle:Activity')->findBy(
|
||||||
|
['accompanyingPeriod' => $accompanyingCourse],
|
||||||
|
['date' => 'DESC'],
|
||||||
|
);
|
||||||
|
|
||||||
return $this->render('@ChillPerson/AccompanyingCourse/index.html.twig', [
|
return $this->render('@ChillPerson/AccompanyingCourse/index.html.twig', [
|
||||||
'accompanyingCourse' => $accompanyingCourse,
|
'accompanyingCourse' => $accompanyingCourse,
|
||||||
'withoutHousehold' => $withoutHousehold
|
'withoutHousehold' => $withoutHousehold,
|
||||||
|
'activities' => $activities
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,9 +67,9 @@
|
|||||||
<h3>{{ p.person.firstname ~ ' ' ~ p.person.lastname }}</h3>
|
<h3>{{ p.person.firstname ~ ' ' ~ p.person.lastname }}</h3>
|
||||||
<p>
|
<p>
|
||||||
{% set born = (p.person.gender == 'woman') ? 'née': 'né' %}
|
{% set born = (p.person.gender == 'woman') ? 'née': 'né' %}
|
||||||
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
||||||
(p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
(p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||||
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
||||||
(p.person.gender == 'man') ? 'homme' : 'neutre' %}
|
(p.person.gender == 'man') ? 'homme' : 'neutre' %}
|
||||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
|
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
|
||||||
</p>
|
</p>
|
||||||
@ -103,9 +103,9 @@
|
|||||||
</li>
|
</li>
|
||||||
{% if p.person.isSharingHousehold %}
|
{% if p.person.isSharingHousehold %}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="{{ chill_path_add_return_path(
|
href="{{ chill_path_add_return_path(
|
||||||
'chill_person_household_summary',
|
'chill_person_household_summary',
|
||||||
{ 'household_id': p.person.getCurrentHousehold.id }
|
{ 'household_id': p.person.getCurrentHousehold.id }
|
||||||
) }}"
|
) }}"
|
||||||
class="sc-button">
|
class="sc-button">
|
||||||
@ -128,7 +128,7 @@
|
|||||||
{% for r in accompanyingCourse.resources %}
|
{% for r in accompanyingCourse.resources %}
|
||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
{% if r.person %}
|
{% if r.person %}
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<h3>
|
<h3>
|
||||||
@ -137,9 +137,9 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
{% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
|
{% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
|
||||||
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
||||||
(r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
(r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||||
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
||||||
(r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
(r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
||||||
</p>
|
</p>
|
||||||
@ -174,10 +174,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if r.thirdParty %}
|
{% if r.thirdParty %}
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<h3>
|
<h3>
|
||||||
@ -214,7 +214,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -222,9 +222,11 @@
|
|||||||
|
|
||||||
<h2>{{ 'Social actions'|trans }}</h2>
|
<h2>{{ 'Social actions'|trans }}</h2>
|
||||||
|
|
||||||
<h2>{{ 'Last events on accompanying course'|trans }}</h2>
|
{% set person = null %}
|
||||||
|
{% block contentActivity %}
|
||||||
|
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'person'} %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{# ==> insert accompanyingCourse vue component #}
|
{# ==> insert accompanyingCourse vue component #}
|
||||||
<div id="accompanying-course"></div>
|
<div id="accompanying-course"></div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user