Convert index tables to using table builder

This commit is contained in:
BrokenEagle
2020-01-03 06:19:30 +00:00
parent 917ffa87ed
commit 043944e1dd
47 changed files with 1161 additions and 1628 deletions

View File

@@ -9,29 +9,16 @@
<%= f.submit "Search" %>
<% end %>
<table width="100%" class="striped">
<thead>
<tr>
<th width="1%">Post</th>
<th width="15%">Approver</th>
</tr>
</thead>
<tbody>
<% @post_approvals.each do |post_approval| %>
<tr>
<td>
<%= PostPresenter.preview(post_approval.post, :tags => "status:any") %>
</td>
<td>
<%= link_to_user post_approval.user %>
<%= link_to "»", post_approvals_path(search: params[:search].merge(user_name: post_approval.user.name)) %>
<br><%= time_ago_in_words_tagged post_approval.created_at %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= table_for @post_approvals, {class: "striped", width: "100%"} do |t| %>
<% t.column "Post", {width: "1%"} do |post_approval| %>
<%= PostPresenter.preview(post_approval.post, :tags => "status:any") %>
<% end %>
<% t.column "Approver", {width: "15%"} do |post_approval| %>
<%= link_to_user post_approval.user %>
<%= link_to "»", post_approvals_path(search: params[:search].merge(user_name: post_approval.user.name)) %>
<br><%= time_ago_in_words_tagged post_approval.created_at %>
<% end %>
<% end %>
<%= numbered_paginator(@post_approvals) %>
</div>