. */ function renderChecklist($check, $level = 1, $parent = 0) { global $structure; $user = auth()->getUser(); $enabled = $check->assignedUsers ? $check->assignedUsers->pluck('id')->search($user->id) !== false : true; $margin = ($level*20); $result = '
checked_at) ? 'checked' : '').' '.(!$enabled ? 'disabled' : '').'> | '; $result .= ''.$check->content.' '; if (intval($check->assignedUsers->pluck('id')->toArray())>0){ $result .= ' '; }else{ $result .= ' '. tr('Nessun utente assegnato').''; } if(!empty($check->checked_at)){ $result .= ' '.(!empty($check->checked_at) ? tr('Verificato da _NAME_ il _DATE_', [ '_NAME_' => $check->checkUser->username, '_DATE_' => timestampFormat($check->checked_at), ]) : '').' '; } $result .= ' | '; $result .= '
| ';
$result .= '
|
|