@extends('back-end.master.app')

@section('title', 'Poetry Details')

@section('body')
<main class="app-content">
    <div class="card">
        <div class="card-header d-flex justify-content-between">
            <h4>Poetry Details</h4>
            <a href="{{ route('poetries.index') }}" class="btn btn-secondary btn-sm">Back to List</a>
        </div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-12">
                    <table class="table table-bordered">
                        <tr>
                            <th style="width: 200px;">Poet</th>
                            <td>{{ $data->poet->name ?? '-' }}</td>
                        </tr>
                        <tr>
                            <th>Category</th>
                            <td>{{ $data->category->title_ps ?? '-' }}</td>
                        </tr>
                        @if($data->sub_category)
                        <tr>
                            <th>Sub Category</th>
                            <td>{{ $data->sub_category->title_ps ?? '-' }}</td>
                        </tr>
                        @endif
                        <tr>
                            <th>Century</th>
                            <td>{{ $data->poet->centry->title_ps ?? '-' }}</td>
                        </tr>
                        <tr>
                            <th>Alphabet</th>
                            <td>{{ $data->alphabit }}</td>
                        </tr>
                        <tr>
                            <th>Date Added</th>
                            <td>{{ $data->date }}</td>
                        </tr>
                    </table>
                </div>
                <div class="col-md-12 mt-3">
                    <div class="card">
                        <div class="card-header">
                            <h5>Poetry Text</h5>
                        </div>
                        <div class="card-body" dir="rtl">
                            {!! $data->body !!}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
@endsection

@section('pageJs')
<script>
    $(".app-menu").removeClass("active");
    $("#nav_poetriesi").addClass("active");
    $("#poetriesi").addClass("is-expanded");
    $("#poetries_history").addClass("active");
</script>
@endsection
