Convert index tables to using table builder
This commit is contained in:
@@ -3,22 +3,14 @@
|
||||
<% content_for(:content) do %>
|
||||
<h1>Wiki</h1>
|
||||
|
||||
<table class="striped" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Last edited</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wiki_pages.each do |wiki_page| %>
|
||||
<tr>
|
||||
<td class="category-<%= wiki_page.category_name %>"><%= link_to_wiki wiki_page.title %></td>
|
||||
<td><%= time_ago_in_words_tagged(wiki_page.updated_at) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= table_for @wiki_pages, {class: "striped", width: "100%"} do |t| %>
|
||||
<% t.column "Title" do |wiki_page| %>
|
||||
<span class="category-<%= wiki_page.category_name %>"><%= link_to_wiki wiki_page.title %></span>
|
||||
<% end %>
|
||||
<% t.column "Last edited" do |wiki_page| %>
|
||||
<%= time_ago_in_words_tagged(wiki_page.updated_at) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= numbered_paginator(@wiki_pages) %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user