app/views/georgia/revisions/_revision.html.erb in georgia-0.7.8 vs app/views/georgia/revisions/_revision.html.erb in georgia-0.8.0

- old
+ new

@@ -1,11 +1,16 @@ -<div class="revision"> - <span class='badge badge-default'>id:<%= revision.id %></span> - <span class='label label-<%= revision.review? ? 'warning' : 'default' %>'><%= revision.state %></span> - <%= link_to revision.created_at.strftime('%F %H:%M'), [@page, revision] %> - <small class="muted">updated <%= time_ago_in_words(revision.updated_at) %> ago</small> +<div class="revision media"> + <%= icon_tag('star pull-left', size: 'lg', title: 'Current Revision') if @page.current_revision == revision %> + <%= image_tag avatar_url(revision.user.try(:email)), alt: '', class: 'media-object pull-left' %> <div class="pull-right"> <%= link_to "#{icon_tag('pencil')} Edit".html_safe, [@page, revision], class: 'btn btn-info' %> - <%= link_to "#{icon_tag('undo')} Restore".html_safe, [:restore, @page, revision] , class: 'btn btn-warning' if can? :restore, @revision %> - <%= link_to_delete [@page, revision] if can? :destroy, @revision %> + <%= link_to "#{icon_tag('undo')} Restore".html_safe, [:restore, @page, revision] , class: 'btn btn-warning', disabled: (@page.current_revision == revision) if policy(revision).restore? %> + <%= link_to_delete [@page, revision], disabled: (@page.current_revision == revision) if policy(revision).destroy? %> + </div> + <div class="media-body"> + <h4 class="media-heading"> + <small class='badge badge-default'>id:<%= revision.id %></small> + <small class='label label-<%= revision.status %>'><%= revision.status %></small> + <small class="muted">updated <%= time_ago_in_words(revision.updated_at) %> ago</small> + </h4> </div> </div> \ No newline at end of file