mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
closes #1556
added tag input box to composer when creating a topic added new routes for viewing tags 'tags' and 'tags/:tagname' respectively post_bar.tpl shows the tags of the topic can edit the main post to remove or add new tags added a new menu item to header to go to the tags page
This commit is contained in:
@@ -49,7 +49,7 @@ var stopTracking = function(replyObj) {
|
||||
};
|
||||
|
||||
SocketModules.composer.push = function(socket, pid, callback) {
|
||||
posts.getPostFields(pid, ['content'], function(err, postData) {
|
||||
posts.getPostFields(pid, ['content', 'tid'], function(err, postData) {
|
||||
if(err || (!postData && !postData.content)) {
|
||||
return callback(err || new Error('[[error:invalid-pid]]'));
|
||||
}
|
||||
@@ -58,6 +58,9 @@ SocketModules.composer.push = function(socket, pid, callback) {
|
||||
topic: function(next) {
|
||||
topics.getTopicDataByPid(pid, next);
|
||||
},
|
||||
tags: function(next) {
|
||||
topics.getTopicTags(postData.tid, next);
|
||||
},
|
||||
index: function(next) {
|
||||
posts.getPidIndex(pid, next);
|
||||
}
|
||||
@@ -71,6 +74,7 @@ SocketModules.composer.push = function(socket, pid, callback) {
|
||||
body: postData.content,
|
||||
title: results.topic.title,
|
||||
topic_thumb: results.topic.thumb,
|
||||
tags: results.tags,
|
||||
index: results.index
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user