mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
nav - basic ACP setup
This commit is contained in:
@@ -37,6 +37,7 @@ var adminController = {
|
||||
settings: {},
|
||||
logger: {},
|
||||
sounds: {},
|
||||
navigation: {},
|
||||
themes: {},
|
||||
users: require('./admin/users'),
|
||||
uploads: require('./admin/uploads')
|
||||
@@ -230,6 +231,30 @@ adminController.languages.get = function(req, res, next) {
|
||||
});
|
||||
};
|
||||
|
||||
adminController.sounds.get = function(req, res, next) {
|
||||
meta.sounds.getFiles(function(err, sounds) {
|
||||
sounds = Object.keys(sounds).map(function(name) {
|
||||
return {
|
||||
name: name
|
||||
};
|
||||
});
|
||||
|
||||
res.render('admin/general/sounds', {
|
||||
sounds: sounds
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
adminController.navigation.get = function(req, res, next) {
|
||||
require('../navigation/admin').get(function(err, data) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
res.render('admin/general/navigation', data);
|
||||
});
|
||||
};
|
||||
|
||||
adminController.settings.get = function(req, res, next) {
|
||||
var term = req.params.term ? req.params.term : 'general';
|
||||
|
||||
@@ -340,20 +365,6 @@ adminController.groups.get = function(req, res, next) {
|
||||
});
|
||||
};
|
||||
|
||||
adminController.sounds.get = function(req, res, next) {
|
||||
meta.sounds.getFiles(function(err, sounds) {
|
||||
sounds = Object.keys(sounds).map(function(name) {
|
||||
return {
|
||||
name: name
|
||||
};
|
||||
});
|
||||
|
||||
res.render('admin/general/sounds', {
|
||||
sounds: sounds
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
adminController.themes.get = function(req, res, next) {
|
||||
var themeDir = path.join(__dirname, '../../node_modules/' + req.params.theme);
|
||||
fs.exists(themeDir, function(exists) {
|
||||
|
||||
Reference in New Issue
Block a user