mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 21:34:59 +00:00
sf4, repair errors and make basic and admin chill pages works
This commit is contained in:
@@ -32,7 +32,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Chill\MainBundle\Search\SearchProvider;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ class SearchController extends Controller
|
||||
|
||||
function __construct(
|
||||
SearchProvider $searchProvider,
|
||||
TranslatorInterface $translator,
|
||||
TranslatorInterface $translator,
|
||||
PaginatorFactory $paginatorFactory
|
||||
) {
|
||||
$this->searchProvider = $searchProvider;
|
||||
@@ -77,7 +77,7 @@ class SearchController extends Controller
|
||||
if ($pattern === ''){
|
||||
switch($_format) {
|
||||
case 'html':
|
||||
return $this->render('ChillMainBundle:Search:error.html.twig',
|
||||
return $this->render('@ChillMain/Search/error.html.twig',
|
||||
array(
|
||||
'message' => $this->translator->trans("Your search is empty. "
|
||||
. "Please provide search terms."),
|
||||
@@ -129,7 +129,7 @@ class SearchController extends Controller
|
||||
}
|
||||
}
|
||||
} catch (UnknowSearchDomainException $ex) {
|
||||
return $this->render('ChillMainBundle:Search:error.html.twig',
|
||||
return $this->render('@ChillMain/Search/error.html.twig',
|
||||
array(
|
||||
"message" => $this->get('translator')->trans("The domain %domain% "
|
||||
. "is unknow. Please check your search.", array('%domain%' => $ex->getDomain())),
|
||||
@@ -138,7 +138,7 @@ class SearchController extends Controller
|
||||
} catch (UnknowSearchNameException $ex) {
|
||||
throw $this->createNotFoundException("The name ".$ex->getName()." is not found");
|
||||
} catch (ParsingException $ex) {
|
||||
return $this->render('ChillMainBundle:Search:error.html.twig',
|
||||
return $this->render('@ChillMain/Search/error.html.twig',
|
||||
array(
|
||||
"message" => $this->translator->trans('Invalid terms').
|
||||
": ".$this->translator->trans($ex->getMessage()),
|
||||
@@ -147,7 +147,7 @@ class SearchController extends Controller
|
||||
}
|
||||
|
||||
|
||||
return $this->render('ChillMainBundle:Search:list.html.twig',
|
||||
return $this->render('@ChillMain/Search/list.html.twig',
|
||||
array('results' => $results, 'pattern' => $pattern)
|
||||
);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class SearchController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->render('ChillMainBundle:Search:choose_list.html.twig');
|
||||
return $this->render('@ChillMain/Search/choose_list.html.twig');
|
||||
}
|
||||
|
||||
public function advancedSearchAction($name, Request $request)
|
||||
@@ -205,7 +205,7 @@ class SearchController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('ChillMainBundle:Search:advanced_search.html.twig',
|
||||
return $this->render('@ChillMain/Search/advanced_search.html.twig',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'name' => $name,
|
||||
|
Reference in New Issue
Block a user