From d140ba61743eeceb4e405acb6c0bd7f632252368 Mon Sep 17 00:00:00 2001 From: JamieC24 Date: Tue, 16 Jul 2024 15:01:03 +0100 Subject: [PATCH] Introduce new related_documents field to directus for exhibition files to live --- .../templates/details-2024.blade.php | 5 ++--- .../elements/exhibitions/files.blade.php | 17 +++++++---------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/resources/views/exhibitions/templates/details-2024.blade.php b/resources/views/exhibitions/templates/details-2024.blade.php index 806e760d..7b0dd15f 100644 --- a/resources/views/exhibitions/templates/details-2024.blade.php +++ b/resources/views/exhibitions/templates/details-2024.blade.php @@ -17,10 +17,9 @@ @include('support.components.components-repeater', ['page' => $exhibition]) -{{-- {{ dd($exhibition) }} --}} -@if (!empty($exhibition['exhibition_files'])) - @include('includes.elements.exhibitions.files') +@if (!empty($exhibition['related_documents'])) + @include('includes.elements.exhibitions.files', ['source' => $exhibition['related_documents']]) @endif @if($reposition_curators == false && (!empty($exhibition['associated_curators']) || !empty($exhibition['external_curators']))) diff --git a/resources/views/includes/elements/exhibitions/files.blade.php b/resources/views/includes/elements/exhibitions/files.blade.php index 2de634c3..223f0bd4 100644 --- a/resources/views/includes/elements/exhibitions/files.blade.php +++ b/resources/views/includes/elements/exhibitions/files.blade.php @@ -1,11 +1,8 @@ -@if (!empty($page_template)) - @if (!empty($exhibition['exhibition_files'])) - - @endif -@else - @section('exhibitions-files') - @if (!empty($exhibition['exhibition_files'])) - - @endif - @endsection +@if(!isset($source)) + @php + $source = $exhibition['exhibition_files'] + @endphp +@endif +@if(!empty($source)) + @endif