@extends('layouts.master')

@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')
    @endif
@stop

@section('main')

<div class="row">
    <div class="col-md-12">

        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a href="#undergraduate" aria-controls="undergraduate" role="tab" data-toggle="tab"><h4>Undergraduate Program Participation</h4></a></li>
            <li role="presentation"><a href="#graduate" aria-controls="graduate" role="tab" data-toggle="tab"><h4>Graduate Program Participation</h4></a></li>
        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="undergraduate">
                <br>
                <table class="table table-striped datatable">
                    <thead>
                        <th>Name</th>
                        <th>School</th>
                        <th>Sections that attempted outcome</th>
                        <th>Sections that achieved outcome </th>
                        <th>Success rate</th>
                    </thead>
                    <tbody>
                        @foreach($undergradResults["names"] as $id=>$undergradProgramName)
                            <tr>
                                <td>{{{ $undergradProgramName }}}</td>
                                <td>{{{ $undergradResults["schools"][$id] }}}</td>
                                <td>{{{ $undergradResults["attempted"][$id] }}}</td>
                                <td>{{{ $undergradResults["achieved"][$id] }}}</td>
                                <td>{{{ $undergradResults["successRate"][$id] }}}</td>
                            </tr>
                        @endforeach
                    </tbody>
                    <caption>N/M: Not Measured</caption>
                </table>
            </div>
            <div role="tabpanel" class="tab-pane" id="graduate">
                <br>
                <table class="table table-striped datatable">
                    <thead>
                        <th>Name</th>
                        <th>School</th>
                        <th>Sections that attempted outcome</th>
                        <th>Sections that achieved outcome </th>
                        <th>Success rate</th>
                    </thead>
                    <tbody>
                        @foreach($gradResults["names"] as $id=>$gradProgramName)
                            <tr>
                                <td>{{{ $gradProgramName }}}</td>
                                <td>{{{ $gradResults["schools"][$id] }}}</td>
                                <td>{{{ $gradResults["attempted"][$id] }}}</td>
                                <td>{{{ $gradResults["achieved"][$id] }}}</td>
                                <td>{{{ $gradResults["successRate"][$id] }}}</td>
                            </tr>
                        @endforeach
                    </tbody>
                    <caption>N/M: Not Measured</caption>
                </table>
            </div>

        </div>
    </div>
</div>

@stop

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

@section('javascript')

    // ------------------------------------------------------------------------
    // Page Load
    // ------------------------------------------------------------------------

    // ------------------------------------------------------------------------
    // Events
    // ------------------------------------------------------------------------



    // ------------------------------------------------------------------------
    // Functions
    // ------------------------------------------------------------------------

@stop
