Files
old-stazarucak/whatforlunch.com/app/views/recipes/index.html.erb
2017-09-24 10:12:44 +02:00

35 lines
690 B
Plaintext

<div class="row">
<div class="col-md-8">
<h1>Recepti</h1>
<table class="table">
<thead>
<tr>
<th>Ime</th>
<th>Datum</th>
<th>Ispravan?</th>
<th></th>
</tr>
</thead>
<tbody>
<% @recipes.each do |recipe| %>
<tr>
<td><%= recipe.name %></td>
<td><%= recipe.ordinal_date %></td>
<td><%= (recipe.is_it_valid?) ? "DA" : "NE" %></td>
<td><%= link_to 'Popravi recept', edit_recipe_path(recipe) %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'Napravi novi recept', new_recipe_path %>
</div>
</div>