diff --git a/Controller/AdminController.php b/Controller/AdminController.php index 2009ecf21..9852be7ab 100644 --- a/Controller/AdminController.php +++ b/Controller/AdminController.php @@ -42,4 +42,11 @@ class AdminController extends Controller { return $this->render('ChillMainBundle:Admin:layout_permissions.html.twig'); } + public function configurationWarningsAction() + { + $alertManager = $this->get('chill_main.configuration_alert_manager'); + + + } + } diff --git a/Controller/SearchController.php b/Controller/SearchController.php index 49a648f43..375429de1 100644 --- a/Controller/SearchController.php +++ b/Controller/SearchController.php @@ -106,6 +106,24 @@ class SearchController extends Controller ); } + public function advancedSearchListAction(Request $request) + { + /* @var $variable Chill\MainBundle\Search\SearchProvider */ + $searchProvider = $this->get('chill.main.search_provider'); + $advancedSearchProviders = $searchProvider + ->getHasAdvancedFormSearchServices(); + + if(\count($advancedSearchProviders) === 1) { + \reset($advancedSearchProviders); + + return $this->redirectToRoute('chill_main_advanced_search', [ + 'name' => \key($advancedSearchProviders) + ]); + } + + return $this->render('ChillMainBundle:Search:choose_list.html.twig'); + } + public function advancedSearchAction($name, Request $request) { try { @@ -144,7 +162,8 @@ class SearchController extends Controller return $this->render('ChillMainBundle:Search:advanced_search.html.twig', [ 'form' => $form->createView(), - 'name' => $name + 'name' => $name, + 'title' => $search->getAdvancedSearchTitle() ]); } diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index 3252e8f96..2b1562379 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -66,6 +66,10 @@ chill_main_search: chill_main_advanced_search: path: /{_locale}/search/advanced/{name} defaults: { _controller: ChillMainBundle:Search:advancedSearch } + +chill_main_advanced_search_list: + path: /{_locale}/search/advanced + defaults: { _controller: ChillMainBundle:Search:advancedSearchList } login: path: /login diff --git a/Resources/config/services/form.yml b/Resources/config/services/form.yml index e205292bd..30502a399 100644 --- a/Resources/config/services/form.yml +++ b/Resources/config/services/form.yml @@ -108,5 +108,12 @@ services: - "@security.token_storage" - "@chill.main.scope_repository" - "@chill.main.helper.translatable_string" + tags: + - { name: form.type } + + chill.main.form.advanced_search_type: + class: Chill\MainBundle\Form\AdvancedSearchType + arguments: + - "@chill.main.search_provider" tags: - { name: form.type } \ No newline at end of file diff --git a/Resources/translations/admin.fr.yml b/Resources/translations/admin.fr.yml new file mode 100644 index 000000000..c2d522a12 --- /dev/null +++ b/Resources/translations/admin.fr.yml @@ -0,0 +1,4 @@ +welcome_message_raw: | +
Dans l'interface d'administration, vous pouvez configurer votre instance selon vos besoins.
+ + diff --git a/Resources/views/Admin/index.html.twig b/Resources/views/Admin/index.html.twig new file mode 100644 index 000000000..999034392 --- /dev/null +++ b/Resources/views/Admin/index.html.twig @@ -0,0 +1,17 @@ +{% extends "ChillMainBundle::Admin/layoutWithVerticalMenu.html.twig" %} + +{% block admin_content %} +{{ 'Here you can check the configuration of your instance.'|trans }}
+ + {{ chill_widget('configuration_warnings', {}) }} + +