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">
|
|
|
|
<a href="{{ route('frontend.pireps.create') }}?flight_id={{ $flight->id }}"
|
|
|
|
class="btn btn-sm btn-info">
|
|
|
|
{{ __('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
|