2018-03-12 07:00:42 +08:00
|
|
|
@extends('app')
|
2018-05-19 03:30:59 +08:00
|
|
|
@section('title', __('common.profile'))
|
2018-02-04 08:18:09 +08:00
|
|
|
|
2017-08-03 02:13:08 +08:00
|
|
|
@section('content')
|
2017-12-25 02:12:26 +08:00
|
|
|
<div class="row profile-page content-center text-color-dark-beige">
|
|
|
|
<div class="col-md-4" style="text-align:center;">
|
|
|
|
<div class="photo-container">
|
2018-05-01 09:24:44 +08:00
|
|
|
@if ($user->avatar == null)
|
|
|
|
<img src="{{ $user->gravatar(512) }}" style="width: 123px;">
|
|
|
|
@else
|
2018-05-01 23:31:08 +08:00
|
|
|
<img src="{{ $user->avatar->url }}" style="width: 123px;">
|
2018-05-01 09:24:44 +08:00
|
|
|
@endif
|
2017-12-25 02:12:26 +08:00
|
|
|
</div>
|
2019-09-12 23:48:41 +08:00
|
|
|
<div><br /></div>
|
|
|
|
<div class="social-description">
|
|
|
|
<h2>{{ $user->name }}</h2>
|
|
|
|
<p>{{ $user->ident }}</p>
|
|
|
|
</div>
|
2017-12-25 02:12:26 +08:00
|
|
|
<p class="description" style="color: #9A9A9A;">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ $user->airline->name }}
|
2017-12-25 02:12:26 +08:00
|
|
|
</p>
|
2019-09-12 23:48:41 +08:00
|
|
|
<h6><span class="flag-icon flag-icon-{{ $user->country }}"></span></h6>
|
|
|
|
<div class="social-description">
|
|
|
|
<h2>{{ $user->rank->name }}</h2>
|
|
|
|
<p>Rank</p>
|
|
|
|
</div>
|
|
|
|
@if($user->home_airport)
|
|
|
|
<div class="social-description">
|
|
|
|
<h2>{{ $user->home_airport->icao }}</h2>
|
|
|
|
<p>@lang('airports.home')</p>
|
|
|
|
</div>
|
|
|
|
@endif
|
2017-12-25 02:12:26 +08:00
|
|
|
</div>
|
|
|
|
<div class="col-md-8 content-center">
|
|
|
|
<div class="content">
|
2019-09-12 23:48:41 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6">
|
|
|
|
<div class="card text-center">
|
|
|
|
<div class="card-body">
|
|
|
|
<h2 class="card-title">{{ $user->flights}}</h2>
|
|
|
|
<p class="card-text">Flights</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-25 02:12:26 +08:00
|
|
|
</div>
|
|
|
|
|
2019-09-12 23:48:41 +08:00
|
|
|
<div class="col-lg-6">
|
|
|
|
<div class="card text-center">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="social-description">
|
|
|
|
<h2>{{ \App\Facades\Utils::minutesToTimeString($user->flight_time, false) }}</h2>
|
|
|
|
<p>@lang('flights.flighthours')</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-25 02:12:26 +08:00
|
|
|
</div>
|
2019-09-12 23:48:41 +08:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
@if($user->current_airport)
|
|
|
|
<div class="col-lg-6">
|
|
|
|
<div class="card text-center">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="social-description">
|
|
|
|
<h2>{{ $user->current_airport->icao }}</h2>
|
|
|
|
<p>@lang('airports.current')</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2017-12-25 02:12:26 +08:00
|
|
|
|
2018-09-05 08:09:33 +08:00
|
|
|
|
2019-09-12 23:48:41 +08:00
|
|
|
@if(setting('pilots.allow_transfer_hours') === true)
|
|
|
|
<div class="col-lg-6">
|
|
|
|
<div class="card text-center">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="social-description">
|
|
|
|
<h2>{{ \App\Facades\Utils::minutesToHours($user->transfer_time) }}h</h2>
|
|
|
|
<p>@lang('profile.transferhours')</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2017-12-25 02:12:26 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-01-01 03:08:41 +08:00
|
|
|
{{--
|
|
|
|
show the details/edit fields only for the currently logged in user
|
|
|
|
--}}
|
2017-12-25 02:12:26 +08:00
|
|
|
@if(Auth::check() && $user->id === Auth::user()->id)
|
|
|
|
<div class="clearfix" style="height: 50px;"></div>
|
|
|
|
<div class="row">
|
2018-01-01 03:08:41 +08:00
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="text-right">
|
2018-03-13 06:58:12 +08:00
|
|
|
<a href="{{ route('frontend.profile.regen_apikey') }}" class="btn btn-warning"
|
2018-05-19 03:52:31 +08:00
|
|
|
onclick="return confirm({{ __('Are you sure? This will reset your API key.') }})">@lang('profile.newapikey')</a>
|
2018-01-01 03:08:41 +08:00
|
|
|
|
2018-03-13 06:58:12 +08:00
|
|
|
<a href="{{ route('frontend.profile.edit', ['id' => $user->id]) }}"
|
2018-05-19 03:18:12 +08:00
|
|
|
class="btn btn-primary">@lang('common.edit')</a>
|
2018-01-01 03:08:41 +08:00
|
|
|
</div>
|
|
|
|
|
2018-05-19 03:52:31 +08:00
|
|
|
<h3 class="description">@lang('profile.yourprofile')</h3>
|
2017-12-25 02:12:26 +08:00
|
|
|
<table class="table table-full-width">
|
|
|
|
<tr>
|
2018-05-19 03:18:12 +08:00
|
|
|
<td>@lang('common.email')</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ $user->email }}</td>
|
2017-12-25 02:12:26 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-05-19 03:52:31 +08:00
|
|
|
<td>@lang('profile.apikey') <span class="description">(@lang('profile.dontshare'))</span></td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ $user->api_key }}</td>
|
2017-12-25 02:12:26 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-05-19 03:18:12 +08:00
|
|
|
<td>@lang('common.timezone')</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ $user->timezone }}</td>
|
2017-12-25 02:12:26 +08:00
|
|
|
</tr>
|
2018-09-20 23:00:23 +08:00
|
|
|
<tr>
|
|
|
|
<td>@lang('profile.opt-in')</td>
|
|
|
|
<td>{{ $user->opt_in ? __('common.yes') : __('common.no') }}</td>
|
|
|
|
</tr>
|
2017-12-25 02:12:26 +08:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2017-08-03 02:13:08 +08:00
|
|
|
@endsection
|