templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width">
  6. <title>{% block title %}{{ page_title }}{% endblock %}</title>
  7. {{ encore_entry_link_tags('app') }}
  8. <link rel="icon" type="image/x-icon" href="{{ asset('build/images/favicon.ico') }}" />
  9. <script src="https://kit.fontawesome.com/896e0c9f42.js" crossorigin="anonymous"></script>
  10. </head>
  11. <body class="vlv-generic">
  12. <header>
  13. <div id="header-contents">
  14. <div id="header-logo">
  15. <img src="{{ asset('build/images/vitaliv-logo.png') }}">
  16. </div>
  17. <div id="header-menu">
  18. <nav id="main-menu" class="vlv-menu">
  19. <ul class="menu">
  20. <li class="menu-item"><a href="{{ path('browse_fridge') }}">Frigoríficos</a></li>
  21. {% if is_granted('ROLE_ADMIN') %}
  22. <li class="menu-item"><a href="{{ path('browse_product_type') }}">Productos</a></li>
  23. <li class="menu-item"><a href="{{ path('browse_order') }}">&Oacute;rdenes</a></li>
  24. <li class="menu-item"><a href="{{ path('browse_user') }}">Usuarios</a></li>
  25. <li class="menu-item"><a href="{{ path('sync_manual') }}">Actualizar</a></li>
  26. {% endif %}
  27. <li class="menu-item"><a href="{{ path('app_logout') }}">Salir</a></li>
  28. </ul>
  29. </nav>
  30. </div>
  31. </div>
  32. </header>
  33. <div class="flash-container">
  34. {% for message in app.flashes('notice') %}
  35. <div class="vlv-flash-notice">
  36. {{ message }}
  37. </div>
  38. {% endfor %}
  39. {% for message in app.flashes('error') %}
  40. <div class="vlv-flash-error">
  41. {{ message }}
  42. </div>
  43. {% endfor %}
  44. </div>
  45. {% block body %}{% endblock %}
  46. {% block javascripts %}
  47. {{ encore_entry_script_tags('app') }}
  48. <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
  49. <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
  50. <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.16/r-2.2.1/datatables.min.css"/>
  51. <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.16/r-2.2.1/datatables.min.js"></script>
  52. <script>
  53. $(document).ready(function() {
  54. $('.autocomplete').autocomplete({
  55. source: function(request, response) {
  56. $.ajax({
  57. url: "{{ path('product_type_autocomplete') }}",
  58. data: { term: request.term },
  59. success: function(data) {
  60. response(data);
  61. }
  62. });
  63. },
  64. minLength: 2,
  65. select: function(event, ui) {
  66. console.log(ui);
  67. $('#form_new_product_id').val(ui.item.id);
  68. }
  69. });
  70. $('table#edit-picklist').DataTable({
  71. responsive: true,
  72. ordering: false,
  73. paging: false,
  74. searching: false,
  75. info: false,
  76. autoWidth: false,
  77. oLanguage: {sZeroRecords: "No hay datos", sEmptyTable: "No hay datos"},
  78. }
  79. );
  80. });
  81. </script>
  82. {% endblock %}
  83. {% include "footer.html.twig" %}
  84. </body>
  85. </html>