{% extends 'base.html.twig' %} {% block breadcrumb %} {% endblock %} {% block titulo_body %} video_camera_front

Lectura de Notas


{% endblock %} {% block titulo_acciones_body %} {% if is_granted('ROLE_ENTREVISTAS_ADMIN') %}
add video_camera_front Nueva Lectura {% endif %} {% endblock %} {% block javascripts %} {{parent()}} {% endblock %} {% 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(); } function comprobarInputs() { a=$('#lectura_notas_control_filtro_fecha'); c=$('#lectura_notas_control_filtro_estado'); if (a.val() != "" || c.val() != "Todos"){ $('.limpiar').show(); } else { $('.limpiar').hide(); } } var cleave = new Cleave('#lectura_notas_control_filtro_fecha', { date: true, delimiter: '/', datePattern: ['d', 'm', 'Y'] }); {% 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 = $('#lectura_notas_control_filtro_fecha').val().split(/[^0-9]/); var newDate = new Date(d[2], d[1] - 1, d[0]); instance.setDate(newDate); initDateFormat(instance); }, onSelect: function(date) { var day = String(date.getDate()).padStart(2, '0'); var month = String(date.getMonth() + 1).padStart(2, '0'); var year = String(date.getFullYear()); var fecha = day + '/' + month + '/' + year; $('#lectura_notas_control_filtro_fecha').val(fecha); $('#lectura_notas_control_filtro_fecha').siblings('label').addClass('active'); }, 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' ], } }); // Agrego evento de click al botón de limpiar del datepicker $('.datepicker-clear').click(function(){ $('#lectura_notas_control_filtro_fecha').val(''); // Vaciar el valor del input }); $('#datatable').dataTable({ createdRow: function(row, data, dataIndex) { $(row).css({"background-color":"transparent"}); }, filter : false, language: { "url": "//cdn.datatables.net/plug-ins/1.10.16/i18n/Spanish.json" }, aLengthMenu: "", bAutoWidth: false, "columns": [ { "data": "fecha" }, { "data": "cargo", }, {"data": "videos"}, {"data": "estado"}, { "data": "acciones" , render: function(data, type, row, meta) { if (type === 'display') { $botones = [ "", "visibility", "", ].join(''); $botones += [ "", "edit", "", ].join(''); return $botones; } return data; }, }, ], order: [[ 0, 'desc' ]], columnDefs: [ // These are the column name variables that will be sent to the server { "name": "l.fecha", "searchable": true, "orderable": true, "targets": 0, }, { "name": "cronogramaEntrevistas", "searchable": true, "orderable": false, "targets": 1 }, { "name": "videos", "searchable": true, "orderable": false, "targets": 2 }, { "name": "l.estado", "searchable": true, "orderable": false, "targets": 3 }, { "searchable": false, "orderable": false, "targets": 4 }, ], serverSide: true, processing: true, ajax: { url: '{{ path('lectura_notas_datos') }}', type: 'POST' } }); // the "href" attribute of the modal trigger must specify the modal ID that wants to be triggered $('select').formSelect(); $('.limpiar').click(function(){ window.location.href="{{ path('lectura_notas_limpiar') }}" }); $('#lectura_notas_control_filtro_fecha').keyup(function() { if ($(this).val() != '') { $('.limpiar').show(); } else { comprobarInputs(); } }); $('#lectura_notas_control_filtro_estado').change(function() { if ($(this).val() != 'Todos') { $('.limpiar').show(); } else { comprobarInputs(); } }); comprobarInputs(); {% endblock %} {% block body %}
{{ form_start(form) }} {#
{{ form_widget(form.cargo) }} {{ form_label(form.cargo) }}
#}
{{ form_label(form.fecha) }} {{ form_widget(form.fecha) }}
{{ form_widget(form.estado) }} {{ form_label(form.estado) }}
{{ form_end(form) }}
Fecha Cronogramas Videos Estado Acciones
{% endblock %}