fixes #1904: Display aliases/implications in artist excerpt, fixes bug with approving alias/implications involving artists

This commit is contained in:
r888888888
2015-08-06 16:40:30 -07:00
parent 65d52ebb40
commit e675016ec5
6 changed files with 47 additions and 29 deletions

View File

@@ -5,33 +5,7 @@ module WikiPagesHelper
antecedent_implications = wiki_page.presenter.antecedent_tag_implications
consequent_implications = wiki_page.presenter.consequent_tag_implications
html = ""
if antecedent_alias
html << "<p class='hint'>This tag has been aliased to "
html << link_to(antecedent_alias.consequent_name, show_or_new_wiki_pages_path(:title => antecedent_alias.consequent_name))
html << ".</p>"
end
if consequent_aliases.any?
html << "<p class='hint'>The following tags are aliased to this tag: "
html << raw(consequent_aliases.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", "))
html << ".</p>"
end
if antecedent_implications.any?
html << "<p class='hint'>This tag implicates "
html << raw(antecedent_implications.map {|x| link_to(x.consequent_name, show_or_new_wiki_pages_path(:title => x.consequent_name))}.join(", "))
html << ".</p>"
end
if consequent_implications.any?
html << "<p class='hint'>The following tags implicate this tag: "
html << raw(consequent_implications.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", "))
html << ".</p>"
end
html.html_safe
alias_and_implication_list(antecedent_alias, consequent_aliases, antecedent_implications, consequent_implications)
end
def wiki_page_post_previews(wiki_page)