@extends('layouts.master-2')

@section('navigation')
    @if (Auth::user()->role == 1)
        @include('local.managers.admins._new_navigation')
    @elseif(Auth::user()->role == 2)
        @include('local.managers.sCoords._new_navigation')
    @elseif(Auth::user()->role == 3)
        @include('local.managers.pCoords._new_navigation')
    @elseif(Auth::user()->role == 4)
        @include('local.professors._navigation')
    @endif
@stop
@section('main')

    {{-- TODO: look where to place this script.
          if placed inside .ready() or before it,
            an error that the function is not defined occurs. --}}
    {{-- TODO: no reconoce acentos --}}


    <div class="row">



        <div class="col-md-12">
            <div class="table-responsive table-responsive-0">
                <table class="table table-striped table-condensed datatable">
                    <thead id="theHead">
                        <tr>
                            <th>Cycle</th>
                            <th>PDF Name</th>
                            <th>User who submitted</th>
                            <th>Date Submitted </th>
                            <th>New Version</th>
                           

                        </tr>
                    </thead>
                    <tbody>
                        @foreach ($paths_with_users as $info)
                            <tr>
                                <td> {{ $info->year_start }} - {{ $info->year_end }}</td>
                                <td> <a
                                        href="{{ URL::action('ThreeYearPlanController@findHTML', [$info->path_id]) }}">
                                        {{ str_replace(".blade.php","",basename($info->path_to_pdf)) }}
                                        <span class="glyphicon glyphicon-eye-open"></span>

                                </td>
                                <td> {{ $info->surnames . ', ' . $info->first_name }}</td>
                                <td>
                                    {{ $info->date_posted }}
                                </td>
                                <td>
                                    @if ($info->last == 1)
                                        <span class="glyphicon glyphicon-ok"></span>
                                    @endif
                                </td>


                            </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>



    </div>








@stop

@section('included-js')
    @include('global._datatables_js')
@stop
