2019-10-01 11:53:12 +02:00
|
|
|
@extends('layouts.connected')
|
2019-09-18 16:50:01 +02:00
|
|
|
|
2019-09-30 16:32:40 +02:00
|
|
|
@inject('tag_detector', 'App\Services\TagDetectorService)
|
|
|
|
|
2019-09-18 16:50:01 +02:00
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
2019-10-01 16:15:50 +02:00
|
|
|
<div class="page-header">
|
|
|
|
<h1 class="page-title">
|
|
|
|
{{ __('Dashboard') }}
|
|
|
|
</h1>
|
|
|
|
@if (session('status'))
|
|
|
|
<div class="alert alert-success" role="alert">
|
|
|
|
{{ session('status') }}
|
|
|
|
</div>
|
|
|
|
@endif
|
2020-03-05 15:39:35 +01:00
|
|
|
@if (session('success'))
|
|
|
|
<div class="alert alert-success" role="alert">
|
|
|
|
{{ session('success') }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@if (session('errors'))
|
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
{{ session('errors') }}
|
|
|
|
</div>
|
|
|
|
@endif
|
2019-10-01 16:15:50 +02:00
|
|
|
</div>
|
|
|
|
<div class="row flex-fill">
|
|
|
|
<div class="col-sm-6 col-lg-3">
|
|
|
|
<div class="card p-3">
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
<span class="stamp stamp-md bg-blue mr-3">
|
|
|
|
<i class="fe fe-activity"></i>
|
|
|
|
</span>
|
|
|
|
<div>
|
|
|
|
<h4 class="m-0">{{ $all_counts }}</h4>
|
|
|
|
<small class="text-muted">{{ __('Jours Écrits') }}</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6 col-lg-3">
|
|
|
|
<div class="card p-3">
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
<span class="stamp stamp-md bg-green mr-3">
|
|
|
|
<i class="fe fe-calendar"></i>
|
|
|
|
</span>
|
|
|
|
<div>
|
|
|
|
<h4 class="m-0">{{ $year_counts }}</h4>
|
|
|
|
<small class="text-muted">{{ __('Cette Année') }}</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6 col-lg-3">
|
|
|
|
<div class="card p-3">
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
<span class="stamp stamp-md bg-red mr-3">
|
|
|
|
<i class="fe fe-grid"></i>
|
|
|
|
</span>
|
|
|
|
<div>
|
|
|
|
<h4 class="m-0">{{ $month_counts }}</h4>
|
|
|
|
<small class="text-muted">{{ __('Ce Mois') }}</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6 col-lg-3">
|
|
|
|
<div class="card p-3">
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
<span class="stamp stamp-md bg-yellow mr-3">
|
|
|
|
<i class="fe fe-image"></i>
|
|
|
|
</span>
|
|
|
|
<div>
|
|
|
|
<h4 class="m-0">{{ $image_counts }}</h4>
|
|
|
|
<small class="text-muted">{{ __('Images Envoyées') }}</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
|
|
|
@if($already)
|
|
|
|
<div class="alert alert-primary">L'activité du jour a déjà été entrée.</div>
|
2019-10-08 17:10:11 +02:00
|
|
|
<div id="store">
|
|
|
|
@component('components/app', [
|
|
|
|
'route' => url('store'),
|
|
|
|
'crsf' => csrf_field(),
|
|
|
|
'mustencrypt' => $must_encrypt,
|
|
|
|
'possible' => false,
|
|
|
|
])
|
|
|
|
@endcomponent
|
|
|
|
</div>
|
2019-10-01 16:15:50 +02:00
|
|
|
@else
|
2020-03-16 17:01:39 +01:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">{{ strftime('%B %G', $today->format('U')) }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<div id="store">
|
|
|
|
@component('components/app', [
|
|
|
|
'route' => url('store'),
|
|
|
|
'crsf' => csrf_field(),
|
|
|
|
'mustencrypt' => $must_encrypt,
|
|
|
|
'possible' => !$already,
|
|
|
|
])
|
|
|
|
@endcomponent
|
2019-09-18 16:50:01 +02:00
|
|
|
</div>
|
2019-10-01 16:15:50 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@foreach($posts as $post)
|
|
|
|
<div class="col-md-6 col-xl-4">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-status bg-blue"></div>
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">{{ ucfirst(\Carbon\Carbon::instance($post->date_post)->diffForHumans()) }}</h3>
|
|
|
|
<div class="card-options">
|
|
|
|
<a href="#" class="card-options-collapse" data-toggle="card-collapse"><i class="fe fe-chevron-up"></i></a>
|
2020-03-05 15:39:35 +01:00
|
|
|
@if($today->format('Y-m-d') === \Carbon\Carbon::instance($post->date_post)->format('Y-m-d'))
|
|
|
|
<button class="btn btn-link" data-toggle="collapse" data-target="#collapse" aria-expanded="true" aria-controls="collapse"><i class="fe fe-edit-2"></i></button>
|
|
|
|
<form action="{{ url('delete') }}" method="post" accept-charset="utf-8">
|
|
|
|
@csrf
|
|
|
|
<button class="btn btn-link" data-toggle="card-remove"><i class="fe fe-x"></i></button>
|
|
|
|
</form>
|
|
|
|
@endif
|
2019-09-18 16:50:01 +02:00
|
|
|
</div>
|
2019-10-01 16:15:50 +02:00
|
|
|
</div>
|
2020-03-05 15:39:35 +01:00
|
|
|
<div class="card-body @if($today->format('Y-m-d') === \Carbon\Carbon::instance($post->date_post)->format('Y-m-d')) already @endif ">
|
2020-03-19 12:11:21 +01:00
|
|
|
@if($post->hasMedia('post_image'))<p><img src="{{ route('display_image', ['post_id' => $post->id]) }}"/></p>@endif <p data-encrypt>{!! $tag_detector->linkTagFrom($post->content) !!}</p>
|
2019-10-01 16:15:50 +02:00
|
|
|
</div>
|
|
|
|
<div class="card-footer">
|
|
|
|
{{ \Carbon\Carbon::instance($post->date_post)->format('d F Y') }}
|
|
|
|
</div>
|
2019-09-18 16:50:01 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-01 16:15:50 +02:00
|
|
|
@endforeach
|
2020-03-17 09:52:23 +01:00
|
|
|
<?php echo $posts->render(); ?>
|
2019-09-18 16:50:01 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|