fixes #199
This commit is contained in:
@@ -171,13 +171,13 @@ div#c-explore-posts {
|
|||||||
|
|
||||||
div#c-post-versions {
|
div#c-post-versions {
|
||||||
div#a-index {
|
div#a-index {
|
||||||
ins {
|
ins, ins a {
|
||||||
color: green;
|
color: green;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-right: 0.5em;
|
margin-right: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
del {
|
del, del a {
|
||||||
color: red;
|
color: red;
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
margin-right: 0.5em;
|
margin-right: 0.5em;
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ module PostVersionsHelper
|
|||||||
diff = post_version.diff(post_version.previous)
|
diff = post_version.diff(post_version.previous)
|
||||||
html = []
|
html = []
|
||||||
diff[:added_tags].each do |tag|
|
diff[:added_tags].each do |tag|
|
||||||
html << '<ins>' + tag + '</ins>'
|
html << '<ins>' + link_to(tag, posts_path(:tags => tag)) + '</ins>'
|
||||||
end
|
end
|
||||||
diff[:removed_tags].each do |tag|
|
diff[:removed_tags].each do |tag|
|
||||||
html << '<del>' + tag + '</del>'
|
html << '<del>' + link_to(tag, posts_path(:tags => tag)) + '</del>'
|
||||||
end
|
end
|
||||||
diff[:unchanged_tags].each do |tag|
|
diff[:unchanged_tags].each do |tag|
|
||||||
html << '<span>' + tag + '</span>' unless tag =~ /^(?:rating|source):/
|
html << '<span>' + link_to(tag, posts_path(:tags => tag)) + '</span>' unless tag =~ /^(?:rating|source):/
|
||||||
end
|
end
|
||||||
return html.join(" ").html_safe
|
return html.join(" ").html_safe
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<% if @post_versions.empty? %>
|
<% if @post_versions.empty? %>
|
||||||
<%= render "post_sets/blank" %>
|
<%= render "post_sets/blank" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render"listing", :post_versions => @post_versions %>
|
<%= render "listing", :post_versions => @post_versions %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user