table builder: fix various incorrect css classes.
Change calling convention to explicitly indicate whether the attributes are for the <th> element or the <td> element. Fixes various cases where the two were mixed up. * Fix .col-expand classes not being set correctly on the /post_versions, /pool_versions, and /notes pages. * Fix .updater and .updated-at classes not being set correctly on the /forum_topics page. * Fix the name param being ignored (noticeable in the post count field on the /tags page). * Don't pass empty string when column has no name.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<% t.column "Duration" do |ban| %>
|
||||
<%= humanized_duration(ban.created_at, ban.expires_at) %>
|
||||
<% end %>
|
||||
<% t.column "Reason", nil, {class: "col-expand"} do |ban| %>
|
||||
<% t.column "Reason", td: {class: "col-expand"} do |ban| %>
|
||||
<div class="prose">
|
||||
<%= format_text ban.reason %>
|
||||
</div>
|
||||
@@ -22,7 +22,7 @@
|
||||
<%= link_to "»", bans_path(search: { banner_name: ban.banner.name }) %>
|
||||
<div><%= time_ago_in_words_tagged(ban.created_at) %></div>
|
||||
<% end %>
|
||||
<% t.column "" do |ban| %>
|
||||
<% t.column do |ban| %>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<%= link_to "Edit", edit_ban_path(ban) %>
|
||||
| <%= link_to "Delete", ban_path(ban), :method => :delete, :remote => true %>
|
||||
|
||||
Reference in New Issue
Block a user