Add tips in the situation of no items

This commit is contained in:
guanshiliang 2015-11-16 11:14:56 +08:00
parent 9cf600f36c
commit 4149ee86bf
4 changed files with 12 additions and 4 deletions

View File

@ -36,6 +36,7 @@ return [
'title' => 'Incident Templates',
'add' => [
'title' => 'Create an Incident Template',
'message' => 'You should add an Incident Template.',
'success' => 'Template created.',
'failure' => 'Something went wrong with the incident template.',
],
@ -50,6 +51,7 @@ return [
// Incident Maintenance
'schedule' => [
'schedule' => 'Scheduled Maintenance',
'logged' => '{0} There are no schedules, good work.|You have logged one schedule.|You have reported <strong>:count</strong> schedules.',
'scheduled_at' => 'Scheduled at :timestamp',
'add' => [
'title' => 'Add Scheduled Maintenance',
@ -106,6 +108,7 @@ return [
'metrics' => 'Metrics',
'add' => [
'title' => 'Create a Metric',
'message' => 'You should add a Metric.',
'success' => 'Metric created.',
'failure' => 'Something went wrong with the metric.',
],

View File

@ -18,7 +18,7 @@
<div class="col-sm-12">
@include('dashboard.partials.errors')
<div class="striped-list">
@foreach($metrics as $metric)
@forelse($metrics as $metric)
<div class="row striped-list-item">
<div class="col-md-6">
<i class="{{ $metric->icon }}"></i> <strong>{{ $metric->name }}</strong>
@ -31,7 +31,9 @@
<a href="/dashboard/metrics/{{ $metric->id }}/delete" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
@endforeach
@empty
<div class="list-group-item text-danger">{{ trans('dashboard.metrics.add.message') }}</div>
@endforelse
</div>
</div>
</div>

View File

@ -18,6 +18,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<p class="lead">{!! trans_choice('dashboard.schedule.logged', $schedule->count(), ['count' => $schedule->count()]) !!}</p>
<div class="striped-list">
@foreach($schedule as $incident)

View File

@ -16,7 +16,7 @@
<div class="row">
<div class="col-sm-12">
<div class="striped-list">
@foreach($incident_templates as $template)
@forelse($incident_templates as $template)
<div class="row striped-list-item">
<div class="col-xs-6">
<strong>{{ $template->name }}</strong>
@ -26,7 +26,9 @@
<a href="/dashboard/templates/{{ $template->id }}/delete" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
@endforeach
@empty
<div class="list-group-item text-danger">{{ trans('dashboard.incidents.templates.add.message') }}</div>
@endforelse
</div>
</div>
</div>