File: /var/www/vhost/disk-apps/demo.sports-crowd.com/resources/views/academy/news/list.blade.php
@extends('modules.head') @section('contenido')
<style>
/* Ensure that the demo table scrolls */
/* th, */
td {
white-space: nowrap;
}
div.dataTables_wrapper {
height: fit-content;
margin: 0px 10px 0px 10px;
}
.dataTables_scrollBody {
max-height: none !important;
}
/* enable absolute positioning */
.inner-addon {
position: relative;
width: inherit;
}
/* style icon */
.inner-addon .glyphicon {
position: absolute;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
pointer-events: none;
}
/* align icon */
.left-addon .glyphicon {
left: 0px;
}
.right-addon .glyphicon {
right: 0px;
}
/* add padding */
.left-addon input {
padding-left: 15px;
}
.right-addon input {
padding-right: 10px;
}
.hidden {
display: none;
}
</style>
@php
$page_prefix = "academy_news_" . $type_academy;
@endphp
<div class="box-header">
<a class="btn btn-app btnReportProducts" onclick="clickExportAll()">
<i class="fa fa-file-excel-o"></i> {{ Lang::get('messages.screen_products_tag42') }}
</a>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ Lang::get('messages.academy_news.title_list') }}</h3>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title"><b>{{ Lang::get('messages.academy_purchases.filters') }}</b></h3>
<div class="row">
<div class="col-3 col-md-3">
<label for="min_date">{{ Lang::get('messages.academy_news.create_date_min') }}</label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" class="form-control pull-right" placeholder="{{ Lang::get('messages.academy_purchases.placeholder_date') }}" name="min_date" autocomplete="off" id="min_date">
</div>
</div>
<div class="col-3 col-md-3">
<label for="max_date">{{ Lang::get('messages.academy_news.create_date_max') }}</label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" class="form-control pull-right" placeholder="{{ Lang::get('messages.academy_purchases.placeholder_date') }}" name="max_date" autocomplete="off" id="max_date">
</div>
</div>
<div class="col-6 col-md-6">
<label for="type">{{ Lang::get('messages.academy_news.type_new') }}</label>
<select class="form-control select2" multiple="multiple" data-placeholder="{{ Lang::get('messages.academy_users.placeholder_select') }}" name="type" value="" required>
<option value="{{ Lang::get('messages.academy_news.backout') }}">
{{ Lang::get('messages.academy_news.backout') }}
</option>
<option value="{{ Lang::get('messages.academy_news.medical_disability') }}">
{{ Lang::get('messages.academy_news.medical_disability') }}
</option>
<option value="{{ Lang::get('messages.academy_news.freezing') }}">
{{ Lang::get('messages.academy_news.freezing') }}
</option>
<option value="{{ Lang::get('messages.academy_news.request_certificate') }}">
{{ Lang::get('messages.academy_news.request_certificate') }}
</option>
</select>
</div>
</div>
{{-- new filters --}}
<div class="row">
<div class="col-3 col-md-3">
<label for="locations">{{ config('app.location') . Lang::get('messages.academy_users.tag2') }}</label>
<select class="form-control select2" multiple="multiple"
data-placeholder="{{ Lang::get('messages.academy_schedules.select') }}"
name="locations" id="locations" required>
</select>
</div>
<div class="col-3 col-md-3">
<label for="categories">{{ Lang::get('messages.screen_banners_tag6') }}</label>
<select class="form-control select2" multiple="multiple"
data-placeholder="{{ Lang::get('messages.academy_schedules.select') }}"
name="categories" id ="categories" required>
</select>
</div>
<div class="col-3 col-md-3">
<label for="schedules">Horarios</label>
<select class="form-control select2" multiple="multiple"
data-placeholder="{{ Lang::get('messages.academy_schedules.select') }}"
name="schedules" id="schedules" required>
</select>
</div>
<div class="col-3 col-md-3">
<label for="coaches">{{ Lang::get('messages.academy_schedules.tag7') }}</label>
<select class="form-control select2" multiple="multiple"
data-placeholder="{{ Lang::get('messages.academy_schedules.select') }}"
name="coaches" id="coaches" required>
</select>
</div>
</div>
{{-- end new filters --}}
<p style="margin-top: 10px; border-bottom: 1px solid #D3D3D3;"></p>
</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_news.create_date') }}
</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_attendances.tag1-1') }}
</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_attendances.tag1-2') }}
</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_attendances.tag1-3') }}
</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_news.type_new') }}
</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_news.init_date') }}
</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_news.end_date') }}
</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_news.reason') }}
</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_news.file') }}
</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_news.receiver') }}
</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_news.status') }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ config('app.location') }}
</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_news.category') }}
</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_news.schedule') }}
</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_news.coaches') }}
</th>
</tr>
</thead>
<tbody>
@foreach ($academyNews as $item)
<tr class="odd">
<td>{{ $item->created_at }}</td>
<td>{{ $item->academy_user ? $item->academy_user->student_name : '' }}</td>
<td>{{ $item->academy_user ? $item->academy_user->student_last_name : '' }}</td>
<td>{{ $item->academy_user ? $item->academy_user->identification : '' }}</td>
<td>{{ $item->type_new }}</td>
<td>{{ $item->init_date }}</td>
<td>{{ $item->end_date }}</td>
<td>{{ $item->reason }}</td>
<td>
@if ($item->file)
<a href="{{ $item->file }}" target="_blank">
{{ Lang::get('messages.academy_parameters_labels.view_terms') }}
</a>
@endif
</td>
<td>{{ $item->receiver }}</td>
<td>
<select class="form-control" name="state" value="{{ $item->status ?? old('state') }}" onchange="changeStatus(this, {{ $item->id }});">
<option value="PENDING" @if ($item->status == 'PENDING') selected='selected' @endif>
Solicitada
</option>
<option value="IN_PROGRESS" @if ($item->status == 'IN_PROGRESS') selected='selected' @endif>
En tramite
</option>
<option value="FINISHED" @if ($item->status == 'FINISHED') selected='selected' @endif>
Finalizada
</option>
</select>
</td>
<td>{{ $item->academy_place ? $item->academy_place : '' }}</td>
<td>{{ $item->category_name ? $item->category_name : '' }}</td>
<td>{{ $item->schedule_name ? $item->schedule_name : '' }}</td>
<td>
@if ($item->coaches)
<ul>
@foreach (explode(',', $item->coaches) as $coach)
<li>{{ trim($coach) }}</li>
@endforeach
</ul>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<script>
const SELECTOR_PREFIX = "{{$page_prefix}}";
</script>
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/academy_news.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/filter.js') . '?v=' . time() }}"></script>
@endsection