2017-08-03 04:12:26 +08:00
|
|
|
@foreach($flights as $flight)
|
2019-10-30 01:03:04 +08:00
|
|
|
<div class="card border-blue-bottom">
|
2019-09-12 23:48:41 +08:00
|
|
|
<div class="card-body" style="min-height: 0">
|
2019-10-30 01:03:04 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-9">
|
|
|
|
<h5>
|
|
|
|
<a class="text-c" href="{{ route('frontend.flights.show', [$flight->id]) }}">
|
2020-02-15 07:54:05 +08:00
|
|
|
@if(optional($flight->airline)->logo)
|
|
|
|
<img src="{{ $flight->airline->logo }}" alt="{{$flight->airline->name}}"
|
|
|
|
style="max-width: 80px; width: 100%; height: auto;"/>
|
|
|
|
@endif
|
2019-10-30 01:03:04 +08:00
|
|
|
{{ $flight->ident }}
|
|
|
|
</a>
|
|
|
|
</h5>
|
|
|
|
</div>
|
2020-02-15 07:54:05 +08:00
|
|
|
<div class="col-sm-3 align-top text-right">
|
|
|
|
{{--
|
|
|
|
!!! NOTE !!!
|
|
|
|
Don't remove the "save_flight" class, or the x-id attribute.
|
|
|
|
It will break the AJAX to save/delete
|
2018-02-23 01:34:57 +08:00
|
|
|
|
2020-02-15 07:54:05 +08:00
|
|
|
"x-saved-class" is the class to add/remove if the bid exists or not
|
|
|
|
If you change it, remember to change it in the in-array line as well
|
2019-10-30 01:03:04 +08:00
|
|
|
--}}
|
2020-02-04 01:23:58 +08:00
|
|
|
@if (!setting('pilots.only_flights_from_current') || $flight->dpt_airport_id == Auth::user()->current_airport->icao)
|
2019-10-30 01:03:04 +08:00
|
|
|
<button class="btn btn-round btn-icon btn-icon-mini save_flight
|
|
|
|
{{ in_array($flight->id, $saved, true) ? 'btn-info':'' }}"
|
|
|
|
x-id="{{ $flight->id }}"
|
|
|
|
x-saved-class="btn-info"
|
|
|
|
type="button"
|
2019-11-06 00:44:31 +08:00
|
|
|
title="@lang('flights.addremovebid')">
|
2019-10-30 01:03:04 +08:00
|
|
|
<i class="fas fa-map-marker"></i>
|
|
|
|
</button>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-7">
|
|
|
|
{{--<table class="table-condensed"></table>--}}
|
|
|
|
<span class="title">{{ strtoupper(__('flights.dep')) }} </span>
|
2020-02-04 01:23:58 +08:00
|
|
|
{{ optional($flight->dpt_airport)->name ?? $flight->dpt_airport_id }}
|
2019-10-30 01:03:04 +08:00
|
|
|
(<a href="{{route('frontend.airports.show', [
|
2020-02-04 01:23:58 +08:00
|
|
|
'id' => $flight->dpt_airport_id
|
|
|
|
])}}">{{$flight->dpt_airport_id}}</a>)
|
2019-10-30 01:03:04 +08:00
|
|
|
@if($flight->dpt_time), {{ $flight->dpt_time }}@endif
|
|
|
|
<br/>
|
|
|
|
<span class="title">{{ strtoupper(__('flights.arr')) }} </span>
|
2020-02-04 01:23:58 +08:00
|
|
|
{{ optional($flight->arr_airport)->name ?? $flight->arr_airport_id }}
|
2019-10-30 01:03:04 +08:00
|
|
|
(<a href="{{route('frontend.airports.show', [
|
2020-02-04 01:23:58 +08:00
|
|
|
'id' => $flight->arr_airport_id
|
|
|
|
])}}">{{$flight->arr_airport_id}}</a>)
|
2019-10-30 01:03:04 +08:00
|
|
|
@if($flight->arr_time), {{ $flight->arr_time }}@endif
|
|
|
|
<br/>
|
|
|
|
@if($flight->distance)
|
|
|
|
<span class="title">{{ strtoupper(__('common.distance')) }} </span>
|
|
|
|
{{ $flight->distance }} {{ setting('units.distance') }}
|
|
|
|
@endif
|
|
|
|
<br/>
|
|
|
|
@if($flight->level)
|
|
|
|
<span class="title">{{ strtoupper(__('flights.level')) }} </span>
|
|
|
|
{{ $flight->level }} {{ setting('units.altitude') }}
|
|
|
|
@endif
|
2018-01-04 10:56:46 +08:00
|
|
|
</div>
|
2019-10-30 01:03:04 +08:00
|
|
|
<div class="col-sm-5">
|
|
|
|
@if($flight->route)
|
|
|
|
<span class="title">{{ strtoupper(__('flights.route')) }} </span>
|
|
|
|
{{ $flight->route }}
|
|
|
|
@endif
|
2017-08-03 04:12:26 +08:00
|
|
|
</div>
|
2019-10-30 01:03:04 +08:00
|
|
|
</div>
|
2019-11-06 00:44:31 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12 text-right">
|
2020-03-23 21:31:35 +08:00
|
|
|
@if ($simbrief !== false)
|
2020-03-27 23:49:19 +08:00
|
|
|
@if ($simbrief_bids === false || ($simbrief_bids === true && in_array($flight->id, $saved, true)))
|
|
|
|
<a href="{{ route('frontend.simbrief.generate') }}?flight_id={{ $flight->id }}"
|
|
|
|
class="btn btn-sm btn-outline-primary">
|
|
|
|
Create SimBrief Flight Plan
|
|
|
|
</a>
|
|
|
|
@endif
|
2020-03-23 21:31:35 +08:00
|
|
|
@endif
|
|
|
|
|
2019-11-06 00:44:31 +08:00
|
|
|
<a href="{{ route('frontend.pireps.create') }}?flight_id={{ $flight->id }}"
|
2020-03-23 21:31:35 +08:00
|
|
|
class="btn btn-sm btn-outline-info">
|
2019-11-06 00:44:31 +08:00
|
|
|
{{ __('pireps.newpirep') }}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-03 04:12:26 +08:00
|
|
|
</div>
|
2019-10-30 01:03:04 +08:00
|
|
|
</div>
|
2017-08-03 04:12:26 +08:00
|
|
|
|
|
|
|
@endforeach
|