@include('clumsy::templates.head')

<div class="container master">
    <h1 class="page-header">
        <div class="row">
            <div class="col-sm-8">
               Avaliações do juri
            </div>
        </div>
    </h1>

    <div class="panel panel-default {{ $resource }}-panel">
        <div class="table-responsive">
            <table class="table jury-table">
                <thead>
                    <th>Nome do Fadista</th>
                    <th>Música</th>
                    @foreach ($jury as $juror)
                    <th class="center"><a href="{{ route('admin.jury-vote.juror-bands-ratings', array('jurorId' => $juror->id)) }}">{{ $juror->last_name }}</a></th>
                    @endforeach
                    <th class="center">Total</th>
                </thead>
                <tbody>
                    @foreach ($bands as $band)
                        <tr class="band">
                            <td><a href="{{ route('admin.band.edit', array('id' => $band->id)) }}">{{ $band->name }}</a></td>
                            <td>{{ $band->song }}</td>
                            @foreach($band->juryVotes as $rating)
                            <td class="center">{{ $rating }}</td>
                            @endforeach
                            <td class="center">{{ $band->totalScore }}</td>
                        </tr>
                    @endforeach
                </tbody>
            </table>
        </div>

       {{--  @if (count($jury))

            <div class="table-responsive">

                {{ Form::token() }}

                <table class="table jury-table" >
                    <thead>
                        <th class="juror-name">
                            Nome
                        </th>
                    </thead>

                    <tbody>
                    @foreach ($jury as $juror)
                        <tr class="juror">
                            <td><a href="{{ route('admin.jury-vote.juror-bands-ratings', array('jurorId' => $juror->id)) }}">{{ $juror->first_name.' '.$juror->last_name }}</a></td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>

        @else

            <div class="panel-body">
                <h5>
                    Não há jurados designados
                </h5>
            </div>

        @endif --}}

    </div>

</div>

@include('clumsy::templates.footer')
