File: /var/www/vhost/disk-apps/teamdemo.sports-crowd.com/resources/views/academy/discounts/list.blade.php
@extends('modules.head') @section('contenido')
<div class="box-header">
<a class="auxiliar-black" href="{{ url('/academy_discounts/add') }}">
<button class="btn btnAdd pull-right">
<i style="margin-right:5px;" class="fa fa-plus"></i>
{{ Lang::get('messages.academy_discounts.title_create') }}
</button></a>
</div>
<!-- List Data -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ Lang::get('messages.academy_discounts.title_list') }}</h3>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive ">
<table id="example2" class="stripe row-border order-column" style="width:100%" role="grid" aria-describedby="example2_info">
<thead>
<tr role="row">
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.tag1') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.tag2') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.tag3') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.tag4') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.type_academy') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.created_at') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" @if (isset($showFranchises) && $showFranchises) style="display:show;" @else style="display:none;" @endif>
{{ Lang::get('messages.franchises') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.tag0') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">
{{ Lang::get('messages.academy_discounts.tag00') }}
</th>
</tr>
</thead>
</table>
</div>
<!-- /.box-body -->
</div>
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/crud.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/academy_discounts.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {
let showFranchises = <?php echo json_encode($showFranchises); ?>;
let fixedColumns = false;
let isMobileDevice = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
if (!isMobileDevice) {
fixedColumns = {
left: 1,
right: 2
};
}
_table = $('#example2').DataTable({
responsive: true,
processing: true,
serverSide: true,
language: {
url: window.DATATABLES_LANGUAGE_URL,
},
scrollX: true,
scrollCollapse: true,
paging: true,
fixedColumns: fixedColumns,
ajax: "{{ route('academy_discounts.table') }}",
columns: [{
data: 'name',
name: 'name'
},
{
data: 'discount',
render: function(data, type, row) {
return row.discount + '%';
},
name: 'discount'
},
{
data: 'availability',
name: 'availability'
},
{
data: 'view_on',
name: 'view_on'
},
{
data: 'type_academy',
render: function(data, type, row, column) {
response = row.type_academy;
switch (row.type_academy) {
case 'children':
response = 'NiƱos';
break;
case 'adult':
response = 'Adultos';
break;
}
return response;
},
name: 'type_academy'
},
{
data: 'created_at',
name: 'created_at'
},
{
data: 'locations',
visible: showFranchises,
name: 'academy_locations.name'
},
{
data: 'active',
name: 'active'
},
{
data: 'actions',
name: 'actions'
},
]
});
var info = '<i class="fa fa-info-circle" id="btn-info-busqueda"></i><div class="dropdown-menu" id="menuBusqueda" style="left: 50%; padding: 5px; background-color: #f9fb8f;"><p data-toggle="modal">Busqueda por Nombre, Orden y Link</p></div>';
$('#example2_filter').append(info);
$('#btn-info-busqueda').on('click', function() {
$('#menuBusqueda').toggle();
});
});
</script>
@endsection