2018-03-28 00:40:37 +08:00
|
|
|
@extends('app')
|
|
|
|
@section('title', $airport->full_name)
|
|
|
|
|
|
|
|
@section('content')
|
2018-04-03 01:55:37 +08:00
|
|
|
<div class="row" style="margin-bottom: 30px;">
|
2018-04-01 04:57:30 +08:00
|
|
|
<div class="col-12">
|
2018-04-04 08:21:42 +08:00
|
|
|
<h2>{{ $airport->full_name }}</h2>
|
2018-03-28 00:40:37 +08:00
|
|
|
</div>
|
2018-04-01 04:57:30 +08:00
|
|
|
|
2018-04-03 01:55:37 +08:00
|
|
|
{{-- Show the weather widget in one column --}}
|
|
|
|
<div class="col-5">
|
2018-04-03 11:35:25 +08:00
|
|
|
{{ Widget::Weather([
|
2018-04-01 04:57:30 +08:00
|
|
|
'icao' => $airport->icao,
|
|
|
|
]) }}
|
|
|
|
</div>
|
2018-04-03 01:55:37 +08:00
|
|
|
|
|
|
|
{{-- Show the airspace map in the other column --}}
|
2018-04-01 04:57:30 +08:00
|
|
|
<div class="col-7">
|
2018-04-03 11:35:25 +08:00
|
|
|
{{ Widget::AirspaceMap([
|
2018-03-28 00:40:37 +08:00
|
|
|
'width' => '100%',
|
2018-04-01 04:57:30 +08:00
|
|
|
'height' => '400px',
|
2018-03-28 00:40:37 +08:00
|
|
|
'lat' => $airport->lat,
|
|
|
|
'lon' => $airport->lon,
|
|
|
|
]) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-04 08:21:42 +08:00
|
|
|
<div class="row">
|
2018-04-03 01:55:37 +08:00
|
|
|
{{-- There are files uploaded and a user is logged in--}}
|
2018-04-04 08:21:42 +08:00
|
|
|
@if(count($airport->files) > 0 && Auth::check())
|
2018-04-03 01:55:37 +08:00
|
|
|
<div class="col-12">
|
2018-04-04 08:21:42 +08:00
|
|
|
<h3>Downloads</h3>
|
2018-04-03 11:35:25 +08:00
|
|
|
@include('downloads.table', ['files' => $airport->files])
|
2018-04-03 01:55:37 +08:00
|
|
|
</div>
|
|
|
|
@endif
|
2018-04-01 04:57:30 +08:00
|
|
|
</div>
|
2018-04-04 08:21:42 +08:00
|
|
|
|
2018-03-28 00:40:37 +08:00
|
|
|
<div class="row">
|
2018-04-04 08:21:42 +08:00
|
|
|
<div class="col-6">
|
|
|
|
<h5>Inbound Flights</h5>
|
2018-03-28 00:40:37 +08:00
|
|
|
@if(!$inbound_flights)
|
2018-04-03 01:55:37 +08:00
|
|
|
<div class="jumbotron text-center">
|
2018-03-28 00:40:37 +08:00
|
|
|
no flights found
|
|
|
|
</div>
|
|
|
|
@else
|
2018-04-04 08:21:42 +08:00
|
|
|
<table class="table table-striped table-condensed">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="text-left">Ident</th>
|
|
|
|
<th class="text-left">From</th>
|
|
|
|
<th>Departure</th>
|
|
|
|
<th>Arrival</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
@foreach($inbound_flights as $flight)
|
|
|
|
<tr>
|
|
|
|
<td class="text-left">
|
|
|
|
<a href="{{ route('frontend.flights.show', [$flight->id]) }}">
|
|
|
|
{{ $flight->ident }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="text-left">{{ $flight->dpt_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show',
|
|
|
|
['id'=>$flight->dpt_airport->icao])}}">{{$flight->dpt_airport->icao}}</a>)
|
|
|
|
</td>
|
|
|
|
<td>{{ $flight->dpt_time }}</td>
|
|
|
|
<td>{{ $flight->arr_time }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
2018-03-28 00:40:37 +08:00
|
|
|
@endif
|
2018-04-04 08:21:42 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-6">
|
|
|
|
<h5>Outbound Flights</h5>
|
2018-04-03 01:55:37 +08:00
|
|
|
@if(!$outbound_flights)
|
|
|
|
<div class="jumbotron text-center">
|
|
|
|
no flights found
|
|
|
|
</div>
|
|
|
|
@else
|
2018-04-04 08:21:42 +08:00
|
|
|
<table class="table table-striped table-condensed">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="text-left">Ident</th>
|
|
|
|
<th class="text-left">To</th>
|
|
|
|
<th>Departure</th>
|
|
|
|
<th>Arrival</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
@foreach($outbound_flights as $flight)
|
|
|
|
<tr>
|
|
|
|
<td class="text-left">
|
|
|
|
<a href="{{ route('frontend.flights.show', [$flight->id]) }}">
|
|
|
|
{{ $flight->ident }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="text-left">{{ $flight->arr_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show',
|
|
|
|
['id'=>$flight->arr_airport->icao])}}">{{$flight->arr_airport->icao}}</a>)
|
|
|
|
</td>
|
|
|
|
<td>{{ $flight->dpt_time }}</td>
|
|
|
|
<td>{{ $flight->arr_time }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
2018-04-03 01:55:37 +08:00
|
|
|
@endif
|
2018-03-28 00:40:37 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|