Convert index tables to using table builder
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user