Add flight log to both frontend and admin pirep edit view

This commit is contained in:
Nabeel Shahzad
2018-02-21 15:24:46 -06:00
parent 77055991af
commit 9dfdc8195d
4 changed files with 47 additions and 2 deletions

View File

@@ -41,6 +41,14 @@
@include('admin.pireps.comments')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
<h4>flight log</h4>
@include('admin.pireps.flight_log')
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,14 @@
@if(count($pirep->acars_logs) > 0)
<div class="col-12">
<table class="table table-hover" id="users-table">
<tbody>
@foreach($pirep->acars_logs as $log)
<tr>
<td nowrap="true">{!! show_datetime($log->created_at) !!}</td>
<td>{!! $log->log !!}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif

View File

@@ -94,5 +94,26 @@
@endif
@include("layouts.${SKIN_NAME}.pireps.map")
@if(count($pirep->acars_logs) > 0)
<br /><br />
<div class="row clear">
<div class="col-12">
<h3 class="description">flight log</h3>
</div>
<div class="col-12">
<table class="table table-hover" id="users-table">
<tbody>
@foreach($pirep->acars_logs as $log)
<tr>
<td nowrap="true">{!! show_datetime($log->created_at) !!}</td>
<td>{!! $log->log !!}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
@endsection