48 lines
2.2 KiB
PHP
48 lines
2.2 KiB
PHP
@props(['category', 'data', 'bundle'])
|
|
<aside>
|
|
<h3>{!! $category !!}</h3>
|
|
|
|
@foreach($data as $subCategory => $items)
|
|
@if($category === 'Liens')
|
|
@include('components.asides.links', compact('subCategory', 'items', 'bundle'))
|
|
@elseif($category === 'Distribution')
|
|
@include('components.asides.distribution', compact('subCategory', 'items', 'bundle'))
|
|
@else
|
|
<div class="two-columns">
|
|
<h4>{!! $subCategory !!}</h4>
|
|
<div>
|
|
@if(is_string($items) || is_numeric($items))
|
|
<p>{{ strval($items) }}</p>
|
|
@else
|
|
@foreach($items as $key => $item)
|
|
@if($category === 'Dates')
|
|
@if(is_string($item))
|
|
<p>{{ Carbon\Carbon::parse($item)->format('d/m/Y') }}</p>
|
|
@else
|
|
<p>{{ Carbon\Carbon::parse($key)->format('d/m/Y') }}
|
|
@if(!empty($item['Lieu de publication'][0]))
|
|
({{ $item['Lieu de publication'][0] }})
|
|
@endif
|
|
</p>
|
|
@endif
|
|
@else
|
|
@if(is_numeric($item))
|
|
<p>{{ strval($item) }}</p>
|
|
@elseif(is_string($item))
|
|
@if(Str::contains($item, '€'))
|
|
<p>{{ strval($item) }}</p>
|
|
@else
|
|
<p>{!! \App\Classes\Term::register($item, $subCategory, $bundle)->render() !!}</p>
|
|
@endif
|
|
@else
|
|
<p>{!! \App\Classes\Term::register($key, $subCategory, $bundle)->render() !!}</p>
|
|
@endif
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
</aside>
|