103 lines
3.1 KiB
PHP
Raw Normal View History

2020-05-07 00:36:33 +01:00
@extends('adminlte::page')
@section('title', config('app.name') . ' | ' . __('Available forms'))
2020-05-07 00:36:33 +01:00
@section('content_header')
<h4>{{__('Administration')}} / {{__('Forms')}}</h4>
2020-05-07 00:36:33 +01:00
@stop
@section('js')
<x-global-errors></x-global-errors>
2020-05-07 00:36:33 +01:00
@stop
@section('content')
<div class="row">
<div class="col">
<div class="card bg-gray-dark">
<div class="card-header bg-indigo">
<div class="card-title"><h4 class="text-bold">{{__('Available forms')}}</h4></div>
2020-05-07 00:36:33 +01:00
</div>
<div class="card-body">
@if(!$forms->isEmpty())
<table class="table table-active table-borderless" style="white-space: nowrap">
<thead>
<tr>
<th>#</th>
<th>{{__('Title')}}</th>
<th>{{__('Created at')}}</th>
<th>{{__('Updated at')}}</th>
<th>{{__('Actions')}}</th>
2020-05-07 00:36:33 +01:00
</tr>
</thead>
<tbody>
@foreach($forms as $form)
<tr>
<td>{{$form->id}}</td>
<td>{{$form->formName}}</td>
<td>{{$form->created_at}}</td>
<td>{{ $form->updated_at }}</td>
2020-05-07 00:36:33 +01:00
<td>
<form style="display: inline-block; white-space: nowrap" action="{{route('destroyForm', ['form' => $form->id])}}" method="POST">
2020-05-07 00:36:33 +01:00
@method('DELETE')
@csrf
<button type="submit" class="btn btn-sm btn-danger mr-2"><i class="fa fa-trash"></i> {{__('Delete')}}</button>
2020-05-07 00:36:33 +01:00
</form>
<button type="button" class="btn btn-sm btn-success" onclick="window.location.href='{{ route('previewForm', ['form' => $form->id]) }}'"><i class="fa fa-eye"></i> {{__('Preview form')}}</button>
2020-05-07 00:36:33 +01:00
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<div class="alert alert-warning">
{{__('Nothing to see here! Please add some forms first.')}}
2020-05-07 00:36:33 +01:00
</div>
@endif
</div>
<div class="card-footer">
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='{{route('showFormBuilder')}}'">{{__('NEW FORM')}}</button>
2020-05-07 00:36:33 +01:00
</div>
</div>
</div>
</div>
@stop
2020-07-16 06:46:20 +01:00
@section('footer')
@include('breadcrumbs.dashboard.footer')
@stop