fix post archive presenter
This commit is contained in:
@@ -105,6 +105,10 @@ class PostArchive < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def visible?
|
||||||
|
post && post.visible?
|
||||||
|
end
|
||||||
|
|
||||||
def diff(version = nil)
|
def diff(version = nil)
|
||||||
if post.nil?
|
if post.nil?
|
||||||
latest_tags = tag_array
|
latest_tags = tag_array
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<td><%= post_version_diff(post_version) %></td>
|
<td><%= post_version_diff(post_version) %></td>
|
||||||
<% if CurrentUser.is_member? %>
|
<% if CurrentUser.is_member? %>
|
||||||
<td>
|
<td>
|
||||||
<% if post_version.post.visible? %>
|
<% if post_version.visible? %>
|
||||||
<% if post_version.version != 1 %>
|
<% if post_version.version != 1 %>
|
||||||
<%= link_to "Undo", undo_post_version_path(post_version), :method => :put, :remote => true %> |
|
<%= link_to "Undo", undo_post_version_path(post_version), :method => :put, :remote => true %> |
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user