phpvms/resources/views/layouts/default/airports/show.blade.php

109 lines
3.8 KiB
PHP
Raw Normal View History

@extends('app')
@section('title', $airport->full_name)
@section('content')
<div class="row" style="margin-bottom: 30px;">
<div class="col-12">
2018-04-04 08:21:42 +08:00
<h2>{{ $airport->full_name }}</h2>
</div>
{{-- Show the weather widget in one column --}}
<div class="col-5">
{{ Widget::Weather([
'icao' => $airport->icao,
]) }}
</div>
{{-- Show the airspace map in the other column --}}
<div class="col-7">
{{ Widget::AirspaceMap([
'width' => '100%',
'height' => '400px',
'lat' => $airport->lat,
'lon' => $airport->lon,
]) }}
</div>
</div>
2018-04-04 08:21:42 +08:00
<div class="row">
{{-- 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())
<div class="col-12">
2018-05-19 03:18:12 +08:00
<h3>{{ trans_choice('common.download', 2) }}</h3>
@include('downloads.table', ['files' => $airport->files])
</div>
@endif
</div>
2018-04-04 08:21:42 +08:00
<div class="row">
2018-04-04 08:21:42 +08:00
<div class="col-6">
2018-05-19 03:54:11 +08:00
<h5>@lang('airports.inboundflights')</h5>
@if(!$inbound_flights)
<div class="jumbotron text-center">
2018-05-19 03:54:11 +08:00
@lang('airports.noflightfound')
</div>
@else
2018-04-04 08:21:42 +08:00
<table class="table table-striped table-condensed">
<thead>
<tr>
2018-05-19 03:54:11 +08:00
<th class="text-left">@lang('airports.ident')</th>
2018-05-19 03:18:12 +08:00
<th class="text-left">@lang('common.from')</th>
<th>@lang('common.departure')</th>
<th>@lang('common.arrival')</th>
2018-04-04 08:21:42 +08:00
</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>
@endif
2018-04-04 08:21:42 +08:00
</div>
<div class="col-6">
2018-05-19 03:54:11 +08:00
<h5>@lang('airports.outboundflights')</h5>
@if(!$outbound_flights)
<div class="jumbotron text-center">
2018-05-19 03:54:11 +08:00
@lang('airports.noflightfound')
</div>
@else
2018-04-04 08:21:42 +08:00
<table class="table table-striped table-condensed">
<thead>
<tr>
2018-05-19 03:54:11 +08:00
<th class="text-left">@lang('airports.ident')</th>
2018-05-19 03:18:12 +08:00
<th class="text-left">@lang('common.to')</th>
<th>@lang('common.departure')</th>
<th>@lang('common.arrival')</th>
2018-04-04 08:21:42 +08:00
</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>
@endif
</div>
</div>
@endsection