mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
Merge branch '3.2.4' into 'master'
Hotfix See merge request TheGamecraft/c-cms!82
This commit is contained in:
@@ -80,9 +80,12 @@ class User extends Authenticatable
|
|||||||
$filterCourse = collect();
|
$filterCourse = collect();
|
||||||
foreach (\Auth::user()->courses as $course)
|
foreach (\Auth::user()->courses as $course)
|
||||||
{
|
{
|
||||||
if(date('U',strtotime($course->event->date_begin)) >= date('U'))
|
if($course->event)
|
||||||
{
|
{
|
||||||
$filterCourse->push($course);
|
if(date('U',strtotime($course->event->date_begin)) >= date('U'))
|
||||||
|
{
|
||||||
|
$filterCourse->push($course);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $filterCourse;
|
return $filterCourse;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if(\Auth::user()->courses->isEmpty())
|
@if(\Auth::user()->futureCourses()->isEmpty())
|
||||||
<div class="col-sm-12 text-center">
|
<div class="col-sm-12 text-center">
|
||||||
<h4 class="m-4">Aucun cours à venir</h4>
|
<h4 class="m-4">Aucun cours à venir</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,24 +44,25 @@
|
|||||||
<div class="col-sm-12 text-center">
|
<div class="col-sm-12 text-center">
|
||||||
<h4 class="m-4">Aucune activité à venir</h4>
|
<h4 class="m-4">Aucune activité à venir</h4>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@else
|
||||||
@foreach ($futureEvent as $event)
|
@foreach ($futureEvent as $event)
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="alert" style="background-color: {{\App\ComplementaryActivity::find($event->type)->calendar_color}}">
|
<div class="alert" style="background-color: {{\App\ComplementaryActivity::find($event->type)->calendar_color}}">
|
||||||
<div class="row text-white">
|
<div class="row text-white">
|
||||||
<div class="col-md-2 text-capitalize m-auto d-none d-md-flex">
|
<div class="col-md-2 text-capitalize m-auto d-none d-md-flex">
|
||||||
<h3 class="m-0 p-0" style="margin-top: -0.5rem !important;">{!! \App\ComplementaryActivity::find($event->type)->calendar_icon !!}</h3>
|
<h3 class="m-0 p-0" style="margin-top: -0.5rem !important;">{!! \App\ComplementaryActivity::find($event->type)->calendar_icon !!}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md">
|
<div class="col-md">
|
||||||
{{$event->name}}
|
{{$event->name}}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{{$event->date_begin}}
|
{{$event->date_begin}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
@endforeach
|
||||||
@endforeach
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<a href="/admin/schedule" type="button" class="btn btn-primary btn-lg btn-block">Afficher plus</a>
|
<a href="/admin/schedule" type="button" class="btn btn-primary btn-lg btn-block">Afficher plus</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user