Moved non-config tag category info to its own class
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user