<% @revisions = Roroacms::Post.where(:ancestry => @record.id.to_s, :post_type => 'autosave').order('created_at desc') %> <% if @revisions.blank? || @record.id.blank? || @revisions.size <= 1 %>
<%= t("views.admin.partials.revision_tree.no_revisions") %>
<% else %> <%= link_to edit_admin_revision_path(@revisions.first.id), :class => 'btn btn-primary btn-block btn-sm pull-right view-all-revisions' do %> <%= t("views.admin.partials.revision_tree.view_all") %> <% end %> <% end %>