@extends('Vzdelavanie::layout.integrated')

@section('content')
    @parent
    <section class="bg-white space-sm pb-4">
        <div class="container">
            <div class="row justify-content-between align-items-center">
                <div class="col-auto">
                    <h1 class="h2 mb-2">História testov</h1>
                    @yield('historia_testov_pouzivatela_subtitle')
                </div>
                <div class="col-auto text-right">
                    <a href="{{ route('vzdelavanie.testy.zoznam') }}" class="btn btn-primary">Spustenie testu</a>
                </div>
            </div>
        </div>
    </section>

    <section class="flush-with-above space-0">
        <div class="bg-white">
            <div class="container">
                <div class="row">
                    <div class="col">
                        <ul class="nav nav-tabs" role="tablist">
                            <li class="nav-item">
                                <a class="nav-link {{ request()->routeIs('vzdelavanie.testy.pouzivatela.historia') ? 'active' : '' }}" href="{{ route('vzdelavanie.testy.pouzivatela.historia') }}">Zoznam</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link @if(isset($testy) && $testy->isEmpty()) disabled @endif {{ request()->routeIs('vzdelavanie.testy.pouzivatela.graf') ? 'active' : '' }}" href="{{ route('vzdelavanie.testy.pouzivatela.graf') }}">Graf</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="flush-with-above height-80 d-block">
        <div class="tab-content">
            <div class="tab-pane fade show active" role="tabpanel">
                <div class="container">
                    @hasrole('spravca_pek')
                    <div class="row">
                        <div class="col-12">
                            <div class="alert alert-primary text-small">
                                <i class="icon-info mr-2"></i>
                                <span>Správca pracoviska má prístup k histórii všetkých testov spustených študentami z jeho pracoviska.</span>
                            </div>
                        </div>
                    </div>
                    @endhasrole
                    <div class="row">
                        <div class="col">
                            @yield('historia_testov_pouzivatela_graf')
                            @yield('historia_testov_pouzivatela_zoznam')
                        </div>
                    </div>
                    @yield('historia_testov_pouzivatela_zoznam_strankovanie')
                </div>
            </div>
        </div>
    </section>
@endsection