Files
core/resources/views/admin/content/overviewTiles.blade.php
T

83 lines
3.6 KiB
PHP

@forelse($pages as $page)
<div class="page callout page {{$page->status}} row">
<div class="row column">
@if ($page->parent_id && $page->parent_url)
<span class="parent">
@lang('admin/contents.parentPage'):
<a href="{{route('content.edit', ['id' => $page->parent_id])}}">{{$page->parent_title}}</a>,
</span>
@endif
<span class="author">{{$page->author_name}}</span>,
<span class="date">{{date('d.m.Y', strtotime($page->created_at))}}</span>
</div>
<div class="column large-1">
@if ($page->title_photo)
<a href="{{route('content.edit', ['id' => $page->id])}}">
<img src="@upload($page->title_photo)" class="float-left" alt="" />
</a>
@endif
</div>
<div class="column large-8">
<h4>
<a href="{{route('content.edit', ['id' => $page->id])}}">
{{$page->title}}
<small>(@lang($page->module_name))</small>
</a>
</h4>
<p class="perex">
@if (trim($page->meta_description))
{{str_limit($page->meta_description)}}
@else
{{str_limit(strip_tags($page->content))}}
@endif
</p>
</div>
<div class="controls column float-right large-3">
@if($page->is_homepage)
<a class="button tiny disabled">
<i class="fa fa-home"></i>
@lang('admin/contents.alreadyHomepage')
</a>
@else
<a href="{{route('content.setHomepage', ['id' => $page->id])}}"
class="button tiny success">
<i class="fa fa-home"></i>
@lang('admin/contents.setHomepage')
</a>
@endif
<a href="{{route('content.edit', ['id' => $page->id])}}" class="button tiny success">
<i class="fa fa-edit"></i>
@lang('admin/contents.editPlain')
</a>
@if($page->status == \App\Models\Content::STATUS_DRAFT)
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PUBLIC])}}"
class="button tiny success confirm">
<i class="fa fa-eye"></i> @lang('admin/contents.makePublic')</a>
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PROTECTED])}}"
class="button tiny warning confirm">
<i class="fa fa-lock"></i> @lang('admin/contents.makeProtected')</a>
@else
<a href="{{route('page.content', ['url' => $page->url])}}" target="_blank"
class="button tiny secondary"><i
class="fa fa-desktop"></i> @lang('admin/contents.viewPage')</a>
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_DRAFT])}}"
class="button tiny warning confirm"><i
class="fa fa-eye-slash"></i> @lang('admin/contents.makeDraft')</a>
@endif
<a href="{{route('content.delete', ['id' => $page->id])}}"
class="button tiny alert confirm"><i
class="fa fa-remove"></i> @lang('admin/contents.deletePage')</a>
</div>
</div>
@empty
<em>@lang('admin/contents.noPagesAvailable')</em>
@endforelse