Use optional parameter to set column class
- Fixes the extremely long class name on the post versions view - Can now use one value instead of having to set th and td - Added missing column classes on all tables
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div id="p-<%= note_versions_listing_type %>-listing">
|
||||
|
||||
<%= table_for @note_versions, {class: "striped autofit", width: "100%"} do |t| %>
|
||||
<% t.column %>
|
||||
<% t.column column: "empty" %>
|
||||
<% t.column "Post", {width: "5%"} do |note_version| %>
|
||||
<%= link_to note_version.post_id, post_path(note_version.post_id) %>
|
||||
<% if params.dig(:search, :note_id).present? %>
|
||||
@@ -31,7 +31,7 @@
|
||||
<%= compact_time note_version.updated_at %>
|
||||
<% end %>
|
||||
<% if note_versions_listing_type == :revert %>
|
||||
<% t.column "", {width: "7%"} do |note_version| %>
|
||||
<% t.column column: "control", width: "7%" do |note_version| %>
|
||||
<%= link_to "Revert to", revert_note_path(note_version.note_id, :version_id => note_version.id), :remote => true, :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user