76 lines
3.9 KiB
PHP
76 lines
3.9 KiB
PHP
@extends('admin/layout')
|
|
|
|
@section('content')
|
|
<div class="row">
|
|
<h1>@lang('staticpages::admin.overview')</h1>
|
|
|
|
@if (session('success'))
|
|
<div data-alert class="callout success">
|
|
<strong>{{ session('success') }}</strong>
|
|
</div>
|
|
@endif
|
|
|
|
@if (session('error'))
|
|
<div data-alert class="callout alert">
|
|
<strong>{{ session('error') }}</strong>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="row" id="static-page-overview" data-equalizer>
|
|
@forelse($pages as $page)
|
|
<div class="columns large-3">
|
|
<div class="page callout" data-equalizer-watch>
|
|
|
|
{{--<div class="controls pull-right">--}}
|
|
{{--<button class="button tiny secondary" data-toggle="static-page-{{$page->id}}actions"><i class="fa fa-caret-down"></i></button>--}}
|
|
|
|
{{--<div class="dropdown-pane" id="static-page-{{$page->id}}actions" data-dropdown>--}}
|
|
{{----}}
|
|
{{--</div>--}}
|
|
{{--</div>--}}
|
|
|
|
<h4>{{$page->title}}</h4>
|
|
<span class="date">{{date('d.m.Y', strtotime($page->created_at))}}</span>
|
|
<span class="author">{{$page->author_name}}</span>
|
|
|
|
<p class="perex">
|
|
@if (trim($page->meta_description))
|
|
{{str_limit($page->meta_description)}}
|
|
@else
|
|
{{str_limit(strip_tags($page->content))}}
|
|
@endif
|
|
</p>
|
|
|
|
@if ($page->meta_keywords)
|
|
<p class="keywords">{{$page->meta_keywords}}</p>
|
|
@endif
|
|
|
|
<p class="controls row text-center">
|
|
|
|
{{--<a href="#" class="button tiny secondary has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.viewPage')"><i class="fa fa-desktop"></i></a>--}}
|
|
<a href="{{route('staticpage.edit', ['id' => $page->id])}}" class="button tiny success has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.edit', ['name' => $page->title])"><i class="fa fa-edit"></i></a>
|
|
|
|
@if($page->status == \App\Models\Content::STATUS_DRAFT)
|
|
<a href="{{route('staticpage.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PUBLIC])}}" class="button tiny success confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.makePublic')"><i class="fa fa-eye"></i></a>
|
|
<a href="{{route('staticpage.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PROTECTED])}}" class="button tiny warning confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.makeProtected')"><i class="fa fa-lock"></i></a>
|
|
@endif
|
|
|
|
@if(in_array($page->status, [\App\Models\Content::STATUS_PROTECTED, \App\Models\Content::STATUS_PUBLIC]))
|
|
<a href="{{route('staticpage.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_DRAFT])}}" class="button tiny warning confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.makeDraft')"><i class="fa fa-eye-slash"></i></a>
|
|
@endif
|
|
|
|
<a href="{{route('staticpage.delete', ['id' => $page->id])}}" class="button tiny alert confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.deletePage')"><i class="fa fa-remove"></i></a>
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<em>@lang('staticpages::admin.noPagesAvailable')</em>
|
|
@endforelse
|
|
</div>
|
|
|
|
<div class="row">
|
|
{{$pages->render()}}
|
|
</div>
|
|
@stop |