<!--- START View Task -->
<div class="card" ng-if="!item.task.is_edit">
	<div class="card-body">
		<!-- priority and drag handle -->
		<div class="task-priority-sidestrip task-priority-{{item.task.priority}}">
			<div ng-if="item.canDragAndDrop()" class="task-drag-area" as-sortable-item-handle="">
				<span class="drag-icon">
					<ion-icon name="reorder-three-outline"></ion-icon>
				</span>
			</div>
		</div>

		<div class="media mt-0 mb-1">
			<div class="ml-0 mr-2">
				<input type="checkbox" class="" ng-model="item.task.is_complete" ng-change="item.completeToggled()" ng-show="item.task.perms.can_update">
			</div>
			<div class="media-body">
				<div class="sub-items">
					<div>
						<a class="task-link" ng-if="item.task.title !== item.task.title_truncated" ng-href="/projects/task/{{item.task.id}}" rel="tooltip" data-original-title="{{item.task.title}}">{{item.task.title_truncated}}</a>
						<a class="task-link" ng-if="item.task.title === item.task.title_truncated" ng-href="/projects/task/{{item.task.id}}">{{item.task.title}}</a>
						<div class="task-project-name small text-muted" ng-if="item.showSectionName">
							{{item.task.section_name}}
						</div>
						<div class="task-project-name small text-muted" ng-if="item.showProjectName">
							<a ng-href="{{item.task.source.link}}" ng-show="(item.task.source) && (item.task.source.name !== '')">{{item.task.source.name}}</a>
						</div>
					</div>

					<div class="task-meta">
						<div class="task-date mb-1 small d-block" ng-if="!item.showProjectName && !item.showSectionName && item.task.due_date">
							<span class="text-muted">Due on:</span> {{item.task.due_date_formatted}}
						</div>

						<div ng-if="(item.showProjectName || item.showSectionName) && item.task.due_date" class="small task-date d-block mb-1 d-block">
							<span class="text-muted">Due on:</span> {{item.task.due_date_formatted}}
						</div>

						<!--- assigned to -->
						<div class="d-block" ng-if="item.showAssignees !== 'none' && item.task.assignees.length && !item.showProjectName">
							<div class="users d-inline-block">
								<a ng-repeat="assignee in item.getAssignees()" ng-attr-href="{{assignee.profile_url}}" ng-attr-title="{{assignee.name}}" rel="tooltip" title="{{assignee.name}}" data-original-title="{{assignee.name}}">
									<img class="tasks-profile-img profile-img" ng-attr-src="{{assignee.profile_img}}" />
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!--- END View Task -->
