87 lines
4.7 KiB
PHP
87 lines
4.7 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
@include('layouts.shared/title-meta', ['title' => "History"])
|
|
@include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
|
|
</head>
|
|
|
|
<body class="loading">
|
|
<div class="account-pages">
|
|
<div class="container">
|
|
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-8 p-2">
|
|
<h4 class="page-title">{{$formname}}</h4>
|
|
</div>
|
|
<div class="col-4 p-2">
|
|
<a href="/form/show" class="float-end pt-1">New Submission</a>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
@if(session()->has('message'))
|
|
<div class="alert alert-success">
|
|
{{ session()->get('message') }}
|
|
</div>
|
|
@endif
|
|
@if(session()->has('error'))
|
|
<div class="alert alert-danger">
|
|
{{ session()->get('error') }}
|
|
</div>
|
|
@endif
|
|
<div class="row">
|
|
<div class="col-12 p-0">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="responsive-table-plugin">
|
|
<div class="table-rep-plugin">
|
|
<div class="table-responsive" data-pattern="priority-columns">
|
|
<table id="tech-companies-1" class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th data-priority="1">Submission Date</th>
|
|
@foreach($questions as $code => $question)
|
|
<th data-priority="1">{{$question->label}}</th>
|
|
@endforeach
|
|
<th data-priority="1">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($submissions as $submission)
|
|
<tr>
|
|
<th>{{date("d M Y", strtotime($submission->updatedAt))}}</th>
|
|
@foreach($questions as $code => $question)
|
|
@if($question->type == 'file')
|
|
<td><a target="_blank" href="{{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) :(is_string($submission->formdata->{$code}) ? $submission->formdata->{$code} : '' ) : $code }}" download="{{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) : (is_string($submission->formdata->{$code}) ? $submission->formdata->{$code} : '' ) : $code }}" class="btn btn-dark btn-xs"><i class="mdi mdi-cloud-download me-1"></i> Download</a></td>
|
|
@elseif(count((array)$question->options) > 0 && 1==2 )
|
|
<td>{{ $question->options->{ $submission->formdata->{$code} } }}</td>
|
|
@else
|
|
<td>{{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) :$submission->formdata->{$code} : $code }}</td>
|
|
@endif
|
|
@endforeach
|
|
<th>
|
|
@if($question->can_edit == 'yes' || sizeof($submission->workflow_approvals) == 0 )
|
|
<a href="/form/show?id={{$submission->id}}" class="btn btn-primary btn-xs">Edit</button>
|
|
@endif
|
|
</th>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- end .table-responsive -->
|
|
|
|
</div> <!-- end .table-rep-plugin-->
|
|
</div> <!-- end .responsive-table-plugin-->
|
|
|
|
</div> <!-- end card body-->
|
|
</div> <!-- end card -->
|
|
</div><!-- end col-->
|
|
</div>
|
|
<!-- end row-->
|
|
</div> <!-- container -->
|
|
|
|
</div>
|
|
<!-- end page -->
|
|
@include('layouts.shared/footer-script')
|
|
</body>
|
|
</html> |