Merge remote-tracking branch 'origin/master' into user-icons

v1.18.x
Julian Lam 9 years ago
commit 8d4209d42c

@ -50,7 +50,7 @@
"nodebb-rewards-essentials": "0.0.5",
"nodebb-theme-lavender": "2.0.11",
"nodebb-theme-persona": "3.0.68",
"nodebb-theme-vanilla": "4.0.32",
"nodebb-theme-vanilla": "4.0.33",
"nodebb-widget-essentials": "2.0.3",
"npm": "^2.1.4",
"passport": "^0.3.0",

@ -69,6 +69,14 @@
$('#main-page-title').text(menu.text() + (menu.parents('.menu-item').children('a').text() === 'Settings' ? ' Settings' : ''));
}
});
var acpPath = url.replace('admin/', '').split('/');
acpPath.forEach(function(path, i) {
acpPath[i] = path.charAt(0).toUpperCase() + path.slice(1);
});
acpPath = acpPath.join(' > ');
document.title = (url === 'admin/general/dashboard' ? 'Dashboard' : acpPath) + ' | NodeBB Admin Control Panel';
}
function setupRestartLinks() {

@ -101,6 +101,9 @@ helpers.getUserDataByUserSlug = function(userslug, callerUID, callback) {
userData.signature = validator.escape(userData.signature);
userData.aboutme = validator.escape(userData.aboutme || '');
userData['cover:url'] = userData['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(userData.uid);
userData['cover:position'] = userData['cover:position'] || '50% 50%';
next(null, userData);
}
], callback);
@ -140,8 +143,8 @@ helpers.getBaseUser = function(userslug, callerUID, callback) {
results.user.showHidden = results.user.isSelf || results.isAdmin;
results.user.profile_links = results.profile_links;
results['cover:url'] = results['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(results.user.uid);
results['cover:position'] = results['cover:position'] || '50% 50%';
results.user['cover:url'] = results.user['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(results.user.uid);
results.user['cover:position'] = results.user['cover:position'] || '50% 50%';
next(null, results.user);
}

@ -75,7 +75,6 @@ profileController.get = function(req, res, callback) {
userData['cover:url'] = userData['cover:url'] || require('../../coverPhoto').getDefaultProfileCover(userData.uid);
userData['cover:position'] = userData['cover:position'] || '50% 50%';
console.log(userData['cover:url']);
if (!userData.profileviews) {
userData.profileviews = 1;

@ -112,7 +112,7 @@ middleware.renderHeader = function(req, res, data, next) {
scripts: results.scripts,
'cache-buster': meta.config['cache-buster'] ? 'v=' + meta.config['cache-buster'] : '',
env: process.env.NODE_ENV ? true : false,
title: acpPath + ' | NodeBB Admin Control Panel'
title: (acpPath || 'Dashboard') + ' | NodeBB Admin Control Panel'
};
templateValues.template = {name: res.locals.template};

Loading…
Cancel
Save