cleanup aircraft table/repo

This commit is contained in:
Nabeel Shahzad
2017-06-24 14:00:56 -05:00
parent fe1100e57f
commit 5dce55b4f3
11 changed files with 23 additions and 61 deletions

View File

@@ -1,9 +1,3 @@
<!-- ICAO Field -->
<div class="form-group col-sm-6">
{!! Form::label('icao', 'ICAO:') !!} (<a class="small" href="https://www.icao.int/publications/DOC8643/Pages/Search.aspx" target="_blank">find</a>)
{!! Form::text('icao', null, ['class' => 'form-control']) !!}
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}

View File

@@ -2,13 +2,12 @@
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{!! Form::label('icao', 'ICAO') !!}</h3>
<h3 class="box-title">{!! Form::label('airport_id', 'Location') !!}</h3>
</div>
<div class="box-body">
<p class="lead">{!! $aircraft->icao !!}
@if($aircraft->subfleet)
/{!! $aircraft->subfleet->name !!}</p>
<p class="lead">
@if($aircraft->airport)
{!! $aircraft->airport->icao !!}</p>
@endif
</div>
</div>

View File

@@ -1,8 +1,7 @@
<table class="table table-responsive" id="aircrafts-table">
<thead>
<th>ICAO</th>
<th>Name</th>
<th>Subfleet</th>
<th>Name</th>
<th>Registration</th>
<th style="text-align: center;">Active</th>
<th style="text-align: center;">Actions</th>
@@ -10,15 +9,14 @@
<tbody>
@foreach($aircraft as $ac)
<tr>
<td><a href="{!! route('admin.aircraft.show', [$ac->id]) !!}">{!! $ac->icao !!}</a></td>
<td>{!! $ac->name !!}</td>
<td>
@if($ac->subfleet)
@if($ac->subfleet_id)
{!! $ac->subfleet->name !!}
@else
-
@endif
</td>
<td><a href="{!! route('admin.aircraft.show', [$ac->id]) !!}">{!! $ac->name !!}</a></td>
<td>{!! $ac->registration !!}</td>
<td style="text-align: center;">
<i class="fa fa-{{$ac->active == 1?"check":""}}-square-o" aria-hidden="true"