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

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