li(ng-repeat='task in user[list.type + "s"]', class='task {{taskClasses(task,user.filters,user.preferences.dayStart,user.lastCron,list.showCompleted,list.main)}}', data-id='{{task.id}}')
// right-hand side control buttons
.task-meta-controls
// Streak
span(ng-show='task.streak') {{task.streak}}
span(tooltip='Streak Counter')
i.icon-forward
i.icon-tags(tooltip='{{appliedTags(user.tags, task.tags)}}', ng-hide='noTags(task.tags)')
// edit
a(ng-hide='task._editing', ng-click='toggleEdit(task)', tooltip='Edit')
i.icon-pencil(ng-hide='task._editing')
// cancel
a(ng-hide='!task._editing', ng-click='toggleEdit(task)', tooltip='Cancel')
i.icon-remove(ng-hide='!task._editing')
//- challenges
// {{#if task.challenge}}
// {{#if brokenChallengeLink(task)}}
//
// {{else}}
//
// {{/}}
// {{else}}
// delete
a(ng-click='remove(task)', tooltip='Delete')
i.icon-trash
// chart
a(ng-show='task.history', ng-click='toggleChart(task.id, task)', tooltip='Progress')
i.icon-signal
// notes
span.task-notes(ng-show='task.notes && !task._editing', popover-trigger='mouseenter', popover-placement='left', popover='{{task.notes}}', popover-title='{{task.text}}')
i.icon-comment
// left-hand side checkbox
.task-controls.task-primary
// Habits
span(ng-if='list.main && task.type=="habit"')
// only allow scoring on main tasks, not when viewing others' public tasks or when creating challenges
a.task-action-btn(ng-if='task.up', ng-click='score(task,"up")') +
a.task-action-btn(ng-if='task.down', ng-click='score(task,"down")') -
//span(ng-if='!list.main')
// span.task-action-btn(ng-show='task.up') +
// span.task-action-btn(ng-show='task.down') =
// Rewards
span(ng-show='list.main && task.type=="reward"')
// only allow scoring on main tasks, not when viewing others' public tasks or when creating challenges
a.money.btn-buy(ng-click='score(task, "down")')
span.reward-cost {{task.value}}
span.shop_gold
//span(ng-if='!list.main')
// span.money.btn-buy
// span.reward-cost {{task.value}}
// span.shop_gold
// Daily & Todos
span.task-checker.action-yesno(ng-if='task.type=="daily" || task.type=="todo"')
// only allow scoring on main tasks, not when viewing others' public tasks or when creating challenges
//span(ng-if='list.main')
input.visuallyhidden.focusable(id='box-{{task.id}}', type='checkbox', ng-model='task.completed', ng-change='changeCheck(task)')
label(for='box-{{task.id}}')
//span(ng-if='!list.main')
// input.visuallyhidden.focusable(id='box-{{task.id}}-static',type='checkbox', checked='false')
// label(for='box-{{task.id}}-static')
// main content
p.task-text
// {{#if taskInChallenge(task)}}
// {{taskAttrFromChallenge(task,'text')}}
// {{else}}
| {{task.text}}
// {{/}}
// edit/options dialog
.task-options(ng-show='task._editing')
// {{#if brokenChallengeLink(task)}}
//
//
Broken Challenge Link: this task was part of a challenge, but (a) challenge (or containing group) has been deleted, or (b) the task was deleted from the challenge.