+ ${isExpanded ? `
+
+ ${!isDeleted && !isClosed ? `
+
+
+${currentUser && currentUser.login === 'minicrm' ? `` : ''}
+${currentUser && currentUser.login === 'kalugin.o' ? `` : ''}
+${currentUser && currentUser.role === 'tasks' && canEdit || currentUser.role === 'admin' ? `` : ''}
+${currentUser && currentUser.role === 'tasks' && canEdit || currentUser.role === 'admin' ? `` : ''}
+
+${currentUser && currentUser.login === 'minicrm' ? `` : ''}
+
+
+${task.task_type === 'document' && userRole === 'Исполнитель' ? `` : ''}
+
+${!isDeleted && !isClosed && task.task_type !== 'regular' && task.assignments && task.assignments.some(a => parseInt(a.user_id) === currentUser.id) ? `
+
+
+` : ''}
+
+${currentUser && currentUser.login === 'minicrm' ? `` : ''}
+ ${canEdit ? `` : ''}
+ ` : ''}
+ ${isClosed && canEdit ? `
+
+ ` : ''}
+ ${isDeleted && currentUser.role === 'admin' ? `
+
+ ` : ''}
+
+ ` : ''}
+
+ ${isCopy && task.original_task_title ? `
+
+ Оригинал: "${task.original_task_title}" (создал: ${task.original_creator_name})
+
+ ` : ''}
+
+
${task.description || 'Нет описания'}
+
+ ${task.rework_comment ? `
+
+ ` : ''}
+
+ ${task.task_type === 'document' ? renderDocumentFields(task.id, documentFields) : ''}
+
+
+ Файлы:
+ ${task.files && task.files.length > 0 ? renderGroupedFilesWithDelete(task) : 'нет файлов'}
+
+
+
+
Исполнители:
+${task.assignments && task.assignments.length > 0 ?
+ renderAssignmentList(task.assignments, task.id, canEdit) :
+ '
Не назначены
'
+}
+
+