Linking directly to an individual incident

This commit is contained in:
James Brooks
2015-08-15 15:10:20 +01:00
parent c2c815ab14
commit 8a3f9196d3
7 changed files with 76 additions and 38 deletions

View File

@@ -0,0 +1,25 @@
<div class="panel panel-message">
<div class="panel-heading">
@if($current_user)
<div class="pull-right btn-group">
<a href="{{ route('dashboard.incidents.edit', ['id' => $incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ route('dashboard.incidents.delete', ['id' => $incident->id]) }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
@endif
@if($incident->component)
<span class="label label-default">{{ $incident->component->name }}</span>
@endif
<strong>{{ $incident->name }}</strong>{{ $incident->isScheduled ? trans("cachet.incidents.scheduled_at", ["timestamp" => $incident->scheduled_at_diff]) : null }}
<br>
<small class="date">
@if($with_link)
<a href="{{ route('incident', ['id' => $incident->id]) }}"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->created_at_formatted }}" data-timeago="{{ $incident->created_at_iso }}"></abbr></a>
@else
<abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->created_at_formatted }}" data-timeago="{{ $incident->created_at_iso }}"></abbr>
@endif
</small>
</div>
<div class="panel-body">
{!! $incident->formattedMessage !!}
</div>
</div>

View File

@@ -10,28 +10,7 @@
</div>
</div>
<div class="col-xs-10 col-xs-offset-2 col-sm-11 col-sm-offset-0">
<div class="panel panel-message">
<div class="panel-heading">
@if($current_user)
<div class="pull-right btn-group">
<a href="{{ route('dashboard.incidents.edit', ['id' => $incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ route('dashboard.incidents.delete', ['id' => $incident->id]) }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
@endif
@if($incident->component)
<span class="label label-default">{{ $incident->component->name }}</span>
@endif
<strong>{{ $incident->name }}</strong>{{ $incident->isScheduled ? trans("cachet.incidents.scheduled_at", ["timestamp" => $incident->scheduled_at_diff]) : null }}
<br>
<small class="date">
<abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->created_at_formatted }}" data-timeago="{{ $incident->created_at_iso }}">
</abbr>
</small>
</div>
<div class="panel-body">
{!! $incident->formattedMessage !!}
</div>
</div>
@include('partials.incident', ['incident' => $incident, 'with_link' => true])
</div>
</div>
</div>