Moved non-config tag category info to its own class

This commit is contained in:
BrokenEagle
2017-11-07 16:10:33 -08:00
parent 7cb45fc8d3
commit 6838901aac
17 changed files with 128 additions and 77 deletions

View File

@@ -132,7 +132,7 @@ class PostPresenter < Presenter
def categorized_tag_groups
string = []
Danbooru.config.categorized_tag_list.each do |category|
TagCategory.categorized_list.each do |category|
if @post.typed_tags(category).any?
string << @post.typed_tags(category).join(" ")
end

View File

@@ -25,10 +25,10 @@ class TagSetPresenter < Presenter
def split_tag_list_html(template, options = {})
html = ""
Danbooru.config.split_tag_header_list.each do |category|
TagCategory.split_header_list.each do |category|
typetags = typed_tags(category)
if typetags.any?
html << Danbooru.config.full_tag_config_info[category]["header"]
html << TagCategory.header_mapping[category]
html << "<ul>"
typetags.each do |tag|
html << build_list_item(tag, template, options)
@@ -56,7 +56,7 @@ private
@typed_tags ||= {}
@typed_tags[name] ||= begin
@tags.select do |tag|
categories[tag] == Danbooru.config.tag_category_mapping[name]
categories[tag] == TagCategory.mapping[name]
end
end
end