77 lines
4.2 KiB
Plaintext
77 lines
4.2 KiB
Plaintext
|
<% unless activity.author.nil? %>
|
||
|
<div class="container-big mt10" id="user_activity_<%= user_activity_id%>">
|
||
|
<div class="pr">
|
||
|
<div class="homepagePostPortrait">
|
||
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||
|
<%#= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||
|
</div>
|
||
|
<div class="content-big">
|
||
|
<div class="homepagePostTo break_word">
|
||
|
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||
|
TO
|
||
|
<%= link_to activity.project.name.to_s+" | 实训任务", project_training_tasks_path(activity.project), :class => "newsBlue ml15"%>
|
||
|
</div>
|
||
|
<% if User.current.logged? && is_project_manager?(User.current.id, project_id) || activity.author_id == User.current.id %>
|
||
|
<div class="homepagePostSetting">
|
||
|
<ul>
|
||
|
<li class="homepagePostSettingIcon">
|
||
|
<ul class="homepagePostSettiongText">
|
||
|
<li>
|
||
|
<%#= link_to l(:button_edit), edit_issue_path(activity.id), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
||
|
</li>
|
||
|
<li>
|
||
|
<%#= 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) %>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<div class="homepagePostTitle break_word">
|
||
|
<% if activity.status == 1 %>
|
||
|
<div class="issues_ciricons fl"><span class="issues_ciricons_02 "></span></div>
|
||
|
<% else %>
|
||
|
<div class="issues_ciricons fl mt2"><i class="icon-flag fb " style="color:#49a547; font-size:15px;"></i></div>
|
||
|
<% end %>
|
||
|
<span class="task-step mr5 fl">step<%= activity.position %></span>
|
||
|
|
||
|
<%= link_to activity.subject.to_s, training_task_url(activity), :class => "postGrey ml5 fl", :target => "_blank" %>
|
||
|
<% if activity.status == 1 %>
|
||
|
<span class="task-linebtn-green fl ml5 mt3">已解决</span>
|
||
|
<% else %>
|
||
|
<span class="task-linebtn-green fl ml5 mt3">正在解决中</span>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<div class="cl"></div>
|
||
|
<div class="homepagePostSubmitContainer">
|
||
|
<div class="homepagePostDeadline fl">
|
||
|
发布时间:
|
||
|
<%=format_time(activity.created_at) %>
|
||
|
</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>
|
||
|
<div class="mb10" style="font-weight:normal;">
|
||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="cl"></div>
|
||
|
</div>
|
||
|
<div id="div_user_issue_reply_<%=user_activity_id%>">
|
||
|
<%= render :partial => 'projects/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
$(function(){
|
||
|
user_card_show_hide();
|
||
|
});
|
||
|
</script>
|
||
|
<% end %>
|
||
|
|