base.html.twig 5.2 KB

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