diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index f3fdb79db..e6d4d9dee 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -57,15 +57,16 @@ chill_main_admin_central: admin_permissions: order: 0 label: Main admin menu - + chill_main_admin_permissions: path: /{_locale}/admin/permissions defaults: {_controller: ChillMainBundle:Admin:indexPermissions } options: menus: - admin: + admin_section: order: 200 label: Users and permissions + icons: [key] chill_main_search: path: /{_locale}/search diff --git a/Resources/views/Admin/layout.html.twig b/Resources/views/Admin/layout.html.twig index a1b5018b6..e551b558a 100644 --- a/Resources/views/Admin/layout.html.twig +++ b/Resources/views/Admin/layout.html.twig @@ -16,19 +16,26 @@ * along with this program. If not, see . #} -{% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %} +{# + The layout of the admin section. All the page / template of the admin section must use this + layout. +#} + +{% extends "ChillMainBundle::layout.html.twig" %} {% block navigation_search_bar %}{% endblock %} -{% block navigation_section_menu %}{% endblock %} - -{% block vertical_menu_content %} - {{ chill_menu('admin', { - 'layout': 'ChillMainBundle::Menu/admin.html.twig', - }) }} +{% block navigation_section_menu %} + {{ chill_menu('admin_section', { + 'layout': 'ChillMainBundle::Menu/adminSection.html.twig', + }) }} {% endblock %} -{% block layout_wvm_content %} +{% block content %} {% block admin_content %} - Welcome to the admin section ! +
+
+ Welcome to the admin section ! +
+
{% endblock %} {% endblock %} \ No newline at end of file diff --git a/Resources/views/Admin/layoutWithVerticalMenu.html.twig b/Resources/views/Admin/layoutWithVerticalMenu.html.twig new file mode 100644 index 000000000..d2c5ec391 --- /dev/null +++ b/Resources/views/Admin/layoutWithVerticalMenu.html.twig @@ -0,0 +1,43 @@ +{# + * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, + / + * + * 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 . +#} + +{# + The layout of the admin section. All the page / template of the admin section must use this + layout. +#} + +{% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %} + +{% block navigation_search_bar %}{% endblock %} +{% block navigation_section_menu %} + {{ chill_menu('admin_section', { + 'layout': 'ChillMainBundle::Menu/adminSection.html.twig', + }) }} +{% endblock %} + +{% block vertical_menu_content %} + {{ chill_menu('admin', { + 'layout': 'ChillMainBundle::Menu/admin.html.twig', + }) }} +{% endblock %} + +{% block layout_wvm_content %} + {% block admin_content %} + Welcome to the admin section ! + {% endblock %} +{% endblock %} \ No newline at end of file diff --git a/Resources/views/Admin/layout_permissions.html.twig b/Resources/views/Admin/layout_permissions.html.twig index e4bcc6d7f..32cbcaf8f 100644 --- a/Resources/views/Admin/layout_permissions.html.twig +++ b/Resources/views/Admin/layout_permissions.html.twig @@ -16,7 +16,7 @@ * along with this program. If not, see . #} -{% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %} +{% extends "ChillMainBundle::Admin/layoutWithVerticalMenu.html.twig" %} {% block vertical_menu_content %} {{ chill_menu('admin_permissions', { diff --git a/Resources/views/Menu/adminSection.html.twig b/Resources/views/Menu/adminSection.html.twig new file mode 100644 index 000000000..aeeb8041e --- /dev/null +++ b/Resources/views/Menu/adminSection.html.twig @@ -0,0 +1,39 @@ +{# + * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, + / + * + * 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 . +#} + + \ No newline at end of file diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index b91c0f002..76d58ea79 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -17,7 +17,7 @@ #} {# - The basic layout of Chill. All other layouts must extend this layout. + The basic layout of Chill. All the page / template of Chill must use this template. #}