Design and file upload issues (#399)
* Fix some styling issues/edit button on PIREP overview page * Fix validation for file/url upload * Formatting
This commit is contained in:
@@ -1,68 +1,73 @@
|
||||
{{--@each('pireps.pirep_card', $pireps, 'pirep')--}}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans_choice('common.flight', 1) }}</th>
|
||||
<th>@lang('common.departure')</th>
|
||||
<th>@lang('common.arrival')</th>
|
||||
<th>@lang('common.aircraft')</th>
|
||||
<th class="text-center">@lang('flights.flighttime')</th>
|
||||
<th class="text-center">@lang('common.status')</th>
|
||||
<th>@lang('pireps.submitted')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans_choice('common.flight', 1) }}</th>
|
||||
<th>@lang('common.departure')</th>
|
||||
<th>@lang('common.arrival')</th>
|
||||
<th>@lang('common.aircraft')</th>
|
||||
<th class="text-center">@lang('flights.flighttime')</th>
|
||||
<th class="text-center">@lang('common.status')</th>
|
||||
<th>@lang('pireps.submitted')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($pireps as $pirep)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('frontend.pireps.show', [
|
||||
$pirep->id]) }}">{{ $pirep->airline->code }}{{ $pirep->ident }}</a>
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->dpt_airport){{ $pirep->dpt_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->dpt_airport_id])}}">{{$pirep->dpt_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->arr_airport){{ $pirep->arr_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->arr_airport_id])}}">{{$pirep->arr_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->aircraft)
|
||||
{{ $pirep->aircraft->name }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($pirep->state === PirepState::PENDING)
|
||||
<div class="badge badge-warning">
|
||||
@elseif($pirep->state === PirepState::ACCEPTED)
|
||||
<div class="badge badge-success">
|
||||
@elseif($pirep->state === PirepState::REJECTED)
|
||||
<div class="badge badge-danger">
|
||||
@else
|
||||
<div class="badge badge-info">
|
||||
@endif
|
||||
{{ PirepState::label($pirep->state) }}</div>
|
||||
</td>
|
||||
<td>
|
||||
@if(filled($pirep->submitted_at))
|
||||
{{ $pirep->submitted_at->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(!$pirep->read_only)
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}"
|
||||
class="btn btn-info btn-sm"
|
||||
style="z-index: 9999"
|
||||
title="@lang('common.edit')">
|
||||
edit
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@foreach($pireps as $pirep)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('frontend.pireps.show', [
|
||||
$pirep->id]) }}">{{ $pirep->airline->code }}{{ $pirep->ident }}</a>
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->dpt_airport){{ $pirep->dpt_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->dpt_airport_id])}}">{{$pirep->dpt_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->arr_airport){{ $pirep->arr_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->arr_airport_id])}}">{{$pirep->arr_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->aircraft)
|
||||
{{ $pirep->aircraft->name }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($pirep->state === PirepState::PENDING)
|
||||
<div class="badge badge-warning">
|
||||
@elseif($pirep->state === PirepState::ACCEPTED)
|
||||
<div class="badge badge-success">
|
||||
@elseif($pirep->state === PirepState::REJECTED)
|
||||
<div class="badge badge-danger">
|
||||
@else
|
||||
<div class="badge badge-info">
|
||||
@endif
|
||||
{{ PirepState::label($pirep->state) }}</div>
|
||||
</td>
|
||||
<td>
|
||||
@if(filled($pirep->submitted_at))
|
||||
{{ $pirep->submitted_at->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(!$pirep->read_only)
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}">@lang('common.edit')</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user