Improved display of asset status and meta status

This commit is contained in:
snipe 2017-11-30 16:40:37 -08:00
parent 0a5b72e71e
commit e9fdf06bf6

View file

@ -82,13 +82,23 @@
<tr>
<td>{{ trans('general.status') }}</td>
<td>
@if ($asset->assetstatus->color)
<span class="label label-default" style="background-color: {{ e($asset->assetstatus->color) }};">
&nbsp; &nbsp;</span>
</span>
@if (($asset->assignedTo) && ($asset->deleted_at==''))
<i class="fa fa-circle text-blue"></i> {{ trans('general.deployed') }} <i class="fa fa-long-arrow-right" aria-hidden="true"></i> {!! $asset->assignedTo->present()->glyph() !!}
{!! $asset->assignedTo->present()->nameUrl() !!}
@else
@if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
<i class="fa fa-circle text-green"></i>
@elseif (($asset->assetstatus) && ($asset->assetstatus->pending=='1'))
<i class="fa fa-circle text-orange"></i>
@elseif (($asset->assetstatus) && ($asset->assetstatus->archived=='1'))
<i class="fa fa-times text-red"></i>
@endif
<a href="{{ route('statuslabels.show', $asset->assetstatus->id) }}">
{{ $asset->assetstatus->name }}</a>
<label class="label label-default">{{ $asset->present()->statusMeta }}</label>
@endif
<a href="{{ route('statuslabels.show', $asset->assetstatus->id) }}">{{ $asset->assetstatus->name }}</a>
<label class="label label-default">{{ $asset->present()->statusMeta }}</label>
</td>
</tr>
@endif