#32 subfleet classificiation scaffolding
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<section class="content-header">
|
||||
<h1 class="pull-left">Aircraft</h1>
|
||||
<h1 class="pull-right">
|
||||
<a class="btn btn-primary " style="margin-top: -8px;" href="{!! url('/admin/aircraftclasses') !!}">Aircraft Classes</a>
|
||||
<a class="btn btn-primary " style="margin-top: -8px;" href="{!! url('/admin/subfleets') !!}">Subfleets</a>
|
||||
|
||||
<a class="btn btn-primary " style="margin-top: -8px;" href="{!! route('admin.aircraft.create') !!}">Add New Aircraft</a>
|
||||
</h1>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
|
||||
<a href="{!! route('admin.aircraftClasses.index') !!}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
@@ -1,36 +0,0 @@
|
||||
<!-- Id Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('id', 'Id:') !!}
|
||||
<p>{!! $aircraftClass->id !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Class Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('class', 'Class:') !!}
|
||||
<p>{!! $aircraftClass->class !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('name', 'Name:') !!}
|
||||
<p>{!! $aircraftClass->name !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('notes', 'Notes:') !!}
|
||||
<p>{!! $aircraftClass->notes !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Created At Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('created_at', 'Created At:') !!}
|
||||
<p>{!! $aircraftClass->created_at !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Updated At Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('updated_at', 'Updated At:') !!}
|
||||
<p>{!! $aircraftClass->updated_at !!}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<table class="table table-responsive" id="aircraftClasses-table">
|
||||
<thead>
|
||||
<th>Class</th>
|
||||
<th>Name</th>
|
||||
<th>Notes</th>
|
||||
<th colspan="3">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($aircraftClasses as $aircraftClass)
|
||||
<tr>
|
||||
<td>{!! $aircraftClass->class !!}</td>
|
||||
<td>{!! $aircraftClass->name !!}</td>
|
||||
<td>{!! $aircraftClass->notes !!}</td>
|
||||
<td>
|
||||
{!! Form::open(['route' => ['admin.aircraftClasses.destroy', $aircraftClass->id], 'method' => 'delete']) !!}
|
||||
<div class='btn-group'>
|
||||
<a href="{!! route('admin.aircraftClasses.show', [$aircraftClass->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
|
||||
<a href="{!! route('admin.aircraftClasses.edit', [$aircraftClass->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>
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Aircraft Classes
|
||||
</h1>
|
||||
<h1>Add Subfleet</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
@include('adminlte-templates::common.errors')
|
||||
@@ -12,9 +10,9 @@
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
{!! Form::open(['route' => 'admin.aircraftClasses.store']) !!}
|
||||
{!! Form::open(['route' => 'admin.subfleets.store']) !!}
|
||||
|
||||
@include('admin.aircraft_classes.fields')
|
||||
@include('admin.subfleets.fields')
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@@ -2,22 +2,20 @@
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Aircraft Class
|
||||
</h1>
|
||||
<h1>Edit {!! $subfleet->name !!}</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
@include('adminlte-templates::common.errors')
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
{!! Form::model($aircraftClass, ['route' => ['admin.aircraftClasses.update', $aircraftClass->id], 'method' => 'patch']) !!}
|
||||
{!! Form::model($subfleet, ['route' => ['admin.subfleets.update', $subfleet->id], 'method' => 'patch']) !!}
|
||||
|
||||
@include('admin.aircraft_classes.fields')
|
||||
@include('admin.subfleets.fields')
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
23
resources/views/admin/subfleets/fields.blade.php
Normal file
23
resources/views/admin/subfleets/fields.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<!-- Airline Id Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('airline_id', 'Airline Id:') !!}
|
||||
{!! Form::select('airline_id', $airlines, 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>
|
||||
|
||||
<!-- Type Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('type', 'Type:') !!}
|
||||
{!! Form::text('type', null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
|
||||
<a href="{!! route('admin.subfleets.index') !!}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
@@ -1,10 +1,10 @@
|
||||
@extends('layouts.app')
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1 class="pull-left">Aircraft Classes</h1>
|
||||
<h1 class="pull-left">Subfleets</h1>
|
||||
<h1 class="pull-right">
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{!! route('admin.aircraftClasses.create') !!}">Add New</a>
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{!! route('admin.subfleets.create') !!}">Add New</a>
|
||||
</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="clearfix"></div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
@include('admin.aircraft_classes.table')
|
||||
@include('admin.subfleets.table')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,17 +1,15 @@
|
||||
@extends('layouts.app')
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Aircraft Class
|
||||
</h1>
|
||||
<h1>{!! $subfleet->name !!}</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row" style="padding-left: 20px">
|
||||
@include('admin.aircraft_classes.show_fields')
|
||||
<a href="{!! route('admin.aircraftClasses.index') !!}" class="btn btn-default">Back</a>
|
||||
@include('admin.subfleets.show_fields')
|
||||
<a href="{!! route('admin.subfleets.index') !!}" class="btn btn-default">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
31
resources/views/admin/subfleets/show_fields.blade.php
Normal file
31
resources/views/admin/subfleets/show_fields.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- Id Field -->
|
||||
<!-- Airline Id Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('airline_id', 'Airline Id:') !!}
|
||||
<p>{!! $subfleet->airline->name !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('name', 'Name:') !!}
|
||||
<p>{!! $subfleet->name !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Type Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('type', 'Type:') !!}
|
||||
<p>{!! $subfleet->type !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Created At Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('created_at', 'Created At:') !!}
|
||||
<p>{!! $subfleet->created_at !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Updated At Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('updated_at', 'Updated At:') !!}
|
||||
<p>{!! $subfleet->updated_at !!}</p>
|
||||
</div>
|
||||
|
||||
26
resources/views/admin/subfleets/table.blade.php
Normal file
26
resources/views/admin/subfleets/table.blade.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<table class="table table-responsive" id="subfleets-table">
|
||||
<thead>
|
||||
<th>Airline</th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th colspan="3">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($subfleets as $subfleet)
|
||||
<tr>
|
||||
<td>{!! $subfleet->airline->name !!}</td>
|
||||
<td>{!! $subfleet->name !!}</td>
|
||||
<td>{!! $subfleet->type !!}</td>
|
||||
<td>
|
||||
{!! Form::open(['route' => ['admin.subfleets.destroy', $subfleet->id], 'method' => 'delete']) !!}
|
||||
<div class='btn-group'>
|
||||
<a href="{!! route('admin.subfleets.show', [$subfleet->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
|
||||
<a href="{!! route('admin.subfleets.edit', [$subfleet->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