Format all blade templates to 2 spaces #530 (#531)

This commit is contained in:
Nabeel S
2020-02-01 13:05:56 -05:00
committed by GitHub
parent 06b47d97e0
commit 59d09c0cec
254 changed files with 7123 additions and 7006 deletions

View File

@@ -1,11 +1,11 @@
@extends('admin.app')
@section('title', 'Add User')
@section('content')
<div class="card border-blue-bottom">
<div class="content">
{{ Form::open(['route' => 'admin.airlines.store']) }}
@include('admin.airlines.fields')
{{ Form::close() }}
</div>
<div class="card border-blue-bottom">
<div class="content">
{{ Form::open(['route' => 'admin.airlines.store']) }}
@include('admin.airlines.fields')
{{ Form::close() }}
</div>
</div>
@endsection

View File

@@ -1,27 +1,27 @@
@extends('admin.app')
@section('title', 'Edit '. $user->name)
@section('content')
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($user, ['route' => ['admin.users.update', $user->id], 'method' => 'patch']) }}
@include('admin.users.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($user, ['route' => ['admin.users.update', $user->id], 'method' => 'patch']) }}
@include('admin.users.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
<div class="card border-blue-bottom">
<div class="content">
<div class="header">
<h3>PIREPs</h3>
<h3>PIREPs</h3>
</div>
@include('admin.pireps.table')
<div class="row">
<div class="col-12 text-center">
{{ $pireps->links('admin.pagination.default') }}
</div>
<div class="col-12 text-center">
{{ $pireps->links('admin.pagination.default') }}
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -1,131 +1,131 @@
<div class="row">
{{ Form::hidden('id') }}
<div class="form-group col-sm-3">
{{ Form::label('pilot_id', 'Pilot ID:') }}
{{ Form::number('pilot_id', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('pilot_id') }}</p>
</div>
{{ Form::hidden('id') }}
<div class="form-group col-sm-3">
{{ Form::label('pilot_id', 'Pilot ID:') }}
{{ Form::number('pilot_id', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('pilot_id') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('name', 'Name:') }}
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('name', 'Name:') }}
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('email', 'Email:') }}
{{ Form::text('email', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('email') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('email', 'Email:') }}
{{ Form::text('email', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('email') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('password', 'Password:') }}
{{ Form::password('password', ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('password') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('password', 'Password:') }}
{{ Form::password('password', ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('password') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
<div class="form-group">
{{ Form::label('country', 'Country:') }} <br />
{{ Form::select('country', $countries, null, ['class' => 'select2' ]) }}
<p class="text-danger">{{ $errors->first('country') }}</p>
</div>
<div class="form-group">
{{ Form::label('timezone', 'Timezone:') }} <br/>
{{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2' ]) }}
<p class="text-danger">{{ $errors->first('timezone') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('transfer_time', 'Transferred Hours:') }}
{{ Form::text('transfer_time', \App\Facades\Utils::minutesToHours($user->transfer_time), ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('transfer_time') }}</p>
</div>
<div class="form-group col-sm-6">
<div class="form-group">
{{ Form::label('country', 'Country:') }} <br/>
{{ Form::select('country', $countries, null, ['class' => 'select2' ]) }}
<p class="text-danger">{{ $errors->first('country') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('home_airport_id', 'Home Airport:') }}
{{ Form::select('home_airport_id', $airports, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('home_airport_id') }}</p>
<br /><br />
{{ Form::label('curr_airport_id', 'Current Airport:') }}
{{ Form::select('curr_airport_id', $airports, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('curr_airport_id') }}</p>
<div class="form-group">
{{ Form::label('timezone', 'Timezone:') }} <br/>
{{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2' ]) }}
<p class="text-danger">{{ $errors->first('timezone') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
{{ Form::label('airline_id', 'Airline:') }}
{{ Form::select('airline_id', $airlines, null, ['class' => 'form-control select2', 'placeholder' => 'Select Airline']) }}
{{ Form::label('transfer_time', 'Transferred Hours:') }}
{{ Form::text('transfer_time', \App\Facades\Utils::minutesToHours($user->transfer_time), ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('transfer_time') }}</p>
</div>
</div>
<div class="form-group col-sm-6">
{{ Form::label('home_airport_id', 'Home Airport:') }}
{{ Form::select('home_airport_id', $airports, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('home_airport_id') }}</p>
<br/><br/>
{{ Form::label('curr_airport_id', 'Current Airport:') }}
{{ Form::select('curr_airport_id', $airports, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('curr_airport_id') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('rank_id', 'Rank:') }}
{{ Form::select('rank_id', $ranks, null, ['class' => 'form-control select2', 'placeholder' => 'Select Rank']) }}
</div>
<div class="form-group col-sm-4">
{{ Form::label('roles', 'Roles:') }}
{{ Form::select('roles[]', $roles, $user->roles->pluck('id'),
['class' => 'form-control select2', 'placeholder' => 'Select Roles', 'multiple']) }}
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
{{ Form::label('state', 'State:') }}
<label class="checkbox-inline">
{{ Form::select('state', UserState::labels(), null, ['class' => 'form-control select2']) }}
</label>
</div>
<div class="form-group col-sm-4">
{{ Form::label('airline_id', 'Airline:') }}
{{ Form::select('airline_id', $airlines, null, ['class' => 'form-control select2', 'placeholder' => 'Select Airline']) }}
</div>
<!-- Submit Field -->
<div class="form-group col-sm-6 text-right">
{{--<a href="{{ route('admin.users.regen_apikey', [$user->id]) }}" class="btn btn-warning"
onclick="return confirm('Are you sure? This will reset this user\'s API key.')">new api key</a>--}}
&nbsp;
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.users.index') }}" class="btn btn-default">Cancel</a>
</div>
<div class="form-group col-sm-4">
{{ Form::label('rank_id', 'Rank:') }}
{{ Form::select('rank_id', $ranks, null, ['class' => 'form-control select2', 'placeholder' => 'Select Rank']) }}
</div>
<div class="form-group col-sm-4">
{{ Form::label('roles', 'Roles:') }}
{{ Form::select('roles[]', $roles, $user->roles->pluck('id'),
['class' => 'form-control select2', 'placeholder' => 'Select Roles', 'multiple']) }}
</div>
</div>
<div class="row">
<div class="form-group col-sm-12">
<table class="table table-hover">
{{--<tr>
<td>API Key</td>
<td>{{ $user->api_key }}</td>
</tr>--}}
<tr>
<td>Total Flights</td>
<td>{{ $user->flights }}</td>
</tr>
<tr>
<td>Flight Time</td>
<td>{{ Utils::minutesToTimeString($user->flight_time) }}</td>
</tr>
<tr>
<td>IP Address</td>
<td>{{ $user->last_ip }}</td>
</tr>
<tr>
<td>Registered On</td>
<td>{{ show_datetime($user->created_at) }}</td>
</tr>
<tr>
<td>Last Login</td>
<td>{{ show_datetime($user->updated_at) }}</td>
</tr>
<tr>
<td>@lang('toc.title')</td>
<td>{{ $user->toc_accepted ? __('common.yes') : __('common.no') }}</td>
</tr>
<tr>
<td>@lang('profile.opt-in')</td>
<td>{{ $user->opt_in ? __('common.yes') : __('common.no') }}</td>
</tr>
</table>
</div>
<div class="form-group col-sm-6">
{{ Form::label('state', 'State:') }}
<label class="checkbox-inline">
{{ Form::select('state', UserState::labels(), null, ['class' => 'form-control select2']) }}
</label>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-6 text-right">
{{--<a href="{{ route('admin.users.regen_apikey', [$user->id]) }}" class="btn btn-warning"
onclick="return confirm('Are you sure? This will reset this user\'s API key.')">new api key</a>--}}
&nbsp;
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.users.index') }}" class="btn btn-default">Cancel</a>
</div>
</div>
<div class="row">
<div class="form-group col-sm-12">
<table class="table table-hover">
{{--<tr>
<td>API Key</td>
<td>{{ $user->api_key }}</td>
</tr>--}}
<tr>
<td>Total Flights</td>
<td>{{ $user->flights }}</td>
</tr>
<tr>
<td>Flight Time</td>
<td>{{ Utils::minutesToTimeString($user->flight_time) }}</td>
</tr>
<tr>
<td>IP Address</td>
<td>{{ $user->last_ip }}</td>
</tr>
<tr>
<td>Registered On</td>
<td>{{ show_datetime($user->created_at) }}</td>
</tr>
<tr>
<td>Last Login</td>
<td>{{ show_datetime($user->updated_at) }}</td>
</tr>
<tr>
<td>@lang('toc.title')</td>
<td>{{ $user->toc_accepted ? __('common.yes') : __('common.no') }}</td>
</tr>
<tr>
<td>@lang('profile.opt-in')</td>
<td>{{ $user->opt_in ? __('common.yes') : __('common.no') }}</td>
</tr>
</table>
</div>
</div>

View File

@@ -2,26 +2,26 @@
@section('title', 'Users')
@section('actions')
<li><a href="{{ route('admin.users.index') }}?search=state:0">
<i class="ti-user"></i>@lang(UserState::label(UserState::PENDING))</a>
</li>
<li><a href="{{ route('admin.users.index') }}?search=state:0">
<i class="ti-user"></i>@lang(UserState::label(UserState::PENDING))</a>
</li>
@endsection
@section('content')
<div class="card">
@include('admin.users.search')
</div>
<div class="card">
@include('admin.users.search')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.users.table')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.users.table')
</div>
</div>
<div class="row">
<div class="col-12 text-center">
{{ $users->links('admin.pagination.default') }}
</div>
<div class="row">
<div class="col-12 text-center">
{{ $users->links('admin.pagination.default') }}
</div>
</div>
@endsection

View File

@@ -1,26 +1,26 @@
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
{{ Form::open(['route' => 'admin.users.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
<div class="row">
<div class="col-sm-12">
<div class="form-group">
{{ Form::open(['route' => 'admin.users.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
{{ Form::label('name', 'Name:') }}
{{ Form::text('name', null, ['class' => 'form-control']) }}
{{ Form::label('name', 'Name:') }}
{{ Form::text('name', null, ['class' => 'form-control']) }}
{{ Form::label('email', 'Email:') }}
{{ Form::text('email', null, ['class' => 'form-control']) }}
&nbsp;
{{--{{ Form::label('dep_icao', 'Departure:') }}
{{ Form::select('dep_icao', $airports, null , ['class' => 'form-control']) }}
&nbsp;
{{ Form::label('arr_icao', 'Arrival:') }}
{{ Form::select('arr_icao', $airports, null , ['class' => 'form-control']) }}
&nbsp;--}}
{{ Form::submit('find', ['class' => 'btn btn-primary']) }}
&nbsp;
<a href="{{ route('admin.users.index') }}">clear</a>
{{ Form::close() }}
</div>
</div>
{{ Form::label('email', 'Email:') }}
{{ Form::text('email', null, ['class' => 'form-control']) }}
&nbsp;
{{--{{ Form::label('dep_icao', 'Departure:') }}
{{ Form::select('dep_icao', $airports, null , ['class' => 'form-control']) }}
&nbsp;
{{ Form::label('arr_icao', 'Arrival:') }}
{{ Form::select('arr_icao', $airports, null , ['class' => 'form-control']) }}
&nbsp;--}}
{{ Form::submit('find', ['class' => 'btn btn-primary']) }}
&nbsp;
<a href="{{ route('admin.users.index') }}">clear</a>
{{ Form::close() }}
</div>
</div>
</div>
</div>

View File

@@ -1,10 +1,10 @@
@extends('admin.app')
@section('title', 'Edit '. $user->name)
@section('content')
<div class="card">
<div class="card">
<div class="content">
@include('admin.users.fields')
@include('admin.users.fields')
</div>
</div>
</div>
@endsection

View File

@@ -1,45 +1,45 @@
<table class="table table-hover table-responsive" id="users-table">
<thead>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Registered</th>
<th class="text-center">Active</th>
<th></th>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td>{{ $user->ident }}</td>
<td>
@if(filled($user->country))
<span class="flag-icon flag-icon-{{ $user->country }}"
title="{{ $country->alpha2($user->country)['name'] }}"></span>
&nbsp;
@endif
<a href="{{ route('admin.users.edit', [$user->id]) }}">{{ $user->name }}</a>
</td>
<td>{{ $user->email }}</td>
<td>{{ show_date($user->created_at) }}</td>
<td class="text-center">
@if($user->state === UserState::ACTIVE)
<span class="label label-success">
<thead>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Registered</th>
<th class="text-center">Active</th>
<th></th>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td>{{ $user->ident }}</td>
<td>
@if(filled($user->country))
<span class="flag-icon flag-icon-{{ $user->country }}"
title="{{ $country->alpha2($user->country)['name'] }}"></span>
&nbsp;
@endif
<a href="{{ route('admin.users.edit', [$user->id]) }}">{{ $user->name }}</a>
</td>
<td>{{ $user->email }}</td>
<td>{{ show_date($user->created_at) }}</td>
<td class="text-center">
@if($user->state === UserState::ACTIVE)
<span class="label label-success">
@elseif($user->state === UserState::PENDING)
<span class="label label-warning">
<span class="label label-warning">
@else
<span class="label label-default">
<span class="label label-default">
@endif
{{ UserState::label($user->state) }}</span>
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.users.destroy', $user->id], 'method' => 'delete']) }}
<a href="{{ route('admin.users.edit', [$user->id]) }}"
class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i></a>
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
{{ UserState::label($user->state) }}</span>
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.users.destroy', $user->id], 'method' => 'delete']) }}
<a href="{{ route('admin.users.edit', [$user->id]) }}"
class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i></a>
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>