add Aircraft CRUD
This commit is contained in:
24
resources/views/admin/aircraft/create.blade.php
Normal file
24
resources/views/admin/aircraft/create.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Aircraft
|
||||
</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
@include('adminlte-templates::common.errors')
|
||||
<div class="box box-primary">
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
{!! Form::open(['route' => 'admin.aircraft.store']) !!}
|
||||
|
||||
@include('admin.aircraft.fields')
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
23
resources/views/admin/aircraft/edit.blade.php
Normal file
23
resources/views/admin/aircraft/edit.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Aircraft
|
||||
</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
@include('adminlte-templates::common.errors')
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
{!! Form::model($aircraft, ['route' => ['admin.aircraft.update', $aircraft->id], 'method' => 'patch']) !!}
|
||||
|
||||
@include('admin.aircraft.fields')
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
38
resources/views/admin/aircraft/fields.blade.php
Normal file
38
resources/views/admin/aircraft/fields.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<!-- ICAO Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('icao', 'ICAO:') !!}
|
||||
{!! Form::text('icao', null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('name', 'Name:') !!}
|
||||
{!! Form::text('name', null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
|
||||
<!-- Full Name Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('full_name', 'Full Name:') !!}
|
||||
{!! Form::text('full_name', null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
|
||||
<!-- Registration Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('registration', 'Registration:') !!}
|
||||
{!! Form::text('registration', null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('active', 'Active:') !!}
|
||||
<label class="checkbox-inline">
|
||||
{!! Form::hidden('active', false) !!}
|
||||
{!! Form::checkbox('active', '1', null) !!} 1
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
|
||||
<a href="{!! route('admin.aircraft.index') !!}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
23
resources/views/admin/aircraft/index.blade.php
Normal file
23
resources/views/admin/aircraft/index.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1 class="pull-left">Aircraft</h1>
|
||||
<h1 class="pull-right">
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{!! route('admin.aircraft.create') !!}">Add New</a>
|
||||
</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="clearfix"></div>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
@include('admin.aircraft.table')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
19
resources/views/admin/aircraft/show.blade.php
Normal file
19
resources/views/admin/aircraft/show.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Aircraft
|
||||
</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row" style="padding-left: 20px">
|
||||
@include('admin.aircraft.show_fields')
|
||||
<a href="{!! route('admin.aircraft.index') !!}" class="btn btn-default">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
48
resources/views/admin/aircraft/show_fields.blade.php
Normal file
48
resources/views/admin/aircraft/show_fields.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<!-- Id Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('id', 'ID:') !!}
|
||||
<p>{!! $aircraft->id !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Icao Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('icao', 'ICAO:') !!}
|
||||
<p>{!! $aircraft->icao !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('name', 'Name:') !!}
|
||||
<p>{!! $aircraft->name !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Full Name Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('full_name', 'Full Name:') !!}
|
||||
<p>{!! $aircraft->full_name !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Registration Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('registration', 'Registration:') !!}
|
||||
<p>{!! $aircraft->registration !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('active', 'Active:') !!}
|
||||
<p>{!! $aircraft->active !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Created At Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('created_at', 'Created At:') !!}
|
||||
<p>{!! $aircraft->created_at !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Updated At Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('updated_at', 'Updated At:') !!}
|
||||
<p>{!! $aircraft->updated_at !!}</p>
|
||||
</div>
|
||||
|
||||
28
resources/views/admin/aircraft/table.blade.php
Normal file
28
resources/views/admin/aircraft/table.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<table class="table table-responsive" id="aircrafts-table">
|
||||
<thead>
|
||||
<th>ICAO</th>
|
||||
<th>Name</th>
|
||||
<th>Registration</th>
|
||||
<th>Active</th>
|
||||
<th colspan="3">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($aircraft as $ac)
|
||||
<tr>
|
||||
<td>{!! $ac->icao !!}</td>
|
||||
<td>{!! $ac->name !!}</td>
|
||||
<td>{!! $ac->registration !!}</td>
|
||||
<td>{!! $ac->active !!}</td>
|
||||
<td>
|
||||
{!! Form::open(['route' => ['admin.aircraft.destroy', $ac->id], 'method' => 'delete']) !!}
|
||||
<div class='btn-group'>
|
||||
<a href="{!! route('admin.aircraft.show', [$ac->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
|
||||
<a href="{!! route('admin.aircraft.edit', [$ac->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user