@extends('front.layouts.app') @section('title', 'Evêques et Archevêques de CI') @push('css') @endpush @section('content') @foreach($dioceses as $diocese) {{-- Afficher la section uniquement si le diocèse a des évêques ou archevêques --}} @if($diocese->bishops->isNotEmpty()) {{-- Alternance couleur fond --}}
{{-- 1. NOM DU DIOCESE --}}

{{ strtoupper($diocese->full_name) }}

{{-- 2. DESCRIPTION --}} @if($diocese->description)

{{ $diocese->description }}

@endif
{{-- 3. TABLEAU ARCHEVEQUES (si le diocèse en a) --}} @if($diocese->archbishops->isNotEmpty())

ARCHEVÊQUES

@if($diocese->archbishops->first()->custom_fields) @foreach($diocese->archbishops->first()->custom_fields ?? [] as $field) @endforeach @endif @foreach($diocese->archbishops as $archbishop) @foreach($archbishop->custom_fields ?? [] as $field) @endforeach @endforeach
PHOTO NOM DATE NAISSANCE ORD. SACERDOTALE ORD. EPISCOPALE SIÈGE CONTACT EMAIL{{ strtoupper($field['label'] ?? '') }}
@if(empty($archbishop->getFirstMediaUrl('bishop-img'))) Avatar @else {{ $archbishop->name }} @endif @if($archbishop->title){{ $archbishop->title }} @endif{{ $archbishop->name }} {{ $archbishop->birth_date?->format('d/m/Y') ?? '-' }} {{ $archbishop->ordination_sacerdotale?->format('d/m/Y') ?? '-' }} {{ $archbishop->ordination_episcopale?->format('d/m/Y') ?? '-' }} {{ $archbishop->episcopal_seat ?? '-' }} {{ $archbishop->contact_secretariat ?? '-' }} {{ $archbishop->email ?? '-' }}{{ $field['value'] ?? '-' }}
@endif {{-- 4. TABLEAU EVEQUES (si le diocèse en a) --}} @if($diocese->bishops_only->isNotEmpty())

ÉVÊQUES

@if($diocese->bishops_only->first()->custom_fields) @foreach($diocese->bishops_only->first()->custom_fields ?? [] as $field) @endforeach @endif @foreach($diocese->bishops_only as $bishop) @foreach($bishop->custom_fields ?? [] as $field) @endforeach @endforeach
PHOTO NOM DATE NAISSANCE ORD. SACERDOTALE ORD. EPISCOPALE SIÈGE CONTACT EMAIL{{ strtoupper($field['label'] ?? '') }}
@if(empty($bishop->getFirstMediaUrl('bishop-img'))) Avatar @else {{ $bishop->name }} @endif @if($bishop->title){{ $bishop->title }} @endif{{ $bishop->name }} {{ $bishop->birth_date?->format('d/m/Y') ?? '-' }} {{ $bishop->ordination_sacerdotale?->format('d/m/Y') ?? '-' }} {{ $bishop->ordination_episcopale?->format('d/m/Y') ?? '-' }} {{ $bishop->episcopal_seat ?? '-' }} {{ $bishop->contact_secretariat ?? '-' }} {{ $bishop->email ?? '-' }}{{ $field['value'] ?? '-' }}
@endif {{-- 5. TABLEAU EVEQUES EMERITES (si le diocèse en a) --}} @if($diocese->emeritus_bishops->isNotEmpty())

ÉVÊQUES ÉMÉRITES

@if($diocese->emeritus_bishops->first()->custom_fields) @foreach($diocese->emeritus_bishops->first()->custom_fields ?? [] as $field) @endforeach @endif @foreach($diocese->emeritus_bishops as $bishop) @foreach($bishop->custom_fields ?? [] as $field) @endforeach @endforeach
PHOTO NOM DATE NAISSANCE ORD. SACERDOTALE ORD. EPISCOPALE SIÈGE CONTACT EMAIL{{ strtoupper($field['label'] ?? '') }}
@if(empty($bishop->getFirstMediaUrl('bishop-img'))) Avatar @else {{ $bishop->name }} @endif @if($bishop->title){{ $bishop->title }} @endif{{ $bishop->name }} {{ $bishop->birth_date?->format('d/m/Y') ?? '-' }} {{ $bishop->ordination_sacerdotale?->format('d/m/Y') ?? '-' }} {{ $bishop->ordination_episcopale?->format('d/m/Y') ?? '-' }} {{ $bishop->episcopal_seat ?? '-' }} {{ $bishop->contact_secretariat ?? '-' }} {{ $bishop->email ?? '-' }}{{ $field['value'] ?? '-' }}
@endif
@endif @endforeach @endsection