This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from swan58/master
Fixed and styled import for schedule and fleet
- Loading branch information
Showing
5 changed files
with
138 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
@extends('layouts.admin') | ||
|
||
@section('breadcrumb') | ||
<li class="breadcrumb-item">Home</li> | ||
<li class="breadcrumb-item"><a href="{{ url('admin') }}">Admin</a> | ||
</li> | ||
<li class="breadcrumb-item"><a href="{{ url('admin/'.$route) }}">{{ ucfirst($route) }}</a> | ||
</li> | ||
<li class="breadcrumb-item active">Import & Export</li> | ||
@endsection | ||
|
||
@section('content') | ||
<form class="form-horizontal" role="form" method="POST" enctype="multipart/form-data" action="{{ url('/admin/data/'.$route.'?action=import') }}"> | ||
{{ csrf_field() }} | ||
<input type="file" name="file" id="file"> | ||
<button type="submit" class="btn btn-success" role="button">Submit</button> | ||
</form> | ||
<div class="row"> | ||
<div class="col-lg-4"> | ||
<div class="card"> | ||
<div class="card-header">File Import</div> | ||
<div class="card-block"> | ||
<p>Upload an XLSX file to be imported into the {{ $route }} table.</p> | ||
<form class="form-horizontal" role="form" method="POST" enctype="multipart/form-data" action="{{ url('/admin/data/'.$route.'?action=import') }}"> | ||
{{ csrf_field() }} | ||
<input type="file" name="file" id="file"> | ||
<button type="submit" class="btn btn-success pull-right" role="button">Import</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-lg-12"> | ||
<div class="card"> | ||
<div class="card-header">File Format Example</div> | ||
<div class="card-block"> | ||
<p>The file must be uploaded as a Microsoft Excel Worksheet (.xlsx) format in the following structure. Below is an example of the structure that should be used.</p> | ||
@include('admin.partials.import_format.'.$route) | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
@endsection |
35 changes: 35 additions & 0 deletions
35
resources/views/admin/partials/import_format/fleet.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<table class="table table-border table-inverse"> | ||
<tr> | ||
<td>airline</td> | ||
<td>icao</td> | ||
<td>name</td> | ||
<td>manufacturer</td> | ||
<td>registration</td> | ||
<td>range</td> | ||
<td>maxgw</td> | ||
<td>maxpax</td> | ||
<td>status</td> | ||
</tr> | ||
<tr> | ||
<td>1</td> | ||
<td>B738</td> | ||
<td>B737-800</td> | ||
<td>Boeing</td> | ||
<td>N351JX</td> | ||
<td>5500</td> | ||
<td>155000</td> | ||
<td>200</td> | ||
<td>1</td> | ||
</tr> | ||
<tr> | ||
<td>1</td> | ||
<td>A320</td> | ||
<td>A320-200</td> | ||
<td>Airbus</td> | ||
<td>N352JX</td> | ||
<td>5500</td> | ||
<td>155000</td> | ||
<td>200</td> | ||
<td>1</td> | ||
</tr> | ||
</table> |
44 changes: 44 additions & 0 deletions
44
resources/views/admin/partials/import_format/schedule.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<table class="table table-border table-inverse"> | ||
<tr> | ||
<td>airline</td> | ||
<td>flightnum</td> | ||
<td>depicao</td> | ||
<td>arricao</td> | ||
<td>route</td> | ||
<td>aircraft_group</td> | ||
<td>deptime</td> | ||
<td>arrtime</td> | ||
<td>notes</td> | ||
<td>type</td> | ||
<td>daysofweek</td> | ||
<td>enabled</td> | ||
</tr> | ||
<tr> | ||
<td>1</td> | ||
<td>66</td> | ||
<td>KABQ</td> | ||
<td>KJFK</td> | ||
<td></td> | ||
<td>A320</td> | ||
<td>5:09:00</td> | ||
<td>10:09:00</td> | ||
<td>FlightAware Schedule</td> | ||
<td>1</td> | ||
<td>123456</td> | ||
<td>1</td> | ||
</tr> | ||
<tr> | ||
<td>1</td> | ||
<td>1492</td> | ||
<td>KACK</td> | ||
<td>KJFK</td> | ||
<td></td> | ||
<td>RJ85</td> | ||
<td>13:08:00</td> | ||
<td>14:08:00</td> | ||
<td>FlightAware Schedule</td> | ||
<td>1</td> | ||
<td>123456</td> | ||
<td>1</td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters