phpvms/resources/views/admin/subfleets/show.blade.php
2017-06-24 11:09:27 -05:00

61 lines
2.0 KiB
PHP

@extends('admin.app')
@section('content')
<section class="content-header">
<h1>{!! $subfleet->name !!}</h1>
</section>
<div class="content">
<div class="box box-primary">
<div class="box-body">
<div class="row" style="padding-left: 20px">
@include('admin.subfleets.show_fields')
</div>
</div>
</div>
<div class="box box-primary">
<div class="box-body">
<div class="row">
<div class="col-xs-12">
<h3>fares</h3>
<div class="box-body">
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
Fares assigned to the current subfleet. These can be overridden,
otherwise, the value used is the default, which comes from the fare.
</div>
@include('admin.subfleets.fares')
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
<script>
$(document).ready(function() {
$(".ac-fare-dropdown").select2();
$('#aircraft_fares a').editable({
type: 'text',
mode: 'inline',
emptytext: 'default',
url: '/admin/subfleets/{!! $subfleet->id !!}/fares',
title: 'Enter override value',
ajaxOptions: { 'type': 'put'},
params: function(params) {
return {
fare_id: params.pk,
name: params.name,
value: params.value
}
}
});
$(document).on('submit', 'form.rm_fare', function(event) {
event.preventDefault();
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
});
});
</script>
@endsection