2017-06-09 09:37:51 +08:00
|
|
|
@extends('admin.app')
|
|
|
|
|
|
|
|
@section('content')
|
2020-02-02 02:05:56 +08:00
|
|
|
<section class="content-header">
|
2018-03-13 06:58:12 +08:00
|
|
|
<h1 class="pull-left">{{ $aircraft->name }}</h1>
|
2017-06-16 11:45:25 +08:00
|
|
|
<h1 class="pull-right">
|
2020-02-02 02:05:56 +08:00
|
|
|
<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>
|
2020-02-02 02:05:56 +08:00
|
|
|
</section>
|
|
|
|
<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">
|
2020-02-02 02:05:56 +08:00
|
|
|
@include('admin.aircraft.show_fields')
|
2017-06-13 11:48:32 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</section>
|
2017-06-13 11:48:32 +08:00
|
|
|
@endsection
|
|
|
|
@section('scripts')
|
2020-02-02 02:05:56 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(".ac-fare-dropdown").select2();
|
|
|
|
$('#aircraft_fares a').editable({
|
2017-06-14 04:11:11 +08:00
|
|
|
type: 'text',
|
|
|
|
mode: 'inline',
|
|
|
|
emptytext: 'default',
|
2018-03-13 06:58:12 +08:00
|
|
|
url: '/admin/aircraft/{{ $aircraft->id }}/fares',
|
2017-06-14 04:11:11 +08:00
|
|
|
title: 'Enter override value',
|
2020-02-02 02:05:56 +08:00
|
|
|
ajaxOptions: {'type': 'put'},
|
|
|
|
params: function (params) {
|
2017-06-14 04:11:11 +08:00
|
|
|
return {
|
2020-02-02 02:05:56 +08:00
|
|
|
fare_id: params.pk,
|
|
|
|
name: params.name,
|
|
|
|
value: params.value
|
2017-06-14 04:11:11 +08:00
|
|
|
}
|
|
|
|
}
|
2020-02-02 02:05:56 +08:00
|
|
|
});
|
2017-06-14 04:11:11 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
$(document).on('submit', 'form.rm_fare', function (event) {
|
2017-06-13 11:48:32 +08:00
|
|
|
event.preventDefault();
|
|
|
|
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
|
2020-02-02 02:05:56 +08:00
|
|
|
});
|
2017-06-13 11:48:32 +08:00
|
|
|
});
|
2020-02-02 02:05:56 +08:00
|
|
|
</script>
|
2017-06-09 09:37:51 +08:00
|
|
|
@endsection
|