@extends('layouts.announcement.app')

@section('content')
    <div class="col-md-8">
        <div class="card">
            <div class="container">
                        <div class="panel panel-primary">
                            <div class="panel-heading">{{ __('View Announcement') }}</div>
                            <div class="panel-body">
                                <div class="row">
                                    @if(count(array($announcements)) > 0)
                                        <form method="" action="{{ route('announcement.create') }}">
                                            @csrf
                                            <div class='col-md-4'>
                                                <div class="form-group">
                                                    <label class="control-label">{{ __('Start Date') }}</label>
                                                    <div class='input-group date' id='startdate'>
                                                        <input name="startdate" type='text' disabled="disabled" value="{{$announcements->start_date}}" class="form-control" required/>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class='col-md-4'>
                                                <div class="form-group">
                                                    <label class="control-label">{{ __('End Date') }}</label>
                                                    <div class='input-group date' id='enddate'>
                                                        <input name="enddate" type='text' disabled="disabled" value="{{$announcements->end_date}}" class="form-control" required/>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class='col-md-4'>
                                                <div class="form-group">
                                                    <label class="control-label">{{ __('Date Posted') }}</label>
                                                    <div class='input-group date' id='dateposted'>
                                                        <input name="enddate" type='text' disabled="disabled" value="{{$announcements->created_at}}" class="form-control" required/>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class='col-md-12'>
                                                <div class="form-group">
                                                    <label class="control-label">{{ __('Content') }}</label>
                                                    <textarea id="content" name="content" disabled="disabled" class="form-control" minlength="20" maxlength="200" required>{{$announcements->content}}
                                                    </textarea>
                                                </div>
                                            </div>

                                            <hr>
                                            <center>
                                                <div class='col-md-12'>
                                                    <a href="{{ route('announcements.view') }}">
                                                        {{ __('View Announcements') }}
                                                    </a>
                                                </div>
                                            </center>
                                        </form>
                                    @else
                                        <p class="mt-5 mb-5">No Results</p>
                                    @endif
                                </div>
                            </div>
                </div>
            </div>
@endsection

