mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-14 09:41:35 -05:00
44 lines
1.4 KiB
Text
44 lines
1.4 KiB
Text
mixin task-row(cid)
|
|
- var task = view.getTaskByCID(cid)
|
|
- var taskName = task.get('name');
|
|
- var isComplete = task.get('complete')
|
|
- var taskLink = view.defaultTaskLinks[taskName]
|
|
tr.task-row(data-task-cid=cid)
|
|
td.task-check
|
|
div.checkbox
|
|
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
|
|
else
|
|
td.edit-cell
|
|
span.glyphicon.glyphicon-edit.start-edit
|
|
td.task-name
|
|
if taskLink
|
|
if taskLink === './'
|
|
a.no-article(href='https://github.com/codecombat/codecombat/wiki/Artisan-Home', target='blank')= taskName
|
|
else
|
|
a(href=taskLink, target='_blank')= taskName
|
|
else
|
|
span= taskName
|
|
|
|
block
|
|
table.table.table-striped.table-hover
|
|
tr
|
|
th.task-check Complete
|
|
th.edit-cell Edit
|
|
th Incomplete Tasks
|
|
for task in (view.taskArray() || [])
|
|
if task.get('revert').complete !== true
|
|
+task-row(task.cid)
|
|
tr
|
|
th.task-check
|
|
th.edit-cell
|
|
th Completed Tasks
|
|
for task in (view.taskArray() || [])
|
|
if task.get('revert').complete === true
|
|
+task-row(task.cid)
|
|
button#create-task.btn.btn-primary Add Task
|
|
if view.missingDefaults().length !== 0
|
|
button#add-default-tasks.btn.btn-default Add Default Tasks
|