Back to overview

This commit is contained in:
Benjamin Takats
2023-01-20 15:30:19 +01:00
parent f498154f85
commit a1e7a16ef1
2 changed files with 9 additions and 2 deletions

View File

@@ -11,6 +11,13 @@ class InternArticleView extends Component
{
public LibraryItem $libraryItem;
public function mount()
{
if (!$this->libraryItem->createdBy->hasRole('news-editor')) {
abort(403, 'This article is not available for viewing.');
}
}
public function render()
{
return view('livewire.news.intern-article-view')->layout('layouts.app', [

View File

@@ -1,6 +1,6 @@
<div class="bg-21gray flex flex-col h-screen justify-between">
<div class="bg-21gray">
<div class="relative mx-auto max-w-7xl py-4 px-6 lg:px-8">
<div class="mx-auto max-w-7xl py-4 px-6 lg:px-8 overflow-hidden">
<div class="flex items-center justify-end">
<x-button lg :href="route('article.overview')">
<i class="fa-thin fa-arrow-left"></i>
@@ -9,7 +9,7 @@
</div>
</div>
<div class="relative mx-auto max-w-7xl py-16 px-6 lg:px-8">
<div class="relative mx-auto max-w-7xl py-16 px-6 lg:px-8 overflow-hidden">
<div class="absolute top-0 bottom-0 left-3/4 hidden w-screen bg-21gray lg:block"></div>
<div class="mx-auto max-w-prose text-base lg:grid lg:max-w-none lg:grid-cols-2 lg:gap-8">
<div>