Merge branch 'trunk'
This commit is contained in:
commit
ad38d3b475
2 changed files with 35 additions and 39 deletions
|
|
@ -41,9 +41,7 @@ class TopMediaController extends Controller
|
|||
);
|
||||
} //end if
|
||||
|
||||
$this->sortQuery($topMediaList);
|
||||
$searchFields = trans('Id Instagram, Participant, Lien');
|
||||
$topMediaList->orderBy('updated_at', 'DESC');
|
||||
$topMediaList = $topMediaList->paginate();
|
||||
|
||||
return \view('bo.pages.top-media.index', \compact('topMediaList', 'searchFields', 'ranking'));
|
||||
|
|
|
|||
|
|
@ -2,48 +2,46 @@
|
|||
<table class="table fix-action">
|
||||
<thead>
|
||||
@php
|
||||
$cols = [
|
||||
'id' => __('Classement'),
|
||||
'username' => __('Participant'),
|
||||
'timestamp' => __('Date de création du post')];
|
||||
$routeName = request()->route()->getName();
|
||||
$rst = !is_null(request()->rst) || !Session::has("$routeName.sorted");
|
||||
$noOrder = Session::get("$routeName.sort_col") !== 'order' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way"));
|
||||
$noOrder = Session::get("$routeName.sort_col") !== '' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way"));
|
||||
$cols = [
|
||||
'id' => __('Classement'),
|
||||
'username' => __('Participant'),
|
||||
'timestamp' => __('Date de création du post')];
|
||||
$routeName = request()->route()->getName();
|
||||
$rst = !is_null(request()->rst) || !Session::has("$routeName.sorted");
|
||||
$noOrder = Session::get("$routeName.sort_col") !== 'order' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way"));
|
||||
$noOrder = Session::get("$routeName.sort_col") !== '' and (Session::has("$routeName.sort_col") or Session::has("$routeName.sort_way"));
|
||||
@endphp
|
||||
@include('modules.table-col-sorter', [
|
||||
'cols' => $cols,
|
||||
'ignore' => ['total', 'timeslot_date', 'shop'],
|
||||
'mobileHide' => ['shop'],
|
||||
])
|
||||
<th>Classement</th>
|
||||
<th>Participant</th>
|
||||
<th>Date de création du post</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($topMediaList->count())
|
||||
@foreach ($topMediaList as $topMediaModel)
|
||||
<tr>
|
||||
<td>
|
||||
<strong class="fs-{{ $ranking->get($topMediaModel->insta_id) + 1 }}">#{{ $ranking->get($topMediaModel->insta_id) + 1 }}</strong>
|
||||
</td>
|
||||
<td>{{ $topMediaModel->username }}</td>
|
||||
<td>
|
||||
{{ $topMediaModel->timestamp->isoFormat('LLLL') }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ $topMediaModel->permalink }}" title="{{ __('Voir le media sur instagram') }}" target="_blank" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-arrow-up-right-from-square"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach ($topMediaList as $topMediaModel)
|
||||
<tr>
|
||||
<td>
|
||||
<strong class="fs-{{ $ranking->get($topMediaModel->insta_id) + 1 }}">#{{ $ranking->get($topMediaModel->insta_id) + 1 }}</strong>
|
||||
</td>
|
||||
<td>{{ $topMediaModel->username }}</td>
|
||||
<td>
|
||||
{{ $topMediaModel->timestamp->isoFormat('LLLL') }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ $topMediaModel->permalink }}" title="{{ __('Voir le media sur instagram') }}" target="_blank" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-arrow-up-right-from-square"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="11" class="text-center">
|
||||
<span
|
||||
class="h3">{{ __('Aucun résultat pour les :models', ['models' => __('models.classes.insta_media')]) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="11" class="text-center">
|
||||
<span class="h3">{{ __('Aucun résultat pour les :models', ['models' => __('models.classes.insta_media')]) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Reference in a new issue