frontend translation + other stuff

This commit is contained in:
lordwilbur
2018-05-18 00:03:30 +02:00
committed by Nabeel Shahzad
parent ba8a819c7d
commit a346b0df2e
54 changed files with 966 additions and 771 deletions

View File

@@ -1,11 +1,11 @@
@extends('app')
@section('title', __trans_choice('Flight', 2))
@section('title', trans_choice('frontend.global.flight', 2))
@section('content')
<div class="row">
@include('flash::message')
<div class="col-md-9">
<h2>{{ $title ?? __trans_choice('Flight', 2) }}</h2>
<h2>{{ $title ?? trans_choice('frontend.global.flight', 2) }}</h2>
@include('flights.table')
</div>
<div class="col-md-3">

View File

@@ -1,7 +1,7 @@
<div class="card">
<div class="card-block" style="min-height: 0px">
<div class="form-group text-right">
<a href="{{ route('frontend.flights.bids') }}">{{ __trans_choice('My Bid', 2) }}</a>
<a href="{{ route('frontend.flights.bids') }}">{{ trans_choice('frontend.flights.mybid', 2) }}</a>
</div>
</div>
</div>

View File

@@ -26,11 +26,11 @@ $(document).ready(function () {
if(params.method === 'DELETE') {
console.log('successfully removed flight');
btn.removeClass(class_name);
alert('Your bid was removed');
alert('@lang("frontend.flights.bidremoved")');
} else {
console.log('successfully saved flight');
btn.addClass(class_name);
alert('Your bid was added');
alert('@lang("frontend.flights.bidadded")');
}
})
.catch(error => {

View File

@@ -1,4 +1,4 @@
<h3 class="description">{{ __('Search') }}</h3>
<h3 class="description">@lang('frontend.flights.search')</h3>
<div class="card pull-right">
<div class="card-block" style="min-height: 0px">
<div class="form-group">
@@ -8,23 +8,23 @@
'class'=>'form-inline'
]) }}
<div>
<p>{{ __('Flight Number') }}</p>
<p>@lang('frontend.global.flightnumber')</p>
{{ Form::text('flight_number', null, ['class' => 'form-control']) }}
</div>
<div style="margin-top: 10px;">
<p>{{ __('Departure Airport') }}</p>
<p>@lang('frontend.global.departureairport')</p>
{{ Form::select('dep_icao', $airports, null , ['class' => 'form-control']) }}
</div>
<div style="margin-top: 10px;">
<p>{{ __('Arrival Airport') }}</p>
<p>@lang('frontend.global.arrivalairport')</p>
{{ Form::select('arr_icao', $airports, null , ['class' => 'form-control']) }}
</div>
<div class="clear" style="margin-top: 10px;">
{{ Form::submit(__('Find'), ['class' => 'btn btn-primary']) }}&nbsp;
<a href="{{ route('frontend.flights.index') }}">{{ __('Reset') }}</a>
{{ Form::submit(trans('frontend.global.find'), ['class' => 'btn btn-primary']) }}&nbsp;
<a href="{{ route('frontend.flights.index') }}">@lang('frontend.global.reset')</a>
</div>
{{ Form::close() }}
</div>

View File

