REFACTORING: move part of content business logic into repository
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
@section('pageHeading', @trans(isset($pageHeading) ? $pageHeading : 'admin/contents.overview'))
|
||||
@section('headerButtons')
|
||||
|
||||
@if($module)
|
||||
<a href="{{route('content.new', ['moduleId' => $module->id])}}" class="btn btn-primary btn-sm rounded-s">
|
||||
@if($module->exists === true)
|
||||
<a href="{{route('content.new', ['moduleId' => $module->id])}}" class="btn btn-primary btn-sm rounded">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
@endif
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (count($pages))
|
||||
@if (count($pages) > 0)
|
||||
<div class="item-list rows-striped">
|
||||
<div class="row bold p-tb-15">
|
||||
<div class="col-md-1 hidden-sm-down"></div>
|
||||
@@ -58,8 +58,8 @@
|
||||
@if($page->is_homepage) <span class="m-l-10 tag tag-primary">@lang('admin/contents.homepage')</span> @endif
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-3 hidden-sm-down">
|
||||
<span class="tag @if($page->status == \App\Models\Content\Content::STATUS_PUBLIC) tag-success
|
||||
@elseif ($page->status == \App\Models\Content\Content::STATUS_DRAFT) tag-danger
|
||||
<span class="tag @if($page->isPublic()) tag-success
|
||||
@elseif ($page->isDraft()) tag-danger
|
||||
@else tag-warning @endif">{{$statuses[$page->status]}}</span>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-3 hidden-sm-down">
|
||||
@@ -98,16 +98,16 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@if($page->status == \App\Models\Content\Content::STATUS_DRAFT)
|
||||
@if($page->isDraft())
|
||||
<li>
|
||||
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content\Content::STATUS_PUBLIC])}}"
|
||||
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => 'public'])}}"
|
||||
class="confirm" data-toggle="tooltip"
|
||||
title="@lang('admin/contents.makePublic')">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content\Content::STATUS_PROTECTED])}}"
|
||||
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => 'protected'])}}"
|
||||
class="confirm" data-toggle="tooltip"
|
||||
title="@lang('admin/contents.makeProtected')">
|
||||
<i class="fa fa-lock"></i>
|
||||
@@ -121,7 +121,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content\Content::STATUS_DRAFT])}}"
|
||||
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => 'draft'])}}"
|
||||
class="button tiny warning confirm" data-toggle="tooltip"
|
||||
title="@lang('admin/contents.makeDraft')">
|
||||
<i class="fa fa-eye-slash"></i>
|
||||
@@ -136,16 +136,6 @@
|
||||
class="fa fa-trash-o"></i>
|
||||
</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="{{route('content.edit', ['id' => $page->id])}}"> <i--}}
|
||||
{{--class="fa fa-pencil"></i> </a>--}}
|
||||
{{--</li>--}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user