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

@@ -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>