fixes #659
This commit is contained in:
@@ -117,3 +117,8 @@ strong {
|
|||||||
table tfoot {
|
table tfoot {
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
color: #666;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|||||||
@@ -28,11 +28,6 @@ form.simple_form {
|
|||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hint {
|
|
||||||
color: #666;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset {
|
fieldset {
|
||||||
border: none;
|
border: none;
|
||||||
display: inline;
|
display: inline;
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ div#c-artists {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hint {
|
.hint {
|
||||||
font-size: 80%;
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ class WikiPagePresenter
|
|||||||
excerpt.try(:gsub, /<.+?>/, "")
|
excerpt.try(:gsub, /<.+?>/, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def consequent_tag_aliases
|
||||||
|
@consequent_tag_aliases ||= TagAlias.where("consequent_name = ?", wiki_page.title)
|
||||||
|
end
|
||||||
|
|
||||||
|
def antecedent_tag_alias
|
||||||
|
@antecedent_tag_alias ||= TagAlias.find_by_antecedent_name(wiki_page.title)
|
||||||
|
end
|
||||||
|
|
||||||
# Produce a formatted page that shows the difference between two versions of a page.
|
# Produce a formatted page that shows the difference between two versions of a page.
|
||||||
def diff(other_version)
|
def diff(other_version)
|
||||||
pattern = Regexp.new('(?:<.+?>)|(?:[0-9_A-Za-z\x80-\xff]+[\x09\x20]?)|(?:[ \t]+)|(?:\r?\n)|(?:.+?)')
|
pattern = Regexp.new('(?:<.+?>)|(?:[0-9_A-Za-z\x80-\xff]+[\x09\x20]?)|(?:[ \t]+)|(?:\r?\n)|(?:.+?)')
|
||||||
|
|||||||
@@ -13,6 +13,14 @@
|
|||||||
|
|
||||||
<div id="wiki-page-body" class="prose">
|
<div id="wiki-page-body" class="prose">
|
||||||
<%= format_text(@wiki_page.body) %>
|
<%= format_text(@wiki_page.body) %>
|
||||||
|
|
||||||
|
<% if @wiki_page.presenter.antecedent_tag_alias %>
|
||||||
|
<p class="hint">This tag has been aliased to <%= link_to @wiki_page.presenter.antecedent_tag_alias.consequent_name, posts_path(:tags => @wiki_page.presenter.antecedent_tag_alias.consequent_name) %>.</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if @wiki_page.presenter.consequent_tag_aliases.any? %>
|
||||||
|
<p class="hint">The following tags are aliased to this tag: <%= raw @wiki_page.presenter.consequent_tag_aliases.map {|x| link_to(x.antecedent_name, posts_path(:tags => x.antecedent_name))}.join(", ") %>.</p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="wiki-page-posts">
|
<div id="wiki-page-posts">
|
||||||
|
|||||||
Reference in New Issue
Block a user