{{-- «Рейтинг игр» (GameLeaderboardController) — this week's game points, in a group or school-wide, over all games or one. Same look as leaderboard/index (the hero XP rating); the «Игры» tab stays lit. --}} @extends('layouts.gamification') @section('title', __('Рейтинг игр')) @section('gami-active', 'games') @push('styles') @endpush @section('gami-content') @php $isAll = $selectedGroupId === null; $scope = $isAll ? 'all' : (int) $selectedGroupId; $url = fn ($groupScope, $gameKey) => '/games_leaderboard.php?'.http_build_query(array_filter(['group_id' => $groupScope, 'game' => $gameKey])); @endphp

🏆 {{ __('Рейтинг игр') }} · {{ __('за 7 дней') }}

{{ __('Все игры') }}

{{ __('Очки за раунд — правильные ответы × сложность (1–3). В зачёт идут лучшие :n раундов в каждой игре за день.', ['n' => \App\Services\GameLeaderboard::DAILY_ROUND_CAP]) }}

@foreach ($groups as $g) {{ $g->group_name }} @endforeach {{ __('🌍 Общий рейтинг') }}
{{ __('Все игры') }} @foreach (\App\Services\GameLeaderboard::games() as $key) {{ __(\App\Services\Duels::GAME_LABELS[$key]) }} @endforeach
@if (empty($rows))
{{ __('На этой неделе здесь ещё никто не набрал очков — будьте первым!') }}
@else @if ($isAll && count($rows) >= \App\Services\GameLeaderboard::TOP_ALL)
{{ __('Топ-:n учеников', ['n' => \App\Services\GameLeaderboard::TOP_ALL]) }}
@endif @foreach ($rows as $row) @include('games._leaderboard_row') @endforeach @if ($myRow)
⋯
@include('games._leaderboard_row', ['row' => $myRow]) @endif @endif
@endsection