From 6bcb55a129bc1772f7034ec77db018643f14fd58 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 26 Oct 2017 21:50:39 -0700 Subject: [PATCH] Slight tweak to model name presenter --- app/Presenters/AssetModelPresenter.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Presenters/AssetModelPresenter.php b/app/Presenters/AssetModelPresenter.php index 7011a72039..a1cd879128 100644 --- a/app/Presenters/AssetModelPresenter.php +++ b/app/Presenters/AssetModelPresenter.php @@ -45,9 +45,14 @@ class AssetModelPresenter extends Presenter */ 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) { - $name .=" / ".$this->model_number; + $name .=" (#".$this->model_number.')'; } return $name; }