2015-08-21 17:26:52 +08:00
|
|
|
|
<div class="resources mt15">
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<div class="homepagePostBrief">
|
2015-08-21 17:26:52 +08:00
|
|
|
|
<div class="homepagePostPortrait">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostDes">
|
2015-08-26 17:02:54 +08:00
|
|
|
|
<div class="homepagePostTo" style="word-break:break-all;">
|
2015-08-21 17:26:52 +08:00
|
|
|
|
<% 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
|
2015-08-25 15:08:35 +08:00
|
|
|
|
<%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
|
|
|
|
</div>
|
2015-08-26 17:02:54 +08:00
|
|
|
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
2015-08-25 15:08:35 +08:00
|
|
|
|
<%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
|
|
|
|
|
<span class="homepagePostProjectState"><%=activity.status.name %></span>
|
2015-08-21 17:26:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostSubmitContainer">
|
2015-08-25 15:08:35 +08:00
|
|
|
|
<div class="homepagePostAssignTo">指派给
|
|
|
|
|
<% 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 %>
|
2015-08-21 17:26:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
|
|
|
|
|
</div>
|
2015-08-24 17:45:09 +08:00
|
|
|
|
<div class="homepagePostIntro" style="word-break:break-all;">(缺陷描述)<%=activity.description.html_safe %></div>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
<div class="mt10" style="font-weight:normal;">
|
2015-08-24 17:45:09 +08:00
|
|
|
|
<% if activity.attachments.any? %>
|
|
|
|
|
<% activity.attachments.each do |attachment| %>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
|
|
|
|
<span title="<%= attachment.filename %>" id="attachment_">
|
|
|
|
|
<%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
|
2015-08-24 17:45:09 +08:00
|
|
|
|
</span>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
<% if attachment.is_text? %>
|
|
|
|
|
<%= link_to image_tag('magnifier.png'),
|
|
|
|
|
:controller => 'attachments',
|
|
|
|
|
:action => 'show',
|
|
|
|
|
:id => attachment,
|
|
|
|
|
:filename => attachment.filename %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<span class="postAttSize">(
|
|
|
|
|
<%= number_to_human_size attachment.filesize %>)
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2015-08-24 17:45:09 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<!--<div class="mt10">
|
2015-08-21 17:26:52 +08:00
|
|
|
|
<a href="javascript:void(0);" class="homepagePostFileAtt newsBlue">文件附件.zip</a><span class="postAttSize">(123KB)</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<a href="javascript:void(0);" class="homepagePostImageAtt newsBlue">图片附件.png</a><span class="postAttSize">(123KB)</span>
|
2015-08-24 17:45:09 +08:00
|
|
|
|
</div>-->
|
2015-08-21 17:26:52 +08:00
|
|
|
|
<div class="homepagePostSetting" id="act-<%=user_activity.id %>" style="visibility: hidden">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
|
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
|
|
|
|
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
|
|
|
|
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<!--<div class="homepagePostReply">
|
2015-08-25 15:08:35 +08:00
|
|
|
|
|
2015-08-21 17:26:52 +08:00
|
|
|
|
<div class="homepagePostReplyBanner">
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<div class="homepagePostReplyBannerCount">回复(<%#=activity.journals.count %>)</div>
|
|
|
|
|
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
2015-08-21 17:26:52 +08:00
|
|
|
|
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyInputContainer">
|
|
|
|
|
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyInputContainer">
|
|
|
|
|
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
|
|
|
|
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
|
|
|
|
|
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<%# activity.journals.reorder("created_on desc").each do |reply| unless activity.journals.nil?%>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
<div class="homepagePostReplyContainer">
|
|
|
|
|
<div class="homepagePostReplyPortrait">
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<%#= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyDes">
|
|
|
|
|
<div class="homepagePostReplyPublisher">
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<%# 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) %>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
|
2015-08-26 15:24:57 +08:00
|
|
|
|
#<!–<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>–>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
</div>
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<%# if reply.details.any? %>
|
|
|
|
|
<%# details_to_strings(reply.details).each do |string| %>
|
|
|
|
|
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%#=string %></div>
|
|
|
|
|
<%# end %>
|
|
|
|
|
<%# else %>
|
|
|
|
|
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%#=reply.notes.html_safe %></div>
|
|
|
|
|
<%# end %>
|
2015-08-25 15:08:35 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
2015-08-26 15:24:57 +08:00
|
|
|
|
<%# end %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
</div>-->
|
2015-08-21 17:26:52 +08:00
|
|
|
|
</div>
|