Add pilots list page; fix gravatar display and pilot profile #82

This commit is contained in:
Nabeel Shahzad
2018-01-19 17:07:31 -05:00
parent f58b01f3ea
commit 3a02a77eba
13 changed files with 204 additions and 102 deletions

View File

@@ -0,0 +1,17 @@
@extends('layouts.default.app')
@section('title', 'Pilots')
@section('content')
<div class="row">
<div class="col-md-12">
<h2 class="description">pilots</h2>
@include('layouts.default.users.table')
</div>
</div>
<div class="row">
<div class="col-12 text-center">
{{ $users->links('layouts.default.pagination.default') }}
</div>
</div>
@endsection

View File

@@ -0,0 +1,38 @@
<table class="table table-hover" id="users-table">
<thead>
<th></th>
<th>Name</th>
<th style="text-align: center"></th>
<th style="text-align: center">Airline</th>
<th style="text-align: center">Location</th>
<th style="text-align: center">Flights</th>
<th style="text-align: center">Hours</th>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td style="width: 80px;">
<div class="photo-container">
<img class="rounded-circle"
src="{!! $user->gravatar(256) !!}&s=256"/>
</div>
</td>
<td>
<a href="{!! route('frontend.profile.show.public', ['id' => $user->id]) !!}">
{!! $user->name !!}
</a>
</td>
<td align="center">
@if(filled($user->country))
<span class="flag-icon flag-icon-{!! $user->country !!}"
title="{!! $country->alpha2($user->country)['name'] !!}"></span>
@endif
</td>
<td class="text-center">{!! $user->airline->icao !!}</td>
<td class="text-center">{!! $user->curr_airport_id !!}</td>
<td align="center">{!! $user->flights !!}</td>
<td align="center">{!! \App\Facades\Utils::minutesToTimeString($user->flight_time) !!}</td>
</tr>
@endforeach
</tbody>
</table>