<%= render 'shared/page_title', title: @recipe.name %>

<div class="row">
  <div class="well col-sm-8 col-sm-offset-2">
    <h4 class="description text-center">Steps</h4>
    <hr />
    <p><%= simple_format(@recipe.description) %></p>
    <hr />
    <div class="pull-right">
      <p class="text-center">
        <em>Created by</em>
      </p>
      <p class="text-center">
        <%= link_to gravatar_for(@recipe.chef), @recipe.chef %>
      </p>
      <p class="text-center">
        <small><%= @recipe.chef.name %></small>
        <div class="pull-right">
          <small><%= time_ago_in_words(@recipe.created_at) %> ago</small>
        </div>
      </p>
    </div>
    <div class="recipe-actions">
      <%= link_to 'Edit Recipe', edit_recipe_path(@recipe), class: 'btn btn-xs btn-warning' %>
      <%= link_to 'Delete Recipe', recipe_path(@recipe), method: :delete,
                  data: { confirm: 'Are you sure you want to delete this recipe' }, class: 'btn btn-xs btn-danger' %>
      <%= link_to 'Back to Recipe List', recipes_path, class: 'btn btn-xs btn-primary btn-custom' %>
    </div>
  </div>
</div>


<%= render 'shared/page_title', title: @recipe.name %>

<div class="row">
  <div class="well col-sm-8 col-sm-offset-2">
    <h4 class="description text-center">Steps</h4>
    <hr />
    <p><%= simple_format(@recipe.description) %></p>
    <hr />
    <div class="pull-right">
      <p class="text-center">
        <em>Created by</em>
      </p>
      <p class="text-center">
        <%= link_to gravatar_for(@recipe.chef), @recipe.chef %>
      </p>
      <p class="text-center">
        <small><%= @recipe.chef.name %></small>
        <div class="pull-right">
          <small><%= time_ago_in_words(@recipe.created_at) %> ago</small>
        </div>
      </p>
    </div>
    <div class="recipe-actions">
      <% if current_chef == @recipe.chef %>
        <%= link_to 'Edit Recipe', edit_recipe_path(@recipe), class: 'btn btn-xs btn-warning' %>
        <%= link_to 'Delete Recipe', recipe_path(@recipe), method: :delete,
                    data: { confirm: 'Are you sure you want to delete this recipe' }, class: 'btn btn-xs btn-danger' %>
      <% end %>
      <%= link_to 'Back to Recipe List', recipes_path, class: 'btn btn-xs btn-primary btn-custom' %>
    </div>
  </div>
</div>


Edit and delete recipe options are only given to the recipe owner
Edit and delete recipe options are only given to the recipe owner

