add tags to post file urls
This commit is contained in:
@@ -104,34 +104,7 @@ class PostPresenter < Presenter
|
||||
end
|
||||
|
||||
def humanized_essential_tag_string
|
||||
string = []
|
||||
|
||||
if @post.character_tags.any?
|
||||
chartags = @post.character_tags.slice(0, 5)
|
||||
if @post.character_tags.length > 5
|
||||
chartags << "others"
|
||||
end
|
||||
chartags = chartags.map do |tag|
|
||||
tag.match(/^(.+?)(?:_\(.+\))?$/)[1]
|
||||
end
|
||||
string << chartags.to_sentence
|
||||
end
|
||||
|
||||
if @post.copyright_tags.any?
|
||||
copytags = @post.copyright_tags.slice(0, 5)
|
||||
if @post.copyright_tags.length > 5
|
||||
copytags << "others"
|
||||
end
|
||||
copytags = copytags.to_sentence
|
||||
string << (@post.character_tags.any? ? "(#{copytags})" : copytags)
|
||||
end
|
||||
|
||||
if @post.artist_tags_excluding_hidden.any?
|
||||
string << "drawn by"
|
||||
string << @post.artist_tags_excluding_hidden.to_sentence
|
||||
end
|
||||
|
||||
string.empty? ? "##{@post.id}" : string.join(" ").tr("_", " ")
|
||||
@post.humanized_essential_tag_string
|
||||
end
|
||||
|
||||
def categorized_tag_string
|
||||
|
||||
Reference in New Issue
Block a user