Convert index tables to using table builder
This commit is contained in:
@@ -2,24 +2,16 @@
|
||||
<div id="a-index">
|
||||
<h1>News Updates</h1>
|
||||
|
||||
<table class="striped" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Creator</th>
|
||||
<th>Message</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @news_updates.each do |news_update| %>
|
||||
<tr id="news-update-<%= news_update.id %>">
|
||||
<td><%= link_to_user news_update.creator %></td>
|
||||
<td><%= news_update.message %></td>
|
||||
<td><%= link_to "Edit", edit_news_update_path(news_update) %> | <%= link_to "Delete", news_update_path(news_update), :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= table_for @news_updates, {class: "striped", width: "100%"} do |t| %>
|
||||
<% t.column "Creator" do |news_update| %>
|
||||
<%= link_to_user news_update.creator %>
|
||||
<% end %>
|
||||
<% t.column :message %>
|
||||
<% t.column "" do |news_update| %>
|
||||
<%= link_to "Edit", edit_news_update_path(news_update) %>
|
||||
| <%= link_to "Delete", news_update_path(news_update), :method => :delete %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= numbered_paginator(@news_updates) %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user