base.html.twig 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 dropdown-menu-right" 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. {#<form class="form-inline my-2 my-lg-0">
  64. <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
  65. <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
  66. </form>#}
  67. </div>
  68. </nav>
  69. <div class="container-fluid">
  70. <header>
  71. <h1>{% block titre %}{% endblock %}</h1>
  72. </header>
  73. <main role="main">
  74. <div>
  75. {% for message in app.flashes('success') %}
  76. <div class="alert alert-success alert-dismissible fade show" role="alert">
  77. <strong>Cool</strong> {{ message }}
  78. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  79. <span aria-hidden="true">&times;</span>
  80. </button>
  81. </div>
  82. {% endfor %}
  83. {% block body %}{% endblock %}
  84. </div>
  85. </main>
  86. <footer>
  87. {% block footer %}
  88. {% endblock %}
  89. </footer>
  90. </div>
  91. <script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
  92. <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  93. <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>
  94. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  95. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.js"></script>
  96. <script>
  97. $(document).ready(function() {
  98. // you may need to change this code if you are not using Bootstrap Datepicker
  99. $('.js-datepicker').datepicker({
  100. format: 'd/m/yyyy'
  101. });
  102. });
  103. </script>
  104. {% block javascripts %}{% endblock %}
  105. </body>
  106. </html>