<% if @recipes.empty? %>

No Recipes

<% else %> <%= link_to 'New Recipe', new_recipe_path, class: 'btn btn-default' %>
<%= paginate @recipes %>
<% if current_user? %> <% end %> <% decorate(@recipes, RecipeDecorator).each do |recipe| %> <% if current_user? %> <% end %> <% end %>
<%= index_sort_header('Name', :name, @criteria) %> <%= index_sort_header('Rating', :rating, @criteria) %> Yields <%= index_sort_header('Time', :total_time, @criteria) %> <%= index_sort_header('Created', :created_at, @criteria) %>
<%= link_to recipe.short_name, recipe %> <% if recipe.rating %> <%= text_field_tag('rating', recipe.rating, disabled: true, data: {rating: true, size: '20px', interval: '0.25'}) %> <% else %> -- <% end %> <%= recipe.yields %> <%= recipe_time(recipe) %> <%= timestamp(recipe.created_at) %> <%= link_to new_recipe_log_path(recipe), class: 'btn btn-sm btn-primary' do %> <% end %> <%= link_to edit_recipe_path(recipe), class: 'btn btn-sm btn-primary' do %> <% end %> <%= link_to recipe, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-sm btn-danger' do %> <% end %>
<%= paginate @recipes %> <% end %>
<%= link_to 'New Recipe', new_recipe_path, class: 'btn btn-default' %>