mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Admin: Add country and languages to the admin
This commit is contained in:
@@ -24,6 +24,11 @@ class AdminController extends AbstractController
|
||||
return $this->render('@ChillMain/Admin/index.html.twig');
|
||||
}
|
||||
|
||||
public function indexLanguageCountryAction()
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/layout_language_country.html.twig');
|
||||
}
|
||||
|
||||
public function indexLocationsAction()
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/layout_location.html.twig');
|
||||
|
27
src/Bundle/ChillMainBundle/Controller/CountryController.php
Normal file
27
src/Bundle/ChillMainBundle/Controller/CountryController.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class CountryController extends CRUDController
|
||||
{
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
|
||||
{
|
||||
$query->addOrderBy('e.countryCode', 'ASC');
|
||||
|
||||
return parent::orderQuery($action, $query, $request, $paginator);
|
||||
}
|
||||
|
||||
}
|
27
src/Bundle/ChillMainBundle/Controller/LanguageController.php
Normal file
27
src/Bundle/ChillMainBundle/Controller/LanguageController.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class LanguageController extends CRUDController
|
||||
{
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
|
||||
{
|
||||
$query->addOrderBy('e.id', 'ASC');
|
||||
|
||||
return parent::orderQuery($action, $query, $request, $paginator);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user