Source

qutubaike / views / articles / _article.html.erb

Full commit
<% 
id = article.id 
url = article_url(article)
group = @group || article.group -%>
<div class="block untagged article" id="qiushi_tag_<%= id %>">
  <% unless article.title.blank? %>
  <div class="entry-title">
    <h2><%=h article.title %></h2>
  </div>
  <% end %>
  <div class="author">
    <% unless article.anonymous? %>
    <%= image_tag article.user.avatar.url(:thumb) %>
    <%= link_to article.user.login, article.user %>
    <% end %>
  </div>

  <% if article.picture.file? %>
    <div class="thumb">
      <%# if article.picture.content_type =~ /gif/i %>
        <%= image_tag(article.picture(:original), :alt => (article.title || article.content.mb_chars[0,10])) %>
      <%# else %>
        <%#= link_to image_tag(article.picture(:medium), :alt => (article.title || article.content.mb_chars[0,10])), article.picture(:original),
          :class => 'picture', :id => "picture-#{id}", :title => (article.title || article.content.mb_chars[0,10]) %>
      <%# end %>
    </div>
  <% end %>
  <p class="content entry-content" id="BSHARE_TEXT" title="<%= article.created_at.strftime('%Y-%m-%d')%>">
    <%= format_content article, group -%>
  </p>  
  <% unless article.tag_line.blank? %>
    <div class="tags"><span class="bti"></span><%= show_tags(article) %></div>
  <% end %>    

  <div class="bar clearfix" id="qiushi_counts_<%= id %>">
    <div class="up" id="vote-up-<%= id %>">
      <a href="javascript:vote2(<%= id %>,1)" id="up-<%= id %>">
        <%= article.pos_score %>
      </a>
    </div>
    <div class="down" id="vote-dn-<%= id %>">
      <a href="javascript:vote2(<%= id %>,-1)" id="dn-<%= id %>">
        <%= article.neg_score %>
      </a>
    </div>
    <div class="share">

    </div>
    <div class="comment">
      <a href="<%= url %>#qiushi_comments_<%= id %>" class="qiushi_comments" id="c-<%= id %>">
        <%= article.public_comments_count %>
      </a>
    </div>
    <div class="detail">
      <a href="<%= url %>" target="_blank" class="permalink" rel="bookmark"></a>
    </div>
  </div>
  <% if controller_name == 'articles' && action_name == 'show' %>
    <%= render :partial => "comments/index" %>
  <% end %>
</div>
<div class="shadow"></div>