{{-- resources/views/surveys/show.blade.php --}} @extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ __('labels.surveys') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => __('labels.surveys'), 'actionButton' => [ 'url' => route('surveys.index'), 'text' => __('labels.back_to_list'), ], ]) {{-- News Header --}}
{{--

{{ $survey->title }}

--}}

{{ $survey->title }}

{{-- Quick Actions --}}
@can('update', $survey) @endcan @can('delete', $survey) @endcan
{{-- METADATA CARDS --}}
{{-- Type Card --}} @include('components.form.view-timeline', [ 'started_at' => $survey->started_at, 'ended_at' => $survey->ended_at, ]) {{-- Status Card --}}
{{ __('labels.status') }}
{{ $survey->is_published ? __('labels.published') : __('labels.draft') }}
@if ($survey->description)
{{ __('labels.description') }}
{!! nl2br(e($survey->description)) !!}
@endif {{-- @if (!isset($survey) || (isset($survey) && Auth::user()->can('update', $survey))) @include('pages.surveys.templates.vote-option', [ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'voteOptions' => $voteOptions ?? [], ]) @endif --}} @if (isset($survey) && !isset($votingResults['userVote'])) @include('pages.surveys.templates.vote', [ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'voteOptions' => $voteOptions ?? [], 'votes' => $votes ?? [], 'hasVoted' => isset($votingResults['userVote']), ]) @endif @if (isset($survey) && (Auth::user()->can('update', $survey) || isset($votingResults['userVote']))) @include('pages.surveys.templates.vote-results', [ 'votingResults' => $votingResults ?? [], ]) @endif {{-- Attachments Section --}} @isset($survey->assets) @include('components.form.file-manager.uploaded-files', [ 'readonly' => isset($readonly) && $readonly, 'assets' => $survey->assets, ]) @endisset {{-- Groups Section --}} {{-- @include('components.form.view-selected-groups', [ 'groups' => $survey->groups, ]) --}} @include('components.meta.stats',[ 'created_at' => $survey->created_at ?? null, 'updated_at' => $survey->updated_at ?? null, 'published_at' => $survey->published_at ?? null, 'is_published' => $survey->is_published ?? null, 'creater' => $survey->author_name ?? null, ]) @endsection