socialforge/app/views/training_tasks/_detail.html.erb

43 lines
2.1 KiB
Plaintext
Raw Normal View History

<div id="issue_detail" style="display: block">
<div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(@training_task.author), :width => 46, :height => 46), user_path(@training_task.author), :class => "ping_dispic" %>
</div>
<div class="talk_txt fl">
2017-02-23 14:13:25 +08:00
<div id="training_task_details">
<%= render :partial => "training_tasks/training_task_details", :locals => {:activity => @training_task, :project_id => @project.id} %>
</div>
<br>
<div class="cl"></div>
由<%=link_to @training_task.author.show_name, user_path(@training_task.author), :class => "link-blue" %>添加于 <%= format_time(@training_task.created_at).html_safe %>
</div>
<!--talk_txt end-->
<a href="javascript:void(0)" class="talk_edit fr"> </a>
2017-02-23 14:13:25 +08:00
<% if User.current.logged? && is_project_manager?(User.current.id, @project.id) || @training_task.author_id == User.current.id %>
<%= link_to l(:button_delete), training_task_path(@training_task.id, :project_id => @project.id), :data => {:confirm => l(:text_trainig_task_destroy_confirmation)}, :method => :delete, :class => 'talk_edit fr' %>
<%= link_to l(:button_edit), edit_training_task_path(@training_task), :class => 'talk_edit fr', :accesskey => accesskey(:edit) %>
<% end %>
<div class="cl"></div>
<% if @training_task.description? || @training_task.attachments.any? -%>
<div class="talk_info mb10 issue_desc ke-block" id="issue_desc_<%= @training_task.id %>" style="word-break:break-all;">
<% if @training_task.description? %>
<%= textAreailizable @training_task, :description, :attachments => @training_task.attachments %>
<% end %>
</div>
<% end -%>
<%# 附件局部刷新 %>
<div id = "div_issue_attachment_<%= @training_task.id %>">
<%= render :partial => 'task_attachments', :locals => {:training_task => @training_task} %>
</div>
<div class="cl"></div>
2017-02-28 21:11:14 +08:00
</div>
<script type="text/javascript">
$(function(){
showNormalImage('issue_desc_<%= @training_task.id %>');
autoUrl('issue_desc_<%= @training_task.id %>');
});
2017-02-18 17:44:50 +08:00
</script>