Move PIREPs to separate file

This commit is contained in:
Nabeel Shahzad 2018-05-18 14:45:52 -05:00
parent 1a3065b1ca
commit 74b53b4ba7
10 changed files with 104 additions and 38 deletions

View File

@ -1,4 +0,0 @@
<?php
/**
*
*/

View File

@ -0,0 +1,35 @@
<?php
/**
*
*/
return [
'filenewpirep' => 'File New PIREP',
'pilotreport' => 'Pilot Report|Pilot Reports',
'arrived' => 'Arrived',
'source' => 'Source',
'flighttype' => 'Flight Type',
'filedroute' => 'Filed Route',
'filedon' => 'Filed On',
'fare' => 'Fare|Fares',
'class' => 'Class',
'count' => 'Count',
'flightlevel' => 'Flight Level',
'fieldsreadonly' => 'Once a PIREP has been accepted/rejected, certain fields go into read-only mode.',
'flightinformations' => 'Flight Informations',
'flightident' => 'Flight Number/Code/Leg',
'codeoptional' => 'Code (optional)',
'legoptional' => 'Leg (optional)',
'deparrinformations' => 'Departure/Arrival Informations',
'aircraftinformations' => 'Aircraft Informations',
'dateflown' => 'Date Flown',
'departuretime' => 'Departure Time',
'arrivaltime' => 'Arrival Time',
'deletepirep' => 'Delete PIREP',
'savepirep' => 'Save PIREP',
'submitpirep' => 'Submit PIREP',
'editflightreport' => 'Edit Flight Report',
'fileflightreport' => 'File New Report',
'newflightreport' => 'New Flight Report',
'submitted' => 'Submitted',
];

View File

@ -0,0 +1,35 @@
<?php
/**
*
*/
return [
'filenewpirep' => 'Inserici Nuovo PIREP',
'pilotreport' => 'Rapporto Pilota|Rapporti Pilota',
'arrived' => 'Arrivato',
'source' => 'Fonte',
'flighttype' => 'Tipo di Volo',
'filedroute' => 'Rotta Inserita',
'filedon' => 'Inserito il',
'fare' => 'Tariffa|Tariffe',
'class' => 'Classe',
'count' => 'Numero',
'flightlevel' => 'Livello di Volo',
'fieldsreadonly' => 'Quando un PIREP viene accettato/rifiutato, alcuni cami entrano in modalità di sola lettura.',
'flightinformations' => 'Informazioni di Volo',
'flightident' => 'Numero di Volo/Codice/Leg',
'codeoptional' => 'Codice (facoltativo)',
'legoptional' => 'Leg (facoltativa)',
'deparrinformations' => 'Informazioni di Partenza/Arrivo',
'aircraftinformations' => 'Informazioni sull\'Aeromobile',
'dateflown' => 'Volato in Data',
'departuretime' => 'Ora di Partenza',
'arrivaltime' => 'Ora di Arrivo',
'deletepirep' => 'Cancella PIREP',
'savepirep' => 'Salva PIREP',
'submitpirep' => 'Invia PIREP',
'editflightreport' => 'Modifica Rapporto di Volo',
'fileflightreport' => 'Inserisci Rapporto di Volo',
'newflightreport' => 'Nuovo Rapporto di Volo',
'submitted' => 'Inviato',
];

View File

@ -1,10 +1,10 @@
@extends('app')
@section('title', trans('frontend.pireps.fileflightreport'))
@section('title', __('pireps.fileflightreport'))
@section('content')
<div class="row">
<div class="col-md-12">
<h2>@lang('frontend.pireps.newflightreport')</h2>
<h2>@lang('pireps.newflightreport')</h2>
@include('flash::message')
{{ Form::open(['route' => 'frontend.pireps.store']) }}

View File

