@extends('admin.layouts.main') @section('content')

{{ trans('BlogSystem::admin/main.back_to_all') }}

@section('panelTitle')

{{ trans('BlogSystem::admin/main.edit') }}

@overwrite @section('panelContent') {!! Form::open(['class' => 'form-horizontal', 'files' => 'true', 'method' => 'PATCH', 'route' => ['admin::posts::update', $post]]) !!}
{!! Form::label(null, trans('BlogSystem::admin/main.creation.title')) !!}:
{!! Form::text('title', $post->getProperLanguageRow('lang', 'title'), [ 'class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => trans('BlogSystem::admin/main.creation.title'), 'required', ]) !!}
{!! Form::label(null, trans('BlogSystem::admin/main.creation.image')) !!}:
{!! Form::file('image') !!}
{!! Form::label(null, trans('BlogSystem::admin/main.creation.short_description')) !!}:
{!! Form::textarea('short_description', $post->getProperLanguageRow('lang', 'short_description'), [ 'class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => trans('BlogSystem::admin/main.creation.short_description'), 'required', ]) !!}
{!! Form::label(null, trans('BlogSystem::admin/main.creation.description')) !!}:
{!! Form::textarea('description', $post->getProperLanguageRow('lang', 'description'), [ 'class' => 'form-control ckeditor', 'autocomplete' => 'off', 'placeholder' => trans('BlogSystem::admin/main.creation.description'), 'required', ]) !!}
{!! Form::label(null, trans('BlogSystem::admin/main.creation.category')) !!}:
{!! Form::label(null, trans('BlogSystem::admin/main.creation.added_categories')) !!}:
@foreach($postCategories as $category)

{{ $category->getFullCategoryName() }}

@endforeach
{!! Form::label(null, trans('BlogSystem::admin/main.creation.added_at')) !!}:
{!! Form::button(trans('global.edit'), ['type' => 'submit', 'class' => 'btn btn-wide btn-success ladda-button', 'data-style' => 'slide-up']) !!}
{!! Form::close() !!} {!! Form::open(['class' => 'form-horizontal']) !!}
{!! Form::button(trans('global.delete'), [ 'class' => 'btn btn-wide btn-warning ladda-button blog-delete-button', 'data-style' => 'slide-up', 'data-delete-link' => route('admin::posts::delete', $post), 'data-post-delete-button' => 1, ]) !!}
{!! Form::close() !!} @overwrite @include('admin.layouts.includes.panel',['id' => 'post-edit'])

{{ $post->getProperLanguageRow('lang', 'title') }}

{!! $post->getProperLanguageRow('lang', 'description') !!}

{{ trans('BlogSystem::admin/main.added_at') }} {{ $post->added_at }}
@push('footScripts') @include('BlogSystem::admin.posts.js.scripts') @endpush @endsection