2017-06-09 09:37:51 +08:00
|
|
|
@extends('admin.app')
|
|
|
|
|
|
|
|
@section('content')
|
2017-06-16 11:45:25 +08:00
|
|
|
<section class="content-header">
|
2017-06-20 03:29:10 +08:00
|
|
|
<h1 class="pull-left">{!! $aircraft->name !!}</h1>
|
2017-06-16 11:45:25 +08:00
|
|
|
<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>
|
2017-06-20 03:29:10 +08:00
|
|
|
</h1>
|
|
|
|
</section>
|
2017-06-13 11:48:32 +08:00
|
|
|
<section class="content">
|
2017-06-16 11:45:25 +08:00
|
|
|
<div class="clearfix"></div>
|
2017-06-13 11:48:32 +08:00
|
|
|
<div class="row">
|
|
|
|
@include('admin.aircraft.show_fields')
|
|
|
|
</div>
|
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
2017-06-14 04:11:11 +08:00
|
|
|
<h3>fares</h3>
|
2017-06-13 11:48:32 +08:00
|
|
|
<div class="box-body">
|
2017-06-14 04:11:11 +08:00
|
|
|
<div class="callout callout-info">
|
|
|
|
<i class="icon fa fa-info"> </i>
|
|
|
|
Fares assigned to the current aircraft. These can be overridden,
|
|
|
|
otherwise, the value used is the default, which comes from the fare.
|
|
|
|
</div>
|
2017-06-13 11:48:32 +08:00
|
|
|
@include('admin.aircraft.fares')
|
|
|
|
</div>
|
2017-06-09 09:37:51 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-06-13 11:48:32 +08:00
|
|
|
</section>
|
|
|
|
@endsection
|
|
|
|
@section('scripts')
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
2017-06-14 03:01:06 +08:00
|
|
|
$(".ac-fare-dropdown").select2();
|
2017-06-14 04:11:11 +08:00
|
|
|
$('#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) {
|
|
|
|
return {
|
|
|
|
fare_id: params.pk,
|
|
|
|
name: params.name,
|
|
|
|
value: params.value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-06-13 11:48:32 +08:00
|
|
|
$(document).on('submit', 'form.rm_fare', function(event) {
|
|
|
|
event.preventDefault();
|
|
|
|
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2017-06-09 09:37:51 +08:00
|
|
|
@endsection
|