@extends('layouts.master')

@section('navigation')
    @include('local.managers.admins._navigation')
@stop

@section('main')

    <div class="row">

        <table class="table table-striped datatable">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>School</th>
                </tr>
            </thead>
            <tfoot>
                <tr class="column-search">
                    <td><input class="column-search-bar form-control" type="text" placeholder="Buscar" aria-label="search rubric name"/></td>
                    <td><select class="column-search-select form-control" aria-label="select associated school"><option value=""></option></select></td>
                </tr>
            </tfoot>
            <tbody>
                @foreach($templates as $template)
                    <tr>
                        <td>{{ HTML::linkAction('TemplatesController@show', $template->name, array($template->id)) }}</td>
                        <td>
                            @if($template->school)
                                {{$template->school->name}}
                            @else
                                All (global)
                            @endif
                        </td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    </div>
@stop

@section('included-js')

<!-- Datatables -->
@include('global._datatables_js')

@stop