@extends('layouts.app') @section('wrapper')
@if(auth()->user()->user_type == 1)
{{__('Announcements Management')}}
{{__('Create Announcement')}}
@foreach($announcements as $announcement) @endforeach
{{__('Title')}} {{__('Type')}} {{__('Priority')}} {{__('Status')}} {{__('Created')}} {{__('Actions')}}
{{ $announcement->title }} @if($announcement->show_as_popup) {{__('Popup')}} @endif
{{ $announcement->type_text }} {{ $announcement->priority_text }} @if($announcement->is_active && !$announcement->isExpired()) {{__('Active')}} @elseif($announcement->isExpired()) {{__('Expired')}} @else {{__('Inactive')}} @endif {{ $announcement->created_at->format('d.m.Y H:i') }}
{{ $announcements->links() }}
@else
@forelse($announcements as $announcement)
{{ $announcement->title }}
{{ $announcement->priority_text }}

{{ Str::limit(strip_tags($announcement->content), 150) }}

{{ $announcement->created_at->diffForHumans() }} {{__('Read More')}}
@empty
{{__('No announcements found')}}

{{__('There are no announcements available at the moment.')}}

@endforelse
@if($announcements->hasPages())
{{ $announcements->links() }}
@endif @endif
@endsection @section('script') @endsection