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

{{ trans('app.pages') }}

@can('create', \App\Models\Page::class) {{ trans('app.add_page') }} @endcan
@can('massDelete', \App\Models\Page::class) @endcan @foreach ($pages as $page) @can('massDelete', \App\Models\Page::class) @endcan @endforeach
{{ trans('app.image') }} {{ trans('app.page_title') }} {{ trans('app.visibility') }} {{ trans('app.view_position') }} {{ trans('app.author') }} {{ trans('app.date') }}  
{{ trans('app.cover_image') }} @can('update', $page) {!! $page->title !!} @else {!! $page->title !!} @endcan @if (is_null($page->published_at)) {{ strtoupper(trans('app.draft')) }} @endif {!! $page->visibilityName() !!} {!! $page->viewPosition() !!} {{ $page->author->getName() }} @if ($page->published_at) @if (\Carbon\Carbon::now() < $page->published_at) {{ trans('app.schedule_published_at') }}
{{ optional($page->published_at)->toDayDateTimeString() }} @else {{ trans('app.published_at') }}
{{ optional($page->published_at)->toFormattedDateString() }} @endif @else {{ trans('app.updated_at') }}
{{ $page->updated_at->toFormattedDateString() }} @endif
@can('update', $page)   @endcan @can('delete', $page) @if (in_array($page->id, config('system.freeze.pages'))) @else {!! Form::open(['route' => ['admin.utility.page.trash', $page], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endif @endcan

@can('massDelete', \App\Models\Page::class) {!! Form::open(['route' => ['admin.utility.page.emptyTrash'], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm btn btn-default btn-flat ajax-silent', 'title' => trans('help.empty_trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'right']) !!} {!! Form::close() !!} @else @endcan {{ trans('app.trash') }}

@foreach ($trashes as $trash) @endforeach
{{ trans('app.page_title') }} {{ trans('app.visibility') }} {{ trans('app.author') }} {{ trans('app.deleted_at') }} {{ trans('app.option') }}
{!! $trash->title !!} {!! $trash->visibilityName() !!} {{ $trash->author->getName() }} {{ $trash->deleted_at->diffForHumans() }} @can('delete', $trash)   {!! Form::open(['route' => ['admin.utility.page.destroy', $trash], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.delete_permanently'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan
@endsection