mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
improve location: admin menu
This commit is contained in:
parent
21f463ccb9
commit
82a679c233
@ -41,4 +41,9 @@ class AdminController extends AbstractController
|
||||
return $this->render('@ChillMain/Admin/layout_permissions.html.twig');
|
||||
}
|
||||
|
||||
public function indexLocationsAction()
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/layout_location.html.twig');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
|
||||
|
||||
{% block vertical_menu_content %}
|
||||
{{ chill_menu('admin_location', {
|
||||
'layout': '@ChillMain/Admin/menu_admin_location.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
{% block admin_content %}
|
||||
<h1>{{ 'Management of location' |trans }}</h1>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
@ -0,0 +1,20 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
|
||||
{% block v_menu_title %}{{ 'Location Menu'|trans }}{% endblock %}
|
@ -1,4 +1,4 @@
|
||||
{% extends "@ChillAsideActivity/Admin/layout_asideactivity.html.twig" %}
|
||||
{% extends "@ChillMain/Admin/layout_location.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>{{ 'Location list'|trans }}</h1>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "@ChillAsideActivity/Admin/layout_asideactivity.html.twig" %}
|
||||
{% extends "@ChillMain/Admin/layout_location.html.twig" %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h1>{{ 'Location type list'|trans }}</h1>
|
||||
|
@ -55,22 +55,13 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
|
||||
'explain' => "Configure permissions for users"
|
||||
]);
|
||||
|
||||
$menu->addChild('Location', [
|
||||
'route' => 'chill_crud_main_location_index'
|
||||
$menu->addChild('Location and location type', [
|
||||
'route' => 'chill_main_admin_locations'
|
||||
])
|
||||
->setExtras([
|
||||
'icons' => ['key'],
|
||||
'order' => 205,
|
||||
'explain' => "Configure location"
|
||||
]);
|
||||
|
||||
$menu->addChild('Location type', [
|
||||
'route' => 'chill_crud_main_location_type_index'
|
||||
])
|
||||
->setExtras([
|
||||
'icons' => ['key'],
|
||||
'order' => 205,
|
||||
'explain' => "Configure location type"
|
||||
'explain' => "Configure location and location type"
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Routing\MenuBuilder;
|
||||
|
||||
use Knp\Menu\MenuItem;
|
||||
|
||||
class LocationMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getMenuIds(): array
|
||||
{
|
||||
return [ 'admin_location' ];
|
||||
}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
$menu->addChild('Location list', [
|
||||
'route' => 'chill_crud_main_location_index'
|
||||
])->setExtras(['order' => 205]);
|
||||
|
||||
$menu->addChild('Location type list', [
|
||||
'route' => 'chill_crud_main_location_type_index'
|
||||
])->setExtras(['order' => 206]);
|
||||
|
||||
}
|
||||
}
|
@ -66,6 +66,10 @@ chill_main_admin_permissions:
|
||||
path: /{_locale}/admin/permissions
|
||||
controller: Chill\MainBundle\Controller\AdminController::indexPermissionsAction
|
||||
|
||||
chill_main_admin_locations:
|
||||
path: /{_locale}/admin/locations
|
||||
controller: Chill\MainBundle\Controller\AdminController::indexLocationsAction
|
||||
|
||||
chill_main_search:
|
||||
path: /{_locale}/search.{_format}
|
||||
controller: Chill\MainBundle\Controller\SearchController::searchAction
|
||||
|
Loading…
x
Reference in New Issue
Block a user