<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), 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_issues_path(activity.project), :class => "newsBlue ml15"%>
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %>
<%= 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_time(activity.created_on) %>
<% if activity.description? %>
<%= textAreailizable activity, :description, :attachments => activity.attachments %>
<% end %>
<% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %>
<%= link_to_short_attachment attachment,:length=> 58, :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 %>