2017-08-03 04:12:26 +08:00
|
|
|
@foreach($flights as $flight)
|
2017-08-10 13:08:38 +08:00
|
|
|
<div class="card border-blue-bottom">
|
2018-02-23 01:34:57 +08:00
|
|
|
<div class="card-block" style="min-height: 0">
|
2017-08-03 04:12:26 +08:00
|
|
|
<div class="row">
|
2018-01-04 10:56:46 +08:00
|
|
|
<div class="col-sm-9">
|
2017-08-03 12:22:51 +08:00
|
|
|
<h5>
|
2018-03-13 06:58:12 +08:00
|
|
|
<a class="text-c" href="{{ route('frontend.flights.show', [$flight->id]) }}">
|
|
|
|
{{ $flight->ident }}
|
2017-08-03 12:22:51 +08:00
|
|
|
</a>
|
|
|
|
</h5>
|
2017-08-03 04:12:26 +08:00
|
|
|
</div>
|
2018-01-04 10:56:46 +08:00
|
|
|
<div class="col-sm-3 text-right">
|
2018-02-23 01:34:57 +08:00
|
|
|
{{-- NOTE:
|
|
|
|
Don't remove the "save_flight" class, or the x-id attribute.
|
|
|
|
It will break the AJAX to save/delete
|
|
|
|
|
|
|
|
"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
|
|
|
|
--}}
|
2018-05-19 06:55:08 +08:00
|
|
|
@if (!setting('pilots.only_flights_from_current') || $flight->dpt_airport->icao == Auth::user()->current_airport->icao)
|
2018-02-23 01:34:57 +08:00
|
|
|
<button class="btn btn-round btn-icon btn-icon-mini
|
2018-05-04 04:07:16 +08:00
|
|
|
{{ in_array($flight->id, $saved, true) ? 'btn-info':'' }}
|
|
|
|
save_flight"
|
2018-03-13 06:58:12 +08:00
|
|
|
x-id="{{ $flight->id }}"
|
2018-02-23 01:34:57 +08:00
|
|
|
x-saved-class="btn-info"
|
|
|
|
type="button"
|
2018-05-19 03:50:20 +08:00
|
|
|
title="@lang('flights.addremovebid')"
|
2018-02-23 01:34:57 +08:00
|
|
|
>
|
|
|
|
<i class="fas fa-map-marker"></i>
|
2017-08-03 12:22:51 +08:00
|
|
|
</button>
|
2018-05-19 06:55:08 +08:00
|
|
|
@endif
|
2017-08-03 12:22:51 +08:00
|
|
|
</div>
|
2018-01-04 10:56:46 +08:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2018-01-04 11:40:05 +08:00
|
|
|
<div class="col-sm-5">
|
2018-04-04 08:21:42 +08:00
|
|
|
{{--<table class="table-condensed"></table>--}}
|
2018-05-19 03:50:20 +08:00
|
|
|
<span class="title">{{ strtoupper(__('flights.dep')) }} </span>
|
2018-04-04 08:21:42 +08:00
|
|
|
{{ $flight->dpt_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show', [
|
|
|
|
'id' => $flight->dpt_airport->icao
|
|
|
|
])}}">{{$flight->dpt_airport->icao}}</a>)
|
|
|
|
@if($flight->dpt_time), {{ $flight->dpt_time }}@endif
|
2018-01-04 11:40:05 +08:00
|
|
|
<br />
|
2018-05-19 03:50:20 +08:00
|
|
|
<span class="title">{{ strtoupper(__('flights.arr')) }} </span>
|
2018-04-04 08:21:42 +08:00
|
|
|
{{ $flight->arr_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show', [
|
|
|
|
'id' => $flight->arr_airport->icao
|
|
|
|
])}}">{{$flight->arr_airport->icao}}</a>)
|
|
|
|
@if($flight->arr_time), {{ $flight->arr_time }}@endif
|
2018-01-04 11:40:05 +08:00
|
|
|
<br />
|
|
|
|
@if($flight->distance)
|
2018-05-19 03:30:59 +08:00
|
|
|
<span class="title">{{ strtoupper(__('common.distance')) }} </span>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ $flight->distance }} {{ setting('units.distance') }}
|
2018-01-04 11:40:05 +08:00
|
|
|
@endif
|
|
|
|
<br />
|
|
|
|
@if($flight->level)
|
2018-05-19 03:50:20 +08:00
|
|
|
<span class="title">{{ strtoupper(__('flights.level')) }} </span>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ $flight->level }} {{ setting('units.altitude') }}
|
2018-01-04 11:40:05 +08:00
|
|
|
@endif
|
2017-08-03 12:22:51 +08:00
|
|
|
</div>
|
2018-01-04 11:40:05 +08:00
|
|
|
<div class="col-sm-7">
|
2017-08-03 12:22:51 +08:00
|
|
|
<div class="row">
|
2017-08-03 04:12:26 +08:00
|
|
|
<div class="col-sm-12">
|
2018-05-22 00:55:40 +08:00
|
|
|
<span class="title">{{ strtoupper(__('flights.route')) }} </span>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ $flight->route }}
|
2017-08-03 04:12:26 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@endforeach
|