Add AirspaceMap widget; airport overview page
This commit is contained in:
@@ -16,10 +16,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.flights.edit', [$flight->id]) }}">
|
||||
{{ $flight->airline->code }}{{ $flight->flight_number }}
|
||||
@if($flight->route_code)
|
||||
(C: {{ $flight->route_code }} L: {{ $flight->route_leg }})
|
||||
@endif
|
||||
{{$flight->ident}}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $flight->dpt_airport->icao }}</td>
|
||||
|
||||
34
resources/views/layouts/default/airports/show.blade.php
Normal file
34
resources/views/layouts/default/airports/show.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@extends('app')
|
||||
@section('title', $airport->full_name)
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2 class="description">{{ $airport->full_name }}</h2>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ Widget::airspaceMap([
|
||||
'width' => '100%',
|
||||
'height' => '250px',
|
||||
'lat' => $airport->lat,
|
||||
'lon' => $airport->lon,
|
||||
]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="description">Inbound Flights</h3>
|
||||
@if(!$inbound_flights)
|
||||
<div class="mini-splash">
|
||||
no flights found
|
||||
</div>
|
||||
@else
|
||||
@each('airports.table', $inbound_flights, 'flight')
|
||||
@endif
|
||||
|
||||
<h3 class="description">Outbound Flights</h3>
|
||||
@each('airports.table', $outbound_flights, 'flight')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
19
resources/views/layouts/default/airports/table.blade.php
Normal file
19
resources/views/layouts/default/airports/table.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('frontend.flights.show', [$flight->id]) }}">
|
||||
{{ $flight->ident }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $flight->dpt_airport->icao }}</td>
|
||||
<td>
|
||||
{{ $flight->arr_airport->icao }}
|
||||
@if($flight->alt_airport)
|
||||
(Alt: {{ $flight->alt_airport->icao }})
|
||||
@endif
|
||||
</td>
|
||||
{{--<td>{{ $flight->route }}</td>--}}
|
||||
<td>{{ $flight->dpt_time }}</td>
|
||||
<td>{{ $flight->arr_time }}</td>
|
||||
<td>{{ $flight->notes }}</td>
|
||||
</table>
|
||||
@@ -0,0 +1,10 @@
|
||||
<div id="map" style="width: {{ $config['width'] }}; height: {{ $config['height'] }}"></div>
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
phpvms.map.render_airspace_map({
|
||||
lat: "{{$config['lat']}}",
|
||||
lon: "{{$config['lon']}}",
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user