{% extends 'base.html.twig' %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block breadcrumb %} {% endblock %} {% block javascripts_base %} {% 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) { }, filter : false, language: { "url": "//cdn.datatables.net/plug-ins/1.12.1/i18n/es-ES.json" }, aLengthMenu: "", bAutoWidth: false, "columns": [ { "data": "fechaCreacion", "render": function(data, type, row) { if (type === 'display') { var date = new Date(data); var date2 = new Date(data); var options = { weekday: 'long'}; var options2 = { year: '2-digit', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit'}; var formattedDate = date2.toLocaleDateString('es-AR', options) + ', ' + date2.toLocaleDateString('es-ar', options2); formattedDate = formattedDate.replace(',', ''); formattedDate = formattedDate.charAt(0).toUpperCase() + formattedDate.slice(1); return formattedDate + ' hs'; } return data; }}, { "data": "cargo", render: function(data, type, row, meta) { let string_compacto = ""; if(data != null) { tooltiptext = data; string_compacto = data.length >= 80 ? data.substring(0, 80)+"..." : data; } else{ tooltiptext = ""; } let string_final = "
"; string_final += string_compacto; if(row['estadoRegistro'] && row['estadoRegistro'].indexOf('Borrador')!=-1){ string_final += ' {Borrador}'; } string_final += '
'; return string_final; } }, { "data": "departamentoJudicial"}, { "data": "jurisdiccion"}, { "data": "ordenMeritoDetalles", "render": function(data, type, row) { if (type === 'display') { return "
"+ data+ "
"; } return data; } }, { "data": "estadoMerito"}, { "data": "acciones" , render: function(data, type, row, meta) { if (type === 'display') { var estadoMeritoContent = $(row.estadoMerito).text().trim(); $botones = [ ' ', 'visibility', ' ', ].join(''); if (estadoMeritoContent !== 'Definitivo') { $botones += [ ' ', 'edit', '', ].join(''); $botones += [ ' ', 'person_add', '', ].join(''); } return $botones; } return data; }, }, ], {# order: [[ 1, 'asc' ]], #} columnDefs: [ // These are the column name variables that will be sent to the server { "name": "o.fechaCreacion", "searchable": true, "orderable": false, "targets": 0, {# "width": "35%", #} }, { "name": "o.cargo", "searchable": true, "orderable": false, "targets": 1 }, { "name": "o.departamentoJudicial", "searchable": true, "orderable": false, "targets": 2 }, { "name": "o.jurisdiccion", "searchable": true, "orderable": false, "targets": 3 }, { "name": "o.ordenMeritoDetalles", "searchable": true, "orderable": false, "targets": 4 }, { "name": "o.estadoMerito", "searchable": true, "orderable": false, "targets": 5 }, { "searchable": false, "orderable": false, "targets": 6 }, ], serverSide: true, processing: true, ajax: { url: '{{ path('ordenes_merito_datos') }}', type: 'POST' } }); // the "href" attribute of the modal trigger must specify the modal ID that wants to be triggered {# $('.modal1').modal(); #} $('select').formSelect(); $('.limpiar').click(function(){ window.location.href="{{ path('orden_merito_limpiar_index') }}" }); {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% block titulo_body %}
business_center

Órdenes de Mérito


{% endblock %} {% block titulo_acciones_body %}
Nuevo Orden de Mérito business_center add
{% endblock %} {% block body %}
{{ form_start(form) }}
{{ form_widget(form.cargos) }} {{ form_label(form.cargos) }}
{{ form_label(form.territorialidad) }} {{ form_widget(form.territorialidad) }}
{{ form_widget(form.estado) }} {{ form_label(form.estado) }}
{{ form_widget(form.caracter) }} {{ form_label(form.caracter) }}
{% if form.children | filter(v => (v.vars.name != "_token" and not (v.vars.value == "" or v.vars.value == []))) | length > 0 %} {% endif %}
{{ form_end(form) }}

Fecha de Creacion Cargo Departamento Judicial Jurisdicción Cant. Postulantes Caracter Acciones
{% endblock %}