<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width">
<title>{% block title %}{{ page_title }}{% endblock %}</title>
{{ encore_entry_link_tags('app') }}
<link rel="icon" type="image/x-icon" href="{{ asset('build/images/favicon.ico') }}" />
<script src="https://kit.fontawesome.com/896e0c9f42.js" crossorigin="anonymous"></script>
</head>
<body class="vlv-generic">
<header>
<div id="header-contents">
<div id="header-logo">
<img src="{{ asset('build/images/vitaliv-logo.png') }}">
</div>
<div id="header-menu">
<nav id="main-menu" class="vlv-menu">
<ul class="menu">
<li class="menu-item"><a href="{{ path('browse_fridge') }}">Frigoríficos</a></li>
{% if is_granted('ROLE_ADMIN') %}
<li class="menu-item"><a href="{{ path('browse_product_type') }}">Productos</a></li>
<li class="menu-item"><a href="{{ path('browse_order') }}">Órdenes</a></li>
<li class="menu-item"><a href="{{ path('browse_user') }}">Usuarios</a></li>
<li class="menu-item"><a href="{{ path('sync_manual') }}">Actualizar</a></li>
{% endif %}
<li class="menu-item"><a href="{{ path('app_logout') }}">Salir</a></li>
</ul>
</nav>
</div>
</div>
</header>
<div class="flash-container">
{% for message in app.flashes('notice') %}
<div class="vlv-flash-notice">
{{ message }}
</div>
{% endfor %}
{% for message in app.flashes('error') %}
<div class="vlv-flash-error">
{{ message }}
</div>
{% endfor %}
</div>
{% block body %}{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.16/r-2.2.1/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.16/r-2.2.1/datatables.min.js"></script>
<script>
$(document).ready(function() {
$('.autocomplete').autocomplete({
source: function(request, response) {
$.ajax({
url: "{{ path('product_type_autocomplete') }}",
data: { term: request.term },
success: function(data) {
response(data);
}
});
},
minLength: 2,
select: function(event, ui) {
console.log(ui);
$('#form_new_product_id').val(ui.item.id);
}
});
$('table#edit-picklist').DataTable({
responsive: true,
ordering: false,
paging: false,
searching: false,
info: false,
autoWidth: false,
oLanguage: {sZeroRecords: "No hay datos", sEmptyTable: "No hay datos"},
}
);
});
</script>
{% endblock %}
{% include "footer.html.twig" %}
</body>
</html>