Damian 2 weeks ago
parent
commit
3868319271
  1. 29
      resources/views/docentes.blade.php

29
resources/views/docentes.blade.php

@ -2,6 +2,10 @@
@extends('layouts.dashboard')
@section('content')
<!-- Agregar los CSS en el encabezado -->
<link rel="stylesheet" href="https://cdn.datatables.net/2.2.2/css/dataTables.dataTables.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/3.2.2/css/buttons.dataTables.css">
<div class="container mx-auto px-4 py-6">
<!-- Encabezado -->
@if(session('success'))
@ -51,7 +55,7 @@
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<table id="docentes-table" class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
@ -60,7 +64,7 @@
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Correo</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tipo de Licencia</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Materia</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Acciones</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@ -104,6 +108,17 @@
</div>
</div>
<!-- Agregar los scripts necesarios -->
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://cdn.datatables.net/2.2.2/js/dataTables.js"></script>
<script src="https://cdn.datatables.net/buttons/3.2.2/js/dataTables.buttons.js"></script>
<script src="https://cdn.datatables.net/buttons/3.2.2/js/buttons.dataTables.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/3.2.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/3.2.2/js/buttons.print.min.js"></script>
<script>
function confirmarEdicion(url) {
Swal.fire({
@ -152,6 +167,16 @@ document.addEventListener('DOMContentLoaded', function() {
}, 3000);
}
});
// Inicializar DataTable con botones
new DataTable('#docentes-table', {
layout: {
topStart: {
buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
}
}
});
</script>
@endsection
<!-- End Generation Here -->

Loading…
Cancel
Save