app/views/pages/histories.html.slim
= render 'breadcrumb', page: @page
- @versions.each_with_index do |version, i|
- cur_page = @pages[i]
- prev_page = @pages[i + 1]
- user = User.find_by(version.whodunnit)
- break if prev_page.nil?
.card
.card-header
ul.list-inline.m-b-0
li
span.label.label-default= t(".#{version.event}")
li= time_ago(version.created_at)
li
= image_tag user.try(:avatar, 24), size: '24x24'
=< user.try(:nickname)
.card-block
.row
.col-sm-6
= cur_page.title
.col-sm-6
= diff(prev_page.title, cur_page.title)
hr.m-a-0
.card-block
.row
.col-sm-6
.markdown-body= cur_page.render
.col-sm-6
= diff(prev_page.content, cur_page.content)
= paginate @versions