mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add admin section (2/2)
This commit is contained in:
parent
f0676b99d0
commit
40a2692c9c
28
Controller/AdminController.php
Normal file
28
Controller/AdminController.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace CL\Chill\MainBundle\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author julien.fastre@champs-libres.coop
|
||||||
|
*/
|
||||||
|
class AdminController extends Controller {
|
||||||
|
|
||||||
|
public function indexAction($menu = 'admin',
|
||||||
|
$header_title = 'views.Main.admin.index.header_title',
|
||||||
|
$page_title = 'views.Main.admin.index.page_title') {
|
||||||
|
|
||||||
|
|
||||||
|
return $this->render('CLChillMainBundle:Admin:index.html.twig', array(
|
||||||
|
'menu_composer' => $this->get('cl_chill_main_menu_composer'),
|
||||||
|
'menu' => $menu,
|
||||||
|
'header_title' => $header_title,
|
||||||
|
'page_title' => $page_title,
|
||||||
|
'args' => array()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
6
Resources/translations/messages.fr.yml
Normal file
6
Resources/translations/messages.fr.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
views:
|
||||||
|
Main:
|
||||||
|
admin:
|
||||||
|
index:
|
||||||
|
header_title: Administration de Chill
|
||||||
|
page_title: Administration
|
23
Resources/views/Admin/index.html.twig
Normal file
23
Resources/views/Admin/index.html.twig
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{% extends "CLChillMainBundle::layout.html.twig" %}
|
||||||
|
|
||||||
|
{% block title%}{{ header_title|trans }}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<h1>{{ page_title|trans }}</h1>
|
||||||
|
|
||||||
|
<ul class="two tiles">
|
||||||
|
{% for menu in menu_composer.getRoutesFor(menu) %}
|
||||||
|
<li class="">
|
||||||
|
<h3><a href="{{ path(menu.route, args) }}" >{{ menu.label|trans }}</a></h3>
|
||||||
|
|
||||||
|
<p>{{ menu.helper|trans|default('') }}</p>
|
||||||
|
|
||||||
|
<p><a href="{{ path(menu.route, args) }}" >{{ menu.label|trans }}</a></p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -57,7 +57,7 @@
|
|||||||
<li><a href="#">Bonjour {utilisateur}</a></li>
|
<li><a href="#">Bonjour {utilisateur}</a></li>
|
||||||
<li><a href="#"><i class="icon-users"></i></a></li>
|
<li><a href="#"><i class="icon-users"></i></a></li>
|
||||||
<li><a href="#"><i class="icon-export"></i></a></li>
|
<li><a href="#"><i class="icon-export"></i></a></li>
|
||||||
<li><a href="#"><i class="icon-gauge"></i></a></li>
|
<li><a href="{{ path('chill_main_admin_central') }}"><i class="icon-gauge"></i></a></li>
|
||||||
<li><a href="#">Se déconnecter <i class="icon-logout"></i></a></li>
|
<li><a href="#">Se déconnecter <i class="icon-logout"></i></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user