FEATURE: display page status as tag in overview

This commit is contained in:
Michal Kváček
2016-09-27 21:31:32 +02:00
parent 842b54d879
commit bb3d000e5e
2 changed files with 91 additions and 3 deletions
+83
View File
@@ -14408,3 +14408,86 @@ img {
.card.file-preview .card-block img {
width: 100%;
}
.tag {
display: inline-block;
padding: 0.25em 0.4em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}
.tag:empty {
display: none;
}
.btn .tag {
position: relative;
top: -1px;
}
a.tag:focus, a.tag:hover {
color: #fff;
text-decoration: none;
cursor: pointer;
}
.tag-pill {
padding-right: 0.6em;
padding-left: 0.6em;
border-radius: 10rem;
}
.tag-default {
background-color: #818a91;
}
.tag-default[href]:focus, .tag-default[href]:hover {
background-color: #687077;
}
.tag-primary {
background-color: #0275d8;
}
.tag-primary[href]:focus, .tag-primary[href]:hover {
background-color: #025aa5;
}
.tag-success {
background-color: #5cb85c;
}
.tag-success[href]:focus, .tag-success[href]:hover {
background-color: #449d44;
}
.tag-info {
background-color: #5bc0de;
}
.tag-info[href]:focus, .tag-info[href]:hover {
background-color: #31b0d5;
}
.tag-warning {
background-color: #f0ad4e;
}
.tag-warning[href]:focus, .tag-warning[href]:hover {
background-color: #ec971f;
}
.tag-danger {
background-color: #d9534f;
}
.tag-danger[href]:focus, .tag-danger[href]:hover {
background-color: #c9302c;
}
@@ -32,7 +32,7 @@
<div class="col-xs-2 col-lg-1">@lang('admin/contents.actions')</div>
</div>
@foreach($pages as $page)
<div class="row p-tb-15">
<div class="row p-tb-15 @if($page->is_homepage) bold @endif">
<div class="col-md-1 hidden-sm-down text-center with-placeholder">
<a href="{{route('content.edit', ['id' => $page->id])}}">
@if(!view()->exists(\App\Helpers\Template::name($page->template, false)))
@@ -40,7 +40,8 @@
title="@lang('admin/contents.invalidTemplateSelected')"></i>
@else
@if(!empty($page->title_photo))
<img src="@thumbnail($page->title_photo)" class="placeholder" alt="{{$page->title}}" />
<img src="@thumbnail($page->title_photo)" class="placeholder"
alt="{{$page->title}}" />
@else
<img src="{{asset('resources/assets/admin/img/placeholder.png')}}"
class="placeholder"
@@ -54,7 +55,11 @@
{{$page->title}}
</a>
</div>
<div class="col-lg-2 col-md-3 hidden-sm-down">{{$statuses[$page->status]}}</div>
<div class="col-lg-2 col-md-3 hidden-sm-down">
<span class="tag @if($page->status == \App\Models\Content::STATUS_PUBLIC) tag-success
@elseif ($page->status == \App\Models\Content::STATUS_DRAFT) tag-danger
@else tag-warning @endif">{{$statuses[$page->status]}}</span>
</div>
<div class="col-lg-2 col-md-3 hidden-sm-down">
<a href="{{route('content.overview', ['moduleId' => $page->module_id])}}">
{{trans($page->module_name)}}