mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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
|
||||
{
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
@ -2,18 +2,18 @@ root:
|
||||
pattern: /
|
||||
defaults:
|
||||
_controller: FrameworkBundle:Redirect:urlRedirect
|
||||
path: /hello
|
||||
path: /welcome
|
||||
permanent: true
|
||||
options:
|
||||
menus:
|
||||
main:
|
||||
order: 10
|
||||
label: homepage
|
||||
label: Homepage
|
||||
|
||||
cl_chill_main_homepage:
|
||||
pattern: /hello
|
||||
pattern: /welcome
|
||||
defaults: { _controller: ChillMainBundle:Default:index }
|
||||
|
||||
|
||||
chill_main_admin_central:
|
||||
pattern: /admin
|
||||
defaults: { _controller: ChillMainBundle:Admin:index }
|
||||
@ -21,14 +21,14 @@ chill_main_admin_central:
|
||||
menus:
|
||||
main:
|
||||
order: 20
|
||||
label: homepage
|
||||
label: Admin Menu
|
||||
|
||||
login:
|
||||
path: /login
|
||||
defaults: { _controller: ChillMainBundle:Login:login }
|
||||
|
||||
|
||||
login_check:
|
||||
path: /login_check
|
||||
|
||||
|
||||
logout:
|
||||
path: /logout
|
||||
|
@ -1 +0,0 @@
|
||||
Hello {{ name }}!
|
@ -65,41 +65,45 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{# Flash messages ! #}
|
||||
<div class="container">
|
||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||
<div class="grid-8 centered success">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
{% block layout_content %}
|
||||
{# Flash messages ! #}
|
||||
<div class="container">
|
||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||
<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>
|
||||
{% 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">
|
||||
<a href="#">Primary</a>
|
||||
{{ chill_menu('main', {
|
||||
'layout': 'ChillPersonBundle::menu.html.twig',
|
||||
}) }}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-8">
|
||||
<h1>Welcome to Chill</h1>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user