diff --git a/CHANGELOG.md b/CHANGELOG.md index 8331ceb6..5c005654 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change log +## 21.04.2022 + +1. Added True to Nature banner to homepage (this will need removal at end of the exhibition) +2. Change things to do -> Podcasts +3. Change exhibition model for home page to allow for featured instances +4. Changed layout for fundraising and added new component +5. Added Tessitura search for related exhibition events + ## 19.04.2022 1. Added Cockerell exhibition site to solr importer diff --git a/app/Http/Controllers/exhibitionsController.php b/app/Http/Controllers/exhibitionsController.php index 924d4b86..00753255 100644 --- a/app/Http/Controllers/exhibitionsController.php +++ b/app/Http/Controllers/exhibitionsController.php @@ -15,6 +15,7 @@ use App\Models\Labels; use App\Models\TtnBios; use App\Models\TtnLabels; +use App\Models\TessituraPerformances; use Illuminate\Http\Response; use Psr\SimpleCache\InvalidArgumentException; @@ -78,6 +79,7 @@ public function details(string $slug): View|Response $podcasts = NULL; $cases = NULL; $products = NULL; + $events = NULL; if (!empty($exhibitions['data'][0]['podcasts'])) { $podcasts = PodcastArchive::find($exhibitions['data'][0]['podcasts'][0]['podcast_series_id']['id']); } @@ -87,10 +89,14 @@ public function details(string $slug): View|Response if (!empty($exhibitions['data'][0]['fme_product_ids'])) { $products = Shopify::getShopifyCollection($exhibitions['data'][0]['fme_product_ids']); } + if (!empty($exhibitions['data'][0]['tessitura_keyword_id'])) { + $events = TessituraPerformances::getExhibitionPerformances($exhibitions['data'][0]['tessitura_keyword_id']); + } if (empty($exhibitions['data'])) { return response()->view('errors.404', [], 404); } - return view('exhibitions.details', compact('exhibitions', 'records', 'adlib', 'podcasts', 'cases', 'products')); + + return view('exhibitions.details', compact('exhibitions', 'records', 'adlib', 'podcasts', 'cases', 'products', 'events')); } /** diff --git a/app/Http/Controllers/tessituraController.php b/app/Http/Controllers/tessituraController.php index e4b53770..9076a8ce 100644 --- a/app/Http/Controllers/tessituraController.php +++ b/app/Http/Controllers/tessituraController.php @@ -61,6 +61,8 @@ public function type(string $slug): View return view('tessitura.type', compact('productions', 'slug', 'events')); } + + /** * @param string $slug * @return int @@ -86,7 +88,6 @@ public function translateEvent(string $slug):int */ public function search(): View { -// dd(request('datefrom')); $this->validateForm(); $prods = $this->getTessituraApi(); $prods->setPerformanceStartDate(request('datefrom')); diff --git a/app/Models/TessituraPerformances.php b/app/Models/TessituraPerformances.php index 68c48b32..4c62ee17 100644 --- a/app/Models/TessituraPerformances.php +++ b/app/Models/TessituraPerformances.php @@ -1,8 +1,25 @@ getPerformances($id); + } + } diff --git a/resources/views/exhibitions/details.blade.php b/resources/views/exhibitions/details.blade.php index acb5c2e8..bdf5e597 100644 --- a/resources/views/exhibitions/details.blade.php +++ b/resources/views/exhibitions/details.blade.php @@ -45,7 +45,8 @@ @endif @if(isset($coll['exhibition_start_date']))
  • - {{$type}} run: {{ Carbon\Carbon::parse($coll['exhibition_start_date'])->format('l dS F Y') }} to + {{$type}} run: {{ Carbon\Carbon::parse($coll['exhibition_start_date'])->format('l dS F Y') }} + to {{ Carbon\Carbon::parse($coll['exhibition_end_date'])->format('l dS F Y') }}
  • @endif @@ -197,14 +198,14 @@ class="stretched-link">{{ ucfirst($record['_source']['summary_title']) }} :params="[$curator['staff_profiles_id']['slug']]" /> @endforeach - @foreach($coll['external_curators'] as $curator) - - @endforeach + @foreach($coll['external_curators'] as $curator) + + @endforeach @@ -404,3 +405,17 @@ class="stretched-link">{{ ucfirst($record['_source']['summary_title']) }} @endsection @endif + + +@if(!empty($events)) +@section('tnew-data') +
    +

    Special events for this exhibition

    +
    + @foreach($events as $production) + + @endforeach +
    +
    +@endsection +@endif diff --git a/resources/views/layouts/exhibitions.blade.php b/resources/views/layouts/exhibitions.blade.php index f7ca012f..27d1a9b7 100644 --- a/resources/views/layouts/exhibitions.blade.php +++ b/resources/views/layouts/exhibitions.blade.php @@ -41,6 +41,7 @@
    @yield('content')
    +@yield('tnew-data') @yield('exhibitions-files') @yield('shopify') @yield('exhibitionCaseCards')