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:
@@ -1,7 +1,7 @@
|
||||
<table class="">
|
||||
<tr>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
||||
<table class="table" style="border-style: hidden; margin-bottom: 0px;">
|
||||
<tr style="border-style: hidden;">
|
||||
@if ($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
||||
<td>
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'accept_'.$pirep->id,
|
||||
@@ -11,11 +11,9 @@
|
||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||
{{ Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
||||
</td>
|
||||
@elseif ($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
||||
<td>
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'reject_'.$pirep->id,
|
||||
@@ -25,8 +23,8 @@
|
||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-warning']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
</td>
|
||||
@endif
|
||||
<td>
|
||||
{{ Form::open(['url' => route('admin.pireps.destroy', [$pirep->id]),
|
||||
'method' => 'delete',
|
||||
@@ -40,20 +38,18 @@
|
||||
@if ($on_edit_page === false)
|
||||
<td>
|
||||
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
|
||||
<button type="submit"
|
||||
class='btn btn-info'>
|
||||
<button type="submit" class='btn btn-info'>
|
||||
<i class="fas fa-pencil-alt"></i> Edit
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
<td>
|
||||
<form action="{{ route('frontend.pireps.show', [$pirep->id]) }}" target="_blank">
|
||||
<button type="submit"
|
||||
class='btn btn-success'>
|
||||
<i class="fas fa-eye"></i> View Pirep
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="{{ route('frontend.pireps.show', [$pirep->id]) }}" target="_blank">
|
||||
<button type="submit" class='btn btn-success'>
|
||||
<i class="fas fa-eye"></i> View Pirep
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="col-sm-6">
|
||||
<div>
|
||||
<span class="description">
|
||||
<b>Pilot</b> {{ $pirep->user->name }}
|
||||
<b>Pilot</b> {{ '('.$pirep->user_id.') '.optional($pirep->user)->name }}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
@@ -35,11 +35,11 @@
|
||||
@if($pirep->aircraft)
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
@endif
|
||||
@if(filled($pirep->level))
|
||||
@if(filled($pirep->level) && $pirep->level > 10)
|
||||
<div>
|
||||
<span class="description">
|
||||
<b>Flight Level</b> {{ $pirep->level }}
|
||||
|
||||
Reference in New Issue
Block a user