phpvms/resources/views/admin/aircraft/table.blade.php

48 lines
2.1 KiB
PHP
Raw Normal View History

2017-08-24 03:59:15 +08:00
<table class="table table-hover table-responsive" id="aircrafts-table">
2017-06-09 09:37:51 +08:00
<thead>
2017-06-25 03:00:56 +08:00
<th>Name</th>
2018-02-13 00:26:27 +08:00
<th>Subfleet</th>
2018-01-12 12:00:39 +08:00
{{--<th style="text-align: center;">ICAO</th>--}}
2018-01-04 02:41:01 +08:00
<th style="text-align: center;">Registration</th>
2018-01-12 12:00:39 +08:00
<th style="text-align: center;">Hours</th>
<th style="text-align: center;">Active</th>
2017-08-24 03:59:15 +08:00
<th style="text-align: right;"></th>
2017-06-09 09:37:51 +08:00
</thead>
<tbody>
@foreach($aircraft as $ac)
<tr>
2018-02-13 00:26:27 +08:00
<td><a href="{!! route('admin.aircraft.edit', [$ac->id]) !!}">{!! $ac->name !!}</a></td>
<td>
@if($ac->subfleet_id && $ac->subfleet)
<a href="{!! route('admin.subfleets.edit', [$ac->subfleet_id]) !!}">
{!! $ac->subfleet->name !!}
</a>
@else
-
@endif
</td>
2018-01-04 02:41:01 +08:00
<td style="text-align: center;">{!! $ac->icao !!}</td>
2018-01-12 12:00:39 +08:00
{{--<td style="text-align: center;">{!! $ac->registration !!}</td>--}}
<td style="text-align: center;">
{!! Utils::minutesToTimeString($ac->flight_hours) !!}
</td>
<td style="text-align: center;">
2018-02-23 04:59:09 +08:00
@if($ac->active == GenericState::ACTIVE)
<span class="label label-success">{!! GenericState::label($ac->active); !!}</span>
@else
<span class="label label-default">Inactive</span>
@endif
</td>
<td style="width: 10%; text-align: right;">
2017-06-09 09:37:51 +08:00
{!! Form::open(['route' => ['admin.aircraft.destroy', $ac->id], 'method' => 'delete']) !!}
<a href="{!! route('admin.aircraft.edit', [$ac->id]) !!}" class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i>
</a>
{!! Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) !!}
2017-06-09 09:37:51 +08:00
{!! Form::close() !!}
</td>
</tr>
@endforeach
</tbody>
</table>