Admin: Add country and languages to the admin

This commit is contained in:
nobohan
2022-05-02 16:51:41 +02:00
parent f917be0958
commit 4c99abd6d3
19 changed files with 318 additions and 6 deletions

View File

@@ -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');

View 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);
}
}

View 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);
}
}