mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
FEATURE add filter to the template
This commit is contained in:
parent
6c58e7eb3e
commit
61982634a6
@ -178,6 +178,7 @@ class AccompanyingCourseWorkController extends AbstractController
|
||||
'accompanyingCourse' => $period,
|
||||
'works' => $works,
|
||||
'paginator' => $paginator,
|
||||
'filter' => $filter
|
||||
]);
|
||||
}
|
||||
|
||||
@ -225,7 +226,7 @@ class AccompanyingCourseWorkController extends AbstractController
|
||||
->addEntityChoice('typesFilter', 'accompanying_course_work.types_filter', \Chill\PersonBundle\Entity\SocialWork\SocialAction::class, $types, [
|
||||
'choice_label' => fn (SocialAction $sa) => $this->translatableStringHelper->localize($sa->getTitle())
|
||||
])
|
||||
->addUserPicker('userFilter', 'accompanying_course_work.user_filter')
|
||||
->addUserPicker('userFilter', 'accompanying_course_work.user_filter', ['required' => false])
|
||||
;
|
||||
|
||||
return $filterBuilder->build();
|
||||
|
@ -5,18 +5,23 @@
|
||||
{% block js %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
|
||||
{{ encore_entry_script_tags('mod_pickentity_type') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('mod_entity_workflow_pick') }}
|
||||
{{ encore_entry_link_tags('mod_pickentity_type') }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanying-course-work">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{{ filter|chill_render_filter_order_helper }}
|
||||
|
||||
{% if works|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
|
||||
{% else %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user