1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00

Bootstrapify problem index page

This commit is contained in:
Philipp Fischbeck 2014-12-07 18:17:33 +01:00
parent 6ee94feb57
commit 759cc8457a

View File

@ -1,12 +1,10 @@
<h1>Listing problems</h1> <h1>Listing problems</h1>
<table> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>Title</th> <th>Title</th>
<th>Content</th>
<th colspan="3"></th>
</tr> </tr>
</thead> </thead>
@ -14,11 +12,7 @@
<% @problems.each do |problem| %> <% @problems.each do |problem| %>
<tr> <tr>
<td><%= problem.id %></td> <td><%= problem.id %></td>
<td><%= problem.title %></td> <td><%= link_to problem.title, problem %></td>
<td><%= problem.content %></td>
<td><%= link_to 'Show', problem %></td>
<td><%= link_to 'Edit', edit_problem_path(problem) %></td>
<td><%= link_to 'Destroy', problem, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
@ -26,4 +20,4 @@
<br> <br>
<%= link_to 'New Problem', new_problem_path %> <%= button_to 'New Problem', new_problem_path, class: 'btn btn-default' %>