From 8f37eb42ebbab675e8911a551eea48bb11a32a28 Mon Sep 17 00:00:00 2001 From: Daniel Pett Date: Sun, 7 Aug 2022 11:06:01 +0100 Subject: [PATCH] Remove departments from collections page --- resources/views/collections/details.blade.php | 208 +++++++++--------- resources/views/research/project.blade.php | 3 +- 2 files changed, 102 insertions(+), 109 deletions(-) diff --git a/resources/views/collections/details.blade.php b/resources/views/collections/details.blade.php index a58683e5..60bc5499 100644 --- a/resources/views/collections/details.blade.php +++ b/resources/views/collections/details.blade.php @@ -1,117 +1,111 @@ @extends('layouts.layout') @foreach($collection['data'] as $coll) - @section('keywords', $coll['meta_keywords']) - @section('description', $coll['meta_description']) - @section('title', $coll['collection_name']) - @section('hero_image', $coll['hero_image']['data']['url']) - @section('hero_image_title', $coll['hero_image_alt_text']) -@section('content') -
- {!! $coll['collection_description'] !!} -
- @section('collections') - @isset($coll['object_id_numbers']) - @inject('collectionsController', 'App\Http\Controllers\collectionsController') - @php - $records = $collectionsController::getObjects($coll['object_id_numbers']); - @endphp - @if(!empty($records)) -
-

- Related objects -

-
- @foreach($records as $record) - @php - $pris = Arr::pluck($record['_source']['identifier'],'priref'); - $pris = array_filter($pris); - $pris= Arr::flatten($pris); - @endphp + @section('keywords', $coll['meta_keywords']) + @section('description', $coll['meta_description']) + @section('title', $coll['collection_name']) + @section('hero_image', $coll['hero_image']['data']['url']) + @section('hero_image_title', $coll['hero_image_alt_text']) -
-
-
- @if(array_key_exists('multimedia', $record['_source'])) - An image of {{ ucfirst($record['_source']['summary_title']) }} - @else - A stand in image for {{ ucfirst($record['_source']['summary_title']) }}} - @endif -
-
-
+ @section('content') +
+ {!! $coll['collection_description'] !!} +
+ @endsection + + @section('collections') + @isset($coll['object_id_numbers']) + @inject('collectionsController', 'App\Http\Controllers\collectionsController') + @php + $records = $collectionsController::getObjects($coll['object_id_numbers']); + @endphp + @if(!empty($records)) +

- @if(array_key_exists('title',$record['_source'] )) - {{ ucfirst($record['_source']['title'][0]['value']) }} - @else - {{ ucfirst($record['_source']['summary_title']) }} - @endif

-

{{ $record['_source']['identifier'][0]['accession_number'] }}

+ Selected Related Objects + +
+ @foreach($records as $record) + @php + $pris = Arr::pluck($record['_source']['identifier'],'priref'); + $pris = array_filter($pris); + $pris= Arr::flatten($pris); + @endphp + +
+
+
+ @if(array_key_exists('multimedia', $record['_source'])) + An image of {{ ucfirst($record['_source']['summary_title']) }} + @else + A stand in image for {{ ucfirst($record['_source']['summary_title']) }}} + @endif +
+
+
+

+ @if(array_key_exists('title',$record['_source'] )) + {{ ucfirst($record['_source']['title'][0]['value']) }} + @else + {{ ucfirst($record['_source']['summary_title']) }} + @endif +

+

{{ $record['_source']['identifier'][0]['accession_number'] }}

+
+
+
+
+ @endforeach
-
-
- @endforeach -
-
- @endif - @endisset -@endsection - - @if(!empty($coll['associated_departments'])) - @section('departments') -
-

Associated departments

-
- @foreach($coll['associated_departments'] as $department) - - @endforeach -
-
+ @endif + @endisset @endsection - @endif - @if(!empty($coll['associated_galleries'])) - @section('galleries') -
-

Associated Galleries

-
- @foreach($coll['associated_galleries'] as $gallery) - - @endforeach -
-
- @endsection - @endif -@endsection -@if(!empty($coll['curators'])) - @section('curators') -
-

Associated staff

-
- @foreach($coll['curators'] as $curator) - - @endforeach -
-
- @endsection - @endif + @if(!empty($coll['associated_galleries'])) + @section('galleries') +
+

+ Associated Galleries +

+
+ @foreach($coll['associated_galleries'] as $gallery) + + @endforeach +
+
+ @endsection + @endif + + + @if(!empty($coll['curators'])) + @section('curators') +
+

Associated staff

+
+ @foreach($coll['curators'] as $curator) + + @endforeach +
+
+ @endsection + @endif @endforeach diff --git a/resources/views/research/project.blade.php b/resources/views/research/project.blade.php index a1178974..8ad88844 100644 --- a/resources/views/research/project.blade.php +++ b/resources/views/research/project.blade.php @@ -54,7 +54,6 @@
@endif @endsection - @if(!empty($project['project_partnerships'] )) @section('research-funders')
@@ -78,7 +77,7 @@

Outcomes of the project

- @markdown($project['outcomes']) + {!! $project['outcomes'] !!}
@endsection