Permalink
Browse files

[GREEN] Login/logout: code

  • Loading branch information...
gajdaw committed Jan 3, 2015
1 parent 01db776 commit c4495ec70e7a2e783cd028758406e3b97fcf5382
@@ -4,6 +4,9 @@
The page does not exists!
{% endblock title %}
{% block login_logout_panel %}
{% endblock login_logout_panel %}
{% block body %}
<h2>The page does not exists!</h2>
<p>
@@ -4,6 +4,9 @@
There was an exception!
{% endblock title %}
{% block login_logout_panel %}
{% endblock login_logout_panel %}
{% block body %}
<h2>An error occured!</h2>
<p>
@@ -8,6 +8,29 @@
</head>
<body>
<h1>The Longest Rivers in the World!</h1>
{% block login_logout_panel %}
<ul>
<li>
<a href="{{ path('homepage') }}">
Homepage
</a>
</li>
{% if is_granted('ROLE_USER') %}
<li>Logged in as {{ app.user.username }}</li>
<li>
<a href="{{ path('fos_user_security_logout') }}">
{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
</a>
</li>
{% else %}
<li>
<a href="{{ path('fos_user_security_login') }}">
{{ 'layout.login'|trans({}, 'FOSUserBundle') }}
</a>
</li>
{% endif %}
</ul>
{% endblock login_logout_panel %}
{% block body %}{% endblock %}
{% block javascripts %}{% endblock %}
</body>

0 comments on commit c4495ec

Please sign in to comment.