<div class="p-5">
    <center>

        <h3>Productividad</h3>
        <br>
        <div class="">
            <div class="col-lg-10 col-md-10 offset-lg-1">
                <table class="table">
                    <thead>

                    </thead>
                    <tbody>
                        @foreach ($productividad as $produc)
                            <th class="text-center" colspan="4"> {{ $produc[0]->tipo }}</th>
                            <tr>
                                <th scope="col">Autores</th>
                                <th scope="col">Titulo</th>
                                <th scope="col">Año</th>
                                <th scope="col">Linea</th>
                                <th scope="col">Ver</th>
                            </tr>
                            @foreach ($produc as $prod)
                                <tr>
                                    <td>{{ $prod->autores }}</td>
                                    <td>{{ $prod->titulo }}</td>
                                    <td>{{ $prod->anio }}</td>
                                    <td>{{ $prod->linea_maestria }}</td>

                                    <td>
                                        @if ($prod->documento != '')
                                            <a href="descargarArchivos?url=pdf/productividad/{{ $prod->documento }}&toda=si"
                                                target="_blank" class="btn-outline-primary"
                                                rel="noopener noreferrer"><img src="img/pdf1.png" alt=""></a>
                                        @else
                                            @if ($prod->url != '')
                                                <a href="{{ $prod->url }}" target="_blank"
                                                    class="" rel="noopener noreferrer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-link-45deg" viewBox="0 0 16 16">
                                                        <path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z"/>
                                                        <path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z"/>
                                                      </svg></a>
                                            @endif
                                        @endif
                                    </td>
                                </tr>
                            @endforeach
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </center>
</div>
