diff --git a/modules/forums/client/controllers/forums-topic.client.controller.js b/modules/forums/client/controllers/forums-topic.client.controller.js index d90ca438..63deda06 100644 --- a/modules/forums/client/controllers/forums-topic.client.controller.js +++ b/modules/forums/client/controllers/forums-topic.client.controller.js @@ -5,10 +5,10 @@ .module('forums') .controller('ForumsTopicController', ForumsTopicController); - ForumsTopicController.$inject = ['$scope', '$state', '$translate', 'Authentication', 'MeanTorrentConfig', 'ForumsService', 'SideOverlay', '$filter', 'NotifycationService', + ForumsTopicController.$inject = ['$scope', '$state', '$translate', 'Authentication', 'MeanTorrentConfig', 'ForumsService', 'ScoreLevelService', '$filter', 'NotifycationService', 'marked', 'ModalConfirmService', '$stateParams', 'TopicsService']; - function ForumsTopicController($scope, $state, $translate, Authentication, MeanTorrentConfig, ForumsService, SideOverlay, $filter, NotifycationService, + function ForumsTopicController($scope, $state, $translate, Authentication, MeanTorrentConfig, ForumsService, ScoreLevelService, $filter, NotifycationService, marked, ModalConfirmService, $stateParams, TopicsService) { var vm = this; vm.forumsConfig = MeanTorrentConfig.meanTorrentConfig.forumsConfig; @@ -58,5 +58,15 @@ return marked(t.content, {sanitize: true}); } }; + + /** + * getUserScoreLevel + * @param u + * @returns {*|l} + */ + vm.getUserScoreLevel = function (u) { + var s = ScoreLevelService.getScoreLevelJson(vm.user.score); + return s.currLevel; + }; } }()); diff --git a/modules/forums/client/views/topic.client.view.html b/modules/forums/client/views/topic.client.view.html index c69450a8..526ca718 100644 --- a/modules/forums/client/views/topic.client.view.html +++ b/modules/forums/client/views/topic.client.view.html @@ -79,7 +79,8 @@
-
{{vm.topic.user.displayName}} +
{{vm.topic.user.displayName}} + ({{vm.topic.user.uploaded | bytes}} {{vm.topic.user.downloaded | bytes}} diff --git a/modules/forums/server/controllers/forums.server.controller.js b/modules/forums/server/controllers/forums.server.controller.js index 038eae33..12f46bd6 100644 --- a/modules/forums/server/controllers/forums.server.controller.js +++ b/modules/forums/server/controllers/forums.server.controller.js @@ -118,7 +118,7 @@ exports.topicById = function (req, res, next, id) { } Topic.findById(id) - .populate('user', 'username displayName profileImageURL uploaded downloaded') + .populate('user', 'username displayName profileImageURL uploaded downloaded score') .populate('lastUser', 'username displayName profileImageURL uploaded downloaded') .populate('_scoreList.user', 'username displayName profileImageURL uploaded downloaded') .populate('_replies.user', 'username displayName profileImageURL uploaded downloaded')