<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
<% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <% end %> TO <%= link_to activity.project.name.to_s+" | 项目缺陷", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %> <%= get_issue_priority(activity.priority_id)[1] %>
指派给   <% unless activity.assigned_to_id.nil? %> <% if activity.try(:assigned_to).try(:realname) == ' ' %> <%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> <% else %> <%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> <% end %> <% end %>
时间:<%=format_date(activity.created_on) %>
缺陷描述:<%= activity.description.html_safe %>
<% if activity.attachments.any? %> <% activity.attachments.each do |attachment| %>
<%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%> <% if attachment.is_text? %> <%= link_to image_tag('magnifier.png'), :controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename %> <% end %> ( <%= number_to_human_size attachment.filesize %>)
<% end %> <% end %>
<% count=activity.journals.count %>
回复(<%= count %>)
<%#= format_date(activity.updated_on) %>
<% if count>2 %> <% end %>
<% replies_all_i = 0 %> <% unless activity.journals.empty? %>
    <% activity.journals.reorder("created_on desc").each do |reply| %> <% replies_all_i=replies_all_i+1 %>
  • <%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
    <% if reply.try(:user).try(:realname) == ' ' %> <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <%# else %> <%#= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <% end %> <%= format_date(reply.created_on) %>
    <% if reply.details.any? %> <% details_to_strings(reply.details).each do |string| %>
    <%= string %>
    <% end %> <% else %>
    <%= reply.notes.html_safe %>
    <% end %>
  • <% end %>
<% end %>