2016-01-21 15:14:37 -05:00
|
|
|
mixin task-row(cid)
|
|
|
|
- var task = view.getTaskByCID(cid)
|
2016-01-20 18:32:21 -05:00
|
|
|
- var taskName = task.get('name');
|
|
|
|
- var isComplete = task.get('complete')
|
|
|
|
- var taskLink = view.defaultTaskLinks[taskName]
|
2016-01-21 15:14:37 -05:00
|
|
|
tr.task-row(data-task-cid=cid)
|
|
|
|
td.task-check
|
2016-01-20 18:32:21 -05:00
|
|
|
div.checkbox
|
2016-01-21 15:14:37 -05:00
|
|
|
input(type='checkbox', checked=(isComplete || false)).task-input
|
|
|
|
if task.get('curEdit') == true
|
|
|
|
td.edit-cell
|
|
|
|
td.task-name
|
|
|
|
input(type="input", value=taskName)#cur-edit
|
2016-01-20 18:32:21 -05:00
|
|
|
else
|
2016-01-21 15:14:37 -05:00
|
|
|
td.edit-cell
|
|
|
|
span.glyphicon.glyphicon-edit.start-edit
|
|
|
|
td.task-name
|
2016-01-20 18:32:21 -05:00
|
|
|
if taskLink
|
|
|
|
if taskLink === './'
|
2016-01-21 15:14:37 -05:00
|
|
|
a.no-article(href='https://github.com/codecombat/codecombat/wiki/Artisan-Home', target='blank')= taskName
|
2016-01-20 18:32:21 -05:00
|
|
|
else
|
|
|
|
a(href=taskLink, target='_blank')= taskName
|
|
|
|
else
|
|
|
|
span= taskName
|
|
|
|
|
|
|
|
block
|
|
|
|
table.table.table-striped.table-hover
|
|
|
|
tr
|
2016-01-21 15:14:37 -05:00
|
|
|
th.task-check Complete
|
|
|
|
th.edit-cell Edit
|
2016-01-20 18:32:21 -05:00
|
|
|
th Incomplete Tasks
|
|
|
|
for task in (view.taskArray() || [])
|
|
|
|
if task.get('revert').complete !== true
|
2016-01-21 15:14:37 -05:00
|
|
|
+task-row(task.cid)
|
2016-01-20 18:32:21 -05:00
|
|
|
tr
|
2016-01-21 15:14:37 -05:00
|
|
|
th.task-check
|
|
|
|
th.edit-cell
|
2016-01-20 18:32:21 -05:00
|
|
|
th Completed Tasks
|
|
|
|
for task in (view.taskArray() || [])
|
|
|
|
if task.get('revert').complete === true
|
2016-01-21 15:14:37 -05:00
|
|
|
+task-row(task.cid)
|
|
|
|
button#create-task.btn.btn-default Add Task
|