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

@@ -2,66 +2,68 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - importer</title>
<title>@yield('title') - importer</title>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/>
<meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}">
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/>
<meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<style>
.table tr:first-child td { border-top: 0px; }
@yield('css')
</style>
<style>
.table tr:first-child td {
border-top: 0px;
}
@yield('css')
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-toggleable-md" style="background: #067ec1;">
<div class="container" style="width: 85%!important;">
<div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a>
</p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
<div class="container" style="width: 85%!important;">
<div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a>
</p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div>
</nav>
<!-- End Navbar -->
{{--<div class="clearfix" style="height: 25px;"></div>--}}
<div class="wrapper">
<div class="clear"></div>
<div class="container" style="width: 50%">
<div class="row">
<div class="col-12">
@include('importer::flash.message')
@yield('content')
</div>
</div>
<div class="clear"></div>
<div class="container" style="width: 50%">
<div class="row">
<div class="col-12">
@include('importer::flash.message')
@yield('content')
</div>
</div>
<div class="clearfix" style="height: 200px;"></div>
</div>
<div class="clearfix" style="height: 200px;"></div>
</div>
{{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}}
@@ -73,17 +75,17 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>
hljs.configure({languages: ['sh']});
hljs.configure({languages: ['sh']});
$(document).ready(function () {
$(document).ready(function () {
$(".select2").select2();
$(".select2").select2();
$('pre code').each(function (i, block) {
hljs.fixMarkup(block);
hljs.highlightBlock(block);
});
$('pre code').each(function (i, block) {
hljs.fixMarkup(block);
hljs.highlightBlock(block);
});
});
</script>
@yield('scripts')

View File

@@ -1,8 +1,8 @@
<div class="alert alert-{{ $status }}" role="alert">
<div class="container">
<div class="alert-icon">
<i class="now-ui-icons ui-1_bell-53"></i>
</div>
{{ $message }}
<div class="container">
<div class="alert-icon">
<i class="now-ui-icons ui-1_bell-53"></i>
</div>
{{ $message }}
</div>
</div>

View File

@@ -1,6 +1,6 @@
@if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
@endif

View File

@@ -1,11 +1,11 @@
@foreach (session('flash_notification', collect())->toArray() as $message)
<div class="alert alert-danger" role="alert">
<div class="alert alert-danger" role="alert">
<div class="container">
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
{{ $message['message'] }}
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
{{ $message['message'] }}
</div>
</div>
</div>
@endforeach
{{ session()->forget('flash_notification') }}

View File

@@ -12,9 +12,11 @@
<ul>
<li>If you have more than 1000 PIREPs or flights, it's best to use the command-line importer!
<a href="http://docs.phpvms.net/setup/importing-from-v2-v5" target="_blank">Click here</a> to
see the documentation of how to use it.</li>
see the documentation of how to use it.
</li>
<li><strong>THIS WILL WIPE OUT YOUR EXISTING DATA</strong> - this is required to make sure that things like
pilot IDs match up</li>
pilot IDs match up
</li>
</ul>
</td>
</tr>

View File

@@ -2,66 +2,68 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - installer</title>
<title>@yield('title') - installer</title>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/>
<meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}">
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/>
<meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<style>
.table tr:first-child td { border-top: 0px; }
@yield('css')
</style>
<style>
.table tr:first-child td {
border-top: 0px;
}
@yield('css')
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-toggleable-md" style="background: #067ec1;">
<div class="container" style="width: 85%!important;">
<div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a>
</p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
<div class="container" style="width: 85%!important;">
<div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a>
</p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div>
</nav>
<!-- End Navbar -->
{{--<div class="clearfix" style="height: 25px;"></div>--}}
<div class="wrapper">
<div class="clear"></div>
<div class="container" style="width: 50%">
<div class="row">
<div class="col-12">
@include('installer::flash.message')
@yield('content')
</div>
</div>
<div class="clear"></div>
<div class="container" style="width: 50%">
<div class="row">
<div class="col-12">
@include('installer::flash.message')
@yield('content')
</div>
</div>
<div class="clearfix" style="height: 200px;"></div>
</div>
<div class="clearfix" style="height: 200px;"></div>
</div>
{{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}}
@@ -73,17 +75,17 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>
hljs.configure({languages: ['sh']});
hljs.configure({languages: ['sh']});
$(document).ready(function () {
$(document).ready(function () {
$(".select2").select2();
$(".select2").select2();
$('pre code').each(function (i, block) {
hljs.fixMarkup(block);
hljs.highlightBlock(block);
});
$('pre code').each(function (i, block) {
hljs.fixMarkup(block);
hljs.highlightBlock(block);
});
});
</script>
@yield('scripts')

View File

@@ -1,11 +1,11 @@
@extends('installer::app')
@section('content')
<h2>phpVMS already installed!</h2>
<p>phpVMS has already been installed! Please remove the modules/Installer folder.</p>
{{ Form::open(['url' => '/', 'method' => 'get']) }}
<p style="text-align: right">
{{ Form::submit('Go to your site >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<h2>phpVMS already installed!</h2>
<p>phpVMS has already been installed! Please remove the modules/Installer folder.</p>
{{ Form::open(['url' => '/', 'method' => 'get']) }}
<p style="text-align: right">
{{ Form::submit('Go to your site >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -1,6 +1,6 @@
@if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
@endif

View File

@@ -1,11 +1,11 @@
@foreach (session('flash_notification', []) as $message)
<div class="alert alert-danger" role="alert">
<div class="alert alert-danger" role="alert">
<div class="container">
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
{{ $message['message'] }}
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
{{ $message['message'] }}
</div>
</div>
</div>
@endforeach
{{ session()->forget('flash_notification') }}

View File

@@ -1,8 +1,8 @@
<div class="alert alert-{{ $status }}" role="alert">
<div class="container">
<div class="alert-icon">
<i class="now-ui-icons ui-1_bell-53"></i>
</div>
{{ $message }}
<div class="container">
<div class="alert-icon">
<i class="now-ui-icons ui-1_bell-53"></i>
</div>
{{ $message }}
</div>
</div>

View File

@@ -2,11 +2,11 @@
@section('title', 'Install phpVMS')
@section('content')
<h2>phpvms installer</h2>
<p>Press continue to start</p>
{{ Form::open(['route' => 'installer.step1', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<h2>phpvms installer</h2>
<p>Press continue to start</p>
{{ Form::open(['route' => 'installer.step1', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -2,62 +2,66 @@
@section('title', 'Requirements Check')
@section('content')
<div style="align-content: center;">
<div style="align-content: center;">
{{ Form::open(['route' => 'installer.step2', 'method' => 'GET']) }}
<table class="table" width="25%">
<tr><td colspan="2"><h4>php version</h4></td></tr>
<tr>
<td>PHP Version: {{ $php['version'] }}</td>
<td style="text-align:center;">
@if($php['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
<tr><td colspan="2"><h4>php extensions</h4></td></tr>
@foreach($extensions as $ext)
<tr>
<td>{{ $ext['ext'] }}</td>
<td style="text-align:center;">
@if($ext['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
@endforeach
<tr>
<td colspan="2"><h4>php version</h4></td>
</tr>
<tr>
<td>PHP Version: {{ $php['version'] }}</td>
<td style="text-align:center;">
@if($php['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
<tr>
<td colspan="2"><h4>php extensions</h4></td>
</tr>
@foreach($extensions as $ext)
<tr>
<td colspan="2">
<h4>directory permissions</h4>
<p>Make sure these directories have read and write permissions</p>
</td>
<td>{{ $ext['ext'] }}</td>
<td style="text-align:center;">
@if($ext['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
@foreach($directories as $dir)
<tr>
<td>{{ $dir['dir'] }}</td>
<td style="text-align:center;">
@if($dir['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
@endforeach
@endforeach
<tr>
<td colspan="2">
<h4>directory permissions</h4>
<p>Make sure these directories have read and write permissions</p>
</td>
</tr>
@foreach($directories as $dir)
<tr>
<td>{{ $dir['dir'] }}</td>
<td style="text-align:center;">
@if($dir['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
@endforeach
</table>
@if($passed === true)
<p style="text-align: right">
{{ Form::submit('Database Setup >>', ['class' => 'btn btn-success']) }}
</p>
<p style="text-align: right">
{{ Form::submit('Database Setup >>', ['class' => 'btn btn-success']) }}
</p>
@endif
{{--{{ $php_version }}
{{ $extensions }}
{{ $passed }}--}}
{{ Form::close() }}
</div>
</div>
@endsection

View File

@@ -1,154 +1,154 @@
@extends('installer::app')
@section('title', 'Database Setup')
@section('content')
<div style="align-content: center;">
<div style="align-content: center;">
{{ Form::open(['route' => 'installer.envsetup', 'method' => 'POST']) }}
<table class="table" width="25%">
<tr>
<td colspan="2"><h4>Site Config</h4></td>
</tr>
<tr>
<td colspan="2"><h4>Site Config</h4></td>
</tr>
<tr>
<td>Site Name</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'site_name', 'phpvms', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Site Name</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'site_name', 'phpvms', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Site URL</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'site_url', Request::root(), ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Site URL</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'site_url', Request::root(), ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td colspan="2"><h4>Database Config</h4></td>
</tr>
<tr>
<td colspan="2"><h4>Database Config</h4></td>
</tr>
<tr>
<td><p>Select Database Type</p></td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::select('db_conn', $db_types, null, ['class' => 'form-control', 'id' => 'db_conn']) }}
</div>
</td>
</tr>
<tr>
<td><p>Select Database Type</p></td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::select('db_conn', $db_types, null, ['class' => 'form-control', 'id' => 'db_conn']) }}
</div>
</td>
</tr>
<tbody id="mysql_settings" class="settings_panel">
<tr>
<td>Database Host</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_host', '127.0.0.1', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tbody id="mysql_settings" class="settings_panel">
<tr>
<td>Database Host</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_host', '127.0.0.1', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database Port</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_port', '3306', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database Port</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_port', '3306', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database Name</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_name', 'phpvms', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database Name</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_name', 'phpvms', ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database User</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_user', null, ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database User</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_user', null, ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database Password</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_pass', null, ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td>Database Password</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_pass', null, ['class' => 'form-control']) }}
</div>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: right;">
{{ Form::submit('Test Database Credentials', ['class' => 'btn btn-info', 'id' => 'dbtest_button']) }}
</td>
</tr>
</tbody>
<tr>
<td colspan="2" style="text-align: right;">
{{ Form::submit('Test Database Credentials', ['class' => 'btn btn-info', 'id' => 'dbtest_button']) }}
</td>
</tr>
</tbody>
<tbody id="sqlite_settings" class="settings_panel">
<tbody id="sqlite_settings" class="settings_panel">
</tbody>
</tbody>
<tr>
<td>Database Prefix</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_prefix', '', ['class' => 'form-control']) }}
<p>Set this if you're sharing the database with another application.</p>
</div>
</td>
</tr>
<tr>
<td>Database Prefix</td>
<td style="text-align:center;">
<div class="form-group">
{{ Form::input('text', 'db_prefix', '', ['class' => 'form-control']) }}
<p>Set this if you're sharing the database with another application.</p>
</div>
</td>
</tr>
</table>
<div id="dbtest"></div>
<p style="text-align: right">
{{ Form::submit('Setup Database >>', ['class' => 'btn btn-success']) }}
{{ Form::submit('Setup Database >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
</div>
@endsection
@section('scripts')
<script>
function changeForm(selected) {
$("tbody.settings_panel").hide();
$("tbody#" + selected + "_settings").show();
}
<script>
function changeForm(selected) {
$("tbody.settings_panel").hide();
$("tbody#" + selected + "_settings").show();
}
$(document).ready(() => {
$(document).ready(() => {
const selValue = $("#db_conn option:selected").text();
changeForm(selValue);
const selValue = $("#db_conn option:selected").text();
changeForm(selValue);
$("#db_conn").change((e) => {
$("#db_conn").change((e) => {
const selValue = $("#db_conn option:selected").text();
changeForm(selValue);
});
});
$("#dbtest_button").click((e) => {
$("#dbtest_button").click((e) => {
e.preventDefault();
const opts = {
_token: "{{ csrf_token() }}",
db_conn: $("#db_conn option:selected").text(),
db_host: $("input[name=db_host]").val(),
db_port: $("input[name=db_port]").val(),
db_name: $("input[name=db_name]").val(),
db_user: $("input[name=db_user]").val(),
db_pass: $("input[name=db_pass]").val(),
_token: "{{ csrf_token() }}",
db_conn: $("#db_conn option:selected").text(),
db_host: $("input[name=db_host]").val(),
db_port: $("input[name=db_port]").val(),
db_name: $("input[name=db_name]").val(),
db_user: $("input[name=db_user]").val(),
db_pass: $("input[name=db_pass]").val(),
};
$.post("{{ route('installer.dbtest') }}", opts, (data) => {
$("#dbtest").html(data);
$("#dbtest").html(data);
})
})
});
</script>
})
});
</script>
@endsection

View File

@@ -1,19 +1,19 @@
@extends('installer::app')
@section('title', 'Database Setup Completed')
@section('content')
<div style="align-content: center;">
<div style="align-content: center;">
{{ Form::open(['route' => 'installer.step3', 'method' => 'GET']) }}
<pre class="lang-sh">
<code class="lang-sh">
{{--<code class="language-bash">--}}
{{ $console_output }}
{{ $console_output }}
</code>
</pre>
<p style="text-align: right">
{{ Form::submit('Continue >>', ['class' => 'btn btn-success']) }}
{{ Form::submit('Continue >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
</div>
@endsection

View File

@@ -2,117 +2,118 @@
@section('title', 'User Setup')
@section('content')
<div class="row"><div class="col-md-12">
<div style="align-content: center;">
{{ Form::open(['route' => 'installer.usersetup', 'method' => 'POST']) }}
<table class="table" width="25%">
<div class="row">
<div class="col-md-12">
<div style="align-content: center;">
{{ Form::open(['route' => 'installer.usersetup', 'method' => 'POST']) }}
<table class="table" width="25%">
<tr>
<td colspan="2" style="text-align: right">
<a href="{{ route('importer.index') }}">Importing from a legacy install?</a>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: right">
<a href="{{ route('importer.index') }}">Importing from a legacy install?</a>
</td>
</tr>
<tr>
<tr>
<td colspan="2"><h4>Airline Information</h4></td>
</tr>
</tr>
<tr>
<tr>
<td><p>Airline ICAO</p></td>
<td>
<div class="form-group">
{{ Form::input('text', 'airline_icao', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'airline_icao'])
</div>
<div class="form-group">
{{ Form::input('text', 'airline_icao', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'airline_icao'])
</div>
</td>
</tr>
</tr>
<tr>
<tr>
<td><p>Airline Name</p></td>
<td>
<div class="form-group">
{{ Form::input('text', 'airline_name', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'airline_name'])
</div>
<div class="form-group">
{{ Form::input('text', 'airline_name', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'airline_name'])
</div>
</td>
</tr>
</tr>
<tr>
<tr>
<td><p>Airline Country</p></td>
<td>
<div class="form-group">
{{ Form::select('airline_country', $countries, null, ['class' => 'form-control select2' ]) }}
@include('installer::flash/check_error', ['field' => 'airline_country'])
</div>
<div class="form-group">
{{ Form::select('airline_country', $countries, null, ['class' => 'form-control select2' ]) }}
@include('installer::flash/check_error', ['field' => 'airline_country'])
</div>
</td>
</tr>
</tr>
<tr>
<tr>
<td colspan="2"><h4>First User</h4></td>
</tr>
</tr>
<tr>
<tr>
<td><p>Name</p></td>
<td>
<div class="form-group">
{{ Form::input('text', 'name', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'name'])
</div>
<div class="form-group">
{{ Form::input('text', 'name', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'name'])
</div>
</td>
</tr>
</tr>
<tr>
<tr>
<td><p>Email</p></td>
<td>
<div class="form-group">
{{ Form::input('text', 'email', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'email'])
</div>
<div class="form-group">
{{ Form::input('text', 'email', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'email'])
</div>
</td>
</tr>
</tr>
<tr>
<tr>
<td><p>Password</p></td>
<td>
{{ Form::password('password', ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'password'])
{{ Form::password('password', ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'password'])
</td>
</tr>
</tr>
<tr>
<tr>
<td width="40%"><p>Password Confirm</p></td>
<td>
{{ Form::password('password_confirmation', ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'password_confirmation'])
{{ Form::password('password_confirmation', ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'password_confirmation'])
</td>
</tr>
</tr>
<tr>
<tr>
<td colspan="2"><h4>Options</h4></td>
</tr>
</tr>
<tr>
<tr>
<td><p>Analytics</p></td>
<td>
<div class="form-group">
{{ Form::hidden('telemetry', 0) }}
{{ Form::checkbox('telemetry', 1, true, ['class' => 'form-control']) }}
<br />
<p>
Allows collection of analytics. They won't identify you, and helps us to track
the PHP and database versions that are used, and help to figure out problems
and slowdowns when vaCentral integration is enabled.
</p>
</div>
<div class="form-group">
{{ Form::hidden('telemetry', 0) }}
{{ Form::checkbox('telemetry', 1, true, ['class' => 'form-control']) }}
<br/>
<p>
Allows collection of analytics. They won't identify you, and helps us to track
the PHP and database versions that are used, and help to figure out problems
and slowdowns when vaCentral integration is enabled.
</p>
</div>
</td>
</tr>
</table>
<div id="dbtest"></div>
<p style="text-align: right">
{{ Form::submit('Complete Setup >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
</div>
</tr>
</table>
<div id="dbtest"></div>
<p style="text-align: right">
{{ Form::submit('Complete Setup >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
</div>
</div>
@endsection

View File

@@ -2,19 +2,19 @@
@section('title', 'Installation Completed!')
@section('content')
<div style="align-content: center;">
{{ Form::open(['route' => 'installer.complete', 'method' => 'GET']) }}
<div style="align-content: center;">
{{ Form::open(['route' => 'installer.complete', 'method' => 'GET']) }}
<h4>Installer Completed!</h4>
<h4>Installer Completed!</h4>
<p>Edit the <span class="code">config.php</span> to fill in some additional settings. </p>
<p>Click the button to proceed to the login screen!</p>
<p>Edit the <span class="code">config.php</span> to fill in some additional settings. </p>
<p>Click the button to proceed to the login screen!</p>
<p style="text-align: right">
{{ Form::submit('Install Complete! Continue to Log-In >>',
['class' => 'btn btn-success'])
}}
</p>
{{ Form::close() }}
</div>
<p style="text-align: right">
{{ Form::submit('Install Complete! Continue to Log-In >>',
['class' => 'btn btn-success'])
}}
</p>
{{ Form::close() }}
</div>
@endsection

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS')
@section('content')
<h2>phpvms updater</h2>
<p>Press continue to check if there are any updates available.</p>
{{ Form::open(['route' => 'update.step1', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<h2>phpvms updater</h2>
<p>Press continue to check if there are any updates available.</p>
{{ Form::open(['route' => 'update.step1', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update phpVMS')
@section('content')
<h2>phpvms updater</h2>
<p>It seems like you're up to date!</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<h2>phpvms updater</h2>
<p>It seems like you're up to date!</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS')
@section('content')
<h2>phpvms updater</h2>
<p>Click run to complete the update!.</p>
{{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Run >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<h2>phpvms updater</h2>
<p>Click run to complete the update!.</p>
{{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Run >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -1,18 +1,18 @@
@extends('installer::app')
@section('title', 'Update Completed')
@section('content')
<div style="align-content: center;">
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<div style="align-content: center;">
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<pre class="lang-sh">
<pre class="lang-sh">
<code class="lang-sh">
{{ $console_output }}
</code>
</pre>
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
@endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update Completed')
@section('content')
<h2>phpvms updater</h2>
<p>Update completed!.</p>
<h2>phpvms updater</h2>
<p>Update completed!.</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right">
{{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right">
{{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -5,10 +5,10 @@
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
<div class="header"><h4 class="title">Create something!</h4></div>
<p>Add a form!</p>
</div>
<div class="card border-blue-bottom">
<div class="content">
<div class="header"><h4 class="title">Create something!</h4></div>
<p>Add a form!</p>
</div>
</div>
@endsection

View File

@@ -2,17 +2,17 @@
@section('title', 'Sample')
@section('actions')
<li>
<a href="{{ url('/admin/sample/create') }}">
<i class="ti-plus"></i>
Add New</a>
</li>
<li>
<a href="{{ url('/admin/sample/create') }}">
<i class="ti-plus"></i>
Add New</a>
</li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
<div class="header"><h4 class="title">Admin Scaffold!</h4></div>
<p>This view is loaded from module: {{ config('sample.name') }}</p>
</div>
<div class="card border-blue-bottom">
<div class="content">
<div class="header"><h4 class="title">Admin Scaffold!</h4></div>
<p>This view is loaded from module: {{ config('sample.name') }}</p>
</div>
</div>
@endsection

View File

@@ -1,9 +1,9 @@
@extends('sample::layouts.frontend')
@section('content')
<h1>Hello World</h1>
<h1>Hello World</h1>
<p>
This view is loaded from module: {{ config('sample.name') }}
</p>
<p>
This view is loaded from module: {{ config('sample.name') }}
</p>
@endsection

View File

@@ -2,66 +2,68 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - updater</title>
<title>@yield('title') - updater</title>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/>
<meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}">
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/>
<meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<style>
.table tr:first-child td { border-top: 0px; }
@yield('css')
</style>
<style>
.table tr:first-child td {
border-top: 0px;
}
@yield('css')
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-toggleable-md" style="background: #067ec1;">
<div class="container" style="width: 85%!important;">
<div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a>
</p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
<div class="container" style="width: 85%!important;">
<div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a>
</p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div>
</nav>
<!-- End Navbar -->
{{--<div class="clearfix" style="height: 25px;"></div>--}}
<div class="wrapper">
<div class="clear"></div>
<div class="container" style="width: 50%">
<div class="row">
<div class="col-12">
@include('installer::flash.message')
@yield('content')
</div>
</div>
<div class="clear"></div>
<div class="container" style="width: 50%">
<div class="row">
<div class="col-12">
@include('installer::flash.message')
@yield('content')
</div>
</div>
<div class="clearfix" style="height: 200px;"></div>
</div>
<div class="clearfix" style="height: 200px;"></div>
</div>
{{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}}
@@ -73,17 +75,17 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>
hljs.configure({languages: ['sh']});
hljs.configure({languages: ['sh']});
$(document).ready(function () {
$(document).ready(function () {
$(".select2").select2();
$(".select2").select2();
$('pre code').each(function (i, block) {
hljs.fixMarkup(block);
hljs.highlightBlock(block);
});
$('pre code').each(function (i, block) {
hljs.fixMarkup(block);
hljs.highlightBlock(block);
});
});
</script>
@yield('scripts')

View File

@@ -1,6 +1,6 @@
@if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
@endif

View File

@@ -1,11 +1,11 @@
@foreach (session('flash_notification', collect())->toArray() as $message)
<div class="alert alert-danger" role="alert">
<div class="alert alert-danger" role="alert">
<div class="container">
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
{{ $message['message'] }}
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
{{ $message['message'] }}
</div>
</div>
</div>
@endforeach
{{ session()->forget('flash_notification') }}

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS')
@section('content')
<h2>phpvms updater</h2>
<p>Press continue to check if there are any updates available.</p>
{{ Form::open(['route' => 'update.step1', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<h2>phpvms updater</h2>
<p>Press continue to check if there are any updates available.</p>
{{ Form::open(['route' => 'update.step1', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update phpVMS')
@section('content')
<h2>phpvms updater</h2>
<p>It seems like you're up to date!</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<h2>phpvms updater</h2>
<p>It seems like you're up to date!</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS')
@section('content')
<h2>phpvms updater</h2>
<p>Click run to complete the update!.</p>
{{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Run >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
<h2>phpvms updater</h2>
<p>Click run to complete the update!.</p>
{{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }}
<p style="text-align: right">
{{ Form::submit('Run >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -1,18 +1,18 @@
@extends('installer::app')
@section('title', 'Update Completed')
@section('content')
<div style="align-content: center;">
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<div style="align-content: center;">
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<pre class="lang-sh">
<pre class="lang-sh">
<code class="lang-sh">
{{ $console_output }}
</code>
</pre>
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
<p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
</div>
@endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update Completed')
@section('content')
<h2>phpvms updater</h2>
<p>Update completed!.</p>
<h2>phpvms updater</h2>
<p>Update completed!.</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right">
{{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right">
{{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }}
</p>
{{ Form::close() }}
@endsection

View File

@@ -1,17 +1,17 @@
@extends('admin.app')
@section('title', 'Add Aircraft')
@section('content')
<div class="card border-blue-bottom">
<div class="content">
@if(!filled($subfleets))
<p class="text-center">
You must add a subfleet before you can add an aircraft!
</p>
@else
{{ Form::open(['route' => 'admin.aircraft.store']) }}
@include('admin.aircraft.fields')
{{ Form::close() }}
@endif
</div>
<div class="card border-blue-bottom">
<div class="content">
@if(!filled($subfleets))
<p class="text-center">
You must add a subfleet before you can add an aircraft!
</p>
@else
{{ Form::open(['route' => 'admin.aircraft.store']) }}
@include('admin.aircraft.fields')
{{ Form::close() }}
@endif
</div>
</div>
@endsection

View File

@@ -1,25 +1,25 @@
@extends('admin.app')
@section('title', "Edit \"$aircraft->name\"")
@section('content')
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($aircraft, ['route' => ['admin.aircraft.update', $aircraft->id], 'method' => 'patch']) }}
@include('admin.aircraft.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($aircraft, ['route' => ['admin.aircraft.update', $aircraft->id], 'method' => 'patch']) }}
@include('admin.aircraft.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.aircraft.expenses')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.aircraft.expenses')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.common.file_upload', ['model' => $aircraft])
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.common.file_upload', ['model' => $aircraft])
</div>
</div>
@endsection
@include('admin.aircraft.script')

View File

@@ -1,78 +1,78 @@
<div id="expenses-wrapper" class="col-12">
<div class="header">
<h3>expenses</h3>
@component('admin.components.info')
These expenses are only applied to this aircraft.
@endcomponent
</div>
<div class="header">
<h3>expenses</h3>
@component('admin.components.info')
These expenses are only applied to this aircraft.
@endcomponent
</div>
@if(count($aircraft->expenses) === 0)
@include('admin.common.none_added', ['type' => 'expenses'])
@if(count($aircraft->expenses) === 0)
@include('admin.common.none_added', ['type' => 'expenses'])
@endif
<table class="table table-responsive" id="expenses">
@if(count($aircraft->expenses) > 0)
<thead>
<th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Type</th>
<th></th>
</thead>
@endif
<table class="table table-responsive" id="expenses">
@if(count($aircraft->expenses) > 0)
<thead>
<th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Type</th>
<th></th>
</thead>
@endif
<tbody>
@foreach($aircraft->expenses as $expense)
<tr>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="name">{{ $expense->name }}</a>
</p>
</td>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="amount">{{ $expense->amount }}</a>
</p>
</td>
<td>
<p>
<a href="#"
class="dropdown"
data-pk="{{ $expense->id }}"
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
</p>
</td>
<td align="right">
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
{{ Form::hidden('expense_id', $expense->id) }}
{{ 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>
<hr/>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
'class' => 'btn btn-success btn-small']) }}
{{ Form::close() }}
<tbody>
@foreach($aircraft->expenses as $expense)
<tr>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="name">{{ $expense->name }}</a>
</p>
</td>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="amount">{{ $expense->amount }}</a>
</p>
</td>
<td>
<p>
<a href="#"
class="dropdown"
data-pk="{{ $expense->id }}"
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
</p>
</td>
<td align="right">
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
{{ Form::hidden('expense_id', $expense->id) }}
{{ 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>
<hr/>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
'class' => 'btn btn-success btn-small']) }}
{{ Form::close() }}
<p class="text-danger">{{ $errors->first('name') }}</p>
<p class="text-danger">{{ $errors->first('amount') }}</p>
</div>
</div>
<p class="text-danger">{{ $errors->first('name') }}</p>
<p class="text-danger">{{ $errors->first('amount') }}</p>
</div>
</div>
</div>
</div>

View File

@@ -1,42 +1,42 @@
<div class="row">
<div class="col-sm-12">
<div class="form-container">
<h6><i class="fas fa-clock"></i>
&nbsp;Subfleet and Status
</h6>
<div class="form-container-body row">
<div class="form-group col-sm-4">
{{ Form::label('subfleet_id', 'Subfleet:') }}
{{ Form::select('subfleet_id', $subfleets, $subfleet_id ?? null, [
'class' => 'form-control select2',
'placeholder' => 'Select Subfleet'
])
}}
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('status', 'Status:') }}
{{ Form::select('status', $statuses, null, ['class' => 'form-control select2', 'placeholder' => 'Select Status']) }}
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('airport_id', 'Location:') }}
{{ Form::select('airport_id', $airports, null, [
'class' => 'form-control select2'
]) }}
<p class="text-danger">{{ $errors->first('airport_id') }}</p>
</div>
</div>
<div class="col-sm-12">
<div class="form-container">
<h6><i class="fas fa-clock"></i>
&nbsp;Subfleet and Status
</h6>
<div class="form-container-body row">
<div class="form-group col-sm-4">
{{ Form::label('subfleet_id', 'Subfleet:') }}
{{ Form::select('subfleet_id', $subfleets, $subfleet_id ?? null, [
'class' => 'form-control select2',
'placeholder' => 'Select Subfleet'
])
}}
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('status', 'Status:') }}
{{ Form::select('status', $statuses, null, ['class' => 'form-control select2', 'placeholder' => 'Select Status']) }}
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('airport_id', 'Location:') }}
{{ Form::select('airport_id', $airports, null, [
'class' => 'form-control select2'
]) }}
<p class="text-danger">{{ $errors->first('airport_id') }}</p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="form-container">
<h6>
<div class="col-12">
<div class="form-container">
<h6>
<span style="float:right">
View list of
<a href="https://en.wikipedia.org/wiki/List_of_ICAO_aircraft_type_designators"
@@ -44,47 +44,47 @@
IATA and ICAO Type Designators
</a>
</span>
<i class="fas fa-plane"></i>
&nbsp;Aircraft Information
<i class="fas fa-plane"></i>
&nbsp;Aircraft Information
</h6>
<div class="form-container-body">
<div class="row">
<div class="form-group col-sm-12">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
{{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('icao', 'ICAO:') }}
{{ Form::text('icao', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('icao') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('registration', 'Registration:') }}
{{ Form::text('registration', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('registration') }}</p>
</div>
</div>
</div>
</h6>
<div class="form-container-body">
<div class="row">
<div class="form-group col-sm-12">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
{{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('icao', 'ICAO:') }}
{{ Form::text('icao', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('icao') }}</p>
</div>
<div class="form-group col-sm-3">
{{ Form::label('registration', 'Registration:') }}
{{ Form::text('registration', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('registration') }}</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.aircraft.index') }}" class="btn btn-default">Cancel</a>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.aircraft.index') }}" class="btn btn-default">Cancel</a>
</div>
</div>
</div>

View File

@@ -1,5 +1,5 @@
@extends('admin.app')
@section('title', 'Import Aircraft')
@section('content')
@include('admin.common.import', ['route' => 'admin.aircraft.import'])
@include('admin.common.import', ['route' => 'admin.aircraft.import'])
@endsection

View File

@@ -2,18 +2,19 @@
@section('title', 'Aircraft')
@section('actions')
<li><a href="{{ route('admin.aircraft.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.aircraft.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
{{--<li><a href="{{ url('/admin/subfleets') }}"><i class="ti-files"></i>Subfleets</a></li>--}}
<li><a href="{{ route('admin.aircraft.create') }}?subfleet={{$subfleet_id}}">
<i class="ti-plus"></i>New Aircraft</a></li>
<li><a href="{{ route('admin.aircraft.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.aircraft.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
{{--<li><a href="{{ url('/admin/subfleets') }}"><i class="ti-files"></i>Subfleets</a></li>--}}
<li><a href="{{ route('admin.aircraft.create') }}?subfleet={{$subfleet_id}}">
<i class="ti-plus"></i>New Aircraft</a>
</li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
@include('admin.aircraft.table')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.aircraft.table')
</div>
</div>
@endsection

View File

@@ -1,70 +1,70 @@
@section('scripts')
<script>
function setEditable() {
const token = $('meta[name="csrf-token"]').attr('content');
const api_key = $('meta[name="api-key"]').attr('content');
<script>
function setEditable() {
const token = $('meta[name="csrf-token"]').attr('content');
const api_key = $('meta[name="api-key"]').attr('content');
@if(isset($aircraft))
$('#expenses a.text').editable({
@if(isset($aircraft))
$('#expenses a.text').editable({
emptytext: '0',
url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}',
title: 'Enter override value',
ajaxOptions: {
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': token,
}
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': token,
}
},
params: function (params) {
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
}
});
});
$('#expenses a.dropdown').editable({
$('#expenses a.dropdown').editable({
type: 'select',
emptytext: '0',
source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!},
url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}',
title: 'Enter override value',
ajaxOptions: {
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': token,
}
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': token,
}
},
params: function (params) {
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
}
});
@endif
}
});
@endif
}
$(document).ready(function() {
$(document).ready(function () {
setEditable();
setEditable();
$(document).on('submit', 'form.modify_expense', function (event) {
$(document).on('submit', 'form.modify_expense', function (event) {
event.preventDefault();
console.log(event);
$.pjax.submit(event, '#expenses-wrapper', {push: false});
});
});
$(document).on('pjax:complete', function () {
initPlugins();
setEditable();
$(document).on('pjax:complete', function () {
initPlugins();
setEditable();
});
});
});
</script>
</script>
@endsection

View File

@@ -1,43 +1,44 @@
@extends('admin.app')
@section('content')
<section class="content-header">
<section class="content-header">
<h1 class="pull-left">{{ $aircraft->name }}</h1>
<h1 class="pull-right">
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{{ route('admin.aircraft.edit', $aircraft->id) }}">Edit</a>
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px"
href="{{ route('admin.aircraft.edit', $aircraft->id) }}">Edit</a>
</h1>
</section>
<section class="content">
</section>
<section class="content">
<div class="clearfix"></div>
<div class="row">
@include('admin.aircraft.show_fields')
@include('admin.aircraft.show_fields')
</div>
</section>
</section>
@endsection
@section('scripts')
<script>
$(document).ready(function() {
$(".ac-fare-dropdown").select2();
$('#aircraft_fares a').editable({
<script>
$(document).ready(function () {
$(".ac-fare-dropdown").select2();
$('#aircraft_fares a').editable({
type: 'text',
mode: 'inline',
emptytext: 'default',
url: '/admin/aircraft/{{ $aircraft->id }}/fares',
title: 'Enter override value',
ajaxOptions: { 'type': 'put'},
params: function(params) {
ajaxOptions: {'type': 'put'},
params: function (params) {
return {
fare_id: params.pk,
name: params.name,
value: params.value
fare_id: params.pk,
name: params.name,
value: params.value
}
}
});
});
$(document).on('submit', 'form.rm_fare', function(event) {
$(document).on('submit', 'form.rm_fare', function (event) {
event.preventDefault();
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
});
});
});
</script>
</script>
@endsection

View File

@@ -1,47 +1,47 @@
<!-- Icao Field -->
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">{{ Form::label('airport_id', 'Location') }}</h3>
</div>
<div class="box-body">
<p class="lead">
@if($aircraft->airport)
{{ $aircraft->airport->icao }}</p>
@endif
</div>
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">{{ Form::label('airport_id', 'Location') }}</h3>
</div>
<div class="box-body">
<p class="lead">
@if($aircraft->airport)
{{ $aircraft->airport->icao }}</p>
@endif
</div>
</div>
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('name', 'Name') }}</h3>
</div>
<div class="box-body"><p class="lead">{{ $aircraft->name }}</p></div>
<div class="box box-solid">
<div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('name', 'Name') }}</h3>
</div>
<div class="box-body"><p class="lead">{{ $aircraft->name }}</p></div>
</div>
</div>
<!-- Registration Field -->
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('registration', 'Registration') }}</h3>
</div>
<div class="box-body"><p class="lead">{{ $aircraft->registration }}</p></div>
<div class="box box-solid">
<div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('registration', 'Registration') }}</h3>
</div>
<div class="box-body"><p class="lead">{{ $aircraft->registration }}</p></div>
</div>
</div>
<!-- Active Field -->
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('active', 'Active:') }}</h3>
</div>
<div class="box-body"><p class="lead">@if ($aircraft->active == '1') yes @else no @endif</p></div>
<div class="box box-solid">
<div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('active', 'Active:') }}</h3>
</div>
<div class="box-body"><p class="lead">@if ($aircraft->active == '1') yes @else no @endif</p></div>
</div>
</div>

View File

@@ -1,49 +1,49 @@
<table class="table table-hover table-responsive" id="aircrafts-table">
<thead>
<th>Name</th>
<th style="text-align: center;">Registration</th>
<th>Subfleet</th>
<th style="text-align: center;">Location</th>
<th style="text-align: center;">Hours</th>
<th style="text-align: center;">Active</th>
<th style="text-align: right;"></th>
</thead>
<tbody>
@foreach($aircraft as $ac)
<tr>
<td><a href="{{ route('admin.aircraft.edit', [$ac->id]) }}">{{ $ac->name }}</a></td>
<td style="text-align: center;">{{ $ac->registration }}</td>
<td>
@if($ac->subfleet_id && $ac->subfleet)
<a href="{{ route('admin.subfleets.edit', [$ac->subfleet_id]) }}">
{{ $ac->subfleet->name }}
</a>
@else
-
@endif
</td>
<td style="text-align: center;">{{ $ac->airport_id }}</td>
<td style="text-align: center;">
{{ Utils::minutesToTimeString($ac->flight_hours) }}
</td>
<td style="text-align: center;">
@if($ac->status == \App\Models\Enums\AircraftStatus::ACTIVE)
<span class="label label-success">{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}</span>
@else
<span class="label label-default">
<thead>
<th>Name</th>
<th style="text-align: center;">Registration</th>
<th>Subfleet</th>
<th style="text-align: center;">Location</th>
<th style="text-align: center;">Hours</th>
<th style="text-align: center;">Active</th>
<th style="text-align: right;"></th>
</thead>
<tbody>
@foreach($aircraft as $ac)
<tr>
<td><a href="{{ route('admin.aircraft.edit', [$ac->id]) }}">{{ $ac->name }}</a></td>
<td style="text-align: center;">{{ $ac->registration }}</td>
<td>
@if($ac->subfleet_id && $ac->subfleet)
<a href="{{ route('admin.subfleets.edit', [$ac->subfleet_id]) }}">
{{ $ac->subfleet->name }}
</a>
@else
-
@endif
</td>
<td style="text-align: center;">{{ $ac->airport_id }}</td>
<td style="text-align: center;">
{{ Utils::minutesToTimeString($ac->flight_hours) }}
</td>
<td style="text-align: center;">
@if($ac->status == \App\Models\Enums\AircraftStatus::ACTIVE)
<span class="label label-success">{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}</span>
@else
<span class="label label-default">
{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}
</span>
@endif
</td>
<td style="width: 10%; text-align: right;">
{{ Form::open(['route' => ['admin.aircraft.destroy', $ac->id], 'method' => 'delete']) }}
<a href="{{ route('admin.aircraft.edit', [$ac->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>
@endif
</td>
<td style="width: 10%; text-align: right;">
{{ Form::open(['route' => ['admin.aircraft.destroy', $ac->id], 'method' => 'delete']) }}
<a href="{{ route('admin.aircraft.edit', [$ac->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>

View File

@@ -1,11 +1,11 @@
@extends('admin.app')
@section('title', 'Add Airline')
@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,17 +1,17 @@
@extends('admin.app')
@section('title', "Edit \"$airline->name\"")
@section('content')
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($airline, ['route' => ['admin.airlines.update', $airline->id], 'method' => 'patch']) }}
@include('admin.airlines.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($airline, ['route' => ['admin.airlines.update', $airline->id], 'method' => 'patch']) }}
@include('admin.airlines.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
<div class="card border-blue-bottom">
<div class="content">
@include('admin.common.file_upload', ['model' => $airline])
</div>
</div>
</div>
</div>
@endsection

View File

@@ -1,55 +1,55 @@
<div class="row">
<!-- Code Field -->
<div class="form-group col-sm-6">
{{ Form::label('icao', 'Code:') }}&nbsp;<span class="required">*</span>
{{ Form::text('icao', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('icao') }}</p>
</div>
<!-- Code Field -->
<div class="form-group col-sm-6">
{{ Form::label('icao', 'Code:') }}&nbsp;<span class="required">*</span>
{{ Form::text('icao', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('icao') }}</p>
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
{{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('logo', 'Logo URL:') }}
{{ Form::text('logo', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('logo') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('logo', 'Logo URL:') }}
{{ Form::text('logo', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('logo') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
{{ Form::label('country', 'Country:') }} <br/>
{{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
<p class="text-danger">{{ $errors->first('country') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('country', 'Country:') }} <br/>
{{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
<p class="text-danger">{{ $errors->first('country') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('active', 'Active:') }}
<br />
<label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }}
</label>
</div>
<div class="form-group col-sm-6">
{{ Form::label('active', 'Active:') }}
<br/>
<label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }}
</label>
</div>
</div>
<div class="row">
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Cancel</a>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Cancel</a>
</div>
</div>
</div>

View File

@@ -2,18 +2,18 @@
@section('title', 'Airlines')
@section('actions')
<li>
<a href="{{ route('admin.airlines.create') }}">
<i class="ti-plus"></i>
Add New</a>
</li>
<li>
<a href="{{ route('admin.airlines.create') }}">
<i class="ti-plus"></i>
Add New</a>
</li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
@include('admin.airlines.table')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.airlines.table')
</div>
</div>
@endsection

View File

@@ -1,19 +1,19 @@
@extends('admin.app')
@section('content')
<section class="content-header">
<h1>
Airlines
</h1>
</section>
<div class="content">
<div class="box box-primary">
<div class="box-body">
<div class="row" style="padding-left: 20px">
@include('admin.airlines.show_fields')
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Back</a>
</div>
</div>
<section class="content-header">
<h1>
Airlines
</h1>
</section>
<div class="content">
<div class="box box-primary">
<div class="box-body">
<div class="row" style="padding-left: 20px">
@include('admin.airlines.show_fields')
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Back</a>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -1,40 +1,40 @@
<!-- Code Field -->
<div class="form-group">
{{ Form::label('icao', 'ICAO:') }}
<p>{{ $airlines->icao }}</p>
{{ Form::label('icao', 'ICAO:') }}
<p>{{ $airlines->icao }}</p>
</div>
<div class="form-group">
{{ Form::label('iata', 'IATA:') }}
<p>{{ $airlines->iata }}</p>
{{ Form::label('iata', 'IATA:') }}
<p>{{ $airlines->iata }}</p>
</div>
<!-- Name Field -->
<div class="form-group">
{{ Form::label('name', 'Name:') }}
<p>{{ $airlines->name }}</p>
{{ Form::label('name', 'Name:') }}
<p>{{ $airlines->name }}</p>
</div>
<div class="form-group">
{{ Form::label('logo', 'Logo URL:') }}
<p>{{ $airlines->logo }}</p>
{{ Form::label('logo', 'Logo URL:') }}
<p>{{ $airlines->logo }}</p>
</div>
<!-- Active Field -->
<div class="form-group">
{{ Form::label('active', 'Active:') }}
<p>{{ $airlines->active }}</p>
{{ Form::label('active', 'Active:') }}
<p>{{ $airlines->active }}</p>
</div>
<!-- Created At Field -->
<div class="form-group">
{{ Form::label('created_at', 'Created At:') }}
<p>{{ show_datetime($airlines->created_at) }}</p>
{{ Form::label('created_at', 'Created At:') }}
<p>{{ show_datetime($airlines->created_at) }}</p>
</div>
<!-- Updated At Field -->
<div class="form-group">
{{ Form::label('updated_at', 'Updated At:') }}
<p>{{ show_datetime($airlines->updated_at) }}</p>
{{ Form::label('updated_at', 'Updated At:') }}
<p>{{ show_datetime($airlines->updated_at) }}</p>
</div>

View File

@@ -1,36 +1,36 @@
<table class="table table-hover table-responsive" id="airlines-table">
<thead>
<th>Code</th>
<th>Name</th>
<th class="text-center">Active</th>
<th></th>
</thead>
<tbody>
@foreach($airlines as $al)
<tr>
<td nowrap="true">
@if(filled($al->country))
<span class="flag-icon flag-icon-{{ $al->country }}"></span>
&nbsp;
@endif
<a href="{{ route('admin.airlines.edit', [$al->id]) }}">{{ $al->iata }}/{{ $al->icao }}</a>
</td>
<td>{{ $al->name }}</td>
<td class="text-center">
@if($al->active == 1)
<span class="label label-success">Active</span>
@else
<span class="label label-default">Inactive</span>
@endif
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.airlines.destroy', $al->id], 'method' => 'delete']) }}
<a href="{{ route('admin.airlines.edit', [$al->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>
<thead>
<th>Code</th>
<th>Name</th>
<th class="text-center">Active</th>
<th></th>
</thead>
<tbody>
@foreach($airlines as $al)
<tr>
<td nowrap="true">
@if(filled($al->country))
<span class="flag-icon flag-icon-{{ $al->country }}"></span>
&nbsp;
@endif
<a href="{{ route('admin.airlines.edit', [$al->id]) }}">{{ $al->iata }}/{{ $al->icao }}</a>
</td>
<td>{{ $al->name }}</td>
<td class="text-center">
@if($al->active == 1)
<span class="label label-success">Active</span>
@else
<span class="label label-default">Inactive</span>
@endif
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.airlines.destroy', $al->id], 'method' => 'delete']) }}
<a href="{{ route('admin.airlines.edit', [$al->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>

View File

@@ -2,12 +2,12 @@
@section('title', 'Add Airport')
@section('content')
<div class="card border-blue-bottom">
<div class="card border-blue-bottom">
<div class="content">
{{ Form::open(['route' => 'admin.airports.store', 'id' => 'airportForm']) }}
@include('admin.airports.fields')
{{ Form::close() }}
{{ Form::open(['route' => 'admin.airports.store', 'id' => 'airportForm']) }}
@include('admin.airports.fields')
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@include('admin.airports.script')

View File

@@ -1,28 +1,28 @@
@extends('admin.app')
@section('title', "Edit \"$airport->name\"")
@section('content')
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($airport, [
'route' => ['admin.airports.update', $airport->id],
'method' => 'patch',
'id' => 'airportForm'])
}}
@include('admin.airports.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($airport, [
'route' => ['admin.airports.update', $airport->id],
'method' => 'patch',
'id' => 'airportForm'])
}}
@include('admin.airports.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.airports.expenses')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.airports.expenses')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.common.file_upload', ['model' => $airport])
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.common.file_upload', ['model' => $airport])
</div>
</div>
@endsection
@include('admin.airports.script')

View File

@@ -1,75 +1,75 @@
<div id="airport-expenses-wrapper" class="col-12">
<div class="header">
<h3>expenses</h3>
@component('admin.components.info')
These expenses are only applied to this airport.
@endcomponent
</div>
<br/>
<table class="table table-responsive" id="airport-expenses">
@if(count($airport->expenses))
<thead>
<th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Type</th>
<th></th>
</thead>
@endif
<tbody>
@foreach($airport->expenses as $expense)
<tr>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="name">{{ $expense->name }}</a>
</p>
</td>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="amount">{{ $expense->amount }}</a>
</p>
</td>
<td>
<p>
<a href="#"
class="dropdown"
data-pk="{{ $expense->id }}"
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
</p>
</td>
<td align="right">
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
{{ Form::hidden('expense_id', $expense->id) }}
{{ 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>
<hr/>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
'class' => 'btn btn-success btn-small']) }}
{{ Form::close() }}
<p class="text-danger">{{ $errors->first('name') }}</p>
<p class="text-danger">{{ $errors->first('amount') }}</p>
</div>
</div>
<div class="header">
<h3>expenses</h3>
@component('admin.components.info')
These expenses are only applied to this airport.
@endcomponent
</div>
<br/>
<table class="table table-responsive" id="airport-expenses">
@if(count($airport->expenses))
<thead>
<th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Type</th>
<th></th>
</thead>
@endif
<tbody>
@foreach($airport->expenses as $expense)
<tr>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="name">{{ $expense->name }}</a>
</p>
</td>
<td>
<p>
<a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="amount">{{ $expense->amount }}</a>
</p>
</td>
<td>
<p>
<a href="#"
class="dropdown"
data-pk="{{ $expense->id }}"
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
</p>
</td>
<td align="right">
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
{{ Form::hidden('expense_id', $expense->id) }}
{{ 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>
<hr/>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
'class' => 'btn btn-success btn-small']) }}
{{ Form::close() }}
<p class="text-danger">{{ $errors->first('name') }}</p>
<p class="text-danger">{{ $errors->first('amount') }}</p>
</div>
</div>
</div>
</div>

View File

@@ -1,101 +1,101 @@
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12">
<!-- Icao Field -->
<div class="row">
<div class="form-group col-sm-6">
{{ Form::label('icao', 'ICAO:') }}&nbsp;<span class="required">*</span>
<a href="#" class="airport_data_lookup">Lookup</a>
{{ Form::text('icao', null, [
'id' => 'airport_icao', 'class' => 'form-control'
]) }}
<p class="text-danger">{{ $errors->first('icao') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('icao', 'ICAO:') }}&nbsp;<span class="required">*</span>
<a href="#" class="airport_data_lookup">Lookup</a>
{{ Form::text('icao', null, [
'id' => 'airport_icao', 'class' => 'form-control'
]) }}
<p class="text-danger">{{ $errors->first('icao') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('lat', 'Latitude:') }}&nbsp;<span class="required">*</span>
{{ Form::text('lat', null, ['class' => 'form-control', 'rv-value' => 'airport.lat']) }}
<p class="text-danger">{{ $errors->first('lat') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('lat', 'Latitude:') }}&nbsp;<span class="required">*</span>
{{ Form::text('lat', null, ['class' => 'form-control', 'rv-value' => 'airport.lat']) }}
<p class="text-danger">{{ $errors->first('lat') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('lon', 'Longitude:') }}&nbsp;<span class="required">*</span>
{{ Form::text('lon', null, ['class' => 'form-control', 'rv-value' => 'airport.lon']) }}
<p class="text-danger">{{ $errors->first('lon') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('lon', 'Longitude:') }}&nbsp;<span class="required">*</span>
{{ Form::text('lon', null, ['class' => 'form-control', 'rv-value' => 'airport.lon']) }}
<p class="text-danger">{{ $errors->first('lon') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
{{ Form::label('country', 'Country:') }}
{{ Form::text('country', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('country') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('country', 'Country:') }}
{{ Form::text('country', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('country') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('location', 'Location:') }}
{{ Form::text('location', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('location') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('location', 'Location:') }}
{{ Form::text('location', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('location') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('timezone', 'Timezone:') }}
{{ 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('timezone', 'Timezone:') }}
{{ 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-6">
{{ Form::label('ground_handling_cost', 'Ground Handling Cost:') }}
{{ Form::number('ground_handling_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('ground_handling_cost') }}</p>
<div class="form-group col-sm-6">
{{ Form::label('ground_handling_cost', 'Ground Handling Cost:') }}
{{ Form::number('ground_handling_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('ground_handling_cost') }}</p>
@component('admin.components.info')
This is the base rate per-flight. A multiplier for this rate can be
set in the subfleet, so you can modulate those costs from there.
@endcomponent
</div>
@component('admin.components.info')
This is the base rate per-flight. A multiplier for this rate can be
set in the subfleet, so you can modulate those costs from there.
@endcomponent
</div>
<div class="form-group col-md-6">
{{ Form::label('fuel_jeta_cost', 'Jet A Fuel Cost:') }}
{{ Form::number('fuel_jeta_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('fuel_jeta_cost') }}</p>
<div class="form-group col-md-6">
{{ Form::label('fuel_jeta_cost', 'Jet A Fuel Cost:') }}
{{ Form::number('fuel_jeta_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('fuel_jeta_cost') }}</p>
@component('admin.components.info')
This is the cost per {{ config('phpvms.internal_units.fuel') }}
@endcomponent
</div>
@component('admin.components.info')
This is the cost per {{ config('phpvms.internal_units.fuel') }}
@endcomponent
</div>
</div>
<div class="row">
<div class="form-group col-sm-4">
{{ Form::label('hub', 'Hub:') }}
{{ Form::hidden('hub', 0) }}
{{ Form::checkbox('hub', null) }}
</div>
<!-- Submit Field -->
<div class="form-group col-sm-8">
<div class="text-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.airports.index') }}" class="btn btn-default">Cancel</a>
</div>
<div class="form-group col-sm-4">
{{ Form::label('hub', 'Hub:') }}
{{ Form::hidden('hub', 0) }}
{{ Form::checkbox('hub', null) }}
</div>
<!-- Submit Field -->
<div class="form-group col-sm-8">
<div class="text-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.airports.index') }}" class="btn btn-default">Cancel</a>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,5 +1,5 @@
@extends('admin.app')
@section('title', 'Import Airports')
@section('content')
@include('admin.common.import', ['route' => 'admin.airports.import'])
@include('admin.common.import', ['route' => 'admin.airports.import'])
@endsection

View File

@@ -2,26 +2,26 @@
@section('title', 'Airports')
@section('actions')
<li><a href="{{ route('admin.airports.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.airports.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
<li><a href="{{ route('admin.airports.create') }}"><i class="ti-plus"></i>Add New</a></li>
<li><a href="{{ route('admin.airports.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.airports.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
<li><a href="{{ route('admin.airports.create') }}"><i class="ti-plus"></i>Add New</a></li>
@endsection
@section('content')
<div class="card">
@include('admin.airports.search')
</div>
<div class="card">
@include('admin.airports.search')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.airports.table')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.airports.table')
</div>
</div>
<div class="row">
<div class="col-12 text-center">
{{ $airports->links('admin.pagination.default') }}
</div>
<div class="row">
<div class="col-12 text-center">
{{ $airports->links('admin.pagination.default') }}
</div>
</div>
@endsection
@include('admin.airports.script')

View File

@@ -1,126 +1,126 @@
@section('scripts')
<script>
'use strict';
<script>
'use strict';
function setEditable() {
const csrf_token = $('meta[name="csrf-token"]').attr('content');
const api_key = $('meta[name="api-key"]').attr('content');
function setEditable() {
const csrf_token = $('meta[name="csrf-token"]').attr('content');
const api_key = $('meta[name="api-key"]').attr('content');
@if(isset($airport))
$('#airport-expenses a.text').editable({
@if(isset($airport))
$('#airport-expenses a.text').editable({
emptytext: '0',
url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}',
title: 'Enter override value',
ajaxOptions: {
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token
}
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token
}
},
params: function (params) {
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
}
});
});
$('#airport-expenses a.dropdown').editable({
$('#airport-expenses a.dropdown').editable({
type: 'select',
emptytext: '0',
source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!},
url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}',
title: 'Enter override value',
ajaxOptions: {
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token
}
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token
}
},
params: function (params) {
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
return {
_method: 'put',
expense_id: params.pk,
name: params.name,
value: params.value
}
}
});
@endif
}
});
@endif
}
$(document).ready(function() {
const api_key = $('meta[name="api-key"]').attr('content');
const csrf_token = $('meta[name="csrf-token"]').attr('content');
$(document).ready(function () {
const api_key = $('meta[name="api-key"]').attr('content');
const csrf_token = $('meta[name="csrf-token"]').attr('content');
setEditable();
setEditable();
$('#airports-table a.inline').editable({
$('#airports-table a.inline').editable({
type: 'text',
mode: 'inline',
emptytext: '0',
url: '{{ url('/admin/airports/fuel') }}',
title: 'Enter price per unit of fuel',
ajaxOptions: {
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token
}
type: 'post',
headers: {
'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token
}
},
params: function(params) {
return {
_method: 'put',
id: params.pk,
name: params.name,
value: params.value
}
params: function (params) {
return {
_method: 'put',
id: params.pk,
name: params.name,
value: params.value
}
}
});
});
$('a.airport_data_lookup').click(async function(e) {
$('a.airport_data_lookup').click(async function (e) {
e.preventDefault();
const icao = $("input#airport_icao").val();
if(icao === '') {
return;
if (icao === '') {
return;
}
let response;
try {
response = await phpvms.airport_lookup(icao);
response = await phpvms.airport_lookup(icao);
} catch (e) {
console.log('Error looking up airport!', e);
return;
console.log('Error looking up airport!', e);
return;
}
_.forEach(response.data, function (value, key) {
if (key === 'city') {
key = 'location';
}
if (key === 'city') {
key = 'location';
}
$("#" + key).val(value);
$("#" + key).val(value);
if (key === 'tz') {
$("#timezone").val(value);
$("#timezone").trigger('change');
}
if (key === 'tz') {
$("#timezone").val(value);
$("#timezone").trigger('change');
}
});
});
});
$(document).on('submit', 'form.modify_expense', function (event) {
$(document).on('submit', 'form.modify_expense', function (event) {
event.preventDefault();
console.log(event);
$.pjax.submit(event, '#airport-expenses-wrapper', {push: false});
});
});
$(document).on('pjax:complete', function () {
$(document).on('pjax:complete', function () {
initPlugins();
setEditable();
});
});
});
</script>
</script>
@endsection

View File

@@ -1,15 +1,15 @@
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
{{ Form::open(['route' => 'admin.airports.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
<div class="row">
<div class="col-sm-12">
<div class="form-group">
{{ Form::open(['route' => 'admin.airports.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
{{ Form::label('icao', 'ICAO:') }}
{{ Form::text('icao', null, ['class' => 'form-control']) }}
&nbsp;
<a href="{{ route('admin.airports.index') }}">clear</a>
{{ Form::close() }}
</div>
</div>
{{ Form::label('icao', 'ICAO:') }}
{{ Form::text('icao', null, ['class' => 'form-control']) }}
&nbsp;
<a href="{{ route('admin.airports.index') }}">clear</a>
{{ Form::close() }}
</div>
</div>
</div>
</div>

View File

@@ -1,35 +1,36 @@
@extends('admin.app')
@section('content')
<section class="content-header">
<section class="content-header">
<h1 class="pull-left">{{ $airport->name }} - {{ $airport->location }}</h1>
<h1 class="pull-right">
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{{ route('admin.airports.edit', $airport->id) }}">Edit</a>
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px"
href="{{ route('admin.airports.edit', $airport->id) }}">Edit</a>
</h1>
</section>
<section class="content">
</section>
<section class="content">
<div class="clearfix"></div>
<div class="row">
@include('admin.airports.show_fields')
@include('admin.airports.show_fields')
</div>
<div class="box box-primary">
<div class="box-body">
<div class="row">
<div class="col-xs-12">
<div class="box-body">
<div id="map" style="width: 100%; height: 800px"></div>
</div>
</div>
<div class="box-body">
<div class="row">
<div class="col-xs-12">
<div class="box-body">
<div id="map" style="width: 100%; height: 800px"></div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
@endsection
@section('scripts')
<script type="text/javascript">
phpvms_render_airspace_map({
lat: {{ $airport->lat }},
lon: {{ $airport->lon }},
});
</script>
<script type="text/javascript">
phpvms_render_airspace_map({
lat: {{ $airport->lat }},
lon: {{ $airport->lon }},
});
</script>
@endsection

View File

@@ -1,22 +1,21 @@
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">ICAO</h3>
</div>
<div class="box-body">
<p class="lead">{{ $airport->icao }}<strong></p>
</div>
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">ICAO</h3>
</div>
<div class="box-body">
<p class="lead">{{ $airport->icao }}<strong></p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">Coordinates</h3>
</div>
<div class="box-body">
<p class="lead">{{ $airport->lat}}/{{ $airport->lon }}</p>
</div>
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">Coordinates</h3>
</div>
<div class="box-body">
<p class="lead">{{ $airport->lat}}/{{ $airport->lon }}</p>
</div>
</div>
</div>

View File

@@ -1,39 +1,41 @@
<div id="airports_table_wrapper">
<table class="table table-hover table-responsive" id="airports-table">
<thead>
<th>ICAO</th>
<th>Name</th>
<th>Location</th>
<th>Hub</th>
<th style="text-align: center;">GH Cost</th>
<th style="text-align: center;">JetA</th>
<th></th>
</thead>
<tbody>
@foreach($airports as $airport)
<tr>
<td><a href="{{ route('admin.airports.edit', [$airport->id]) }}">{{ $airport->icao }}</a></td>
<td>{{ $airport->name }}</td>
<td>{{ $airport->location }}</td>
<td style="text-align: center;">
@if($airport->hub === true)
<span class="label label-success">Hub</span>
@endif
</td>
<td style="text-align: center;">
{{ $airport->ground_handling_cost }}
</td>
<td style="text-align: center;">
<a class="inline" href="#" data-pk="{{ $airport->id }}" data-name="fuel_jeta_cost">{{ $airport->fuel_jeta_cost }}</a>
</td>
<td style="text-align: right;">
{{ Form::open(['route' => ['admin.airports.destroy', $airport->id], 'method' => 'delete']) }}
<a href="{{ route('admin.airports.edit', [$airport->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>
<table class="table table-hover table-responsive" id="airports-table">
<thead>
<th>ICAO</th>
<th>Name</th>
<th>Location</th>
<th>Hub</th>
<th style="text-align: center;">GH Cost</th>
<th style="text-align: center;">JetA</th>
<th></th>
</thead>
<tbody>
@foreach($airports as $airport)
<tr>
<td><a href="{{ route('admin.airports.edit', [$airport->id]) }}">{{ $airport->icao }}</a></td>
<td>{{ $airport->name }}</td>
<td>{{ $airport->location }}</td>
<td style="text-align: center;">
@if($airport->hub === true)
<span class="label label-success">Hub</span>
@endif
</td>
<td style="text-align: center;">
{{ $airport->ground_handling_cost }}
</td>
<td style="text-align: center;">
<a class="inline" href="#" data-pk="{{ $airport->id }}"
data-name="fuel_jeta_cost">{{ $airport->fuel_jeta_cost }}</a>
</td>
<td style="text-align: right;">
{{ Form::open(['route' => ['admin.airports.destroy', $airport->id], 'method' => 'delete']) }}
<a href="{{ route('admin.airports.edit', [$airport->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>
</div>

View File

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

View File

@@ -1,12 +1,12 @@
@extends('admin.app')
@section('title', "Edit \"$award->title\" Award")
@section('content')
<div class="card border-blue-bottom">
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($award, ['route' => ['admin.awards.update', $award->id], 'method' => 'patch']) }}
@include('admin.awards.fields')
{{ Form::close() }}
{{ Form::model($award, ['route' => ['admin.awards.update', $award->id], 'method' => 'patch']) }}
@include('admin.awards.fields')
{{ Form::close() }}
</div>
</div>
</div>
@endsection
@include('admin.awards.scripts')

View File

@@ -1,78 +1,78 @@
<div class="row">
<div class="col-sm-12">
@component('admin.components.info')
These are the awards that pilots can earn. Each award is assigned an
award class, which will be run whenever a pilot's stats are changed,
including after a PIREP is accepted.
@endcomponent
</div>
<div class="col-sm-12">
@component('admin.components.info')
These are the awards that pilots can earn. Each award is assigned an
award class, which will be run whenever a pilot's stats are changed,
including after a PIREP is accepted.
@endcomponent
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}&nbsp;<span class="required">*</span>
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
This will be the title of the award
</div>
{!! Form::text('name', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('name') }}</p>
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}&nbsp;<span class="required">*</span>
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
This will be the title of the award
</div>
{!! Form::text('name', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-6">
{!! Form::label('image', 'Image:') !!}
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
This is the image of the award. Be creative!
</div>
{!! Form::text('image_url', null, [
'class' => 'form-control',
'placeholder' => 'Enter the url of the image location'
]) !!}
<p class="text-danger">{{ $errors->first('image_url') }}</p>
<div class="form-group col-sm-6">
{!! Form::label('image', 'Image:') !!}
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
This is the image of the award. Be creative!
</div>
{!! Form::text('image_url', null, [
'class' => 'form-control',
'placeholder' => 'Enter the url of the image location'
]) !!}
<p class="text-danger">{{ $errors->first('image_url') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
{!! Form::label('description', 'Description:') !!}&nbsp
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
This is the description of the award.
</div>
{!! Form::textarea('description', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('description') }}</p>
<div class="form-group col-sm-6">
{!! Form::label('description', 'Description:') !!}&nbsp
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
This is the description of the award.
</div>
{!! Form::textarea('description', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('description') }}</p>
</div>
<div class="form-group col-sm-6">
<div>
{{ Form::label('ref_model', 'Award Class:') }}
{{ Form::select('ref_model', $award_classes, null , [
'class' => 'form-control select2',
'id' => 'award_class_select',
]) }}
<p class="text-danger">{{ $errors->first('ref_model') }}</p>
</div>
<div class="form-group col-sm-6">
<div>
{{ Form::label('ref_model', 'Award Class:') }}
{{ Form::select('ref_model', $award_classes, null , [
'class' => 'form-control select2',
'id' => 'award_class_select',
]) }}
<p class="text-danger">{{ $errors->first('ref_model') }}</p>
</div>
<div>
{{ Form::label('ref_model_params', 'Award Class parameters') }}
{{ Form::text('ref_model_params', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('ref_model_params') }}</p>
<div>
{{ Form::label('ref_model_params', 'Award Class parameters') }}
{{ Form::text('ref_model_params', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('ref_model_params') }}</p>
<p id="ref_model_param_description">
</p>
</div>
<p id="ref_model_param_description">
</p>
</div>
</div>
</div>
<div class="row">
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
<a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
<a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a>
</div>
</div>
</div>

View File

@@ -2,17 +2,17 @@
@section('title', 'Awards')
@section('actions')
<li>
<a href="{!! route('admin.awards.create') !!}">
<i class="ti-plus"></i>
Add New
</a>
</li>
<li>
<a href="{!! route('admin.awards.create') !!}">
<i class="ti-plus"></i>
Add New
</a>
</li>
@endsection
@section('content')
<div class="card">
@include('admin.awards.table')
</div>
<div class="card">
@include('admin.awards.table')
</div>
@endsection

View File

@@ -1,30 +1,30 @@
@section('scripts')
<script>
@if(isset($award_descriptions))
<script>
@if(isset($award_descriptions))
const award_descriptions = {!! json_encode($award_descriptions) !!};
@else
@else
const award_descriptions = {};
@endif
@endif
const changeParamDescription = (award_class) => {
const descrip = award_descriptions[award_class];
console.log('Found description: ', descrip);
$("p#ref_model_param_description").text(descrip);
};
const changeParamDescription = (award_class) => {
const descrip = award_descriptions[award_class];
console.log('Found description: ', descrip);
$("p#ref_model_param_description").text(descrip);
};
$(document).ready(() => {
const select_id = "select#award_class_select";
console.log('award descriptions', award_descriptions);
$(select_id).change((e) => {
$(document).ready(() => {
const select_id = "select#award_class_select";
console.log('award descriptions', award_descriptions);
$(select_id).change((e) => {
const award_class = $(select_id + " option:selected").val();
console.log('award class selected: ', award_class);
changeParamDescription(award_class);
});
});
// on load
const award_class = $(select_id + " option:selected").val();
changeParamDescription(award_class);
});
</script>
// on load
const award_class = $(select_id + " option:selected").val();
changeParamDescription(award_class);
});
</script>
@endsection

View File

@@ -1,40 +1,40 @@
<table class="table table-hover table-responsive" id="awards-table">
<thead>
<th>Name</th>
<th>Description</th>
<th>Image</th>
<th class="text-right">Action</th>
</thead>
<tbody>
@foreach($awards as $award)
<tr>
<td>
<a href="{{ route('admin.awards.edit', [$award->id]) }}">
{{ $award->name }}</a>
</td>
<td>{{ $award->description }}</td>
<td>
<thead>
<th>Name</th>
<th>Description</th>
<th>Image</th>
<th class="text-right">Action</th>
</thead>
<tbody>
@foreach($awards as $award)
<tr>
<td>
<a href="{{ route('admin.awards.edit', [$award->id]) }}">
{{ $award->name }}</a>
</td>
<td>{{ $award->description }}</td>
<td>
@if($award->image)
<img src="{{ $award->image }}" name="{{ $award->name }}" alt="No Image Available" />
@else
-
@endif
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.awards.destroy', $award->id], 'method' => 'delete']) }}
<a href="{{ route('admin.awards.edit', [$award->id]) }}" class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i></a>
@if($award->image)
<img src="{{ $award->image }}" name="{{ $award->name }}" alt="No Image Available"/>
@else
-
@endif
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.awards.destroy', $award->id], 'method' => 'delete']) }}
<a href="{{ route('admin.awards.edit', [$award->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 you want to delete this award?')"
]) }}
{{ Form::button('<i class="fa fa-times"></i>', [
'type' => 'submit',
'class' => 'btn btn-sm btn-danger btn-icon',
'onclick' => "return confirm('Are you sure you want to delete this award?')"
]) }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>

View File

@@ -6,87 +6,87 @@ Pass in:
--}}
<div id="airport-files-wrapper" class="col-12">
<div class="header">
<h3>files</h3>
@component('admin.components.info')
Add a download link or upload a file to make available
@endcomponent
</div>
<div class="header">
<h3>files</h3>
@component('admin.components.info')
Add a download link or upload a file to make available
@endcomponent
</div>
@if(count($model->files) === 0)
@include('admin.common.none_added', ['type' => 'files'])
@if(count($model->files) === 0)
@include('admin.common.none_added', ['type' => 'files'])
@endif
{{-- Show all the files here --}}
<table class="table table-hover table-responsive">
@if(count($model->files))
<thead>
<tr>
<td>Name</td>
<td>Direct Link</td>
<td>Downloads</td>
<td class="text-right"></td>
</tr>
</thead>
@endif
<tbody>
@foreach($model->files as $file)
<tr>
<td>{{ $file->name }}</td>
<td><a href="{{ $file->url }}" target="_blank">Link to file</a></td>
<td>{{$file->download_count}}</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.files.delete', $file->id], 'method' => 'delete']) }}
{{ Form::hidden('id', $file->id) }}
{{ 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>
<hr>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open([
'url' => route('admin.files.store'),
'method' => 'POST',
'class' => 'form-inline',
'files' => true
])
}}
{{-- Show all the files here --}}
<table class="table table-hover table-responsive">
@if(count($model->files))
<thead>
<tr>
<td>Name</td>
<td>Direct Link</td>
<td>Downloads</td>
<td class="text-right"></td>
</tr>
</thead>
@endif
<tbody>
@foreach($model->files as $file)
<tr>
<td>{{ $file->name }}</td>
<td><a href="{{ $file->url }}" target="_blank">Link to file</a></td>
<td>{{$file->download_count}}</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.files.delete', $file->id], 'method' => 'delete']) }}
{{ Form::hidden('id', $file->id) }}
{{ 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>
<hr>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open([
'url' => route('admin.files.store'),
'method' => 'POST',
'class' => 'form-inline',
'files' => true
])
}}
{{ Form::token() }}
{{ Form::token() }}
<span class="required">*</span>
{{ Form::text('file_name', null, ['class' => 'form-control', 'placeholder' => 'Name']) }}
{{ Form::text('file_description', null, ['class' => 'form-control', 'placeholder' => 'Description']) }}
{{ Form::text('url', null, ['class' => 'form-control', 'placeholder' => 'URL']) }}
{{ Form::file('file', ['class' => 'form-control']) }}
<span class="required">*</span>
{{ Form::text('file_name', null, ['class' => 'form-control', 'placeholder' => 'Name']) }}
{{ Form::text('file_description', null, ['class' => 'form-control', 'placeholder' => 'Description']) }}
{{ Form::text('url', null, ['class' => 'form-control', 'placeholder' => 'URL']) }}
{{ Form::file('file', ['class' => 'form-control']) }}
{{-- Fields for the model --}}
{{ Form::hidden('ref_model', get_class($model)) }}
{{ Form::hidden('ref_model_id', $model->id) }}
{{-- Fields for the model --}}
{{ Form::hidden('ref_model', get_class($model)) }}
{{ Form::hidden('ref_model_id', $model->id) }}
{{ Form::submit('Save', [
'id' => 'save_file_upload',
'class' => 'btn btn-success'
])
}}
<div class="text-danger" style="padding-top: 10px;">
<span>{{ $errors->first('filename') }}</span>
<span>{{ $errors->first('url') }}</span>
<span>{{ $errors->first('file') }}</span>
</div>
{{ Form::close() }}
</div>
{{ Form::submit('Save', [
'id' => 'save_file_upload',
'class' => 'btn btn-success'
])
}}
<div class="text-danger" style="padding-top: 10px;">
<span>{{ $errors->first('filename') }}</span>
<span>{{ $errors->first('url') }}</span>
<span>{{ $errors->first('file') }}</span>
</div>
{{ Form::close() }}
</div>
</div>
</div>
</div>

View File

@@ -1,37 +1,37 @@
<div class="card border-blue-bottom">
<div class="content">
<div class="row">
<div class="content">
<div class="row">
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
<div class="form-group col-12">
{{ Form::label('csv_file', 'Choose a CSV file to import') }}
{{ Form::file('csv_file', ['accept' => '.csv']) }}
<p class="text-danger">{{ $errors->first('csv_file') }}</p>
</div>
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
<div class="form-group col-12">
{{ Form::label('csv_file', 'Choose a CSV file to import') }}
{{ Form::file('csv_file', ['accept' => '.csv']) }}
<p class="text-danger">{{ $errors->first('csv_file') }}</p>
</div>
<div class="form-group col-md-12">
<div class="text-right">
{{ Form::button('Start Import', ['type' => 'submit', 'class' => 'btn btn-success']) }}
</div>
</div>
{{ Form::close() }}
<div class="form-group col-md-12">
@if($logs['success'])
<h4>Logs</h4>
@foreach($logs['success'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
@if($logs['errors'])
<h4>Errors</h4>
@foreach($logs['errors'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
</div>
<div class="form-group col-md-12">
<div class="text-right">
{{ Form::button('Start Import', ['type' => 'submit', 'class' => 'btn btn-success']) }}
</div>
</div>
{{ Form::close() }}
<div class="form-group col-md-12">
@if($logs['success'])
<h4>Logs</h4>
@foreach($logs['success'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
@if($logs['errors'])
<h4>Errors</h4>
@foreach($logs['errors'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
</div>
</div>
</div>
</div>

View File

@@ -1,5 +1,5 @@
<div class="jumbotron">
<p class="text-center">
No {{ $type }} have been added
</p>
<p class="text-center">
No {{ $type }} have been added
</p>
</div>

View File

@@ -1,10 +1,10 @@
<div>
<p style="float:left; margin-right: 10px; margin-left: 2px;">
<p style="float:left; margin-right: 10px; margin-left: 2px;">
<span style="font-size: 1.0em;">
<i class="fas fa-info-circle" style="color: #067ec1"></i>
</span>
</p>
<p class="category" style="text-transform:none;">
{{ $slot }}
</p>
</p>
<p class="category" style="text-transform:none;">
{{ $slot }}
</p>
</div>

View File

@@ -1,32 +1,32 @@
<div class="card border-blue-bottom">
<div class="content">
<div class="row">
<div class="col-xs-5">
<div class="icon-big icon-info text-center">
<i class="{{$icon}}"></i>
</div>
</div>
<div class="col-xs-7">
<div class="numbers">
<p>{{$type}}</p>
@if(isset($link))
<a href="{{ $link }}">
@endif
{{$pending}} pending
@if(isset($link))
</a>
@endif
</div>
</div>
<div class="content">
<div class="row">
<div class="col-xs-5">
<div class="icon-big icon-info text-center">
<i class="{{$icon}}"></i>
</div>
<div class="footer">
<hr>
@if(isset($total))
<div class="stats">
<i class="ti-medall"></i> {{$total}} total
</div>
@endif
</div>
<div class="col-xs-7">
<div class="numbers">
<p>{{$type}}</p>
@if(isset($link))
<a href="{{ $link }}">
@endif
{{$pending}} pending
@if(isset($link))
</a>
@endif
</div>
</div>
</div>
<div class="footer">
<hr>
@if(isset($total))
<div class="stats">
<i class="ti-medall"></i> {{$total}} total
</div>
@endif
</div>
</div>
</div>

View File

@@ -1,66 +1,66 @@
<div id="pjax_news_wrapper">
<div class="card border-blue-bottom">
@if($news->count() === 0)
<div class="text-center text-muted" style="padding: 30px;">
no news items
</div>
@endif
@foreach($news as $item)
<div class="content">
<div class="header">
<h4 class="title">{{ $item->subject }}</h4>
<p class="category">{{ $item->user->name }} - {{ show_datetime($item->created_at) }}</p>
</div>
{{ $item->body }}
<div class="text-right">
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'delete',
'class' => 'pjax_news_form',
]) }}
{{ Form::hidden('news_id', $item->id) }}
{{
Form::button('<i class="far fa-trash-alt"></i>&nbsp;delete',
['type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
}}
{{ Form::close() }}
</div>
<div class="card border-blue-bottom">
@if($news->count() === 0)
<div class="text-center text-muted" style="padding: 30px;">
no news items
</div>
@endif
@foreach($news as $item)
<div class="content">
<div class="header">
<h4 class="title">{{ $item->subject }}</h4>
<p class="category">{{ $item->user->name }} - {{ show_datetime($item->created_at) }}</p>
</div>
<hr />
@endforeach
<div class="content">
<div class="header">
<h4 class="title">Add News</h4>
</div>
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'post',
'class' => 'pjax_news_form',
]) }}
<table class="table">
<tr>
<td>{{ Form::label('subject', 'Subject:') }}</td>
<td>{{ Form::text('subject', '', ['class' => 'form-control']) }}</td>
</tr>
<tr>
<td>{{ Form::label('body', 'Body:') }}</td>
<td>{{ Form::textarea('body', '', ['class' => 'form-control']) }}</td>
</tr>
</table>
<div class="text-right">
{{
Form::button('<i class="fas fa-plus-circle"></i>&nbsp;add',
['type' => 'submit',
'class' => 'btn btn-success btn-s'])
{{ $item->body }}
}}
{{ Form::close() }}
</div>
<div class="text-right">
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'delete',
'class' => 'pjax_news_form',
]) }}
{{ Form::hidden('news_id', $item->id) }}
{{
Form::button('<i class="far fa-trash-alt"></i>&nbsp;delete',
['type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
}}
{{ Form::close() }}
</div>
</div>
<hr/>
@endforeach
<div class="content">
<div class="header">
<h4 class="title">Add News</h4>
</div>
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'post',
'class' => 'pjax_news_form',
]) }}
<table class="table">
<tr>
<td>{{ Form::label('subject', 'Subject:') }}</td>
<td>{{ Form::text('subject', '', ['class' => 'form-control']) }}</td>
</tr>
<tr>
<td>{{ Form::label('body', 'Body:') }}</td>
<td>{{ Form::textarea('body', '', ['class' => 'form-control']) }}</td>
</tr>
</table>
<div class="text-right">
{{
Form::button('<i class="fas fa-plus-circle"></i>&nbsp;add',
['type' => 'submit',
'class' => 'btn btn-success btn-s'])
}}
{{ Form::close() }}
</div>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -1,11 +1,11 @@
@extends('admin.app')
@section('title', "Edit \"$expense->name\"")
@section('content')
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($expense, ['route' => ['admin.expenses.update', $expense->id], 'method' => 'patch']) }}
@include('admin.expenses.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($expense, ['route' => ['admin.expenses.update', $expense->id], 'method' => 'patch']) }}
@include('admin.expenses.fields')
{{ Form::close() }}
</div>
</div>
@endsection

View File

@@ -1,64 +1,64 @@
<div class="row">
<!-- Code Field -->
<div class="form-group col-sm-6">
{{ Form::label('airline_id', 'Airline:') }}
<!-- Code Field -->
<div class="form-group col-sm-6">
{{ Form::label('airline_id', 'Airline:') }}
{{ Form::select('airline_id', $airlines_list, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
@component('admin.components.info')
If an airline is selected, then the expense will only be applied
to the selected airline, or flights in that airline.
@endcomponent
</div>
{{ Form::select('airline_id', $airlines_list, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
@component('admin.components.info')
If an airline is selected, then the expense will only be applied
to the selected airline, or flights in that airline.
@endcomponent
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
{{ Form::label('type', 'Expense Type:') }}&nbsp;<span class="required">*</span>
{{ Form::select('type', $expense_types, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('type') }}</p>
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
{{ Form::label('type', 'Expense Type:') }}&nbsp;<span class="required">*</span>
{{ Form::select('type', $expense_types, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('type') }}</p>
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
{{ Form::label('name', 'Expense Name:') }}
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('name', 'Expense Name:') }}
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('amount', 'Amount:') }}
{{ Form::number('amount', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('amount') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('amount', 'Amount:') }}
{{ Form::number('amount', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('amount') }}</p>
</div>
</div>
<div class="row">
<div class="col-sm-5">
{{ Form::label('multiplier', 'Multiplier:') }}
<label class="checkbox-inline">
{{ Form::hidden('multiplier', 0, false) }}
{{ Form::checkbox('multiplier', 1, null) }}
</label>
@component('admin.components.info')
If checked, with a PIREP, this expense can be modified by a multiplier
on the subfleet. This is ignored for daily and monthly expenses
@endcomponent
</div>
<div class="col-sm-5">
{{ Form::label('multiplier', 'Multiplier:') }}
<label class="checkbox-inline">
{{ Form::hidden('multiplier', 0, false) }}
{{ Form::checkbox('multiplier', 1, null) }}
</label>
@component('admin.components.info')
If checked, with a PIREP, this expense can be modified by a multiplier
on the subfleet. This is ignored for daily and monthly expenses
@endcomponent
</div>
<div class="col-sm-3">
{{ Form::label('active', 'Active:') }}
<label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }}
</label>
</div>
<div class="col-sm-3">
{{ Form::label('active', 'Active:') }}
<label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }}
</label>
</div>
<div class="form-group col-sm-4">
<div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.expenses.index') }}" class="btn btn-default">Cancel</a>
</div>
<div class="form-group col-sm-4">
<div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.expenses.index') }}" class="btn btn-default">Cancel</a>
</div>
</div>
</div>

View File

@@ -2,5 +2,5 @@
@section('title', 'Import Expenses')
@section('content')
@include('admin.common.import', ['route' => 'admin.expenses.import'])
@include('admin.common.import', ['route' => 'admin.expenses.import'])
@endsection

View File

@@ -2,22 +2,22 @@
@section('title', 'Expenses')
@section('actions')
<li><a href="{{ route('admin.expenses.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.expenses.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
<li><a href="{{ route('admin.expenses.create') }}"><i class="ti-plus"></i>Add New</a></li>
<li><a href="{{ route('admin.expenses.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.expenses.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
<li><a href="{{ route('admin.expenses.create') }}"><i class="ti-plus"></i>Add New</a></li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="card border-blue-bottom">
<div class="content">
@if(!filled($expenses))
<p class="text-center">
There are no expenses
</p>
@else
@include('admin.expenses.table')
@endif
@if(!filled($expenses))
<p class="text-center">
There are no expenses
</p>
@else
@include('admin.expenses.table')
@endif
</div>
</div>
</div>
@endsection

View File

@@ -1,40 +1,40 @@
<table class="table table-hover table-responsive" id="expenses-table">
<thead>
<th>Name</th>
<th>Type</th>
<th style="text-align: center;">Amount</th>
<th>Airline</th>
<th class="text-center">Active</th>
<th></th>
</thead>
<tbody>
@foreach($expenses as $expense)
<tr>
<td><a href="{{ route('admin.expenses.edit', [$expense->id]) }}">
{{ $expense->name }}</a>
</td>
<td>{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</td>
<td style="text-align: center;">{{ $expense->amount }}</td>
<td>
@if(filled($expense->airline))
{{ $expense->airline->name }}
@else
<span class="description">-</span>
@endif
</td>
<td class="text-center">
<thead>
<th>Name</th>
<th>Type</th>
<th style="text-align: center;">Amount</th>
<th>Airline</th>
<th class="text-center">Active</th>
<th></th>
</thead>
<tbody>
@foreach($expenses as $expense)
<tr>
<td><a href="{{ route('admin.expenses.edit', [$expense->id]) }}">
{{ $expense->name }}</a>
</td>
<td>{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</td>
<td style="text-align: center;">{{ $expense->amount }}</td>
<td>
@if(filled($expense->airline))
{{ $expense->airline->name }}
@else
<span class="description">-</span>
@endif
</td>
<td class="text-center">
<span class="label label-{{ $expense->active?'success':'default' }}">
{{ \App\Models\Enums\ActiveState::label($expense->active) }}
</span>
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.expenses.destroy', $expense->id], 'method' => 'delete']) }}
<a href="{{ route('admin.expenses.edit', [$expense->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>
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.expenses.destroy', $expense->id], 'method' => 'delete']) }}
<a href="{{ route('admin.expenses.edit', [$expense->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>

View File

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

View File

@@ -1,11 +1,11 @@
@extends('admin.app')
@section('title', "Edit \"$fare->name\"")
@section('content')
<div class="card border-blue-bottom">
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) }}
@include('admin.fares.fields')
{{ Form::close() }}
{{ Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) }}
@include('admin.fares.fields')
{{ Form::close() }}
</div>
</div>
</div>
@endsection

View File

@@ -1,79 +1,79 @@
<div class="row">
<div class="col-md-12">
<div class="callout callout-success">
When a fare is assigned to a subfleet, the price, cost and capacity can be overridden,
so you can create default values that will apply to most of your subfleets, and change
them where they will differ.
</div>
<br />
<div class="col-md-12">
<div class="callout callout-success">
When a fare is assigned to a subfleet, the price, cost and capacity can be overridden,
so you can create default values that will apply to most of your subfleets, and change
them where they will differ.
</div>
<br/>
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
<div class="form-group col-sm-6">
{{ Form::label('code', 'Code:') }}&nbsp;<span class="required">*</span>
@component('admin.components.info')
How this fare class will show up on a ticket
How this fare class will show up on a ticket
@endcomponent
{{ Form::text('code', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('code') }}</p>
</div>
</div>
<div class="form-group col-sm-6">
<div class="form-group col-sm-6">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
@component('admin.components.info')
The fare class name, E.g, "Economy" or "First"
The fare class name, E.g, "Economy" or "First"
@endcomponent
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
</div>
<div class="form-group col-sm-6">
<div class="form-group col-sm-6">
{{ Form::label('price', 'Price:') }}
@component('admin.components.info')
This is the price of a ticket for a passenger
This is the price of a ticket for a passenger
@endcomponent
{{ Form::text('price', null, ['class' => 'form-control', 'placeholder' => 0]) }}
<p class="text-danger">{{ $errors->first('price') }}</p>
</div>
</div>
<div class="form-group col-sm-6">
<div class="form-group col-sm-6">
{{ Form::label('cost', 'Cost:') }}
@component('admin.components.info')
The operating cost
The operating cost
@endcomponent
{{ Form::number('cost', null, ['class' => 'form-control', 'placeholder' => 0, 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('cost') }}</p>
</div>
</div>
<div class="form-group col-sm-6">
<div class="form-group col-sm-6">
{{ Form::label('capacity', 'Capacity:') }}
@component('admin.components.info')
The number of seats available in this class.
The number of seats available in this class.
@endcomponent
{{ Form::number('capacity', null, ['class' => 'form-control', 'min' => 0]) }}
<p class="text-danger">{{ $errors->first('capacity') }}</p>
</div>
</div>
<div class="form-group col-sm-6">
<div class="form-group col-sm-6">
{{ Form::label('notes', 'Notes:') }}
{{ Form::text('notes', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('notes') }}</p>
</div>
</div>
<!-- Active Field -->
<div class="form-group col-sm-12">
<!-- Active Field -->
<div class="form-group col-sm-12">
{{ Form::label('active', 'Active:') }}
<label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }}
{{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }}
</label>
</div>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.fares.index') }}" class="btn btn-warn">Cancel</a>
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.fares.index') }}" class="btn btn-warn">Cancel</a>
</div>
</div>
</div>
</div>

View File

@@ -1,5 +1,5 @@
@extends('admin.app')
@section('title', 'Import Fares')
@section('content')
@include('admin.common.import', ['route' => 'admin.fares.import'])
@include('admin.common.import', ['route' => 'admin.fares.import'])
@endsection

View File

@@ -2,16 +2,16 @@
@section('title', 'Fares')
@section('actions')
<li><a href="{{ route('admin.fares.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.fares.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
<li><a href="{{ route('admin.fares.create') }}"><i class="ti-plus"></i>Add New</a></li>
<li><a href="{{ route('admin.fares.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
<li><a href="{{ route('admin.fares.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
<li><a href="{{ route('admin.fares.create') }}"><i class="ti-plus"></i>Add New</a></li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
@include('admin.fares.table')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.fares.table')
</div>
</div>
@endsection

View File

@@ -1,9 +1,9 @@
@extends('admin.app')
@section('content')
<div class="card border-blue-bottom">
<div class="card border-blue-bottom">
<div class="content">
@include('admin.fares.show_fields')
@include('admin.fares.show_fields')
</div>
</div>
</div>
@endsection

View File

@@ -1,35 +1,35 @@
<!-- Code Field -->
<div class="form-group">
{{ Form::label('code', 'Code:') }}
<p>{{ $fare->code }}</p>
{{ Form::label('code', 'Code:') }}
<p>{{ $fare->code }}</p>
</div>
<!-- Name Field -->
<div class="form-group">
{{ Form::label('name', 'Name:') }}
<p>{{ $fare->name }}</p>
{{ Form::label('name', 'Name:') }}
<p>{{ $fare->name }}</p>
</div>
<!-- Price Field -->
<div class="form-group">
{{ Form::label('price', 'Price:') }}
<p>{{ $fare->price }}</p>
{{ Form::label('price', 'Price:') }}
<p>{{ $fare->price }}</p>
</div>
<!-- Cost Field -->
<div class="form-group">
{{ Form::label('cost', 'Cost:') }}
<p>{{ $fare->cost }}</p>
{{ Form::label('cost', 'Cost:') }}
<p>{{ $fare->cost }}</p>
</div>
<!-- Notes Field -->
<div class="form-group">
{{ Form::label('notes', 'Notes:') }}
<p>{{ $fare->notes }}</p>
{{ Form::label('notes', 'Notes:') }}
<p>{{ $fare->notes }}</p>
</div>
<!-- Active Field -->
<div class="form-group">
{{ Form::label('active', 'Active:') }}
<p>{{ $fare->active }}</p>
{{ Form::label('active', 'Active:') }}
<p>{{ $fare->active }}</p>
</div>

View File

@@ -1,36 +1,36 @@
<table class="table table-hover table-responsive" id="fares-table">
<thead>
<th>Code</th>
<th>Name</th>
<th>Price</th>
<th>Cost</th>
<th>Notes</th>
<th class="text-center">Active</th>
<th class="text-right">Action</th>
</thead>
<tbody>
@foreach($fares as $fare)
<tr>
<td><a href="{{ route('admin.fares.edit', [$fare->id]) }}">{{ $fare->code }}</a></td>
<td>{{ $fare->name }}</td>
<td>{{ $fare->price }}</td>
<td>{{ $fare->cost }}</td>
<td>{{ $fare->notes }}</td>
<td class="text-center">
@if($fare->active == 1)
<span class="label label-success">Active</span>
@else
<span class="label label-default">Inactive</span>
@endif
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.fares.destroy', $fare->id], 'method' => 'delete']) }}
<a href="{{ route('admin.fares.edit', [$fare->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>
<thead>
<th>Code</th>
<th>Name</th>
<th>Price</th>
<th>Cost</th>
<th>Notes</th>
<th class="text-center">Active</th>
<th class="text-right">Action</th>
</thead>
<tbody>
@foreach($fares as $fare)
<tr>
<td><a href="{{ route('admin.fares.edit', [$fare->id]) }}">{{ $fare->code }}</a></td>
<td>{{ $fare->name }}</td>
<td>{{ $fare->price }}</td>
<td>{{ $fare->cost }}</td>
<td>{{ $fare->notes }}</td>
<td class="text-center">
@if($fare->active == 1)
<span class="label label-success">Active</span>
@else
<span class="label label-default">Inactive</span>
@endif
</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.fares.destroy', $fare->id], 'method' => 'delete']) }}
<a href="{{ route('admin.fares.edit', [$fare->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>

View File

@@ -2,23 +2,23 @@
@section('title', 'Financial Reports')
@section('actions')
<li><a href="{{ route('admin.finances.index') }}"><i class="ti-menu-alt"></i>Overview</a></li>
<li><a href="{{ route('admin.finances.index') }}"><i class="ti-menu-alt"></i>Overview</a></li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
<div style="float:right;">
{{ Form::select(
'month_select',
$months_list,
$current_month,
['id' => 'month_select']
) }}
</div>
<div class="card border-blue-bottom">
<div class="content">
<div style="float:right;">
{{ Form::select(
'month_select',
$months_list,
$current_month,
['id' => 'month_select']
) }}
</div>
@include('admin.finances.table')
@include('admin.finances.table')
</div>
</div>
</div>
@endsection
@include('admin.finances.scripts')

View File

@@ -1,12 +1,12 @@
@section('scripts')
<script>
$(document).ready(() => {
const select_id = "select#month_select";
$(select_id).change((e) => {
<script>
$(document).ready(() => {
const select_id = "select#month_select";
$(select_id).change((e) => {
const date = $(select_id + " option:selected").val();
const location = window.location.toString().split('?')[0];
window.location = location + '?month='+date;
window.location = location + '?month=' + date;
});
});
});
</script>
</script>
@endsection

View File

@@ -1,63 +1,62 @@
@foreach($transaction_groups as $group)
<h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3>
<h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3>
<table
id="finances-table"
style="width: 95%; margin: 0px auto;"
class="table table-hover table-responsive">
<table
id="finances-table"
style="width: 95%; margin: 0px auto;"
class="table table-hover table-responsive">
<thead>
<th>Expenses</th>
<th>Credit</th>
<th>Debit</th>
</thead>
<tbody>
@foreach($group['transactions'] as $ta)
<tr>
<td>
{{ $ta->transaction_group }}
</td>
<td>
@if($ta->sum_credits)
{{ money($ta->sum_credits, $ta->currency) }}
@endif
</td>
<td>
@if($ta->sum_debits)
<i>{{ money($ta->sum_debits, $ta->currency) }}</i>
@endif
</td>
</tr>
@endforeach
<thead>
<th>Expenses</th>
<th>Credit</th>
<th>Debit</th>
</thead>
<tbody>
@foreach($group['transactions'] as $ta)
<tr>
<td>
{{ $ta->transaction_group }}
</td>
<td>
@if($ta->sum_credits)
{{ money($ta->sum_credits, $ta->currency) }}
@endif
</td>
<td>
@if($ta->sum_debits)
<i>{{ money($ta->sum_debits, $ta->currency) }}</i>
@endif
</td>
</tr>
@endforeach
{{-- show sums --}}
<tr>
<td></td>
<td>
{{ $group['credits'] }}
</td>
<td>
<i>{{ $group['debits'] }}</i>
</td>
</tr>
{{-- show sums --}}
<tr>
<td></td>
<td>
{{ $group['credits'] }}
</td>
<td>
<i>{{ $group['debits'] }}</i>
</td>
</tr>
{{-- final total --}}
<tr style="border-top: 3px; border-top-style: double;">
<td></td>
<td align="right">
<b>Total</b>
</td>
<td>
{{ $group['credits']->subtract($group['debits']) }}
</td>
</tr>
{{-- final total --}}
<tr style="border-top: 3px; border-top-style: double;">
<td></td>
<td align="right">
<b>Total</b>
</td>
<td>
{{ $group['credits']->subtract($group['debits']) }}
</td>
</tr>
</tbody>
</table>
</tbody>
</table>
@if(!$loop->last)
<hr>
@endif
@if(!$loop->last)
<hr>
@endif
@endforeach

View File

@@ -1,6 +1,6 @@
@if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }}
</div>--}}
@endif

View File

@@ -1,30 +1,31 @@
@foreach (session('flash_notification', []) as $message)
@if ($message['overlay'])
@include('flash::modal', [
'modalClass' => 'flash-modal',
'title' => $message['title'],
'body' => $message['message']
])
@else
<div class="alert
@if ($message['overlay'])
@include('flash::modal', [
'modalClass' => 'flash-modal',
'title' => $message['title'],
'body' => $message['message']
])
@else
<div class="alert
alert-{{ $message['level'] }}
{{ $message['important'] ? 'alert-important' : '' }}"
role="alert"
>
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
@if ($message['important'])
@endif
<button type="button"
class="close"
data-dismiss="alert"
aria-hidden="true">&times;</button>
{{ $message['important'] ? 'alert-important' : '' }}"
role="alert"
>
<div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i>
</div>
@if ($message['important'])
@endif
<button type="button"
class="close"
data-dismiss="alert"
aria-hidden="true">&times;
</button>
{{ $message['message'] }}
{{ $message['message'] }}
</div>
@endif
</div>
@endif
@endforeach
{{ session()->forget('flash_notification') }}

View File

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

View File

@@ -1,11 +1,11 @@
@extends('admin.app')
@section('title', 'Editing ' . $field->name)
@section('content')
<div class="card border-blue-bottom">
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($field, ['route' => ['admin.flightfields.update', $field->id], 'method' => 'patch']) }}
@include('admin.flightfields.fields')
{{ Form::close() }}
</div>
</div>
{{ Form::model($field, ['route' => ['admin.flightfields.update', $field->id], 'method' => 'patch']) }}
@include('admin.flightfields.fields')
{{ Form::close() }}
</div>
</div>
@endsection

View File

@@ -1,14 +1,14 @@
<div class="row">
<div class="form-group col-sm-6">
{{ Form::label('name', 'Name:') }}&nbsp;&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-6">
{{ Form::label('name', 'Name:') }}&nbsp;&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
</div>
<div class="row">
<!-- Submit Field -->
<div class="form-group col-sm-12">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.flightfields.index') }}" class="btn btn-default">Cancel</a>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.flightfields.index') }}" class="btn btn-default">Cancel</a>
</div>
</div>

View File

@@ -1,18 +1,18 @@
@extends('admin.app')
@section('title', 'Flight Fields')
@section('actions')
<li><a href="{{ route('admin.flightfields.create') }}"><i class="ti-plus"></i>Add Field</a></li>
<li>
<a href="{{ route('admin.flights.create') }}">
<i class="ti-plus"></i>
Add Flight</a>
</li>
<li><a href="{{ route('admin.flightfields.create') }}"><i class="ti-plus"></i>Add Field</a></li>
<li>
<a href="{{ route('admin.flights.create') }}">
<i class="ti-plus"></i>
Add Flight</a>
</li>
@endsection
@section('content')
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flightfields.table')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flightfields.table')
</div>
</div>
@endsection

View File

@@ -1,34 +1,34 @@
<div class="content table-responsive table-full-width">
<div class="header">
@component('admin.components.info')
Flights fields that can be filled out. You can still add other custom fields
directly in the flight, but this provides a template for all flights.
@endcomponent
</div>
<div class="header">
@component('admin.components.info')
Flights fields that can be filled out. You can still add other custom fields
directly in the flight, but this provides a template for all flights.
@endcomponent
</div>
<table class="table table-hover table-responsive" id="pirepFields-table">
<table class="table table-hover table-responsive" id="pirepFields-table">
<thead>
<th>Name</th>
<th></th>
<th>Name</th>
<th></th>
</thead>
<tbody>
@foreach($fields as $field)
<tr>
<td>{{ $field->name }}</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.flightfields.destroy', $field->id], 'method' => 'delete']) }}
<a href="{{ route('admin.flightfields.edit', [$field->id]) }}"
class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i></a>
<tr>
<td>{{ $field->name }}</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.flightfields.destroy', $field->id], 'method' => 'delete']) }}
<a href="{{ route('admin.flightfields.edit', [$field->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>
{{ 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>
</table>
</div>

View File

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

View File

@@ -2,30 +2,30 @@
@section('title', 'Edit Flight')
@section('content')
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($flight, ['route' => ['admin.flights.update', $flight->id], 'method' => 'patch']) }}
@include('admin.flights.fields')
{{ Form::close() }}
</div>
<div class="card border-blue-bottom">
<div class="content">
{{ Form::model($flight, ['route' => ['admin.flights.update', $flight->id], 'method' => 'patch']) }}
@include('admin.flights.fields')
{{ Form::close() }}
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flights.subfleets')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flights.subfleets')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flights.flight_fields')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flights.flight_fields')
</div>
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flights.fares')
</div>
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flights.fares')
</div>
</div>
@endsection
@include('admin.flights.scripts')

View File

@@ -1,86 +1,86 @@
<div id="flight_fares_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="header">
<h3>fares</h3>
@component('admin.components.info')
Fares assigned to the current flight. These can be overridden, otherwise,
the values used come from the subfleet of the aircraft that the flight is
filed with. Only assign the fares you want to override. They can be set as
a monetary amount, or a percentage.
<a href="http://docs.phpvms.net/concepts/finances"
target="_blank">Read documentation about finances</a>.
@endcomponent
<div class="header">
<h3>fares</h3>
@component('admin.components.info')
Fares assigned to the current flight. These can be overridden, otherwise,
the values used come from the subfleet of the aircraft that the flight is
filed with. Only assign the fares you want to override. They can be set as
a monetary amount, or a percentage.
<a href="http://docs.phpvms.net/concepts/finances"
target="_blank">Read documentation about finances</a>.
@endcomponent
<p class="text-danger">{{ $errors->first('value') }}</p>
</div>
<p class="text-danger">{{ $errors->first('value') }}</p>
</div>
@if(count($flight->fares) === 0)
@include('admin.common.none_added', ['type' => 'fares'])
@if(count($flight->fares) === 0)
@include('admin.common.none_added', ['type' => 'fares'])
@endif
<table id="flight_fares"
class="table table-hover"
role="grid" aria-describedby="aircraft_fares_info">
@if(count($flight->fares))
<thead>
<tr role="row">
<th>Name</th>
<th style="text-align: center;">Code</th>
<th>Capacity</th>
<th>Price</th>
<th>Cost</th>
<th>Actions</th>
</tr>
</thead>
@endif
<table id="flight_fares"
class="table table-hover"
role="grid" aria-describedby="aircraft_fares_info">
@if(count($flight->fares))
<thead>
<tr role="row">
<th>Name</th>
<th style="text-align: center;">Code</th>
<th>Capacity</th>
<th>Price</th>
<th>Cost</th>
<th>Actions</th>
</tr>
</thead>
@endif
<tbody>
@foreach($flight->fares as $atf)
<tr>
<td class="sorting_1">{{ $atf->name }}</td>
<td style="text-align: center;">{{ $atf->code }}</td>
<td>
<a href="#" data-pk="{{ $atf->id }}" data-name="capacity">{{ $atf->pivot->capacity }}</a>
</td>
<td>
<a href="#" data-pk="{{ $atf->id }}" data-name="price">{{ $atf->pivot->price }}</a>
</td>
<td>
<a href="#" data-pk="{{ $atf->id }}" data-name="cost">{{ $atf->pivot->cost }}</a>
</td>
<td style="text-align: center; width:3%;">
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
'method' => 'delete',
'class' => 'pjax_fares_form'
])
}}
{{ Form::hidden('fare_id', $atf->id) }}
{{ Form::button('<i class="fa fa-times"></i>',
['type' => 'submit',
'class' => 'btn btn-danger btn-xs']) }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
<hr />
<div class="row">
<div class="col-xs-12">
<div class="text-right">
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
'method' => 'post',
'class' => 'pjax_fares_form form-inline'
]) }}
{{ Form::select('fare_id', $avail_fares, null, [
'placeholder' => 'Select Fare',
'class' => 'ac-fare-dropdown form-control input-lg select2',
'style' => 'width: 400px;',
]) }}
{{ Form::button('<i class="glyphicon glyphicon-plus"></i> add', [
'type' => 'submit',
'class' => 'btn btn-success btn-s']
) }}
{{ Form::close() }}
</div>
</div>
<tbody>
@foreach($flight->fares as $atf)
<tr>
<td class="sorting_1">{{ $atf->name }}</td>
<td style="text-align: center;">{{ $atf->code }}</td>
<td>
<a href="#" data-pk="{{ $atf->id }}" data-name="capacity">{{ $atf->pivot->capacity }}</a>
</td>
<td>
<a href="#" data-pk="{{ $atf->id }}" data-name="price">{{ $atf->pivot->price }}</a>
</td>
<td>
<a href="#" data-pk="{{ $atf->id }}" data-name="cost">{{ $atf->pivot->cost }}</a>
</td>
<td style="text-align: center; width:3%;">
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
'method' => 'delete',
'class' => 'pjax_fares_form'
])
}}
{{ Form::hidden('fare_id', $atf->id) }}
{{ Form::button('<i class="fa fa-times"></i>',
['type' => 'submit',
'class' => 'btn btn-danger btn-xs']) }}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
<hr/>
<div class="row">
<div class="col-xs-12">
<div class="text-right">
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
'method' => 'post',
'class' => 'pjax_fares_form form-inline'
]) }}
{{ Form::select('fare_id', $avail_fares, null, [
'placeholder' => 'Select Fare',
'class' => 'ac-fare-dropdown form-control input-lg select2',
'style' => 'width: 400px;',
]) }}
{{ Form::button('<i class="glyphicon glyphicon-plus"></i> add', [
'type' => 'submit',
'class' => 'btn btn-success btn-s']
) }}
{{ Form::close() }}
</div>
</div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More