base.html.twig 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. <li class="nav-item">
  32. <a class="nav-link" href="{{ path('admin_index') }}">Administration<span class="sr-only">(current)</span></a>
  33. </li>
  34. {% endif %}
  35. </ul>
  36. {% if not is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  37. <ul class="navbar-nav">
  38. <li class="nav-item"><a class="nav-link" href="{{ path('login') }}">Se connecter</a></li>
  39. </ul>
  40. {% else %}
  41. <ul class="navbar-nav">
  42. <li class="nav-item dropdown">
  43. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  44. {{ app.user.username }}
  45. </a>
  46. <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  47. <a class="dropdown-item" href="{{ path('user_profil') }}">Profil</a>
  48. <div class="dropdown-divider"></div>
  49. <a class="dropdown-item" href="{{ path('logout') }}">Se déconnecter</a>
  50. </div>
  51. </li>
  52. </ul>
  53. {% endif %}
  54. <div>
  55. <p>Code disponible sur <a href="https://gogs.fdlibre.eu/sangfroid/films">Gogs</a></p>
  56. </div>
  57. {#<form class="form-inline my-2 my-lg-0">
  58. <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
  59. <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
  60. </form>#}
  61. </div>
  62. </nav>
  63. <div class="container-fluid">
  64. <header>
  65. <h1>{% block titre %}{% endblock %}</h1>
  66. </header>
  67. <main role="main">
  68. <div>
  69. {% for message in app.flashes('success') %}
  70. <div class="alert alert-success alert-dismissible fade show" role="alert">
  71. <strong>Cool</strong> {{ message }}
  72. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  73. <span aria-hidden="true">&times;</span>
  74. </button>
  75. </div>
  76. {% endfor %}
  77. {% block body %}{% endblock %}
  78. </div>
  79. </main>
  80. <footer>
  81. {% block footer %}
  82. {% endblock %}
  83. </footer>
  84. </div>
  85. <script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
  86. <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  87. <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>
  88. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  89. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.js"></script>
  90. <script>
  91. $(document).ready(function() {
  92. // you may need to change this code if you are not using Bootstrap Datepicker
  93. $('.js-datepicker').datepicker({
  94. format: 'd/m/yyyy'
  95. });
  96. });
  97. </script>
  98. {% block javascripts %}{% endblock %}
  99. </body>
  100. </html>