feat(chat): dynamic list of tavern mods (see http://goo.gl/9XhIZ6)

This commit is contained in:
Tyler Renelle 2014-06-29 16:20:38 -06:00
parent 20c165263e
commit e5c002bcdb
3 changed files with 6 additions and 1 deletions

View file

@ -168,6 +168,7 @@ module.exports.locals = function(req, res, next) {
},
siteVersion: siteVersion,
Content: shared.content,
mods: require('./models/user').mods,
tavern: tavern, // for world boss
worldDmg: (tavern && tavern.quest && tavern.quest.extra && tavern.quest.extra.worldDmg) || {}

View file

@ -442,3 +442,7 @@ UserSchema.methods.unlink = function(options, cb) {
module.exports.schema = UserSchema;
module.exports.model = mongoose.model("User", UserSchema);
mongoose.model("User").find({'contributor.admin':true},function(err,mods){
module.exports.mods = _.map(mods,function(m){return ' '+ m.profile.name});
});

View file

@ -129,6 +129,6 @@
h3=env.t('tavernTalk')
include ./chat-box
.alert.alert-info.alert-sm
!= ' ' + env.t('tavernAlert1') + ' <a href="https://github.com/HabitRPG/habitrpg/issues/2760" target="_blank">' + env.t('tavernAlert2') + '</a>.<br />' + env.t('moderatorIntro1') + env.t('moderatorList') + env.t('moderatorIntro2')
!= ' ' + env.t('tavernAlert1') + ' <a href="https://github.com/HabitRPG/habitrpg/issues/2760" target="_blank">' + env.t('tavernAlert2') + '</a>.<br />' + env.t('moderatorIntro1') + env.mods + env.t('moderatorIntro2')
ul.list-unstyled.tavern-chat
include ./chat-message