initial commit
This commit is contained in:
34
whatforlunch.com/app/views/recipes/index.html.erb
Normal file
34
whatforlunch.com/app/views/recipes/index.html.erb
Normal file
@@ -0,0 +1,34 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user