Snapshot of main at 9f39a6e1e (2026-11-02)
This commit is contained in:
commit
6ccf1792d7
2580 files changed
+1040202
No files matched your search
@@ -0,0 +1,89 @@
|
||||
<div class="space-y-6">
|
||||
@if ($results['may_export'])
|
||||
<div class="flex justify-end">
|
||||
<a href="{{ route('polls.export', $editingPoll) }}"
|
||||
class="inline-flex items-center rounded-md border border-theme-border bg-theme-background px-4 py-2 text-sm text-theme-primary shadow-sm hover:bg-theme-surface">
|
||||
<x-icon class="mr-2 h-5 w-5" name="arrow-down-tray" />
|
||||
{{ __('Download CSV') }}
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Verification state -->
|
||||
<div class="p-3 bg-theme-surface rounded-md border border-theme-border">
|
||||
<p class="text-sm text-theme-primary">
|
||||
<strong>{{ __('Ballot ledger') }}:</strong>
|
||||
@if ($results['chain']['valid'])
|
||||
{{ __('intact') }} ({{ trans_choice(':count entry|:count entries', $results['chain']['entries'], ['count' => $results['chain']['entries']]) }})
|
||||
@else
|
||||
<span class="text-red-600">{{ __('broken at entry :sequence', ['sequence' => $results['chain']['broken_at']]) }}</span>
|
||||
@endif
|
||||
</p>
|
||||
<p class="text-sm text-theme-secondary mt-1">
|
||||
{{ __('Votes recorded: :votes. Ballots counted in the ledger: :ballots.', ['votes' => $results['response_count'], 'ballots' => $results['active_ballots']]) }}
|
||||
@if ($results['response_count'] !== $results['active_ballots'])
|
||||
<span class="text-red-600">{{ __('These numbers should be equal.') }}</span>
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Results per question -->
|
||||
@foreach ($results['questions'] as $question)
|
||||
@if ($registry->has($question->type))
|
||||
@php($type = $registry->get($question->type))
|
||||
<div wire:key="poll-admin-results-{{ $question->id }}">
|
||||
<p class="mb-2 text-sm font-semibold text-theme-primary">{{ $question->labelFor($locale) }}</p>
|
||||
@include($type->resultsView(), [
|
||||
'type' => $type,
|
||||
'question' => $question,
|
||||
'settings' => $question->settings ?? [],
|
||||
'summary' => $results['summaries'][$question->id],
|
||||
'locale' => $locale,
|
||||
])
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<!-- Voters -->
|
||||
<div>
|
||||
<p class="mb-2 text-sm font-semibold text-theme-primary">{{ __('Voters') }}</p>
|
||||
@if ($editingPoll->anonymous)
|
||||
<p class="text-sm text-theme-secondary">{{ __('This poll is anonymous: voters are not shown.') }}</p>
|
||||
@elseif (!$results['may_export'])
|
||||
<p class="text-sm text-theme-secondary">{{ __('Who voted is shown to admins with the poll export permission.') }}</p>
|
||||
@elseif ($results['voters']->isEmpty())
|
||||
<p class="text-sm text-theme-secondary">{{ __('No votes yet.') }}</p>
|
||||
@else
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-gray-200 text-sm">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">{{ __('Profile') }}</th>
|
||||
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">{{ __('Submitted by') }}</th>
|
||||
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">{{ __('Voted') }}</th>
|
||||
<th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">{{ __('Changed') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
@foreach ($results['voters'] as $response)
|
||||
<tr wire:key="poll-voter-{{ $response->id }}">
|
||||
<td class="px-3 py-2 text-gray-900">
|
||||
{{ $response->voter?->name ?? __('Deleted profile') }}
|
||||
<span class="text-xs text-gray-500">({{ __(class_basename($response->voter_type)) }})</span>
|
||||
</td>
|
||||
<td class="px-3 py-2 text-gray-500">{{ $response->user?->name }}</td>
|
||||
<td class="px-3 py-2 text-gray-500 whitespace-nowrap">{{ $response->submitted_at->locale($locale)->isoFormat('lll') }}</td>
|
||||
<td class="px-3 py-2 text-gray-500 whitespace-nowrap">
|
||||
{{ $response->updated_at && $response->updated_at->gt($response->submitted_at->copy()->addSecond()) ? $response->updated_at->locale($locale)->isoFormat('lll') : '-' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($results['response_count'] > $results['voters']->count())
|
||||
<p class="mt-2 text-xs text-theme-secondary">{{ __('Showing the latest :count voters.', ['count' => $results['voters']->count()]) }}</p>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user