templates/home/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Déclaration LFPL{% endblock %}
  3. {% block body %}
  4. <div class="text-center">
  5. {% if app.user %}
  6.   {% if app.user.role == "ROLE_USER" %}
  7.     <h2 class="py-4 my-4">Bienvenue {{ app.user.membre }}</h2>
  8.     <div class="row justify-content-center">
  9.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('declaration', {date : 'now' | date('Y-m')}) }}">Mes Déclarations</a>
  10.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('declaration.new') }}">Ajouter une déclaration</a>
  11.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('declaration.archive') }}">Archive</a>
  12.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('profil') }}">Mon Profil</a>
  13.     </div>
  14.   {% endif %}
  15.   {% if app.user.role == "ROLE_ADMIN" %}
  16.     <h2 class="py-4 my-4">Bienvenue Administrateur {{ app.user.membre }}</h2>
  17.     <div class="row justify-content-center">
  18.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('gestiondeclaration') }}">Gestion des Déclarations</a>
  19.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('gestionmembre') }}">Gestion des Utilisateurs</a>
  20.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('gestioncommission') }}">Gestion des Commissions</a>
  21.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('gestiondeclaration.new') }}">Nouvelle Déclaration</a>
  22.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('archive') }}">Archive</a>
  23.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('presenceupdate') }}">Mettre à jour les Présences</a>
  24.       <a class="btn btn-primary btn-block col-6 m-3" href="{{ path('tarif') }}">Tarification</a>
  25.     </div>
  26.   {% endif %}
  27.   <br/>
  28.   <a class="btn btn-secondary" href="{{ path('app_logout') }}">Se déconnecter</a>
  29. {% else %}
  30.   <img src="{{ asset('img/logo_transparent.png') }}" height="130vh"/><br/>
  31.   <h2 class="py-4 my-4">Veuillez vous connecter !</h2><br/>
  32.   <a class="btn btn-lg btn-primary" href="{{ path('app_login') }}">Se connecter</a>
  33. {% endif %}
  34. </div>
  35. {% endblock %}