2016-10-13 10:52:48 +08:00
|
|
|
|
<% unless activity.author.nil? %>
|
2016-10-18 11:30:42 +08:00
|
|
|
|
<div class="container-big mt10" id="user_activity_<%= user_activity_id%>">
|
|
|
|
|
<div class="pr">
|
2016-10-13 10:52:48 +08:00
|
|
|
|
<div class="homepagePostPortrait">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
2016-10-19 14:43:07 +08:00
|
|
|
|
<%#= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
2016-10-13 10:52:48 +08:00
|
|
|
|
</div>
|
2016-10-18 11:30:42 +08:00
|
|
|
|
<div class="content-big">
|
2016-10-18 13:34:28 +08:00
|
|
|
|
<div class="homepagePostTo break_word">
|
2016-10-19 15:24:36 +08:00
|
|
|
|
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
|
|
|
|
TO
|
2016-10-13 10:52:48 +08:00
|
|
|
|
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
|
|
|
|
|
</div>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<div class="homepagePostSetting">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to l(:button_edit), issue_path(activity.id, :edit => 'true'), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<% if !defined?(project_id) && !defined?(user_id) %>
|
|
|
|
|
<%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
|
|
|
|
<% elsif defined?(project_id) %>
|
|
|
|
|
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
|
|
|
|
<% elsif defined?(user_id) %>
|
|
|
|
|
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to l(:button_copy), project_copy_issue_path(activity.project, activity), :class => 'postOptionLink' if User.current.allowed_to?(:add_issues, activity.project) %>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="homepagePostTitle break_word">
|
2016-10-19 15:24:36 +08:00
|
|
|
|
<span class="fl">【<%= get_issue_type_new(activity.tracker_id) %>】</span>
|
|
|
|
|
|
2016-10-13 10:52:48 +08:00
|
|
|
|
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey ml5", :target => "_blank" %>
|
|
|
|
|
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'>
|
|
|
|
|
<%= get_issue_priority(activity.priority_id)[1] %>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostSubmitContainer">
|
|
|
|
|
<div class="homepagePostAssignTo"><span class="fontGrey3">指派给</span>
|
|
|
|
|
<% 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 %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostDeadline fl">
|
|
|
|
|
发布时间:
|
|
|
|
|
<%=format_time(activity.created_on) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostDate fl ml15">
|
|
|
|
|
更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id => user_activity_id, :content => activity.description} %>
|
|
|
|
|
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
|
|
|
|
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<%# 局部刷新:修改xissue属性 %>
|
|
|
|
|
<% if User.current.member_of?(activity.project) && !activity.nil? && !activity.status.nil? %>
|
|
|
|
|
<% unless params[:action] == "index" %>
|
|
|
|
|
<div id="div_user_issue_detail_<%=activity.id %>">
|
2016-10-19 14:43:07 +08:00
|
|
|
|
<%= render :partial => 'projects/project_issue_detail', :locals => {:activity => activity} %>
|
2016-10-13 10:52:48 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
2016-10-21 11:09:54 +08:00
|
|
|
|
<div class="mb10" style="font-weight:normal;">
|
2016-10-13 10:52:48 +08:00
|
|
|
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="div_user_issue_reply_<%=user_activity_id%>">
|
2016-10-19 14:43:07 +08:00
|
|
|
|
<%= render :partial => 'projects/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
2016-10-13 10:52:48 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function(){
|
|
|
|
|
user_card_show_hide();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<% end %>
|
|
|
|
|
|