<div class="page-header">
  <h1><%= @article.title %></h1>
</div>

<div class="well col-xs-8 col-xs-offset-2">
  <ul class="listing">
    <div class="row">
      <div class="col-md-4 col-md-offset-4 text-center">
        <li>Created by: <%= link_to @article.user.username, @article.user %></li>
        <li><%= link_to gravatar_for(@article.user), @article.user %></li>
      </div>
    </div>
  </ul>

  <h4 class="text-center description"><strong>Description:</strong></h4>
  <hr>
  <%= simple_format @article.description %></p>
  <div class="article-actions">
    <%= link_to 'Edit this Article', edit_article_path(@article), class: 'btn btn-xs btn-primary' %>
    <%= link_to 'Delete this Article', article_path(@article), method: :delete,
                data: { confirm: 'Are you sure that you want to delete this article?' },
                class: 'btn btn-xs btn-danger' %>
    <%= link_to 'View all Articles', articles_path, class: 'btn btn-xs btn-success' %>
  </div>
</div>

<div class="page-header">
  <h1><%= @article.title %></h1>
</div>

<div class="well col-xs-8 col-xs-offset-2">
  <ul class="listing">
    <div class="row">
      <div class="col-md-4 col-md-offset-4 text-center">
        <li>Created by: <%= link_to @article.user.username, @article.user %></li>
        <li><%= link_to gravatar_for(@article.user), @article.user %></li>
      </div>
    </div>
  </ul>

  <h4 class="text-center description"><strong>Description:</strong></h4>
  <hr>
  <%= simple_format @article.description %></p>
  <div class="article-actions">
    <% if current_user?(@article.user) %>
      <%= link_to 'Edit this Article', edit_article_path(@article), class: 'btn btn-xs btn-primary' %>
      <%= link_to 'Delete this Article', article_path(@article), method: :delete,
                  data: { confirm: 'Are you sure that you want to delete this article?' },
                  class: 'btn btn-xs btn-danger' %>
    <% end %>
    <%= link_to 'View all Articles', articles_path, class: 'btn btn-xs btn-success' %>
  </div>
</div>

Edit / Delete links only there for article owner.
Edit / Delete links only there for article owner.
