public static function make_fields_values_rows($langs, $module, $model, $item, $fields, $appends, $action_fields = ['edit', 'delete']) { if (count($fields) > 0) { $response = ''; $response .= \AdminList::make_fields_values($item, $fields, $appends, 'table'); if (is_array($action_fields)) { if (in_array('view', $action_fields)) { if (count($langs) > 0) { foreach ($langs as $language) { $response .= '<td class="edit">' . AdminList::make_view($module, $model, $appends, $item, $language->code) . '</td>'; } } else { $response .= '<td class="edit">' . AdminList::make_view($module, $model, $appends, $item, 'es') . '</td>'; } } if (in_array('edit', $action_fields)) { if (count($langs) > 0) { foreach ($langs as $language) { $response .= '<td class="edit">' . AdminList::make_edit($module, $model, $appends, $item, $language->code) . '</td>'; } } else { $response .= '<td class="edit">' . AdminList::make_edit($module, $model, $appends, $item, 'es') . '</td>'; } } if (in_array('delete', $action_fields)) { if (request()->has('view-trash') && request()->input('view-trash') == 'true') { $response .= '<td class="restore">' . AdminList::make_delete($module, $model, $item, $restore = true) . '</td>'; } else { $response .= '<td class="delete">' . AdminList::make_delete($module, $model, $item) . '</td>'; } } } return $response; } else { return NULL; } }