This commit is contained in:
albert
2012-01-06 18:27:46 -05:00
parent 073ab8ee96
commit 19c6c8932f
3 changed files with 6 additions and 6 deletions

View File

@@ -171,13 +171,13 @@ div#c-explore-posts {
div#c-post-versions {
div#a-index {
ins {
ins, ins a {
color: green;
text-decoration: none;
margin-right: 0.5em;
}
del {
del, del a {
color: red;
text-decoration: line-through;
margin-right: 0.5em;

View File

@@ -3,13 +3,13 @@ module PostVersionsHelper
diff = post_version.diff(post_version.previous)
html = []
diff[:added_tags].each do |tag|
html << '<ins>' + tag + '</ins>'
html << '<ins>' + link_to(tag, posts_path(:tags => tag)) + '</ins>'
end
diff[:removed_tags].each do |tag|
html << '<del>' + tag + '</del>'
html << '<del>' + link_to(tag, posts_path(:tags => tag)) + '</del>'
end
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
return html.join(" ").html_safe
end

View File

@@ -5,7 +5,7 @@
<% if @post_versions.empty? %>
<%= render "post_sets/blank" %>
<% else %>
<%= render"listing", :post_versions => @post_versions %>
<%= render "listing", :post_versions => @post_versions %>
<% end %>
</div>
</div>