FIX: Tags on topic crawler view

- Remove tag object id
- Remove duplicate tag list
- Don't display tags when tagging is disabled
This commit is contained in:
Rafael dos Santos Silva 2016-08-17 01:28:31 -03:00
parent 4e76525d25
commit 16f04d96d4
2 changed files with 1 additions and 11 deletions

View File

@ -15,7 +15,7 @@ module TopicsHelper
breadcrumb.push url: category.url, name: category.name
end
if (tags = topic.tags).present?
if SiteSetting.tagging_enabled && (tags = topic.tags).present?
tags.each do |tag|
url = "#{Discourse.base_url}/tags/#{tag.name}"
breadcrumb << {url: url, name: tag.name}

View File

@ -18,16 +18,6 @@
</div>
<% end %>
<%- if SiteSetting.tagging_enabled && @topic_view.topic.tags.present? %>
<div class='tags'>
<%= t 'js.tagging.tags' %>:
<%- @topic_view.topic.tags.each do |t| %>
<%= t %>
<%- end %>
</div>
<% end %>
<%= server_plugin_outlet "topic_header" %>
<hr>