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

View File

@@ -22,14 +22,13 @@
@foreach($incidents as $incident)
<div class="row striped-list-item">
<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)
<p><small>{{ Str::words($incident->message, 5) }}</small></p>
@endif
</div>
<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.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>
</div>
</div>

View File

@@ -6,9 +6,9 @@
<div class="content-wrapper">
<div class="header sub-header">
<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>
<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') }}
</a>
<div class="clearfix"></div>