{% extends 'base.html.twig' %} {% block javascripts_base %} function clickEliminarPsicologo(e) { $url_eliminar=e.currentTarget.dataset.url; debugger; swal({ title: "Eliminar", text: "¿Está seguro que quiere eliminar este Psicólogo?", icon: "warning", buttons: true, }) .then((aceptar) => { if (aceptar) { window.location.href = $url_eliminar; } }); } {% endblock %} {% block js_document_ready %} $('#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": "nombre_apellido" }, { "data": "dni" }, { "data": "acciones" , render: function(data, type, row, meta) { if (type === 'display') { $botones = [ ' ', 'visibility', ' ', ' ', 'work', ' ', ].join(''); if(data['editar']!=null) { $botones += [ '', 'edit', '', ].join(''); } if(data['eliminar']!=null) { $botones += [ ' ', 'delete', '', ].join(''); } return $botones; } return data; }, }, ], order: [[ 0, 'asc' ]], columnDefs: [ // These are the column name variables that will be sent to the server { "name": "per.apellidos", "targets": 0 }, { "name": "per.dni", "targets": 1 }, { "searchable": false, "orderable": false, "targets": 2 }, ], "displayStart": {{ app.session.get(constant('App\\Controller\\Personal\\PsicologoController::FORM_CONSULTA_PSICOLOGO_START')) ?? 0 }}, serverSide: true, processing: true, ajax: { url: '{{ path('psicologos_datos') }}', type: 'POST' } }); {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% block breadcrumb %}
{% endblock %} {% block titulo_body %}Apellido y Nombre | DNI | Acciones |
---|