Removed IP addresses from comments and from most other listing pages. IPs take up a lot of space in many places (especially IPv6 addresses), and in most of these pages they're rarely useful for catching sockpuppets.
41 lines
2.2 KiB
Plaintext
41 lines
2.2 KiB
Plaintext
<div id="p-<%= post_versions_listing_type %>-listing">
|
|
<% if post_versions_listing_type == :revert %>
|
|
<%= PostPresenter.preview(@post_versions.first.post, show_deleted: true) %>
|
|
<% end %>
|
|
|
|
<%= table_for @post_versions, {id: "post-versions-table", class: "striped autofit"} do |t| %>
|
|
<% if CurrentUser.user.is_builder? %>
|
|
<% t.column tag.label(tag.input type: :checkbox, id: "post-version-select-all-checkbox", class: "post-version-select-checkbox"), th: { class: "post-version-select-column" }, td: { class: "post-version-select-column" } do |post_version| %>
|
|
<input type="checkbox" class="post-version-select-checkbox" <%= "disabled" unless post_version.can_undo?(CurrentUser.user) %>>
|
|
<% end %>
|
|
<% end %>
|
|
<% if post_versions_listing_type == :standard %>
|
|
<% t.column "Post" do |post_version| %>
|
|
<%= PostPresenter.preview(post_version.post, show_deleted: true) %>
|
|
<% end %>
|
|
<% end %>
|
|
<% t.column "Version" do |post_version| %>
|
|
<%= link_to "#{post_version.post_id}.#{post_version.version}", post_versions_path(search: { post_id: post_version.post_id }, anchor: "post-version-#{post_version.id}") %>
|
|
<% end %>
|
|
<% t.column "Tags", td: {class: "col-expand"} do |post_version| %>
|
|
<%= post_version_diff(post_version) %>
|
|
<% end %>
|
|
<% t.column "Updated" do |post_version| %>
|
|
<%= link_to_user post_version.updater %>
|
|
<%= link_to "»", post_versions_path(search: params[:search].merge({ updater_name: post_version.updater&.name })) %>
|
|
<div>
|
|
<%= compact_time(post_version.updated_at) %>
|
|
</div>
|
|
<% end %>
|
|
<% t.column do |post_version| %>
|
|
<% if post_version.can_undo?(CurrentUser.user) %>
|
|
<%= link_to "Undo", undo_post_version_path(post_version), method: :put, remote: true, class: "post-version-undo-link" %>
|
|
<% end %>
|
|
<% if post_versions_listing_type == :revert && post_version.can_revert_to?(CurrentUser.user) %>
|
|
| <%= link_to "Revert to", revert_post_path(post_version.post_id, version_id: post_version.id), method: :put, remote: true %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
</div>
|