{% extends 'base.html.twig' %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block javascripts_base %} function initDateFormat( datePicker ) { {# console.debug(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 %} //defino variable para fecha actual var currentdate = new Date(); var datetime = "Extraído el: " + currentdate.getDate() + "/" + (currentdate.getMonth()+1) + "/" + currentdate.getFullYear() + " " + currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); $('#datatable').dataTable({ createdRow: function(row, data, dataIndex) { if (data['estadoNotificacion'].indexOf('Prioritario')!=-1) { {# $(row).css({"background-color":"red"}); #} {# $(row).addClass('identidad-color lighten-5'); #} } }, filter : false, language: { "url": "//cdn.datatables.net/plug-ins/1.12.1/i18n/es-ES.json" }, aLengthMenu: "", bAutoWidth: false, "columns": [ { "data": "asunto", render: function(data, type, row, meta) { let string_compacto = ""; if(data != null) { tooltiptext = data; string_compacto = data.length >= 70 ? data.substring(0, 70)+"..." : data; } else {tooltiptext = "";} let string_final = "
"; if(row['estadoNotificacion'].indexOf('Privado')!=-1) {string_final += 'privacy_tip ';} string_final += string_compacto; if(row['estadoNotificacion'].indexOf('Borrador')!=-1) {string_final += ' {Borrador}';} string_final += '
'; return string_final; } }, { "data": "etiquetas" }, {# { "data": "estadoNotificacion" }, #} { "data": "fechaHoraPublicacion"}, { "data": "acciones" , render: function(data, type, row, meta) { if (type === 'display') { $botones = [ ' ', 'visibility', ' ', ].join(''); if(data['editar']!=null) { $botones += [ ' ', 'edit', '', ].join(''); } if(data['publicar']!=null) { $botones += [ ' ', ].join(''); } return $botones; } return data; }, }, ], order: [[ {{ app.session.get(constant('App\\Controller\\SN\\NotificacionController::FORM_CONSULTA_MATERIAL_ORDER_COL')) ?? 2 }} , '{{app.session.get(constant('App\\Controller\\SN\\NotificacionController::FORM_CONSULTA_MATERIAL_ORDER_DIR')) ?? 'desc'}}']], columnDefs: [ // These are the column name variables that will be sent to the server { "name": "asunto", "targets": 0, }, { "name": "etiquetas", "searchable": false, "orderable": false, "targets": 1 }, {# { "name": "estadoNotificacion", "targets": 2 }, #} { "name": "fechaHoraPublicacion", "targets": 2 }, { "searchable": false, "orderable": false, "targets": 3 }, ], "displayStart": {{ app.session.get(constant('App\\Controller\\SN\\NotificacionController::FORM_CONSULTA_MATERIAL_START')) ?? 0 }}, serverSide: true, processing: true, ajax: { url: '{{ path('materiales_datos') }}', type: 'POST' } , fnDrawCallback: function( oSettings ) { // Ocultar columnas si no esta seteada el numero de acta $('#datatable tbody tr').each(function() { var fechaCell1 = $(this).find('td:eq(1)'); // Columna de etiquetas en la tabla var fechaCell2 = $(this).find('td:eq(2)'); // Columna de fechas en la tabla fechaCell1.addClass("hide-on-small-only"); fechaCell2.addClass("hide-on-small-only"); }); } }); // the "href" attribute of the modal trigger must specify the modal ID that wants to be triggered {# $('.modal1').modal(); #} $('select').formSelect(); {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% block titulo_body %} business_center

Material de Trabajo

{% endblock %} {% block titulo_acciones_body %} {% if is_granted(constant('App\\Security\\Voter\\NotificacionVoter::ACCESS_CREATE'),null) %} save Nuevo Material {% endif %} {% endblock %} {% block body %}
{{ form_start(form) }} {% if (not is_granted('ROLE_CONSEJO')) and (not is_granted('ROLE_MUGE')) %}
FILTRAR POR:
{% endif %}
{{ form_widget(form.textoBusqueda) }} {{ form_label(form.textoBusqueda) }}
{{ form_label(form.fechaHoraPublicacionDesde) }} {{ form_widget(form.fechaHoraPublicacionDesde) }}
{{ form_label(form.fechaHoraPublicacionHasta) }} {{ form_widget(form.fechaHoraPublicacionHasta) }}
{{ form_widget(form.estadoNotificacion) }}
{% if is_granted(constant('App\\Security\\Voter\\NotificacionVoter::ACCESS_CREATE'),null) %} {% endif %}
{{ form_end(form) }}
{# #}
{# #}
Asunto EtiquetasEstadoFecha - Hora Publicación Acciones
{% endblock %}