{% extends 'base.html.twig' %} {% block javascripts_base %} function initDateFormat( datePicker ) { var selectedDate = ( typeof datePicker.date === 'undefined' || datePicker.date === null ) ? datePicker.options.defaultDate : datePicker.date; var shortWeekdays = datePicker.options.i18n.weekdaysShort; var shortMonths = datePicker.options.i18n.monthsShort; var day = selectedDate.getDate(); var weekday = shortWeekdays[ selectedDate.getDay() ]; var month = shortMonths[ selectedDate.getMonth() ]; var formattedDate = weekday + ', ' + day + ' ' + month; document.querySelector(".datepicker-date-display .date-text").innerHTML = formattedDate; document.querySelector(".datepicker-date-display .year-text").innerHTML = selectedDate.getFullYear(); } {% endblock %} {% block js_document_ready %} $('.datepicker').datepicker({ autoClose: true, showClearBtn: true, format: 'dd/mm/yyyy', container: 'body', onDraw: function (datePicker) { // materialize select dropdown not proper working on mobile and tablets so we make it browser default select $('.datepicker-container').find('.datepicker-select').addClass('browser-default'); $(".datepicker-container .select-dropdown.dropdown-trigger").remove(); }, onOpen: function (p) { var instance = M.Datepicker.getInstance(this.el); var d = instance.el.value.split(/[^0-9]/); var newDate = new Date(d[2], d[1] - 1, d[0]); instance.setDate(newDate); initDateFormat(instance); }, i18n: { cancel: 'Cancelar', clear: 'Limpiar', done: 'Aceptar', weekdays: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], weekdaysShort: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], weekdaysAbbrev: ["D", "L", "M", "M", "J", "V", "S"], today: 'Hoy', months: [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ], monthsShort: [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ], } }); $('.timepicker').timepicker({ container: 'body', autoClose: true, twelveHour: false, showClearBtn: true, onDraw: function () { // materialize select dropdown not proper working on mobile and tablets so we make it browser default select $('.timepicker-container').find('.timepicker-select').addClass('browser-default'); $(".timepicker-container .select-dropdown.dropdown-trigger").remove() }, i18n: { cancel: 'Cancelar', clear: 'Limpiar', done: 'Aceptar', } }); $('#datatable').dataTable({ filter : false, language: { "url": "//cdn.datatables.net/plug-ins/1.10.16/i18n/Spanish.json" }, aLengthMenu: "", bAutoWidth: false, "columns": [ { "data": "foto", render: function(data, type, row, meta) { if (type === 'display') { foto = [ '', ].join(''); return foto; } return data; }, }, { "data": "nombre_apellido" }, { "data": "dni" }, {# { "data": "antiguedad" }, #} { "data": "acciones", render: function(data, type, row, meta) { if (type === 'display') { $botones = [ " ", "how_to_reg", " ", ].join(''); return $botones; } return data; }, }, ], order: [[ 1, 'desc' ]], columnDefs: [ // These are the column name variables that will be sent to the server { "name": "foto", "searchable": false, "orderable": false, "targets": 0 }, { "name": "nombre_apellido", "targets": 1 }, { "name": "dni", "targets": 2 }, {# { "name": "antiguedad", "targets": 3 }, #} { "searchable": false, "orderable": false, "targets": 3 }, ], "displayStart": {{ app.session.get(constant('App\\Controller\\Informes\\CargarInformesController::FORM_CONSULTA_CARGAR_AGIL_INFORME_PSI_START')) ?? 0 }}, order: [[{{ app.session.get(constant('App\\Controller\\Informes\\CargarInformesController::FORM_CONSULTA_CARGAR_AGIL_INFORME_PSI_ORDER_COL')) ?? 1 }}, '{{ app.session.get(constant('App\\Controller\\Informes\\CargarInformesController::FORM_CONSULTA_CARGAR_AGIL_INFORME_PSI_ORDER_DIR')) ?? 'desc' }}']], serverSide: true, processing: true, ajax: { url: '{{ path('cargar_informe_agil_presentaciones_datos') }}', type: 'POST', {# success: function(response) { // dump de los datos recibidos en la respuesta console.log(response); } #} } {# , fnDrawCallback: function( oSettings ) { // Ocultar columnas si no esta seteada el numero de acta $('#datatable tbody tr').each(function() { var fechaCell1 = $(this).find('td:eq(3)'); // Columna del resultado en la tabla fechaCell1.hide(); }); } #} }); // the "href" attribute of the modal trigger must specify the modal ID that wants to be triggered $('select').formSelect(); //var select = $('select'); $('.limpiar').click(function(){ $("input[type=text]").val(""); form.submit(); }); {% endblock %} {% block breadcrumb %}
{% endblock %} {% block titulo_body %}place
description
Nombre y Apellido | DNI | {# #}Acciones | |
---|---|---|---|
{# #} |