@auth {{ __('Submit news articles') }} @endauth
@foreach($libraryItems as $libraryItem) @if($libraryItem->approved || $libraryItem->created_by === auth()->id() || auth()->user()?->hasRole('news-editor'))
{{ $libraryItem->tags->pluck('name')->join(', ') }}

{{ $libraryItem->name }}

{{ strip_tags($libraryItem->excerpt) }}

{{ $libraryItem->lecturer->name }} {{ $libraryItem->lecturer->name }}
{{ $libraryItem->lecturer->name }}
@if($libraryItem->read_time) {{ $libraryItem->read_time }} {{ __('min read') }} @endif
@if($libraryItem->created_by === auth()->id() || auth()->user()?->hasRole('news-editor'))
@if($libraryItem->approved) {{ __('approved') }} @else {{ __('not approved') }} @endif
@if(!$libraryItem->approved && auth()->user()?->hasRole('news-editor')) {{ __('Approve') }} @endif
{{ __('Edit') }}
@endif
@endif @endforeach
{{-- FOOTER --}}