Use isNotEmpty in more places

This commit is contained in:
James Brooks
2017-01-21 17:32:46 +00:00
parent a4571dab7b
commit f1c09773e2
5 changed files with 10 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
@if($component_groups->count() > 0)
@if($component_groups->isNotEmpty())
@foreach($component_groups as $componentGroup)
<ul class="list-group components">
@if($componentGroup->enabled_components->count() > 0)
@if($componentGroup->enabled_components->isNotEmpty())
<li class="list-group-item group-name">
<i class="{{ $componentGroup->collapse_class }} group-toggle"></i>
<strong>{{ $componentGroup->name }}</strong>
@@ -19,7 +19,7 @@
@endforeach
@endif
@if($ungrouped_components->count() > 0)
@if($ungrouped_components->isNotEmpty())
<ul class="list-group components">
<li class="list-group-item group-name">
<strong>{{ trans('cachet.components.group.other') }}</strong>

View File

@@ -1,7 +1,7 @@
@if($component_groups->count() > 0)
@if($component_groups->isNotEmpty())
@foreach($component_groups as $componentGroup)
<ul class="list-group components">
@if($componentGroup->enabled_components->count() > 0)
@if($componentGroup->enabled_components->isNotEmpty())
<li class="list-group-item group-name">
<i class="{{ $componentGroup->collapse_class_with_subscriptions($subscriptions) }} group-toggle"></i>
<strong>{{ $componentGroup->name }}</strong>
@@ -21,7 +21,7 @@
@endforeach
@endif
@if($ungrouped_components->count() > 0)
@if($ungrouped_components->isNotEmpty())
<ul class="list-group components">
<li class="list-group-item group-name">
<strong>{{ trans('cachet.components.group.other') }}</strong>

View File

@@ -30,7 +30,7 @@
<div class="panel-body markdown-body">
{!! $incident->formatted_message !!}
</div>
@if($incident->updates->count())
@if($incident->updates->isNotEmpty())
<div class="list-group">
@foreach($incident->updates as $update)
<a class="list-group-item" href="{{ $update->permalink }}">

View File

@@ -1,4 +1,4 @@
@if(!$scheduled_maintenance->isEmpty())
@if($scheduled_maintenance->isNotEmpty())
<div class="section-scheduled">
@include('partials.schedule')
</div>

View File

@@ -1,8 +1,8 @@
@if(!$stickied_incidents->isEmpty())
@if($stickied_incidents->isNotEmpty())
<div class="section-stickied">
<h1>{{ trans('cachet.incidents.stickied') }}</h1>
@foreach($stickied_incidents as $date => $incidents)
@include('partials.incidents', [compact($date), compact($incidents)])
@include('partials.incidents', [compact($date), compact($incidents)])
@endforeach
</div>
@endif