base.html.twig 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>{% block title %}VideoPotes{% endblock %}</title>
  6. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.css">
  7. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
  8. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
  9. {% block stylesheets %}{% endblock %}
  10. <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
  11. </head>
  12. <body style="padding-top:5rem;">
  13. <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
  14. <a class="navbar-brand" href="{{ path('videotheque_liste') }}">Videothèque</a>
  15. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="/" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
  16. <span class="navbar-toggler-icon"></span>
  17. </button>
  18. <div class="collapse navbar-collapse" id="navbarsExampleDefault">
  19. <ul class="navbar-nav mr-auto">
  20. <li class="nav-item">
  21. <a class="nav-link" href="{{ path('videothequepersonnelle_maliste') }}">Ma liste de films<span class="sr-only">(current)</span></a>
  22. </li>
  23. <li class="nav-item">
  24. <a class="nav-link" href="{{ path('videotheque_liste') }}">Liste des films<span class="sr-only">(current)</span></a>
  25. </li>
  26. <li class="nav-item">
  27. <a class="nav-link" href="{{ path('realisateur_liste') }}">Liste des réalisateurs<span class="sr-only">(current)</span></a>
  28. </li>
  29. {% if is_granted('ROLE_ADMIN') %}
  30. <li class="nav-item">
  31. <a class="nav-link" href="{{ path('admin_index') }}">Administration<span class="sr-only">(current)</span></a>
  32. </li>
  33. {% endif %}
  34. </ul>
  35. {% if not is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  36. <ul class="navbar-nav">
  37. <li class="nav-item"><a class="nav-link" href="{{ path('login') }}">Se connecter</a></li>
  38. </ul>
  39. {% else %}
  40. <ul class="navbar-nav">
  41. <li class="nav-item dropdown">
  42. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  43. {{ app.user.username }}
  44. </a>
  45. <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  46. <a class="dropdown-item" href="{{ path('user_profil') }}">Profil</a>
  47. <div class="dropdown-divider"></div>
  48. <a class="dropdown-item" href="{{ path('logout') }}">Se déconnecter</a>
  49. </div>
  50. </li>
  51. </ul>
  52. {% endif %}
  53. <div>
  54. <p>Code disponible sur <a href="https://gogs.fdlibre.eu/sangfroid/films">Gogs</a></p>
  55. </div>
  56. {#<form class="form-inline my-2 my-lg-0">
  57. <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
  58. <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
  59. </form>#}
  60. </div>
  61. </nav>
  62. <div class="container-fluid">
  63. <header>
  64. <h1>{% block titre %}{% endblock %}</h1>
  65. </header>
  66. <main role="main">
  67. <div>
  68. {% for message in app.flashes('success') %}
  69. <div class="alert alert-success alert-dismissible fade show" role="alert">
  70. <strong>Cool</strong> {{ message }}
  71. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  72. <span aria-hidden="true">&times;</span>
  73. </button>
  74. </div>
  75. {% endfor %}
  76. {% block body %}{% endblock %}
  77. </div>
  78. </main>
  79. <footer>
  80. {% block footer %}
  81. {% endblock %}
  82. </footer>
  83. </div>
  84. <script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
  85. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
  86. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  87. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.js"></script>
  88. <script>
  89. $(document).ready(function() {
  90. // you may need to change this code if you are not using Bootstrap Datepicker
  91. $('.js-datepicker').datepicker({
  92. format: 'd/m/yyyy'
  93. });
  94. });
  95. </script>
  96. {% block javascripts %}{% endblock %}
  97. </body>
  98. </html>