@@ -20,6 +20,13 @@ function manageFormSearch(){ | |||
$(document).on('click', '.allow-focus', function (e) { | |||
e.stopPropagation(); | |||
}); | |||
$('.pagination a').click(function (e) { | |||
console.log(this.href.split('page=')[1]); | |||
$('.hidden-page').val(this.href.split('page=')[1]); | |||
$('.search-button').click(); | |||
return false; | |||
}); | |||
} | |||
function manageFormContact() { |
@@ -34,6 +34,10 @@ button:focus { | |||
outline: none; | |||
} | |||
.hidden { | |||
display: none; | |||
} | |||
.success-post { | |||
color: $green; | |||
border: 2px solid $green; |
@@ -4,25 +4,25 @@ | |||
"js": [ | |||
"/build/runtime.3095b250.js", | |||
"/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js", | |||
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js", | |||
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-6fef76.ac898f36.js", | |||
"/build/vendors-node_modules_popper_js_dist_esm_popper_js.e5c0d110.js", | |||
"/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-ff08f2.d1f0f608.js", | |||
"/build/adminlte-plugins.c7086074.js" | |||
"/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js", | |||
"/build/vendors-node_modules_core-js_internals_a-function_js-node_modules_jquery_src_jquery_js.9a2fdcaa.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-c46b07.c3c1c04a.js", | |||
"/build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js", | |||
"/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-69f55f.b71e30a6.js", | |||
"/build/adminlte-plugins.bdfac249.js" | |||
], | |||
"css": [ | |||
"/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-ff08f2.fa890b12.css" | |||
"/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-69f55f.fa890b12.css" | |||
] | |||
}, | |||
"adminlte-index": { | |||
"js": [ | |||
"/build/runtime.3095b250.js", | |||
"/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js", | |||
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-6fef76.ac898f36.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.c0107d2e.js", | |||
"/build/adminlte-index.54281e4b.js" | |||
"/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-c46b07.c3c1c04a.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.83e6fd6b.js", | |||
"/build/adminlte-index.1bb01034.js" | |||
], | |||
"css": [ | |||
"/build/adminlte-index.e4548695.css" | |||
@@ -43,11 +43,11 @@ | |||
"js": [ | |||
"/build/runtime.3095b250.js", | |||
"/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js", | |||
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js", | |||
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-6fef76.ac898f36.js", | |||
"/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js", | |||
"/build/vendors-node_modules_core-js_internals_a-function_js-node_modules_jquery_src_jquery_js.9a2fdcaa.js", | |||
"/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-c46b07.c3c1c04a.js", | |||
"/build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js", | |||
"/build/adminlte-sort.eccc9f0b.js" | |||
"/build/adminlte-sort.a8a3ddff.js" | |||
], | |||
"css": [ | |||
"/build/adminlte-sort.8d9ca659.css" | |||
@@ -67,10 +67,11 @@ | |||
"js": [ | |||
"/build/runtime.3095b250.js", | |||
"/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js", | |||
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js", | |||
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js", | |||
"/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js", | |||
"/build/vendors-node_modules_core-js_internals_a-function_js-node_modules_jquery_src_jquery_js.9a2fdcaa.js", | |||
"/build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js", | |||
"/build/adminlte-field-collection.85f7a325.js" | |||
"/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_string_-b9e064.917b4192.js", | |||
"/build/adminlte-field-collection.07e2040b.js" | |||
], | |||
"css": [ | |||
"/build/adminlte-field-collection.55dda2c2.css" | |||
@@ -80,8 +81,8 @@ | |||
"js": [ | |||
"/build/runtime.3095b250.js", | |||
"/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js", | |||
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js", | |||
"/build/adminlte-main.b8c5ec34.js" | |||
"/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js", | |||
"/build/adminlte-main.54e70d9c.js" | |||
], | |||
"css": [ | |||
"/build/adminlte-main.87244ec8.css" | |||
@@ -114,13 +115,15 @@ | |||
"app-frontend": { | |||
"js": [ | |||
"/build/runtime.3095b250.js", | |||
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js", | |||
"/build/vendors-node_modules_popper_js_dist_esm_popper_js.e5c0d110.js", | |||
"/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js", | |||
"/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js", | |||
"/build/vendors-node_modules_core-js_internals_a-function_js-node_modules_jquery_src_jquery_js.9a2fdcaa.js", | |||
"/build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js", | |||
"/build/vendors-node_modules_bootstrap_dist_js_bootstrap_js.cfb3e18d.js", | |||
"/build/app-frontend.5284a67c.js" | |||
"/build/app-frontend.9b043e7a.js" | |||
], | |||
"css": [ | |||
"/build/app-frontend.33e42276.css" | |||
"/build/app-frontend.6b9defaa.css" | |||
] | |||
} | |||
} |
@@ -1,35 +1,36 @@ | |||
{ | |||
"build/adminlte-plugins.js": "/build/adminlte-plugins.c7086074.js", | |||
"build/adminlte-plugins.js": "/build/adminlte-plugins.bdfac249.js", | |||
"build/adminlte-index.css": "/build/adminlte-index.e4548695.css", | |||
"build/adminlte-index.js": "/build/adminlte-index.54281e4b.js", | |||
"build/adminlte-index.js": "/build/adminlte-index.1bb01034.js", | |||
"build/adminlte-form.css": "/build/adminlte-form.59862983.css", | |||
"build/adminlte-form.js": "/build/adminlte-form.b55a3a97.js", | |||
"build/adminlte-sort.css": "/build/adminlte-sort.8d9ca659.css", | |||
"build/adminlte-sort.js": "/build/adminlte-sort.eccc9f0b.js", | |||
"build/adminlte-sort.js": "/build/adminlte-sort.a8a3ddff.js", | |||
"build/adminlte-field-filemanager.css": "/build/adminlte-field-filemanager.aacd1c4c.css", | |||
"build/adminlte-field-filemanager.js": "/build/adminlte-field-filemanager.5b4b01b5.js", | |||
"build/adminlte-field-collection.css": "/build/adminlte-field-collection.55dda2c2.css", | |||
"build/adminlte-field-collection.js": "/build/adminlte-field-collection.85f7a325.js", | |||
"build/adminlte-field-collection.js": "/build/adminlte-field-collection.07e2040b.js", | |||
"build/adminlte-main.css": "/build/adminlte-main.87244ec8.css", | |||
"build/adminlte-main.js": "/build/adminlte-main.b8c5ec34.js", | |||
"build/adminlte-main.js": "/build/adminlte-main.54e70d9c.js", | |||
"build/sov-reminder.css": "/build/sov-reminder.05d9ff45.css", | |||
"build/sov-reminder.js": "/build/sov-reminder.27580486.js", | |||
"build/sov-ticket.js": "/build/sov-ticket.df76c7a0.js", | |||
"build/app-backend.css": "/build/app-backend.3d882954.css", | |||
"build/app-backend.js": "/build/app-backend.e0a6620d.js", | |||
"build/app-frontend.css": "/build/app-frontend.33e42276.css", | |||
"build/app-frontend.js": "/build/app-frontend.5284a67c.js", | |||
"build/app-frontend.css": "/build/app-frontend.6b9defaa.css", | |||
"build/app-frontend.js": "/build/app-frontend.9b043e7a.js", | |||
"build/runtime.js": "/build/runtime.3095b250.js", | |||
"build/vendors-node_modules_core-js_internals_export_js.2e873f33.js": "/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js", | |||
"build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js": "/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js", | |||
"build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js": "/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js", | |||
"build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-6fef76.ac898f36.js": "/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-6fef76.ac898f36.js", | |||
"build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js": "/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js", | |||
"build/vendors-node_modules_core-js_internals_a-function_js-node_modules_jquery_src_jquery_js.9a2fdcaa.js": "/build/vendors-node_modules_core-js_internals_a-function_js-node_modules_jquery_src_jquery_js.9a2fdcaa.js", | |||
"build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-c46b07.c3c1c04a.js": "/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_date_to-c46b07.c3c1c04a.js", | |||
"build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js": "/build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js", | |||
"build/vendors-node_modules_popper_js_dist_esm_popper_js.e5c0d110.js": "/build/vendors-node_modules_popper_js_dist_esm_popper_js.e5c0d110.js", | |||
"build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-ff08f2.fa890b12.css": "/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-ff08f2.fa890b12.css", | |||
"build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-ff08f2.d1f0f608.js": "/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-ff08f2.d1f0f608.js", | |||
"build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js": "/build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js", | |||
"build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-69f55f.fa890b12.css": "/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-69f55f.fa890b12.css", | |||
"build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-69f55f.b71e30a6.js": "/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-69f55f.b71e30a6.js", | |||
"build/vendors-node_modules_core-js_modules_es_array_find_js.3e1960e9.js": "/build/vendors-node_modules_core-js_modules_es_array_find_js.3e1960e9.js", | |||
"build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.c0107d2e.js": "/build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.c0107d2e.js", | |||
"build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.83e6fd6b.js": "/build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.83e6fd6b.js", | |||
"build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_string_-b9e064.917b4192.js": "/build/vendors-node_modules_core-js_modules_es_array_find_js-node_modules_core-js_modules_es_string_-b9e064.917b4192.js", | |||
"build/vendors-node_modules_bootstrap_dist_js_bootstrap_js.cfb3e18d.js": "/build/vendors-node_modules_bootstrap_dist_js_bootstrap_js.cfb3e18d.js", | |||
"build/images/fa-solid-900.svg": "/build/images/fa-solid-900.13de59f1.svg", | |||
"build/images/fa-brands-400.svg": "/build/images/fa-brands-400.216edb96.svg", |
@@ -72,6 +72,7 @@ class DefaultController extends AbstractController | |||
if ($form->isSubmitted() && $form->isValid()) { | |||
$data = $form->getData(); | |||
$page = $data['page']; | |||
$description = $data['search']; | |||
$categoryArray = $data['category']; | |||
$territoryArray = $data['territory']; | |||
@@ -84,17 +85,25 @@ class DefaultController extends AbstractController | |||
$revoltArray = $this->revoltStore->filterSearch($description, $territoryArray, $thematicArray); | |||
} | |||
if (in_array('projectBoost', $categoryArray) || empty($categoryArray)) { | |||
$projectBoostArray = $this->projectBoostStore->filterSearch($description, $territoryArray, $thematicArray); | |||
$projectBoostArray = $this->projectBoostStore->filterSearch( | |||
$description, | |||
$territoryArray, | |||
$thematicArray | |||
); | |||
} | |||
if (in_array('projectInspiring', $categoryArray) || empty($categoryArray)) { | |||
$projectInspiringArray = $this->projectInspiringStore->filterSearch($description, $territoryArray, $thematicArray); | |||
$projectInspiringArray = $this->projectInspiringStore->filterSearch( | |||
$description, | |||
$territoryArray, | |||
$thematicArray | |||
); | |||
} | |||
$resultArray = array_merge($dreamArray, $revoltArray, $projectBoostArray, $projectInspiringArray); | |||
$resultArrayPagination = $this->paginator->paginate( | |||
$resultArray, | |||
$request->query->getInt('page', 1), | |||
$page, | |||
2 | |||
); | |||
} |
@@ -4,6 +4,7 @@ namespace App\Form; | |||
use App\Entity\Territory; | |||
use App\Entity\Thematic; | |||
use Symfony\Component\Form\Extension\Core\Type\HiddenType; | |||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |||
use Symfony\Component\Form\AbstractType; | |||
@@ -49,6 +50,13 @@ class SearchListForm extends AbstractType | |||
'expanded' => true, | |||
'multiple' => true, | |||
]) | |||
->add('page', HiddenType::class, [ | |||
'required' => false, | |||
'empty_data' => 1, | |||
'attr' => [ | |||
'class' => 'hidden-page' | |||
] | |||
]) | |||
->add('search_button', SubmitType::class, [ | |||
'attr' => ['class' => 'search-button'], | |||
]); |