181 lines
7.9 KiB
PHP
181 lines
7.9 KiB
PHP
@extends('admin.layoutWithNavigation')
|
|
|
|
@section('pageHeading', @trans('admin/contents.overview'))
|
|
@section('headerButtons')
|
|
|
|
@if($module)
|
|
<a href="{{route('content.new', ['moduleId' => $module->id])}}" class="btn btn-primary btn-sm rounded-s">
|
|
<i class="fa fa-plus"></i>
|
|
</a>
|
|
@endif
|
|
@endsection
|
|
|
|
@section('content')
|
|
@if (!$homepage)
|
|
<div class="alert alert-warning">
|
|
<strong>@lang('admin/contents.noHomepage')</strong>
|
|
</div>
|
|
@elseif(!$homepage->isPublic())
|
|
<div class="alert alert-info">
|
|
<strong>@lang('admin/contents.homepageProtected')</strong>
|
|
</div>
|
|
@endif
|
|
|
|
|
|
|
|
@if (count($pages))
|
|
<table class="table item-list full-width content-overview table-striped table-bordered table-hover">
|
|
<tr>
|
|
<th></th>
|
|
<th>@lang('admin/contents.title')</th>
|
|
<th>@lang('admin/contents.status')</th>
|
|
<th>@lang('admin/contents.moduleName')</th>
|
|
<th>@lang('admin/contents.createdAt')</th>
|
|
<th>@lang('admin/contents.actions')</th>
|
|
</tr>
|
|
@foreach($pages as $page)
|
|
<tr>
|
|
<td class="text-center with-placeholder">
|
|
<a href="{{route('content.edit', ['id' => $page->id])}}">
|
|
@if(!empty($page->title_photo))
|
|
<img src="@upload($page->title_photo)" class="placeholder" alt="{{$page->title}}" />
|
|
@else
|
|
<img src="{{asset('resources/assets/admin/img/placeholder.png')}}" class="placeholder"
|
|
alt="{{$page->title}}" />
|
|
@endif
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{route('content.edit', ['id' => $page->id])}}">
|
|
{{$page->title}}
|
|
</a>
|
|
</td>
|
|
<td>{{$statuses[$page->status]}}</td>
|
|
<td>
|
|
<a href="{{route('content.overview', ['moduleId' => $page->module_id])}}">
|
|
{{trans($page->module_name)}}
|
|
</a>
|
|
</td>
|
|
<td>@date($page->created_at)</td>
|
|
<td class="text-center">
|
|
<div class="item-actions-dropdown">
|
|
<a class="item-actions-toggle-btn">
|
|
<span class="inactive">
|
|
<i class="fa fa-cog"></i>
|
|
</span>
|
|
<span class="active">
|
|
<i class="fa fa-chevron-circle-right"></i>
|
|
</span>
|
|
</a>
|
|
<div class="item-actions-block">
|
|
<ul class="item-actions-list">
|
|
|
|
@if(!$page->is_homepage)
|
|
|
|
<li>
|
|
|
|
<a href="{{route('content.setHomepage', ['id' => $page->id])}}"
|
|
class="button tiny success">
|
|
<i class="fa fa-home"></i>
|
|
{{--@lang('admin/contents.setHomepage')--}}
|
|
</a>
|
|
</li>
|
|
|
|
|
|
@endif
|
|
|
|
<li>
|
|
<a class="edit" href="{{route('content.edit', ['id' => $page->id])}}"
|
|
class="button tiny success">
|
|
<i class="fa fa-pencil"></i>
|
|
{{-- @lang('admin/contents.editPlain')--}}
|
|
</a>
|
|
</li>
|
|
|
|
@if($page->status == \App\Models\Content::STATUS_DRAFT)
|
|
<li>
|
|
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PUBLIC])}}"
|
|
class="button tiny success">
|
|
<i class="fa fa-eye"></i>
|
|
{{-- @lang('admin/contents.makePublic')--}}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PROTECTED])}}"
|
|
class="button tiny warning" data-toggle="modal"
|
|
data-target="#confirm-modal">
|
|
<i class="fa fa-lock"></i>
|
|
{{-- @lang('admin/contents.makeProtected')--}}
|
|
</a>
|
|
</li>
|
|
@else
|
|
<li>
|
|
<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>
|
|
</li>
|
|
<li>
|
|
<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>
|
|
</li>
|
|
@endif
|
|
|
|
<li>
|
|
<a class="remove" data-toggle="modal" data-target="#confirm-modal"
|
|
href="{{route('content.delete', ['id' => $page->id])}}"
|
|
class="button tiny alert confirm"><i
|
|
class="fa fa-trash-o"></i>
|
|
{{--@lang('admin/contents.deletePage')--}}
|
|
</a>
|
|
</li>
|
|
|
|
|
|
{{--<li>--}}
|
|
{{--<a class="remove" href="#" data-toggle="modal" data-target="#confirm-modal"> <i--}}
|
|
{{--class="fa fa-trash-o "></i> </a>--}}
|
|
{{--</li>--}}
|
|
{{--<li>--}}
|
|
{{--<a class="edit" href="item-editor.html"> <i class="fa fa-pencil"></i> </a>--}}
|
|
{{--</li>--}}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</table>
|
|
|
|
<div class="row">
|
|
{!! $pages->render() !!}
|
|
</div>
|
|
|
|
@else
|
|
<div class="alert alert-info">
|
|
@lang('admin/contents.noPagesAvailable')
|
|
</div>
|
|
@endif
|
|
@endsection
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|