1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00
projekteuler/app/views/problems/index.html.erb

35 lines
939 B
Plaintext

<% provide(:title, Problem.model_name.human(count: 2)) %>
<h1><%= Problem.model_name.human(count: 2) %></h1>
<%= render 'problem_pagination' %>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th><%= Problem.human_attribute_name(:id) %></th>
<th><%= Problem.human_attribute_name(:title) %></th>
</tr>
</thead>
<tbody>
<% @problems.each do |problem| %>
<tr>
<td><%= problem.id %></td>
<td>
<% if problem.is_translated? %>
<%= link_to problem.title, problem %>
<% else %>
<i><%= t 'problems.not_yet_translated' %></i>
<%= link_to new_problem_translation_path(problem), class: 'btn btn-default btn-xs' do %>
<%= icon :pencil %> <%= t '.suggest_translation' %>
<% end %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= render 'problem_pagination' %>
<br>