move core templates into core/
This commit is contained in:
parent
a2c61522a4
commit
1a41973031
|
@ -14,7 +14,7 @@ namespace App\Core\Bundle;
|
|||
use App\Core\DependencyInjection\AppExtension;
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class AppBundle extends Bundle
|
||||
class CoreBundle extends Bundle
|
||||
{
|
||||
public function getContainerExtension()
|
||||
{
|
|
@ -26,7 +26,7 @@ class AccountAdminController extends AdminController
|
|||
{
|
||||
$account = $this->getUser();
|
||||
|
||||
return $this->render('account/admin/edit.html.twig', [
|
||||
return $this->render('@Core/account/admin/edit.html.twig', [
|
||||
'account' => $account,
|
||||
]);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ class AccountAdminController extends AdminController
|
|||
}
|
||||
}
|
||||
|
||||
return $this->render('account/admin/edit.html.twig', [
|
||||
return $this->render('@Core/account/admin/edit.html.twig', [
|
||||
'account' => $account,
|
||||
'twoFaKey' => $secret,
|
||||
'twoFaQrCodeContent' => $qrCodeContent,
|
||||
|
|
|
@ -29,7 +29,7 @@ class AuthController extends AbstractController
|
|||
$error = $authenticationUtils->getLastAuthenticationError();
|
||||
$lastUsername = $authenticationUtils->getLastUsername();
|
||||
|
||||
return $this->render('auth/login.html.twig', [
|
||||
return $this->render('@Core/auth/login.html.twig', [
|
||||
'last_username' => $lastUsername,
|
||||
'error' => $error,
|
||||
]);
|
||||
|
@ -81,7 +81,7 @@ class AuthController extends AbstractController
|
|||
}
|
||||
}
|
||||
|
||||
return $this->render('auth/resetting_request.html.twig', [
|
||||
return $this->render('@Core/auth/resetting_request.html.twig', [
|
||||
'email_sent' => $emailSent,
|
||||
]);
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ class AuthController extends AbstractController
|
|||
}
|
||||
}
|
||||
|
||||
return $this->render('auth/resetting_update.html.twig', [
|
||||
return $this->render('@Core/auth/resetting_update.html.twig', [
|
||||
'password_updated' => $passwordUpdated,
|
||||
'token' => $token,
|
||||
'expired' => $expired,
|
||||
|
|
|
@ -16,7 +16,7 @@ class DashboardAdminController extends AdminController
|
|||
*/
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('dashboard/admin/index.html.twig', [
|
||||
return $this->render('@Core/dashboard/admin/index.html.twig', [
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class NavigationAdminController extends AdminController
|
|||
{
|
||||
$pager = $query->paginate($page);
|
||||
|
||||
return $this->render('site/navigation_admin/index.html.twig', [
|
||||
return $this->render('@Core/site/navigation_admin/index.html.twig', [
|
||||
'pager' => $pager,
|
||||
]);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class NavigationAdminController extends AdminController
|
|||
$this->addFlash('warning', 'Le formulaire est invalide.');
|
||||
}
|
||||
|
||||
return $this->render('site/navigation_admin/new.html.twig', [
|
||||
return $this->render('@Core/site/navigation_admin/new.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
]);
|
||||
|
@ -79,7 +79,7 @@ class NavigationAdminController extends AdminController
|
|||
$this->addFlash('warning', 'Le formulaire est invalide.');
|
||||
}
|
||||
|
||||
return $this->render('site/navigation_admin/edit.html.twig', [
|
||||
return $this->render('@Core/site/navigation_admin/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
]);
|
||||
|
@ -90,7 +90,7 @@ class NavigationAdminController extends AdminController
|
|||
*/
|
||||
public function show(Entity $entity): Response
|
||||
{
|
||||
return $this->render('site/navigation_admin/show.html.twig', [
|
||||
return $this->render('@Core/site/navigation_admin/show.html.twig', [
|
||||
'entity' => $entity,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ class NodeAdminController extends AdminController
|
|||
]);
|
||||
}
|
||||
|
||||
return $this->render('site/node_admin/new.html.twig', [
|
||||
return $this->render('@Core/site/node_admin/new.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'node' => $node,
|
||||
'entity' => $entity,
|
||||
|
@ -137,7 +137,7 @@ class NodeAdminController extends AdminController
|
|||
]);
|
||||
}
|
||||
|
||||
return $this->render('site/node_admin/edit.html.twig', [
|
||||
return $this->render('@Core/site/node_admin/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
'tab' => $tab,
|
||||
|
@ -149,7 +149,7 @@ class NodeAdminController extends AdminController
|
|||
*/
|
||||
public function urls(Entity $entity, SitemapBuilder $builder): Response
|
||||
{
|
||||
return $this->render('site/node_admin/urls.html.twig', [
|
||||
return $this->render('@Core/site/node_admin/urls.html.twig', [
|
||||
'entity' => $entity,
|
||||
'urls' => $builder->getNodeUrls($entity),
|
||||
]);
|
||||
|
@ -205,7 +205,7 @@ class NodeAdminController extends AdminController
|
|||
]);
|
||||
}
|
||||
|
||||
return $this->render('site/node_admin/move.html.twig', [
|
||||
return $this->render('@Core/site/node_admin/move.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
]);
|
||||
|
|
|
@ -27,7 +27,7 @@ class PageAdminController extends AdminController
|
|||
{
|
||||
$pager = $query->paginate($page);
|
||||
|
||||
return $this->render('site/page_admin/index.html.twig', [
|
||||
return $this->render('@Core/site/page_admin/index.html.twig', [
|
||||
'pager' => $pager,
|
||||
]);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ class PageAdminController extends AdminController
|
|||
$this->addFlash('warning', 'Le formulaire est invalide.');
|
||||
}
|
||||
|
||||
return $this->render('site/page_admin/edit.html.twig', [
|
||||
return $this->render('@Core/site/page_admin/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
]);
|
||||
|
|
|
@ -33,7 +33,7 @@ class SitemapController extends AbstractController
|
|||
$response = new Response();
|
||||
$response->headers->set('Content-Type', 'text/xml');
|
||||
|
||||
return $this->render('site/sitemap/sitemap.xml.twig', [
|
||||
return $this->render('@Core/site/sitemap/sitemap.xml.twig', [
|
||||
'items' => $items,
|
||||
], $response);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ class TreeAdminController extends AdminController
|
|||
$forms['menus'][$menu->getId()] = $this->createForm(MenuType::class, $menu)->createView();
|
||||
}
|
||||
|
||||
return $this->render('site/tree_admin/navigation.html.twig', [
|
||||
return $this->render('@Core/site/tree_admin/navigation.html.twig', [
|
||||
'navigation' => $navigation,
|
||||
'navigations' => $navigations,
|
||||
'forms' => $forms,
|
||||
|
|
|
@ -28,7 +28,7 @@ class UserAdminController extends AdminController
|
|||
{
|
||||
$pager = $query->paginate($page);
|
||||
|
||||
return $this->render('user/user_admin/index.html.twig', [
|
||||
return $this->render('@Core/user/user_admin/index.html.twig', [
|
||||
'pager' => $pager,
|
||||
]);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class UserAdminController extends AdminController
|
|||
$this->addFlash('warning', 'Le formulaire est invalide.');
|
||||
}
|
||||
|
||||
return $this->render('user/user_admin/new.html.twig', [
|
||||
return $this->render('@Core/user/user_admin/new.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
]);
|
||||
|
@ -86,7 +86,7 @@ class UserAdminController extends AdminController
|
|||
$this->addFlash('warning', 'Le formulaire est invalide.');
|
||||
}
|
||||
|
||||
return $this->render('user/user_admin/edit.html.twig', [
|
||||
return $this->render('@Core/user/user_admin/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
]);
|
||||
|
@ -97,7 +97,7 @@ class UserAdminController extends AdminController
|
|||
*/
|
||||
public function show(Entity $entity): Response
|
||||
{
|
||||
return $this->render('user/user_admin/show.html.twig', [
|
||||
return $this->render('@Core/user/user_admin/show.html.twig', [
|
||||
'entity' => $entity,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% import _self as macros %}
|
||||
|
57
core/Resources/views/admin/layout.html.twig
Normal file
57
core/Resources/views/admin/layout.html.twig
Normal file
|
@ -0,0 +1,57 @@
|
|||
{% apply spaceless %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ include('@Core/admin/module/metas.html.twig') }}
|
||||
|
||||
<title>{% block title %}Tinternet & cie{% endblock %}</title>
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('admin') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{{ include('@Core/admin/module/flashes.html.twig') }}
|
||||
|
||||
<nav class="navbar fixed-top navbar-expand-md navbar-light bg-light border-bottom">
|
||||
<a class="navbar-brand" href="{{ path('admin_dashboard_index') }}">
|
||||
<img id="logo" src="{{ asset('build/images/logo.png') }}" alt="Tinternet & cie" title="Tinternet & cie">
|
||||
|
||||
Tinternet & cie
|
||||
</a>
|
||||
|
||||
<div class="ml-auto">
|
||||
<div class="collapse navbar-collapse" id="navigation">
|
||||
{{ include('@Core/admin/module/account.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Afficher navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
{% block body_container %}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<nav class="col-md-2 col-1 d-md-block bg-dark-blue sidebar">
|
||||
<div class="sidebar-sticky">
|
||||
{{ include('@Core/admin/module/menu.html.twig') }}
|
||||
</div>
|
||||
</nav>
|
||||
<div class="col-11 col-md-10 ml-sm-auto col-lg-10 body">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{{ asset('vendor/tinymce/tinymce.min.js') }}"></script>
|
||||
|
||||
{{ encore_entry_script_tags('admin') }}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
{% endapply %}
|
1
core/Resources/views/admin/macros/menu.html.twig
Normal file
1
core/Resources/views/admin/macros/menu.html.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% macro active_class(expectedSection, section) %}{{ expectedSection == section ? 'active' : ''}}{% endmacro %}
|
61
core/Resources/views/admin/module/menu.html.twig
Normal file
61
core/Resources/views/admin/module/menu.html.twig
Normal file
|
@ -0,0 +1,61 @@
|
|||
{% import "@Core/admin/macros/menu.html.twig" as macros_menu %}
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros_menu.active_class('dashboard', section) }}" href="{{ path('admin_dashboard_index') }}">
|
||||
<span class="fa fa-chart-line"></span>
|
||||
|
||||
<span class="nav-item-label">Tableau de bord</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<h6 class="sidebar-heading justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||
<span>Contenu</span>
|
||||
</h6>
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros_menu.active_class('site_navigation', section) }}" href="{{ path('admin_site_navigation_index') }}">
|
||||
<span class="fa fa-globe-europe"></span>
|
||||
|
||||
<span class="nav-item-label">Navigations</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros_menu.active_class('site_tree', section) }}" href="{{ path('admin_site_tree_index') }}">
|
||||
<span class="fa fa-sitemap"></span>
|
||||
|
||||
<span class="nav-item-label">Arborescence</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros_menu.active_class('site_page', section) }}" href="{{ path('admin_site_page_index') }}">
|
||||
<span class="fa fa-file-alt"></span>
|
||||
|
||||
<span class="nav-item-label">Pages</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{{ include('admin/menu.html.twig') }}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<h6 class="sidebar-heading justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||
<span>Administration</span>
|
||||
</h6>
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros_menu.active_class('user', section) }}" href="{{ path('admin_user_index') }}">
|
||||
<span class="fa fa-user"></span>
|
||||
|
||||
<span class="nav-item-label">Utilisateurs</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ include('admin/module/metas.html.twig') }}
|
||||
{{ include('@Core/admin/module/metas.html.twig') }}
|
||||
|
||||
<title>{% block title %}Tinternet & cie{% endblock %}</title>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ include('admin/module/metas.html.twig') }}
|
||||
{{ include('@Core/admin/module/metas.html.twig') }}
|
||||
|
||||
<title>{% block title %}Tinternet & cie{% endblock %}</title>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ include('admin/module/metas.html.twig') }}
|
||||
{{ include('@Core/admin/module/metas.html.twig') }}
|
||||
|
||||
<title>{% block title %}Tinternet & cie{% endblock %}</title>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ include('admin/module/metas.html.twig') }}
|
||||
{{ include('@Core/admin/module/metas.html.twig') }}
|
||||
|
||||
<title>{% block title %}Tinternet & cie{% endblock %}</title>
|
||||
|
1
core/Resources/views/dashboard/admin/index.html.twig
Normal file
1
core/Resources/views/dashboard/admin/index.html.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends '@Core/admin/layout.html.twig' %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'mail/base.html.twig' %}
|
||||
{% extends '@Core/mail/base.html.twig' %}
|
||||
|
||||
{% set message %}
|
||||
Une demande de réinitialisation de mot de passe a été réalisée sur Tinternet & cie.
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane active">
|
||||
<div class="tab-form">
|
||||
{{ include('site/navigation_admin/_form.html.twig') }}
|
||||
{{ include('@Core/site/navigation_admin/_form.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 {% if pager.getPaginationData.pageCount < 2 %}pb-5{% endif %}">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
@ -29,7 +29,7 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane active">
|
||||
<div class="tab-form">
|
||||
{{ include('site/navigation_admin/_form.html.twig') }}
|
||||
{{ include('@Core/site/navigation_admin/_form.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ path('admin_site_node_edit', {entity: entity.id}) }}" id="form-node-edit" method="POST">
|
||||
{{ include('site/node_admin/_form.html.twig') }}
|
||||
{{ include('@Core/site/node_admin/_form.html.twig') }}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ path('admin_site_node_new', {node: node.id}) }}" id="form-node-new" method="POST">
|
||||
{{ include('site/node_admin/_form.html.twig') }}
|
||||
{{ include('@Core/site/node_admin/_form.html.twig') }}
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
@ -33,7 +33,7 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane active">
|
||||
<div class="tab-form">
|
||||
{{ include('site/page_admin/_form.html.twig') }}
|
||||
{{ include('@Core/site/page_admin/_form.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 {% if pager.getPaginationData.pageCount < 2 %}pb-5{% endif %}">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
@ -45,7 +45,7 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane active">
|
||||
<div class="tab-form">
|
||||
{{ include('user/user_admin/_form.html.twig') }}
|
||||
{{ include('@Core/user/user_admin/_form.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 {% if pager.getPaginationData.pageCount < 2 %}pb-5{% endif %}">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
@ -29,7 +29,7 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane active">
|
||||
<div class="tab-form">
|
||||
{{ include('user/user_admin/_form.html.twig') }}
|
||||
{{ include('@Core/user/user_admin/_form.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
|
@ -1,141 +0,0 @@
|
|||
{% apply spaceless %}
|
||||
<!DOCTYPE html>
|
||||
{% import _self as macros %}
|
||||
|
||||
{% macro active_class(expectedSection, section) %}{{ expectedSection == section ? 'active' : ''}}{% endmacro %}
|
||||
|
||||
<html>
|
||||
<head>
|
||||
{{ include('admin/module/metas.html.twig') }}
|
||||
|
||||
<title>{% block title %}Tinternet & cie{% endblock %}</title>
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('admin') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{{ include('admin/module/flashes.html.twig') }}
|
||||
|
||||
<nav class="navbar fixed-top navbar-expand-md navbar-light bg-light border-bottom">
|
||||
<a class="navbar-brand" href="{{ path('admin_dashboard_index') }}">
|
||||
<img id="logo" src="{{ asset('build/images/logo.png') }}" alt="Tinternet & cie" title="Tinternet & cie">
|
||||
|
||||
Tinternet & cie
|
||||
</a>
|
||||
|
||||
<div class="ml-auto">
|
||||
<div class="collapse navbar-collapse" id="navigation">
|
||||
{{ include('admin/module/account.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Afficher navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
{% block body_container %}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<nav class="col-md-2 col-1 d-md-block bg-dark-blue sidebar">
|
||||
<div class="sidebar-sticky">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros.active_class('dashboard', section) }}" href="{{ path('admin_dashboard_index') }}">
|
||||
<span class="fa fa-chart-line"></span>
|
||||
|
||||
<span class="nav-item-label">Tableau de bord</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<h6 class="sidebar-heading justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||
<span>Contenu</span>
|
||||
</h6>
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros.active_class('site_navigation', section) }}" href="{{ path('admin_site_navigation_index') }}">
|
||||
<span class="fa fa-globe-europe"></span>
|
||||
|
||||
<span class="nav-item-label">Navigations</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros.active_class('site_tree', section) }}" href="{{ path('admin_site_tree_index') }}">
|
||||
<span class="fa fa-sitemap"></span>
|
||||
|
||||
<span class="nav-item-label">Arborescence</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros.active_class('site_page', section) }}" href="{{ path('admin_site_page_index') }}">
|
||||
<span class="fa fa-file-alt"></span>
|
||||
|
||||
<span class="nav-item-label">Pages</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_WRITER') %}
|
||||
<h6 class="sidebar-heading justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||
<span>Blog</span>
|
||||
</h6>
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros.active_class('blog_post', section) }}" href="{{ path('admin_blog_post_index') }}">
|
||||
<span class="fa fa-pen"></span>
|
||||
|
||||
<span class="nav-item-label">Articles</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros.active_class('blog_category', section) }}" href="{{ path('admin_blog_category_index') }}">
|
||||
<span class="fa fa-puzzle-piece"></span>
|
||||
|
||||
<span class="nav-item-label">Catégories</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<h6 class="sidebar-heading justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||
<span>Administration</span>
|
||||
</h6>
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros.active_class('user', section) }}" href="{{ path('admin_user_index') }}">
|
||||
<span class="fa fa-user"></span>
|
||||
|
||||
<span class="nav-item-label">Utilisateurs</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
<div class="col-11 col-md-10 ml-sm-auto col-lg-10 body">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{{ asset('vendor/tinymce/tinymce.min.js') }}"></script>
|
||||
|
||||
{{ encore_entry_script_tags('admin') }}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
{% endapply %}
|
25
templates/admin/menu.html.twig
Normal file
25
templates/admin/menu.html.twig
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% import "@Core/admin/macros/menu.html.twig" as macros_menu %}
|
||||
|
||||
{% if is_granted('ROLE_WRITER') %}
|
||||
<h6 class="sidebar-heading justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
|
||||
<span>Blog</span>
|
||||
</h6>
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros_menu.active_class('blog_post', section) }}" href="{{ path('admin_blog_post_index') }}">
|
||||
<span class="fa fa-pen"></span>
|
||||
|
||||
<span class="nav-item-label">Articles</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ macros_menu.active_class('blog_category', section) }}" href="{{ path('admin_blog_category_index') }}">
|
||||
<span class="fa fa-puzzle-piece"></span>
|
||||
|
||||
<span class="nav-item-label">Catégories</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 {% if pager.getPaginationData.pageCount < 2 %}pb-5{% endif %}">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 {% if pager.getPaginationData.pageCount < 2 %}pb-5{% endif %}">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
||||
{% extends '@Core/admin/layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{% extends 'admin/layout.html.twig' %}
|
Loading…
Reference in a new issue