Skip to content

Commit

Permalink
Fix extra closing div on YesNo result template
Browse files Browse the repository at this point in the history
  • Loading branch information
VesterDe committed Jul 11, 2024
1 parent 3b8eeeb commit 026ef55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/BallotComponents/ApprovalVote/v1/result.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@foreach ($result['state'] as $option => $votes)
<div
class="flex flex-row {{ count($result['winners']) > 1 && in_array($option, $result['winners']) ? 'bg-yellow-100' : '' }}{{ in_array($option, $result['winners']) ? 'winner bg-green-200' : '' }}">
class="flex flex-row {{ count($result['winners']) > 1 && in_array($option, $result['winners']) ? 'bg-yellow-100' : '' }}{{ in_array($option, $result['winners']) ? ' winner bg-green-200' : '' }}">
<x-ballot-results-table-row>
{{ $option === 'abstain' ? __('components.fptp.abstain') : $option }}
</x-ballot-results-table-row>
Expand All @@ -26,4 +26,4 @@ class="flex flex-row {{ count($result['winners']) > 1 && in_array($option, $resu
<div class="p-4 text-center block mt-6 bg-yellow-200">
{{ __('components.fptp.tie') }} {{ implode(', ', $result['winners']) }}
</div>
@endif
@endif
3 changes: 1 addition & 2 deletions app/BallotComponents/YesNo/v1/result.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ class="flex flex-row {{ count($result['winners']) > 1 && in_array($option, $resu
{{ round(($votes / $result['total_votes']) * 100, 2) }}
</x-ballot-results-table-row>
</div>
</div>
@endforeach
</x-ballot-results-table>

@if ($result['winner'] === 'tie')
<div class="p-4 text-center block mt-6 bg-yellow-200">
{{ __('components.yesno.tie') }}
</div>
@endif
@endif
2 changes: 1 addition & 1 deletion resources/views/ballot-result.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
<span class="mx-auto">No components!</span>
@endif
</x-ballot-wrapper>
@endsection
@endsection

0 comments on commit 026ef55

Please sign in to comment.