mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Added comments and spacing for readability
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
1122562b4e
commit
489895a5fa
|
@ -42,12 +42,16 @@ class ViewAssetsController extends Controller
|
||||||
|
|
||||||
// Loop through all the custom fields that are applied to any model the user has assigned
|
// Loop through all the custom fields that are applied to any model the user has assigned
|
||||||
foreach ($user->assets as $asset) {
|
foreach ($user->assets as $asset) {
|
||||||
|
|
||||||
|
// Make sure the model has a custom fieldset before trying to loop through the associated fields
|
||||||
if ($asset->model->fieldset) {
|
if ($asset->model->fieldset) {
|
||||||
|
|
||||||
foreach ($asset->model->fieldset->fields as $field) {
|
foreach ($asset->model->fieldset->fields as $field) {
|
||||||
// check and make sure they're allowed to see the value of the custom field
|
// check and make sure they're allowed to see the value of the custom field
|
||||||
if ($field->display_in_user_view == '1') {
|
if ($field->display_in_user_view == '1') {
|
||||||
$field_array[$field->db_column] = $field->name;
|
$field_array[$field->db_column] = $field->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue