lecturerMaterial.view

This commit is contained in:
Benjamin Takats
2023-01-27 15:53:44 +01:00
parent fa77d15ff5
commit b9f3f0ba7b
3 changed files with 14 additions and 2 deletions

View File

@@ -27,6 +27,11 @@
class="text-gray-400 mr-5 font-medium leading-6 hover:text-gray-300">
{{ __('Back to the overview') }}
</a>
@elseif(str(request()->route()->getName())->contains('lecturerMaterial.view'))
<a href="{{ route('library.table.lecturer', ['country' => $country]) }}"
class="text-gray-400 mr-5 font-medium leading-6 hover:text-gray-300">
{{ __('Back to the overview') }}
</a>
@endif
@if(str(request()->route()->getName())->contains('school.'))

View File

@@ -73,10 +73,13 @@
class="mx-auto mt-12 grid max-w-lg gap-5 lg:max-w-none lg:grid-cols-3">
@foreach($libraryItems as $libraryItem)
@php
$link = $isLecturerPage ? route('lecturerMaterial.view', ['libraryItem' => $libraryItem]) : route('libraryItem.view', ['libraryItem' => $libraryItem]);
@endphp
<div wire:key="library_item_{{ $libraryItem->id }}"
class="flex flex-col overflow-hidden rounded-lg shadow-[#F7931A] shadow-sm">
<div class="flex-shrink-0">
<a href="{{ route('libraryItem.view', ['libraryItem' => $libraryItem]) }}">
<a href="{{ $link }}">
<img class="h-48 w-full object-contain"
src="{{ $libraryItem->getFirstMediaUrl('main') }}"
alt="{{ $libraryItem->name }}">
@@ -88,7 +91,7 @@
<div
class="text-amber-500">{{ $libraryItem->tags->pluck('name')->join(', ') }}</div>
</p>
<a href="{{ route('libraryItem.view', ['libraryItem' => $libraryItem]) }}"
<a href="{{ $link }}"
class="mt-2 block">
<p class="text-xl font-semibold text-gray-200">{{ $libraryItem->name }}</p>
<p class="mt-3 text-base text-gray-300 line-clamp-6">{{ strip_tags($libraryItem->excerpt) }}</p>

View File

@@ -21,6 +21,10 @@ Route::middleware([])
->get('/library-item/{libraryItem:slug}', \App\Http\Livewire\News\InternArticleView::class)
->name('libraryItem.view');
Route::middleware([])
->get('/lecturer-material/{libraryItem:slug}', \App\Http\Livewire\News\InternArticleView::class)
->name('lecturerMaterial.view');
Route::middleware([])
->get('/my-meetups', \App\Http\Livewire\Profile\Meetups::class)
->name('profile.meetups');