<% if current_user? %> <%= link_to 'New Recipe', new_recipe_path, class: 'btn btn-default' %>
<% end %> <%= paginate @recipes %> <%= form_for(@criteria, as: :criteria, url: recipes_path, method: :get, html: {id: 'search_form'}) do |f| %> <%= f.hidden_field :sort_column %> <%= f.hidden_field :sort_direction %> <%= f.hidden_field :page %> <%= f.hidden_field :per %> <%= f.hidden_field :name %> <%= f.hidden_field :tags %> <% end %>
<% decorate(@recipes, RecipeDecorator).each do |recipe| %> <% end %>
<%= index_sort_header('Name', :name, @criteria) %> Tags <%= index_sort_header('Rating', :rating, @criteria) %> Yields <%= index_sort_header('Time', :total_time, @criteria) %> <%= index_sort_header('Created', :created_at, @criteria) %>
<%= text_field_tag('name_search', @criteria.name) %> <%= text_field_tag('tags_search', @criteria.tags) %>
<%= link_to recipe.short_name, recipe %>
<%= recipe.tag_names %>
<% 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) %> <%= recipe.created_at %> <% if current_user? %>
<%= link_to new_recipe_log_path(recipe), class: 'btn btn-xs btn-primary' do %> <% end %> <%= link_to edit_recipe_path(recipe), class: 'btn btn-xs btn-primary' do %> <% end %> <%= link_to recipe, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-xs btn-danger' do %> <% end %>
<% end %>
<% if @recipes.empty? %>

No Recipes

<% end %> <%= paginate @recipes %>
<% if current_user? %> <%= link_to 'New Recipe', new_recipe_path, class: 'btn btn-default' %>
<% end %>