|
| 1 | +@extends('layouts.app') |
| 2 | + |
| 3 | +@section('meta-robots', 'nofollow, noindex') |
| 4 | +@section('title') |
| 5 | + {{ getTitleContent(__('solution.solution_for_title', ['exercise' => $currentExercise->getFullTitle()])) }} |
| 6 | +@endsection |
| 7 | +@section('description'){{ $user->id }} - {{ __('solution.code_review') }} - {{ $user->name }} - |
| 8 | +{{ __('solution.exercise') }} {{ $currentExercise->getFullTitle() }}@endsection |
| 9 | + |
| 10 | +@section('content') |
| 11 | + |
| 12 | +@auth |
| 13 | + <div class="d-flex flex-wrap justify-content-between mb-2 mb-lg-4"> |
| 14 | + <div class="h5"> |
| 15 | + <a href="{{ route('exercises.show', $currentExercise) }}"> |
| 16 | + {{ __('solution.exercise') }} {{ $currentExercise->getFullTitle() }} |
| 17 | + </div> |
| 18 | + <div class="h5"> |
| 19 | + <a href="{{ route('users.show', $user) }}">{{ $user->name }}</a> |
| 20 | + </div> |
| 21 | + </div> |
| 22 | + |
| 23 | + <h2 class="text-center">{{ __('solution.code_review') }}</h2> |
| 24 | + <div class="text-center h5">{{ __('solution.sub_title') }}</div> |
| 25 | + <hr> |
| 26 | + |
| 27 | + <div class="row no-gutters mb-3"> |
| 28 | + <div class="col-12 col-md-6 text-center"> |
| 29 | + <h5>{{ __('solution.title_output_solution') }}</h5> |
| 30 | + </div> |
| 31 | + @if ($solutionsOfOtherUsers->isNotEmpty()) |
| 32 | + <div class="col-12 col-md-6 text-center"> |
| 33 | + <h5>{{ __('solution.solutions_of_others') }}</h5> |
| 34 | + </div> |
| 35 | + @endif |
| 36 | + </div> |
| 37 | + |
| 38 | + <div class="row no-gutters"> |
| 39 | + <div class="col-12 col-md-6 p-2 p-lg-4"> |
| 40 | + <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist"> |
| 41 | + @foreach ($solutionsOfCurrentUser as $currentSolution) |
| 42 | + @if ($loop->first) |
| 43 | + <li class="nav-item" role="presentation"> |
| 44 | + <a class="nav-link active" id="pills-{{ $currentSolution->id }}-tab" data-bs-toggle="pill" |
| 45 | + href="#pills-{{ $currentSolution->id }}" role="tab" aria-controls="pills-{{ $currentSolution->id }}" |
| 46 | + aria-selected="true">v.{{ $loop->iteration }}</a> |
| 47 | + </li> |
| 48 | + @else |
| 49 | + <li class="nav-item" role="presentation"> |
| 50 | + <a class="nav-link" id="pills-{{ $currentSolution->id }}-tab" data-bs-toggle="pill" |
| 51 | + href="#pills-{{ $currentSolution->id }}" role="tab" aria-controls="pills-{{ $currentSolution->id }}" |
| 52 | + aria-selected="true">v.{{ $loop->iteration }}</a> |
| 53 | + </li> |
| 54 | + @endif |
| 55 | + @endforeach |
| 56 | + </ul> |
| 57 | + <div class="tab-content" id="pills-tabContent"> |
| 58 | + @foreach ($solutionsOfCurrentUser as $currentSolution) |
| 59 | + @if ($loop->first) |
| 60 | + <div class="tab-pane fade show active" id="pills-{{ $currentSolution->id }}" role="tabpanel" |
| 61 | + aria-labelledby="pills-{{ $currentSolution->id }}-tab"> |
| 62 | + @solution(['solution' => $currentSolution]) |
| 63 | + </div> |
| 64 | + @else |
| 65 | + <div class="tab-pane fade show" id="pills-{{ $currentSolution->id }}" role="tabpanel" |
| 66 | + aria-labelledby="pills-{{ $currentSolution->id }}-tab"> |
| 67 | + @solution(['solution' => $currentSolution]) |
| 68 | + </div> |
| 69 | + @endif |
| 70 | + @endforeach |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + |
| 74 | + @if ($solutionsOfOtherUsers->isNotEmpty()) |
| 75 | + <div class="col-12 col-md-6 p-2 p-lg-4"> |
| 76 | + <div class="border-start d-none d-md-block"></div> |
| 77 | + <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist"> |
| 78 | + @foreach ($solutionsOfOtherUsers as $currentSolution) |
| 79 | + @if ($loop->first) |
| 80 | + <li class="nav-item" role="presentation"> |
| 81 | + <a class="nav-link active" id="pills-{{ $currentSolution->id }}double-tab" data-bs-toggle="pill" |
| 82 | + href="#pills-{{ $currentSolution->id }}double" role="tab" |
| 83 | + aria-controls="pills-{{ $currentSolution->id }}double" |
| 84 | + aria-selected="true">v.{{ $loop->iteration }}</a> |
| 85 | + </li> |
| 86 | + @else |
| 87 | + <li class="nav-item" role="presentation"> |
| 88 | + <a class="nav-link" id="pills-{{ $currentSolution->id }}double-tab" data-bs-toggle="pill" |
| 89 | + href="#pills-{{ $currentSolution->id }}double" role="tab" |
| 90 | + aria-controls="pills-{{ $currentSolution->id }}double" |
| 91 | + aria-selected="true">v.{{ $loop->iteration }}</a> |
| 92 | + </li> |
| 93 | + @endif |
| 94 | + @endforeach |
| 95 | + </ul> |
| 96 | + <div class="tab-content" id="pills-tabContent"> |
| 97 | + @foreach ($solutionsOfOtherUsers as $currentSolution) |
| 98 | + @if ($loop->first) |
| 99 | + <div class="tab-pane fade show active" id="pills-{{ $currentSolution->id }}double" role="tabpanel" |
| 100 | + aria-labelledby="pills-{{ $currentSolution->id }}double-tab"> |
| 101 | + @solution(['solution' => $currentSolution]) |
| 102 | + </div> |
| 103 | + @else |
| 104 | + <div class="tab-pane fade show" id="pills-{{ $currentSolution->id }}double" role="tabpanel" |
| 105 | + aria-labelledby="pills-{{ $currentSolution->id }}double-tab"> |
| 106 | + @solution(['solution' => $currentSolution]) |
| 107 | + </div> |
| 108 | + @endif |
| 109 | + @endforeach |
| 110 | + </div> |
| 111 | + </div> |
| 112 | + @endif |
| 113 | + </div> |
| 114 | +@else |
| 115 | + <div class="text-center py-5"> |
| 116 | + <h3>{{ __('solution.login_to_view') }}</h3> |
| 117 | + <p class="text-muted">{{ __('solution.please_login_to_view_solution') }}</p> |
| 118 | + <a href="{{ route('login') }}" class="btn btn-primary mt-3"> |
| 119 | + {{ __('login.submit') }} |
| 120 | + </a> |
| 121 | + </div> |
| 122 | +@endauth |
| 123 | +@endsection |
0 commit comments