mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 10:35:51 -05:00
5e7b267691
- Add helper buttons to verifier.
64 lines
2.4 KiB
Text
64 lines
2.4 KiB
Text
extends /templates/base-flat
|
|
|
|
block content
|
|
.container
|
|
div.row(style="margin-top: 20px")
|
|
div.col-sm-3
|
|
p.alert.alert-success(style="padding: 5px")
|
|
| Passed: #{view.passed}
|
|
div.col-sm-3
|
|
p.alert.alert-danger(style="padding: 5px")
|
|
| Failed: #{view.failed}
|
|
|
|
if view.levelIDs
|
|
.progress
|
|
.progress-bar.progress-bar-success(role="progressbar" style="width: #{100*view.passed/view.testCount}%")
|
|
.progress-bar.progress-bar-danger(role="progressbar" style="width: #{100*view.failed/view.testCount}%")
|
|
|
|
each test, id in view.tests
|
|
if test.level
|
|
.pull-right
|
|
- var last = test.level.get('slug') + view.linksQueryString
|
|
a.btn.btn-primary(href="/editor/verifier/" + last) Focus
|
|
a.btn.btn-success(href="/play/level/" + last) Play
|
|
a.btn.btn-warning(href="/editor/level/" + last ) Edit
|
|
|
|
if !test.goals
|
|
h2(style='color: orange')= test.level.get('name')
|
|
small= ' in ' + test.language + ''
|
|
else if test.isSucessful()
|
|
h2(style='color: green')= test.level.get('name')
|
|
small= ' in ' + test.language + ''
|
|
else
|
|
h2(style='color: red')= test.level.get('name')
|
|
small= ' in ' + test.language + ''
|
|
|
|
div.row(class=(test.isSucessful() && id > 1 ? 'collapse' : 'collapse in'))
|
|
div.col-xs-8
|
|
if test.solution
|
|
pre #{test.solution.source}
|
|
else
|
|
h4 Solution not found...
|
|
div.col-xs-4.well
|
|
if test.goals
|
|
if test.frames == test.solution.frameCount
|
|
div(style='color: green') ✓ Frames: #{test.frames}
|
|
else
|
|
div(style='color: red') ✘ Frames: #{test.frames} vs #{test.solution.frameCount}
|
|
|
|
each v,k in test.goals || []
|
|
if !test.solution.goals
|
|
div(style='color: orange') ? #{k} (#{v.status})
|
|
else if v.status == test.solution.goals[k]
|
|
div(style='color: green') ✓ #{k} (#{v.status})
|
|
else
|
|
div(style='color: red') ✘ #{k} (#{v.status} vs #{test.solution.goals[k]})
|
|
else
|
|
h3 Running....
|
|
|
|
else
|
|
h1 Loading Level...
|
|
|
|
// TODO: show errors
|
|
// TODO: frame length
|
|
// TODO: show last frame hash
|