phpvms/resources/views/admin/aircraft/table.blade.php
B.Fatih KOZ c45d52dffa
Aircraft level Hub definitions (#1363)
* Aircraft level Hub definitions

* Add ability to define a hub for an aircraft apart from its subfleet.

* Update csv import/export capability for hub_id field

* Fix importertest source csv

* Fix source csv for updating too

* Update aircraft_empty_cols.csv

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-11-30 14:54:29 -05:00

52 lines
2.0 KiB
PHP

<table class="table table-hover table-responsive" id="aircrafts-table">
<thead>
<th>Name</th>
<th style="text-align: center;">Registration</th>
<th>Subfleet</th>
<th style="text-align: center;">Hub</th>
<th style="text-align: center;">Location</th>
<th style="text-align: center;">Hours</th>
<th style="text-align: center;">Active</th>
<th style="text-align: right;"></th>
</thead>
<tbody>
@foreach($aircraft as $ac)
<tr>
<td><a href="{{ route('admin.aircraft.edit', [$ac->id]) }}">{{ $ac->name }}</a></td>
<td style="text-align: center;">{{ $ac->registration }}</td>
<td>
@if($ac->subfleet_id && $ac->subfleet)
<a href="{{ route('admin.subfleets.edit', [$ac->subfleet_id]) }}">
{{ $ac->subfleet->name }}
</a>
@else
-
@endif
</td>
<td style="text-align: center;">{{ $ac->hub_id }}</td>
<td style="text-align: center;">{{ $ac->airport_id }}</td>
<td style="text-align: center;">
@minutestotime($ac->flight_time)
</td>
<td style="text-align: center;">
@if($ac->status == \App\Models\Enums\AircraftStatus::ACTIVE)
<span class="label label-success">{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}</span>
@else
<span class="label label-default">
{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}
</span>
@endif
</td>
<td style="width: 10%; text-align: right;">
{{ 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?')"]) }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>