@ -1,9 +1,9 @@
@extends('app')
@section('title', trans('frontend.pireps.editflightreport'))
@section('title', __('pireps.editflightreport'))
@section('content')
<div class="row">
<div class="col-md-12">
<h2>@lang('frontend.pireps.editflightreport')</h2>
<h2>@lang('pireps.editflightreport')</h2>
@include('flash::message')
{{ Form::model($pirep, [
'route' => ['frontend.pireps.update', $pirep->id],

View File

@ -12,7 +12,7 @@ flight reports that have been filed. You've been warned!
<div class="row">
<div class="col-sm-12">
@component('components.info')
@lang('frontend.pireps.fieldsreadonly')
@lang('pireps.fieldsreadonly')
@endcomponent
</div>
</div>
@ -21,7 +21,7 @@ flight reports that have been filed. You've been warned!
<div class="col-8">
<div class="form-container">
<h6><i class="fas fa-info-circle"></i>
&nbsp;@lang('frontend.pireps.flightinformations')
&nbsp;@lang('pireps.flightinformations')
</h6>
<div class="form-container-body">
<div class="row">
@ -42,7 +42,7 @@ flight reports that have been filed. You've been warned!
@endif
</div>
<div class="col-sm-4">
{{ Form::label('flight_number', trans('frontend.pireps.flightident')) }}
{{ Form::label('flight_number', __('pireps.flightident')) }}
@if(!empty($pirep) && $pirep->read_only)
<p>{{ $pirep->ident }}
{{ Form::hidden('flight_number') }}
@ -58,13 +58,13 @@ flight reports that have been filed. You've been warned!
]) }}
&nbsp;
{{ Form::text('route_code', null, [
'placeholder' => trans('frontend.pireps.codeoptional'),
'placeholder' => __('pireps.codeoptional'),
'class' => 'form-control',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
&nbsp;
{{ Form::text('route_leg', null, [
'placeholder' => trans('frontend.pireps.legoptional'),
'placeholder' => __('pireps.legoptional'),
'class' => 'form-control',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
@ -75,7 +75,7 @@ flight reports that have been filed. You've been warned!
@endif
</div>
<div class="col-lg-4">
{{ Form::label('flight_type', trans('frontend.pireps.flighttype')) }}
{{ Form::label('flight_type', __('pireps.flighttype')) }}
@if(!empty($pirep) && $pirep->read_only)
<p>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</p>
{{ Form::hidden('flight_type') }}
@ -126,27 +126,27 @@ flight reports that have been filed. You've been warned!
<div class="col-3">
{{--{{ Form::label('submitted_date', trans('frontend.pireps.dateflown')) }}
{{--{{ Form::label('submitted_date', __('pireps.dateflown')) }}
{{ Form::text('submmitted_date', null, [
'placeholder' => trans('frontend.pireps.departuredate'),
'placeholder' => __('pireps.departuredate'),
'class' => 'form-control',
'readonly' => $pirep->read_only]) }}--}}
</div>
<div class="col-3">
{{--{{ Form::label('departure_time', trans('frontend.pireps.departuretime')) }}
{{--{{ Form::label('departure_time', __('pireps.departuretime')) }}
{{ Form::text('departure_time', null, [
'placeholder' => trans('frontend.pireps.departuretime'),
'placeholder' => __('pireps.departuretime'),
'class' => 'form-control',
'readonly' => $pirep->read_only]) }}--}}
</div>
<div class="col-3">
{{--{{ Form::label('arrival_time', trans('frontend.pireps.arrivaltime')) }}
{{--{{ Form::label('arrival_time', __('pireps.arrivaltime')) }}
{{ Form::text('arrival_time', null, [
'placeholder' => trans('frontend.pireps.arrivaltime'),
'placeholder' => __('pireps.arrivaltime'),
'class' => 'form-control',
'readonly' => $pirep->read_only]) }}--}}
</div>
@ -158,7 +158,7 @@ flight reports that have been filed. You've been warned!
<div class="form-container">
<h6><i class="fas fa-globe"></i>
&nbsp;@lang('frontend.pireps.deparrinformations')
&nbsp;@lang('pireps.deparrinformations')
</h6>
<div class="form-container-body">
<div class="row">
@ -207,7 +207,7 @@ flight reports that have been filed. You've been warned!
<div class="form-container">
<h6><i class="fab fa-avianex"></i>
&nbsp;@lang('frontend.pireps.aircraftinformations')
&nbsp;@lang('pireps.aircraftinformations')
</h6>
<div class="form-container-body">
<div class="row">
@ -310,7 +310,7 @@ flight reports that have been filed. You've been warned!
<div class="form-group">
@if(isset($pirep) && !$pirep->read_only)
{{ Form::button(trans('frontend.pireps.deletepirep'), [
{{ Form::button(__('pireps.deletepirep'), [
'name' => 'submit',
'value' => 'Delete',
'class' => 'btn btn-warning',
@ -319,14 +319,14 @@ flight reports that have been filed. You've been warned!
@endif
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
{{ Form::button(trans('frontend.pireps.savepirep'), [
{{ Form::button(__('pireps.savepirep'), [
'name' => 'submit',
'value' => 'Save',
'class' => 'btn btn-info',
'type' => 'submit'])
}}
{{ Form::button(trans('frontend.pireps.submitpirep'), [
{{ Form::button(__('pireps.submitpirep'), [
'name' => 'submit',
'value' => 'Submit',
'class' => 'btn btn-success',

View File

@ -7,7 +7,7 @@
<div style="float:right;">
<a class="btn btn-info pull-right btn-lg"
style="margin-top: -10px;margin-bottom: 5px"
href="{{ route('frontend.pireps.create') }}">@lang('frontend.pireps.filenewpirep')</a>
href="{{ route('frontend.pireps.create') }}">@lang('pireps.filenewpirep')</a>
</div>
<h2>{{ trans_choice('frontend.pireps.pilotreport', 2) }}</h2>
@include('flash::message')

View File

@ -41,7 +41,7 @@
<div class="col-sm-6">
<table class="table-condensed" width="100%">
<tr>
<td nowrap><span class="title">@lang('frontend.pireps.flighttime')&nbsp;</span></td>
<td nowrap><span class="title">@lang('pireps.flighttime')&nbsp;</span></td>
<td>{{ Utils::minutesToTimeString($pirep->flight_time) }}</td>
</tr>
<tr>
@ -51,12 +51,12 @@
</tr>
@if($pirep->level)
<tr>
<td nowrap><span class="title">@lang('frontend.pireps.flightlevel') }}&nbsp;</span></td>
<td nowrap><span class="title">@lang('pireps.flightlevel') }}&nbsp;</span></td>
<td>{{ $pirep->level }}</td>
</tr>
@endif
<tr>
<td nowrap><span class="title">@lang('frontend.pireps.filedon'):&nbsp;</span></td>
<td nowrap><span class="title">@lang('pireps.filedon'):&nbsp;</span></td>
<td>{{ show_datetime($pirep->created_at) }}</td>
</tr>
</table>

View File

@ -12,7 +12,7 @@
@if($pirep->state === PirepState::IN_PROGRESS)
@else
@lang('frontend.pireps.arrived') {{$pirep->created_at->diffForHumans()}}
@lang('pireps.arrived') {{$pirep->created_at->diffForHumans()}}
@endif
</p>
</p>
@ -111,17 +111,17 @@
</tr>
<tr>
<td>@lang('frontend.pireps.source')</td>
<td>@lang('pireps.source')</td>
<td>{{ PirepSource::label($pirep->source) }}</td>
</tr>
<tr>
<td>@lang('frontend.pireps.flighttype')</td>
<td>@lang('pireps.flighttype')</td>
<td>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</td>
</tr>
<tr>
<td>@lang('frontend.pireps.filedroute')</td>
<td>@lang('pireps.filedroute')</td>
<td>
{{ $pirep->route }}
</td>
@ -135,7 +135,7 @@
</tr>
<tr>
<td>@lang('frontend.pireps.filedon')</td>
<td>@lang('pireps.filedon')</td>
<td>
{{ show_datetime($pirep->created_at) }}
</td>
@ -178,8 +178,8 @@
<h5>{{ trans_choice('frontend.pireps.fare', 2) }}</h5>
<table class="table table-hover table-condensed">
<thead>
<th>@lang('frontend.pireps.class')</th>
<th>@lang('frontend.pireps.count')</th>
<th>@lang('pireps.class')</th>
<th>@lang('pireps.count')</th>
</thead>
<tbody>
@foreach($pirep->fares as $fare)
@ -200,7 +200,7 @@
<div class="separator"></div>
<div class="row">
<div class="col-12">
<h5>@lang('frontend.pireps.flightlog')</h5>
<h5>@lang('pireps.flightlog')</h5>
</div>
<div class="col-12">
<table class="table table-hover table-condensed" id="users-table">

View File

@ -9,7 +9,7 @@
<th>@lang('common.aircraft')</th>
<th class="text-center">@lang('common.flighttime')</th>
<th class="text-center">@lang('common.status')</th>
<th>@lang('frontend.pireps.submitted')</th>
<th>@lang('pireps.submitted')</th>
<th></th>
</tr>
</thead>