publify/publify

View on GitHub
themes/bootstrap-2/views/articles/read.html.erb

Summary

Maintainability
Test Coverage
<div class="article" id="article-<%= @article.id %>">
  <h1 class='page-header'><%= link_to_permalink(@article, @article.title) %></h1>

  <% if @article.password.blank? %>
    <%= render 'articles/full_article_content', article: @article %>
  <% else %>
    <%= render 'articles/password_form', article: @article %>
  <% end %>
  <%= render 'articles/meta', article: @article %>

  <% if @article.user.twitter.present? %>
  <div class='well'>
    <%= t('.if_you_liked_this_article_you_can_html', add_twitter: link_to(t('.add_me_to_twitter'), "http://twitter.com/#{@article.user.twitter}")) %>
  </div>
  <% end %>

  <% if @article.allow_comments? or @article.published_comments.size > 0 %>
    <h3 class="feedback" id="commentaires">
      <%= render 'articles/comment_counter', article: @article %>
      <a href="#commentform" ref="nofollow"> &raquo;</a>
    </h3>
    <%= render 'articles/comment_list' %>
  <% end %>

  <% if @article.allow_comments? %>
    <%= render 'articles/comment_form' %>
  <% else %>
    <div class="well well-small">
      <%= t('.comments_are_disabled') %>
    </div>
  <% end %>

  <% if @article.published_trackbacks.any? %>
    <h5 class="feedback" id="trackbacks"><%= t('.trackbacks_for') %> <em><%= @article.title %></em></h5>
    <ol id="trackbacks" class="trackbacks">
      <%= render partial: 'trackback', collection: @article.published_trackbacks %>
    </ol>
  <% end %>
</div>