riddles
Version:
A framework for building series of puzzle challenge, like Python Challenge.
38 lines • 1.38 kB
text/jade
//
Created by dsds on 10/13/15.
extends admin
block view
a.button.button-primary.float-right(href=path + "/admin/groups/new") New Group
h1 Groups
if success && success.length
p.success #{success}
p #{data.length} group(s) in total.
table.u-full-width
thead
tr
th №
th= __("groupname")
th= __("created at")
th= __("passed levels")
th= __("lock")
tbody
each groupdata, index in data
tr
td #{index + 1}
td
a(href=path + "/admin/groups/" + groupdata._id) #{groupdata.name}
td #{ObjectId(groupdata._id).getTimestamp().toLocaleString()}
td
each id in groupdata.passed
div= quizName[id] ? quizName[id] : id
td
if groupdata.lock > new Date()
= groupdata.lock.toLocaleString()
br
form(style="margin: 0", action=path + "/admin/groups/unlock", method="POST")
input.key(type="submit", value="Unlock")
input(type="text", name="gid", value=groupdata._id, style="display: none")
else
form(style="margin: 0", action=path + "/admin/groups/lock", method="POST")
input.key(type="submit", value="Lock 1 hour")
input(type="text", name="gid", value=groupdata._id, style="display: none")