make bonfire view consistent with other challenge views and make codemirror height larger and result code mirror pane read only with no cursor

This commit is contained in:
Michael Q Larson
2015-01-10 22:59:24 -08:00
parent 2f04f323c1
commit d8929ac72d
3 changed files with 58 additions and 33 deletions

View File

@@ -1,8 +1,19 @@
var _ = require('lodash'),
debug = require('debug')('freecc:cntr:challenges'),
Challenge = require('./../models/Challenge');
/**
* Bonfire controller
*/
module.exports = {
index : function(req,res) {
res.render('bonfire/bonfire.jade');
}
};
exports.index = function(req, res) {
Challenge.find({}, null, { sort: { challengeNumber: 1 } }, function(err, c) {
if (err) {
debug('Challenge err: ', err);
next(err);
}
res.render('bonfire/bonfire.jade', {
challenges: c,
cc: req.user ? req.user.challengesHash : undefined
});
});
};