@@ -1,5 +1,5 @@
@extends('app')
@section('title', __trans_choice('Flight', 1).' '.$flight->ident)
@section('title', trans_choice('frontend.global.flight', 1).' '.$flight->ident)
@section('content')
<div class="row">
@@ -13,7 +13,7 @@
<div class="col-12">
<table class="table">
<tr>
<td>{{ __('Departure') }}</td>
<td>@lang('frontend.global.departure')</td>
<td>
{{ $flight->dpt_airport->name }}
(<a href="{{route('frontend.airports.show', [
@@ -24,7 +24,7 @@
</tr>
<tr>
<td>{{ __('Arrival') }}</td>
<td>@lang('frontend.global.arrival')</td>
<td>
{{ $flight->arr_airport->name }}
(<a href="{{route('frontend.airports.show', [
@@ -34,21 +34,24 @@
</tr>
@if($flight->alt_airport_id)
<tr>
<td>{{ __('Alternate Airport') }}</td>
<td>@lang('frontend.flights.alternateairport')</td>
<td>
{{ $flight->alt_airport->full_name }}
{{ $flight->alt_airport->name }}
(<a href="{{route('frontend.airports.show', [
'id' => $flight->alt_airport->icao
])}}">{{$flight->alt_airport->icao}}</a>)
</td>
</tr>
@endif
<tr>
<td>{{ __('Route') }}</td>
<td>@lang('frontend.global.route')</td>
<td>{{ $flight->route }}</td>
</tr>
@if(filled($flight->notes))
<tr>
<td>{{ __('Notes') }}</td>
<td>{{ trans_choice('frontend.global.note', 2) }}</td>
<td>{{ $flight->notes }}</td>
</tr>
@endif
@@ -62,15 +65,22 @@
</div>
</div>
<div class="col-4">
<h5>{{$flight->dpt_airport_id}} METAR</h5>
<h5>{{$flight->dpt_airport_id}} @lang('frontend.global.metar')</h5>
{{ Widget::Weather([
'icao' => $flight->dpt_airport_id,
]) }}
<br />
<h5>{{$flight->arr_airport_id}} METAR</h5>
<h5>{{$flight->arr_airport_id}} @lang('frontend.global.metar')</h5>
{{ Widget::Weather([
'icao' => $flight->arr_airport_id,
]) }}
@if ($flight->alt_airport_id)
<br />
<h5>{{$flight->alt_airport_id}} @lang('frontend.global.metar')</h5>
{{ Widget::Weather([
'icao' => $flight->alt_airport_id,
]) }}
@endif
</div>
</div>
@endsection

View File

@@ -24,7 +24,7 @@
x-id="{{ $flight->id }}"
x-saved-class="btn-info"
type="button"
title="{{ __('Add/Remove Bid') }}"
title="@lang('frontend.flights.addremovebid')"
>
<i class="fas fa-map-marker"></i>
</button>
@@ -34,14 +34,14 @@
<div class="row">
<div class="col-sm-5">
{{--<table class="table-condensed"></table>--}}
<span class="title">{{ __('DEP') }}&nbsp;</span>
<span class="title">{{ strtoupper(trans('frontend.flights.dep')) }}&nbsp;</span>
{{ $flight->dpt_airport->name }}
(<a href="{{route('frontend.airports.show', [
'id' => $flight->dpt_airport->icao
])}}">{{$flight->dpt_airport->icao}}</a>)
@if($flight->dpt_time), {{ $flight->dpt_time }}@endif
<br />
<span class="title">{{ __('ARR') }}&nbsp;</span>
<span class="title">{{ strtoupper(trans('frontend.flights.arr')) }}&nbsp;</span>
{{ $flight->arr_airport->name }}
(<a href="{{route('frontend.airports.show', [
'id' => $flight->arr_airport->icao
@@ -49,19 +49,19 @@
@if($flight->arr_time), {{ $flight->arr_time }}@endif
<br />
@if($flight->distance)
<span class="title">{{ __('DISTANCE') }}&nbsp;</span>
<span class="title">{{ strtoupper(trans('frontend.global.distance')) }}&nbsp;</span>
{{ $flight->distance }} {{ setting('units.distance') }}
@endif
<br />
@if($flight->level)
<span class="title">{{ __('LEVEL') }}&nbsp;</span>
<span class="title">{{ strtoupper(trans('frontend.flights.level')) }}&nbsp;</span>
{{ $flight->level }} {{ setting('units.altitude') }}
@endif
</div>
<div class="col-sm-7">
<div class="row">
<div class="col-sm-12">
<span class="title">{{ __('ROUTE') }}&nbsp;</span>
<span class="title">{{ strtoupper(trans('frontend.global.route')) }}&nbsp;</span>
{{ $flight->route }}
</div>
</div>