mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Show a glyph in the assets datatable. (#3111)
This commit is contained in:
parent
4c5fce847b
commit
4ad9c3623e
|
@ -85,7 +85,7 @@ class AssetPresenter extends Presenter
|
|||
$results['assigned_to'] = '';
|
||||
if($assigned = $this->model->assignedTo) {
|
||||
$results['status_label'] = 'Deployed';
|
||||
$results['assigned_to'] = $assigned->present()->nameUrl();
|
||||
$results['assigned_to'] = $assigned->present()->glyph() . ' ' . $assigned->present()->nameUrl();
|
||||
} else if($this->model->assetstatus) {
|
||||
$results['status_label'] = $this->model->assetstatus->name;
|
||||
}
|
||||
|
@ -268,4 +268,9 @@ class AssetPresenter extends Presenter
|
|||
{
|
||||
return route('hardware.show', $this->id);
|
||||
}
|
||||
|
||||
public function glyph()
|
||||
{
|
||||
return '<i class="fa fa-barcode"></i>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,4 +72,9 @@ class LocationPresenter extends Presenter
|
|||
{
|
||||
return route('locations.show', $this->id);
|
||||
}
|
||||
|
||||
public function glyph()
|
||||
{
|
||||
return '<i class="fa fa-globe"></i>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,4 +155,9 @@ class UserPresenter extends Presenter
|
|||
{
|
||||
return route('users.show', $this->id);
|
||||
}
|
||||
|
||||
public function glyph()
|
||||
{
|
||||
return '<i class="fa fa-users"></i>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -353,7 +353,7 @@
|
|||
@if($asset->assigned_type == User::class) <!-- Only users have avatars currently-->
|
||||
<img src="{{ $asset->assignedTo->present()->gravatar() }}" class="user-image-inline" alt="{{ $asset->assigneduser->present()->fullName() }}">
|
||||
@endif
|
||||
{!! $asset->assignedTo->present()->nameUrl() !!}
|
||||
{!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!}
|
||||
</p>
|
||||
|
||||
<ul class="list-unstyled">
|
||||
|
|
Loading…
Reference in a new issue