Change navigation flow from incidents to incident updates page

Clicking on the incident title will now navigate to the incident updates page rather than editing the incident. To prevent confusion I've also removed the "update" button from the incidents overview page and added the incident name to the page title of the incident updates page.
This commit is contained in:
Nico Stapelbroek
2018-01-13 16:01:58 +01:00
parent 700c936662
commit 3a9688c510
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ return [
'incident-create-template' => 'Create Template', 'incident-create-template' => 'Create Template',
'incident-templates' => 'Incident Templates', 'incident-templates' => 'Incident Templates',
'updates' => [ 'updates' => [
'title' => 'Incident updates', 'title' => 'Incident updates for :incident',
'count' => '{0} Zero Updates|[1] One Update|[2] Two Updates|[3,Inf] Several Updates', 'count' => '{0} Zero Updates|[1] One Update|[2] Two Updates|[3,Inf] Several Updates',
], ],
'add' => [ 'add' => [
@@ -22,14 +22,13 @@
@foreach($incidents as $incident) @foreach($incidents as $incident)
<div class="row striped-list-item"> <div class="row striped-list-item">
<div class="col-xs-6"> <div class="col-xs-6">
<i class="{{ $incident->icon }}"></i> <a href="{{ cachet_route('dashboard.incidents.edit', [$incident->id]) }}"><strong>{{ $incident->name }}</strong></a> <span class="badge badge-info">{{ trans_choice('dashboard.incidents.updates.count', $incident->updates()->count()) }}</span> <i class="{{ $incident->icon }}"></i> <a href="{{ cachet_route('dashboard.incidents.updates', [$incident->id]) }}"><strong>{{ $incident->name }}</strong></a> <span class="badge badge-info">{{ trans_choice('dashboard.incidents.updates.count', $incident->updates()->count()) }}</span>
@if($incident->message) @if($incident->message)
<p><small>{{ Str::words($incident->message, 5) }}</small></p> <p><small>{{ Str::words($incident->message, 5) }}</small></p>
@endif @endif
</div> </div>
<div class="col-xs-6 text-right"> <div class="col-xs-6 text-right">
<a href="{{ cachet_route('dashboard.incidents.edit', [$incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a> <a href="{{ cachet_route('dashboard.incidents.edit', [$incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.incidents.updates', [$incident->id]) }}" class="btn btn-info">{{ trans('forms.update') }}</a>
<a href="{{ cachet_route('dashboard.incidents.delete', [$incident->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a> <a href="{{ cachet_route('dashboard.incidents.delete', [$incident->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div> </div>
</div> </div>
@@ -6,9 +6,9 @@
<div class="content-wrapper"> <div class="content-wrapper">
<div class="header sub-header"> <div class="header sub-header">
<span class="uppercase"> <span class="uppercase">
<i class="ion ion-ios-information-outline"></i> {{ trans('dashboard.incidents.updates.title') }} <i class="ion ion-ios-information-outline"></i> {{ trans('dashboard.incidents.updates.title', ['incident' => Str::words($incident->name, 5)]) }}
</span> </span>
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.incidents.updates.create', [$incident]) }}"> <a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.incidents.updates.create', [$incident->id]) }}">
{{ trans('dashboard.incidents.update.title') }} {{ trans('dashboard.incidents.update.title') }}
</a> </a>
<div class="clearfix"></div> <div class="clearfix"></div>