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

99 lines
3.1 KiB
PHP
Raw Normal View History

@extends("layouts.${SKIN_NAME}.app")
@section('title', 'PIREP '.$pirep->ident)
@section('content')
<div class="row">
<div class="col-md-12">
<h2 class="description">{!! $pirep->ident !!}</h2>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table class="table">
<tr>
<td>Status</td>
<td>
@if($pirep->state === PirepState::PENDING)
2018-01-02 00:49:26 +08:00
<div class="badge badge-warning">
@elseif($pirep->state === PirepState::ACCEPTED)
2018-01-02 00:49:26 +08:00
<div class="badge badge-success">
@elseif($pirep->state === PirepState::REJECTED)
<div class="badge badge-danger">
@else
2018-01-02 00:49:26 +08:00
<div class="badge badge-info">
@endif
2018-01-02 00:49:26 +08:00
{!! PirepState::label($pirep->state) !!}</div>
<span class="description" style="padding-left: 20px;">
source: {!! PirepSource::label($pirep->source) !!}
</span>
</td>
</tr>
<tr>
<td>Departure/Arrival</td>
<td>
{!! $pirep->dpt_airport->icao !!} - {!! $pirep->dpt_airport->name !!}
<span class="description">to</span>
{!! $pirep->arr_airport->icao !!} - {!! $pirep->arr_airport->name !!}
</td>
</tr>
<tr>
<td>Flight Time</td>
<td>
{!! Utils::minutesToTimeString($pirep->flight_time) !!}
</td>
</tr>
<tr>
2017-12-24 01:58:17 +08:00
<td>Filed Route</td>
<td>
{!! $pirep->route !!}
</td>
</tr>
<tr>
<td>Notes</td>
<td>
{!! $pirep->notes !!}
</td>
</tr>
2017-12-24 01:58:17 +08:00
<tr>
<td>Filed On</td>
<td>
{!! show_datetime($pirep->created_at) !!}
</td>
</tr>
</table>
</div>
</div>
@if(count($pirep->fields) > 0)
<div class="row">
<div class="col-md-12">
<h3 class="description">fields</h3>
<table class="table">
<thead>
<th>Name</th>
<th>Value</th>
</thead>
<tbody>
@foreach($pirep->fields as $field)
<tr>
<td>{!! $field->name !!}</td>
<td>{!! $field->value !!}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
@include("layouts.${SKIN_NAME}.pireps.map")
@endsection