#23 add rankings
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
{!! Form::open(['route' => 'admin.ranks.store', 'class' => 'add_rank']) !!}
|
||||
{!! Form::open(['route' => 'admin.ranks.store', 'class' => 'add_rank', 'method'=>'POST']) !!}
|
||||
|
||||
@include('admin.ranks.fields')
|
||||
|
||||
|
||||
@@ -19,12 +19,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="create_rank_wrapper">
|
||||
@include('admin.ranks.create')
|
||||
</div>
|
||||
|
||||
@include('admin.ranks.create')
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
/*$(".ac-fare-dropdown").select2();
|
||||
@@ -45,7 +44,7 @@
|
||||
|
||||
$(document).on('submit', 'form.add_rank', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#create_rank_wrapper', {push: false});
|
||||
$.pjax.submit(event, '#ranks_table_wrapper', {push: false});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
<table class="table table-responsive" id="ranks-table">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Hours</th>
|
||||
<th>Auto Approve Acars</th>
|
||||
<th>Auto Approve Manual</th>
|
||||
<th>Auto Promote</th>
|
||||
<th colspan="3">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ranks as $rank)
|
||||
<tr>
|
||||
<td>{!! $rank->name !!}</td>
|
||||
<td>{!! $rank->hours !!}</td>
|
||||
<td>{!! $rank->auto_approve_acars !!}</td>
|
||||
<td>{!! $rank->auto_approve_manual !!}</td>
|
||||
<td>{!! $rank->auto_promote !!}</td>
|
||||
<td>
|
||||
{!! Form::open(['route' => ['admin.ranks.destroy', $rank->id], 'method' => 'delete']) !!}
|
||||
<div class='btn-group'>
|
||||
<a href="{!! route('admin.ranks.show', [$rank->id]) !!}"
|
||||
class='btn btn-default btn-xs'><i
|
||||
class="glyphicon glyphicon-eye-open"></i></a>
|
||||
<a href="{!! route('admin.ranks.edit', [$rank->id]) !!}"
|
||||
class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="ranks_table_wrapper">
|
||||
<table class="table table-responsive">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Hours</th>
|
||||
<th>Auto Approve Acars</th>
|
||||
<th>Auto Approve Manual</th>
|
||||
<th>Auto Promote</th>
|
||||
<th colspan="3">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($ranks as $rank)
|
||||
<tr>
|
||||
<td>{!! $rank->name !!}</td>
|
||||
<td>{!! $rank->hours !!}</td>
|
||||
<td>{!! $rank->auto_approve_acars !!}</td>
|
||||
<td>{!! $rank->auto_approve_manual !!}</td>
|
||||
<td>{!! $rank->auto_promote !!}</td>
|
||||
<td>
|
||||
{!! Form::open(['route' => ['admin.ranks.destroy', $rank->id], 'method' => 'delete']) !!}
|
||||
<div class='btn-group'>
|
||||
<a href="{!! route('admin.ranks.show', [$rank->id]) !!}"
|
||||
class='btn btn-default btn-xs'><i
|
||||
class="glyphicon glyphicon-eye-open"></i></a>
|
||||
<a href="{!! route('admin.ranks.edit', [$rank->id]) !!}"
|
||||
class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user