mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Slight tweak to model name presenter
This commit is contained in:
parent
a99e09e5e3
commit
6bcb55a129
|
@ -45,9 +45,14 @@ class AssetModelPresenter extends Presenter
|
||||||
*/
|
*/
|
||||||
public function modelName()
|
public function modelName()
|
||||||
{
|
{
|
||||||
$name = $this->model->manufacturer->name.' '.$this->name;
|
$name = '';
|
||||||
|
if ($this->model->manufacturer) {
|
||||||
|
$name .= $this->model->manufacturer->name;
|
||||||
|
}
|
||||||
|
$name .= $this->name;
|
||||||
|
|
||||||
if ($this->model_number) {
|
if ($this->model_number) {
|
||||||
$name .=" / ".$this->model_number;
|
$name .=" (#".$this->model_number.')';
|
||||||
}
|
}
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue