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:
barisusakli
2014-05-21 16:13:46 -04:00
parent 1d7c293197
commit df73ceaeb7
20 changed files with 400 additions and 19 deletions

View File

@@ -20,6 +20,7 @@ var async = require('async'),
require('./topics/fork')(Topics);
require('./topics/posts')(Topics);
require('./topics/follow')(Topics);
require('./topics/tags')(Topics);
Topics.getTopicData = function(tid, callback) {
Topics.getTopicsData([tid], function(err, topics) {
@@ -275,6 +276,9 @@ var async = require('async'),
},
threadTools: function(next) {
plugins.fireHook('filter:topic.thread_tools', [], next);
},
tags: function(next) {
Topics.getTopicTagsObjects(tid, next);
}
}, function(err, results) {
if (err) {
@@ -283,6 +287,7 @@ var async = require('async'),
topicData.category = results.category;
topicData.posts = results.posts;
topicData.tags = results.tags;
topicData.thread_tools = results.threadTools;
topicData.pageCount = results.pageCount;
topicData.unreplied = parseInt(topicData.postcount, 10) === 1;