Admin blade improvements (#1321)
* Update search.blade.php Used select2 for airports, fixed grid layout * Update actions.blade.php Fixed button placing * Update pirep_card.blade.php Added user id before the name, made name optional so if page hits an hard deleted user's pirep it will not fail. Also improved the flight level check.
This commit is contained in:
parent
0b27635fcb
commit
7a29630f57
@ -3,21 +3,31 @@
|
|||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{ Form::open(['route' => 'admin.flights.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
|
{{ Form::open(['route' => 'admin.flights.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-2">
|
||||||
{{ Form::label('airlines', 'Airline:') }}
|
{{ Form::label('airlines', 'Airline:') }}
|
||||||
{{ Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) }}
|
{{ Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group input-group-sm col-sm-2">
|
||||||
{{ Form::label('flight_number', 'Flight Number:') }}
|
{{ Form::label('flight_number', 'Flight Number:') }}
|
||||||
{{ Form::text('flight_number', null, ['class' => 'form-control']) }}
|
{{ Form::text('flight_number', null, ['class' => 'form-control']) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
{{ Form::label('dpt_airport_id', 'Departure:') }}
|
{{ Form::label('dpt_airport_id', 'Departure:') }}
|
||||||
{{ Form::select('dpt_airport_id', $airports, null , ['class' => 'form-control']) }}
|
{{ Form::select('dpt_airport_id', $airports, null , ['class' => 'form-control select2']) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
{{ Form::label('arr_airport_id', 'Arrival:') }}
|
{{ Form::label('arr_airport_id', 'Arrival:') }}
|
||||||
{{ Form::select('arr_airport_id', $airports, null , ['class' => 'form-control']) }}
|
{{ Form::select('arr_airport_id', $airports, null , ['class' => 'form-control select2']) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row text-right">
|
||||||
|
<div class="col-sm-12">
|
||||||
{{ Form::submit('find', ['class' => 'btn btn-primary']) }}
|
{{ Form::submit('find', ['class' => 'btn btn-primary']) }}
|
||||||
|
|
||||||
<a href="{{ route('admin.flights.index') }}">clear</a>
|
<a href="{{ route('admin.flights.index') }}">clear</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{ Form::close() }}
|
{{ Form::close() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<table class="">
|
<table class="table" style="border-style: hidden; margin-bottom: 0px;">
|
||||||
<tr>
|
<tr style="border-style: hidden;">
|
||||||
|
@if ($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
||||||
<td>
|
<td>
|
||||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
|
||||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||||
'method' => 'post',
|
'method' => 'post',
|
||||||
'name' => 'accept_'.$pirep->id,
|
'name' => 'accept_'.$pirep->id,
|
||||||
@ -11,11 +11,9 @@
|
|||||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||||
{{ Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
{{ Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||||
{{ Form::close() }}
|
{{ Form::close() }}
|
||||||
@endif
|
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
@elseif ($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
||||||
<td>
|
<td>
|
||||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
|
||||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||||
'method' => 'post',
|
'method' => 'post',
|
||||||
'name' => 'reject_'.$pirep->id,
|
'name' => 'reject_'.$pirep->id,
|
||||||
@ -25,8 +23,8 @@
|
|||||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||||
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-warning']) }}
|
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-warning']) }}
|
||||||
{{ Form::close() }}
|
{{ Form::close() }}
|
||||||
@endif
|
|
||||||
</td>
|
</td>
|
||||||
|
@endif
|
||||||
<td>
|
<td>
|
||||||
{{ Form::open(['url' => route('admin.pireps.destroy', [$pirep->id]),
|
{{ Form::open(['url' => route('admin.pireps.destroy', [$pirep->id]),
|
||||||
'method' => 'delete',
|
'method' => 'delete',
|
||||||
@ -40,8 +38,7 @@
|
|||||||
@if ($on_edit_page === false)
|
@if ($on_edit_page === false)
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
|
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
|
||||||
<button type="submit"
|
<button type="submit" class='btn btn-info'>
|
||||||
class='btn btn-info'>
|
|
||||||
<i class="fas fa-pencil-alt"></i> Edit
|
<i class="fas fa-pencil-alt"></i> Edit
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
@ -49,8 +46,7 @@
|
|||||||
@endif
|
@endif
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ route('frontend.pireps.show', [$pirep->id]) }}" target="_blank">
|
<form action="{{ route('frontend.pireps.show', [$pirep->id]) }}" target="_blank">
|
||||||
<button type="submit"
|
<button type="submit" class='btn btn-success'>
|
||||||
class='btn btn-success'>
|
|
||||||
<i class="fas fa-eye"></i> View Pirep
|
<i class="fas fa-eye"></i> View Pirep
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div>
|
<div>
|
||||||
<span class="description">
|
<span class="description">
|
||||||
<b>Pilot</b> {{ $pirep->user->name }}
|
<b>Pilot</b> {{ '('.$pirep->user_id.') '.optional($pirep->user)->name }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -35,11 +35,11 @@
|
|||||||
@if($pirep->aircraft)
|
@if($pirep->aircraft)
|
||||||
<div>
|
<div>
|
||||||
<span class="description">
|
<span class="description">
|
||||||
<b>Aircraft</b> {{ $pirep->aircraft->registration }} ({{ $pirep->aircraft->name }})
|
<b>Aircraft</b> {{ $pirep->aircraft->registration }} @if($pirep->aircraft->registration != $pirep->aircraft->name) '{{ $pirep->aircraft->name }}' @endif
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if(filled($pirep->level))
|
@if(filled($pirep->level) && $pirep->level > 10)
|
||||||
<div>
|
<div>
|
||||||
<span class="description">
|
<span class="description">
|
||||||
<b>Flight Level</b> {{ $pirep->level }}
|
<b>Flight Level</b> {{ $pirep->level }}
|
||||||
|
Loading…
Reference in New Issue
Block a user