{% extends 'base.html.twig' %} {% block javascripts_base %} function clickEliminarPsiquiatra(e) { $url_eliminar=e.currentTarget.dataset.url; debugger; swal({ title: "Eliminar", text: "¿Está seguro que quiere eliminar este Psiquiatra?", 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\\PsiquiatraController::FORM_CONSULTA_PSIQUIATRA_START')) ?? 0 }}, serverSide: true, processing: true, ajax: { url: '{{ path('psiquiatras_datos') }}', type: 'POST' } }); {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% block breadcrumb %} {% endblock %} {% block titulo_body %}
list

Listado de Psiquiátras

{% endblock %} {% block titulo_acciones_body %} {% if is_granted(constant('App\\Security\\Voter\\PsiquiatraVoter::ACCESS_CREATE'), null) %} add save Nuevo Psiquiatra {% endif %} {% endblock %} {% block body %}
{{ form_start(form) }}
{{ form_label(form.textoBusqueda) }} {{ form_widget(form.textoBusqueda) }}
{{ form_label(form.dni) }} {{ form_widget(form.dni) }}
{% if form.children | filter(v => (v.vars.name != "_token" and not (v.vars.value == "" or v.vars.value == []))) | length > 0 %} {% endif %} {{ form_end(form) }}

Apellido y Nombre DNI Acciones
{% endblock %}