X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/dddeaedb2eb31bef0f115116eadec65536d2c028..3b7129d4925b8ade812f3e2100da9640f1ebb49e:/Resources/views/location/index.html.twig?ds=sidebyside

diff --git a/Resources/views/location/index.html.twig b/Resources/views/location/index.html.twig
index 5863c76..ca51431 100644
--- a/Resources/views/location/index.html.twig
+++ b/Resources/views/location/index.html.twig
@@ -1,9 +1,8 @@
 {% extends '@RapsysAir/body.html.twig' %}
 {% block content %}
 <section id="dashboard">
-TODO:
 	<h2>{% trans %}Dashboard{% endtrans %}</h2>
-	<div class="panel">
+	<section class="panel">
 		{% if calendar is defined and calendar %}
 			<table class="grid">
 				<tbody>
@@ -30,29 +29,17 @@ TODO:
 				</tbody>
 			</table>
 		{% endif %}
-		<div>
-		{{ form_start(form) }}
-
-			<header>{{ form_errors(form) }}</header>
-
+		{# Display application or login form #}
+		{% if is_granted('ROLE_GUEST') %}
 			<section>
-				{{ form_row(form.location) }}
-
-				{{ form_row(form.date) }}
-
-				{{ form_row(form.slot) }}
+				{{ include('@RapsysAir/form/_application.html.twig') }}
 			</section>
-
-			{{ form_row(form.submit) }}
-
-			{# Render CSRF token etc .#}
-			<footer style="display:none">
-				{{ form_rest(form) }}
-			</footer>
-
-		{{ form_end(form) }}
-		</div>
-	</div>
+		{% elseif not is_granted('IS_AUTHENTICATED_REMEMBERED') %}
+			<section>
+				{{ include('@RapsysAir/form/_login.html.twig') }}
+			</section>
+		{% endif %}
+	</section>
 	{# dump(calendar) #}
 </section>
 {% endblock %}