mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
Improving navigation
This commit is contained in:
parent
5ecfd89126
commit
6642edb3e9
@ -7,23 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|||||||
class DefaultController extends Controller
|
class DefaultController extends Controller
|
||||||
{
|
{
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$a = array(
|
|
||||||
array('success', "Message de succès (success)! "),
|
|
||||||
array('success',"Un autre message de succès ! "),
|
|
||||||
array('danger' , "(danger)Avert lorem ipsum dolor sit amet spiritur"),
|
|
||||||
array('danger' ,"Avertum ipsut est amet amergitur tatouari"),
|
|
||||||
array('info' , "(info) Un message d'information s'affiche."),
|
|
||||||
array('info' , "Info informitur escept asolitur amet. Sit Roberetur astot.")
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($this->getRequest()->query->get('addMessages', 1)) {
|
|
||||||
foreach ($a as $array) {
|
|
||||||
$this->get('session')->getFlashBag()->add($array[0], $array[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $this->render('ChillMainBundle::layout.html.twig');
|
return $this->render('ChillMainBundle::layout.html.twig');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,18 +2,18 @@ root:
|
|||||||
pattern: /
|
pattern: /
|
||||||
defaults:
|
defaults:
|
||||||
_controller: FrameworkBundle:Redirect:urlRedirect
|
_controller: FrameworkBundle:Redirect:urlRedirect
|
||||||
path: /hello
|
path: /welcome
|
||||||
permanent: true
|
permanent: true
|
||||||
options:
|
options:
|
||||||
menus:
|
menus:
|
||||||
main:
|
main:
|
||||||
order: 10
|
order: 10
|
||||||
label: homepage
|
label: Homepage
|
||||||
|
|
||||||
cl_chill_main_homepage:
|
cl_chill_main_homepage:
|
||||||
pattern: /hello
|
pattern: /welcome
|
||||||
defaults: { _controller: ChillMainBundle:Default:index }
|
defaults: { _controller: ChillMainBundle:Default:index }
|
||||||
|
|
||||||
chill_main_admin_central:
|
chill_main_admin_central:
|
||||||
pattern: /admin
|
pattern: /admin
|
||||||
defaults: { _controller: ChillMainBundle:Admin:index }
|
defaults: { _controller: ChillMainBundle:Admin:index }
|
||||||
@ -21,14 +21,14 @@ chill_main_admin_central:
|
|||||||
menus:
|
menus:
|
||||||
main:
|
main:
|
||||||
order: 20
|
order: 20
|
||||||
label: homepage
|
label: Admin Menu
|
||||||
|
|
||||||
login:
|
login:
|
||||||
path: /login
|
path: /login
|
||||||
defaults: { _controller: ChillMainBundle:Login:login }
|
defaults: { _controller: ChillMainBundle:Login:login }
|
||||||
|
|
||||||
login_check:
|
login_check:
|
||||||
path: /login_check
|
path: /login_check
|
||||||
|
|
||||||
logout:
|
logout:
|
||||||
path: /logout
|
path: /logout
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Hello {{ name }}!
|
|
@ -65,41 +65,45 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{# Flash messages ! #}
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
{% block layout_content %}
|
||||||
<div class="grid-8 centered success">
|
{# Flash messages ! #}
|
||||||
<span>
|
<div class="container">
|
||||||
{{ flashMessage|raw }}
|
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||||
</span>
|
<div class="grid-8 centered success">
|
||||||
|
<span>
|
||||||
|
{{ flashMessage|raw }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for flashMessage in app.session.flashbag.get('danger') %}
|
||||||
|
<div class="grid-8 centered error">
|
||||||
|
<span>
|
||||||
|
{{ flashMessage|raw }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for flashMessage in app.session.flashbag.get('info') %}
|
||||||
|
<div class="grid-8 centered notice">
|
||||||
|
<span>
|
||||||
|
{{ flashMessage|raw }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% for flashMessage in app.session.flashbag.get('danger') %}
|
|
||||||
<div class="grid-8 centered error">
|
|
||||||
<span>
|
|
||||||
{{ flashMessage|raw }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% for flashMessage in app.session.flashbag.get('info') %}
|
|
||||||
<div class="grid-8 centered notice">
|
|
||||||
<span>
|
|
||||||
{{ flashMessage|raw }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
{% block content %}
|
|
||||||
<h1>Title</h1>
|
|
||||||
<p> Hello ! </p>
|
|
||||||
|
|
||||||
<div class="medium primary btn">
|
{{ chill_menu('main', {
|
||||||
<a href="#">Primary</a>
|
'layout': 'ChillPersonBundle::menu.html.twig',
|
||||||
|
}) }}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="grid-8">
|
||||||
|
<h1>Welcome to Chill</h1>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user