diff --git a/.changes/unreleased/DX-20230623-122408.yaml b/.changes/unreleased/DX-20230623-122408.yaml
deleted file mode 100644
index 58dd96180..000000000
--- a/.changes/unreleased/DX-20230623-122408.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-kind: DX
-body: '[FilterOrderHelper] add entity choice and singleCheckbox'
-time: 2023-06-23T12:24:08.133491895+02:00
-custom:
- Issue: ""
diff --git a/.changes/unreleased/Feature-20230623-122530.yaml b/.changes/unreleased/Feature-20230623-122530.yaml
deleted file mode 100644
index 922750ea8..000000000
--- a/.changes/unreleased/Feature-20230623-122530.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-kind: Feature
-body: '[activity list] add filtering for activities list'
-time: 2023-06-23T12:25:30.49643551+02:00
-custom:
- Issue: ""
diff --git a/.changes/unreleased/Feature-20230623-122702.yaml b/.changes/unreleased/Feature-20230623-122702.yaml
deleted file mode 100644
index e1d1b0e1f..000000000
--- a/.changes/unreleased/Feature-20230623-122702.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: Feature
-body: '[activity list] in person context, show also the activities from the accompanying
- periods where the person participates'
-time: 2023-06-23T12:27:02.159041095+02:00
-custom:
- Issue: ""
diff --git a/.changes/unreleased/Feature-20230623-124438.yaml b/.changes/unreleased/Feature-20230623-124438.yaml
deleted file mode 100644
index bc199d3bb..000000000
--- a/.changes/unreleased/Feature-20230623-124438.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-kind: Feature
-body: '[activity list] add pagination to the list of activities'
-time: 2023-06-23T12:44:38.879098862+02:00
-custom:
- Issue: ""
diff --git a/.changie.yaml b/.changie.yaml
index 8a25ed695..cda69de65 100644
--- a/.changie.yaml
+++ b/.changie.yaml
@@ -30,6 +30,8 @@ kinds:
auto: patch
- label: DX
auto: patch
+ - label: UX
+ auto: patch
newlines:
afterChangelogHeader: 1
beforeChangelogVersion: 1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b74eea58d..1bb9a8ee3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,7 +7,6 @@ and is generated by [Changie](https://github.com/miniscruff/changie).
## v2.4.0 - 2023-07-07
-
### Feature
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] on "filter by user working" on accompanying period, add two dates to filters intervention within a period
* ([#113](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/113)) [export] Add an aggregator by user's job working on a course
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
index 16038515d..f22b6bfba 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
@@ -38,22 +38,16 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
$builder->add('q', SearchType::class, [
'label' => false,
'required' => false,
+ 'attr' => [
+ 'placeholder' => 'filter_order.Search',
+ ]
]);
}
$checkboxesBuilder = $builder->create('checkboxes', null, ['compound' => true]);
foreach ($helper->getCheckboxes() as $name => $c) {
- $choices = array_combine(
- array_map(static function ($c, $t) {
- if (null !== $t) {
- return $t;
- }
-
- return $c;
- }, $c['choices'], $c['trans']),
- $c['choices']
- );
+ $choices = self::buildCheckboxChoices($c['choices'], $c['trans']);
$checkboxesBuilder->add($name, ChoiceType::class, [
'choices' => $choices,
@@ -122,6 +116,20 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
}
}
+ public static function buildCheckboxChoices(array $choices, array $trans = []): array
+ {
+ return array_combine(
+ array_map(static function ($c, $t) {
+ if (null !== $t) {
+ return $t;
+ }
+
+ return $c;
+ }, $choices, $trans),
+ $choices
+ );
+ }
+
public function buildView(FormView $view, FormInterface $form, array $options)
{
/** @var FilterOrderHelper $helper */
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/forms.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/forms.scss
index 0ae568244..28c597bc0 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/forms.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/forms.scss
@@ -42,3 +42,7 @@ form {
font-weight: 700;
margin-bottom: .375em;
}
+
+.chill_filter_order {
+ background: $gray-100;
+}
\ No newline at end of file
diff --git a/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig b/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig
index d4a6bbdd4..b517eb154 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig
@@ -1,105 +1,120 @@
{{ form_start(form) }}
-
-
- {% if form.vars.has_search_box %}
-
-
- {{ form_widget(form.q)}}
-
-
-
+
+
+
+
+
+ {% set btnSubmit = 0 %}
+
+
+ {% if form.vars.has_search_box %}
+
+
+ {{ form_widget(form.q) }}
+
+
+
+ {% endif %}
+
+ {% if form.dateRanges is defined %}
+ {% set btnSubmit = 1 %}
+ {% if form.dateRanges|length > 0 %}
+ {% for dateRangeName, _o in form.dateRanges %}
+
+ {% if form.dateRanges[dateRangeName].vars.label is not same as(false) %}
+ {{ form_label(form.dateRanges[dateRangeName])}}
+ {% else %}
+