mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Add fieldset to asset model listing
This commit is contained in:
parent
3acc4065ce
commit
eb340b0fa9
|
@ -398,7 +398,7 @@ class AssetModelsController extends Controller
|
|||
*/
|
||||
public function getCustomFields($modelId)
|
||||
{
|
||||
$model=AssetModel::find($modelId);
|
||||
$model = AssetModel::find($modelId);
|
||||
return View::make("models.custom_fields_form")->with("model", $model);
|
||||
}
|
||||
|
||||
|
@ -467,10 +467,11 @@ class AssetModelsController extends Controller
|
|||
'image' => ($model->image!='') ? '<img src="'.config('app.url').'/uploads/models/'.$model->image.'" height=50 width=50>' : '',
|
||||
'modelnumber' => $model->model_number,
|
||||
'numassets' => $model->assets->count(),
|
||||
'depreciation' => (($model->depreciation)&&($model->depreciation->id > 0)) ? $model->depreciation->name.' ('.$model->depreciation->months.')' : trans('general.no_depreciation'),
|
||||
'category' => ($model->category) ? $model->category->name : '',
|
||||
'depreciation' => (($model->depreciation) && ($model->depreciation->id > 0)) ? $model->depreciation->name.' ('.$model->depreciation->months.')' : trans('general.no_depreciation'),
|
||||
'category' => ($model->category) ? (string)link_to('admin/settings/categories/'.$model->category->id.'/view', $model->category->name) : '',
|
||||
'eol' => ($model->eol) ? $model->eol.' '.trans('general.months') : '',
|
||||
'note' => $model->getNote(),
|
||||
'note' => $model->getNote(),
|
||||
'fieldset' => ($model->fieldset) ? (string)link_to('admin/custom_fields/'.$model->fieldset->id, $model->fieldset->name) : '',
|
||||
'actions' => $actions
|
||||
);
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
<th data-sortable="false" data-field="depreciation">{{ trans('general.depreciation') }}</th>
|
||||
<th data-sortable="false" data-field="category">{{ trans('general.category') }}</th>
|
||||
<th data-sortable="true" data-field="eol">{{ trans('general.eol') }}</th>
|
||||
<th data-sortable="false" data-field="fieldset">{{ trans('admin/models/general.fieldset') }}</th>
|
||||
<th data-sortable="false" data-field="note">{{ trans('general.notes') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
|
|
|
@ -96,6 +96,13 @@
|
|||
{{ trans('general.months') }}</li>
|
||||
@endif
|
||||
|
||||
@if ($model->fieldset)
|
||||
<li>{{ trans('admin/models/general.fieldset') }}:
|
||||
<a href="{{ config('app.url') }}/admin/custom_fields/{{ $model->fieldset->id }}">{{ $model->fieldset->name }}</a>
|
||||
</li>
|
||||
|
||||
@endif
|
||||
|
||||
@if ($model->image)
|
||||
<li><br /><img src="{{ config('app.url') }}/uploads/models/{{ $model->image }}" class="img-responsive"></li>
|
||||
@endif
|
||||
|
|
Loading…
Reference in a new issue