diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index 386aad8d..49393155 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -966,6 +966,7 @@ SEARCH_RESULT_LIST: 'Search Result', SEARCH_LOADING: 'is loading result, please wait...', SEARCH_EMPTY: 'No matching results', + SIGNATURE_TAG: 'Signature', CATEGORY: { AFFAIRS: 'Affairs', diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index 6c05bf4e..cd672a60 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -966,6 +966,7 @@ SEARCH_RESULT_LIST: '搜索结果', SEARCH_LOADING: '正在装载搜索结果,请稍候...', SEARCH_EMPTY: '没有匹配的搜索结果', + SIGNATURE_TAG: '用户签名', CATEGORY: { AFFAIRS: '站务区', diff --git a/modules/core/client/less/mt.less b/modules/core/client/less/mt.less index b4649c8b..edb44729 100644 --- a/modules/core/client/less/mt.less +++ b/modules/core/client/less/mt.less @@ -1620,7 +1620,8 @@ body { } .signature-input { - background-color: #efefef; + font-size: 0.9em; + background-color: #f5f5f5; border-radius: 4px; border: solid 1px #dedede; padding: 10px; diff --git a/modules/forums/client/controllers/forums-topic.client.controller.js b/modules/forums/client/controllers/forums-topic.client.controller.js index 2324a0c7..ed5122ac 100644 --- a/modules/forums/client/controllers/forums-topic.client.controller.js +++ b/modules/forums/client/controllers/forums-topic.client.controller.js @@ -78,6 +78,7 @@ forumId: $stateParams.forumId, topicId: $stateParams.topicId }, function (topic) { + mtDebug.info(topic); vm.topic = topic; vm.buildPager(); @@ -96,6 +97,17 @@ } }; + /** + * getUserSignatureMarked + * @param u + * @returns {*} + */ + vm.getUserSignatureMarked = function (u) { + if (u) { + return marked(u.signature, {sanitize: true}); + } + }; + /** * getUserScoreLevel * @param u diff --git a/modules/forums/client/less/forum.less b/modules/forums/client/less/forum.less index d81910d2..b690e898 100644 --- a/modules/forums/client/less/forum.less +++ b/modules/forums/client/less/forum.less @@ -136,7 +136,7 @@ } .readonly { - cursor: pointer; + cursor: pointer; } .post-list { @@ -366,7 +366,7 @@ padding-left: 15px; color: #586069; background-color: lighten(@comment-background-default, 2%); - border-bottom: 1px dashed #d1d5da; + border-bottom: 1px solid #d1d5da; border-top-left-radius: 3px; border-top-right-radius: 3px; min-height: 42px; @@ -475,6 +475,35 @@ } } } + .reply-comment-signature { + position: relative; + padding: 10px 15px; + font-size: 0.9em; + color: #586069; + background-color: lighten(@comment-background-default, 2%); + border-top: 1px solid #d1d5da; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + p { + &:first-child { + margin-top: 5px; + } + &:last-child { + margin-bottom: 0; + } + } + .signature-tag { + position: absolute; + background-color: lighten(@comment-background-default, 2%); + top: -10px; + left: 15px; + font-size: 12px; + color: #ccc; + padding: 1px 5px 0 5px; + border-radius: 3px; + border: solid 1px #d1d5da; + } + } } .reply-avatar { img { diff --git a/modules/forums/client/views/topic.client.view.html b/modules/forums/client/views/topic.client.view.html index b473c01b..1363cb22 100644 --- a/modules/forums/client/views/topic.client.view.html +++ b/modules/forums/client/views/topic.client.view.html @@ -117,6 +117,9 @@
+
+

[ {{vm.topic.updatedBy.displayName}} {{ 'COMMENT_EDITED_INFO' | translate}} {{vm.topic.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}} ]

+
    @@ -141,9 +144,10 @@
-
-

[ {{vm.topic.updatedBy.displayName}} {{ 'COMMENT_EDITED_INFO' | translate}} {{vm.topic.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}} ]

-
+ +
+
+
@@ -193,6 +197,9 @@
+
+

[ {{rep.updatedBy.displayName}} {{ 'COMMENT_EDITED_INFO' | translate}} {{rep.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}} ]

+
    @@ -216,9 +223,10 @@
-
-

[ {{rep.updatedBy.displayName}} {{ 'COMMENT_EDITED_INFO' | translate}} {{rep.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}} ]

-
+ +
+
+
diff --git a/modules/forums/server/controllers/forums.server.controller.js b/modules/forums/server/controllers/forums.server.controller.js index 3db9fed3..9f31b921 100644 --- a/modules/forums/server/controllers/forums.server.controller.js +++ b/modules/forums/server/controllers/forums.server.controller.js @@ -953,11 +953,11 @@ exports.topicById = function (req, res, next, id) { } Topic.findById(id) - .populate('user', 'username displayName profileImageURL isVip uploaded downloaded score') + .populate('user', 'username displayName profileImageURL isVip uploaded downloaded score signature') .populate('lastUser', 'username displayName profileImageURL isVip uploaded downloaded') .populate('updatedBy', 'username displayName profileImageURL isVip uploaded downloaded') .populate('_thumbs.user', 'username displayName profileImageURL isVip uploaded downloaded') - .populate('_replies.user', 'username displayName profileImageURL isVip uploaded downloaded') + .populate('_replies.user', 'username displayName profileImageURL isVip uploaded downloaded signature') .populate('_replies.updatedBy', 'username displayName profileImageURL isVip uploaded downloaded') .populate('_replies._thumbs.user', 'username displayName profileImageURL isVip uploaded downloaded') .exec(function (err, topic) {