UNPKG

riddles

Version:

A framework for building series of puzzle challenge, like Python Challenge.

44 lines (43 loc) 1.52 kB
// Created by dsds on 10/10/15. extends admin block view h1 Users p #{data.total} user(s) in total. table.u-full-width thead tr th(style="white-space: nowrap") a(href="?s=username")= __("username") th(style="white-space: nowrap") a(href="?s=_id")= __("created at") th(style="white-space: nowrap") a(href="?s=group")= __("group") th(style="white-space: nowrap") a(href="?s=gid")= __("group") th a(href="?s=name")= __("Name") th a(href="?s=uid")= __("UID") th a(href="?s=school")= __("School") th= __("Contact") tbody each userdata in data.users tr td #{userdata.username} td(style="white-space: nowrap") #{ObjectId(userdata._id).getTimestamp().toLocaleString()} td(style="white-space: nowrap") #{userdata.group} td(style="white-space: nowrap") #{data.groupName[userdata.gid] || ''} td(style="word-break: break-word") #{userdata.name || ''} td(style="word-break: break-word") #{userdata.uid || ''} td(style="word-break: break-word") #{userdata.school || ''} td(style="word-break: break-word") #{userdata.contact || ''} - var pageCount = Math.ceil(data.total / data.usersPerPage); ul.pagination - for (var x = 0; x < pageCount; ++x) li if x != data.page a(href="?s=" + data.sort + "&p=" + x)= x + 1 else a.current= x + 1