@if ($addTaskFilePermission == 'all'
|| ($addTaskFilePermission == 'added' && $task->added_by == user()->id)
|| ($addTaskFilePermission == 'owned' && in_array(user()->id, $taskUsers))
|| ($addTaskFilePermission == 'both' && (in_array(user()->id, $taskUsers) || $task->added_by == user()->id))
)
@endif
@forelse($task->files as $file)
@if ($file->icon == 'images')
@else
@endif
@if ($viewTaskFilePermission == 'all' || ($viewTaskFilePermission == 'added' && $file->added_by == user()->id))
@if ($viewTaskFilePermission == 'all' || ($viewTaskFilePermission == 'added' && $file->added_by == user()->id))
@if ($file->icon = 'images')
@lang('app.view')
@endif
@lang('app.download')
@endif
@if ($deleteTaskFilePermission == 'all' || ($deleteTaskFilePermission == 'added' && $file->added_by == user()->id))
@lang('app.delete')
@endif
@endif
@empty
@endforelse