% content_for(:title) { "Changes to #{ @leaf.title }" } %>
<% @layout_class = "books" %>
<% content_for :header do %>
<% end %>
<%= turbo_frame_tag :previous_version do %>
<% if @edit.previous %>
<%= link_to page_edit_path(@leaf, @edit.previous), data: { turbo_action: :advance }, class: "btn btn--reversed txt-small" do %>
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
Previous version
<% end %>
<% else %>
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
Previous version
<% end %>
<%= time_ago_in_words(@edit.updated_at) %> ago
<% if @edit.next %>
<%= link_to page_edit_path(@leaf, @edit.next), data: { turbo_action: :advance }, class: "btn btn--reversed txt-small" do %>
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
Next version
<% end %>
<% else %>
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
Next version
<% end %>
<%= @edit.page.body.to_html %>
<% end %>
<%= link_to edit_leafable_path(@leaf), class: "btn btn--positive txt-medium center margin-none" do %>
Current
<% end %>
<%= @leaf.page.body.to_html %>