%PDF- %PDF-
Direktori : /www/loslex/test/resources/views/contests/results/ |
Current File : //www/loslex/test/resources/views/contests/results/overview.blade.php |
@php $first = true; @endphp <div class="text-lg text-center font-bold" id="anresults">{{__('Results')}}</div> <div class="mb-11 w-fit m-auto" id="resultsTabContents"> <!--Tabs navigation--> <ul class="list-none w-full flex flex-wrap text-sm font-medium text-center text-gray-500 border-b border-gray-200 dark:border-gray-700 dark:text-gray-400" data-tabs-toggle="#resultsTabContents" role="tablist"> @foreach($divisions as $division) <li class="mr-2" role="presentation"> <button class="inline-block text-gray-500 hover:text-gray-600 hover:border-gray-300 hover:dark:border-gray-600 rounded-t-lg py-4 px-4 text-sm font-medium text-center border-transparent border-b-2 dark:text-gray-400 dark:hover:text-gray-300" id="division-{{ $division->name }}-tab" data-tabs-target="#division-{{ $division->name }}" type="button" role="tab" aria-controls="division-{{ $division->name }}" aria-selected="false">{{ __("contest." . $division->name) }}</button> </li> @endforeach </ul> <!--Tabs content--> @foreach($divisions as $division) <div class="hidden p-4 rounded-lg" id="division-{{ $division->name }}" role="tabpanel" aria-labelledby="division-{{ $division->name }}-tab"> <table> <thead> <tr class="border-b border-gray-400"> <th class="text-center text-sm result-header"><span class="fa-solid fa-trophy"></th> @if($division->name == "All") <th class="result-header">{{ __("Division") }}</th> @endif <th class="result-header whitespace-nowrap">{{ __("Name") }}</th> <th class="result-header">{{ __("Total %") }}</th> @for($i = 1; $i <= $numStages; $i++) <th class="{{ $i % 2 ? 'result-odd': 'result-even' }}">Stage {{ $i }}</th> @endfor </tr> </thead> <tbody> @php $no = 1; @endphp @foreach($division->shooters as $sh) <tr> <td class="text-center result-header">{{ !($sh->notcomp || $sh->dq) ? $no++ : ($sh->dq ? __("DQ") : __("NC")) }}</td> @if($division->name == "All") <td class="result-header">{{ $sh->origDivision }}</td> @endif <td class="whitespace-nowrap result-header">@auth{{ $sh->name }}@else{{ $sh->anonname }}@endauth</td> <td @class(['result-header', 'text-center', 'result-best' => ($sh->percent == 100)])>{{ $sh->percent }}%</td> @for($i = 1; $i <= $numStages; $i++) <td @class(['text-center', 'result-odd' => $i % 2, 'result-even' => !($i % 2), 'result-best' => ($sh->stages[$i]->stage_percent == 100)])><span title="{{ number_format($sh->stages[$i]->total_time, 2) }}s">{{ number_format($sh->stages[$i]->stage_percent, 2) }}%</span></td> @endfor </tr> @endforeach </tbody> </table> </div> @endforeach @auth <div class="w-fit m-auto flex flex-row flex-wrap gap-4 justify-items-center"> <a href="{{route('contest.detailed-results', $contest->id)}}" target="_blank"><x-primary-button>{{ __('Display detailed results') }}</x-primary-button></a> <a href="{{route('contest.detailed-results', $contest->id)}}?print" target="_blank"><x-primary-button>{{ __('Download detailed PDF') }}</x-primary-button></a> <a href="{{route('contest.overview-results', $contest->id)}}?print" target="_blank"><x-primary-button>{{ __('Download overview PDF') }}</x-primary-button></a> @if (auth()->user()?->is_organizer_member($contest->organizer_group_id) || auth()->user()?->is_admin) <a href="{{route('contest.ceremonies', $contest->id)}}?print" target="_blank"><x-primary-button>{{ __('Download awards PDF') }}</x-primary-button></a> <a href="{{route('contest.publish-results', $contest->id)}}"> @if (!$contest->results_published) <x-danger-button>{{__('Publish results')}}</x-danger-button> @else <x-danger-button>{{__('Unpublish results')}}</x-danger-button> @endif </a> @endif </div> @endauth </div>