实训任务增加二级回复功能
This commit is contained in:
parent
41197af763
commit
4a925201eb
|
@ -425,14 +425,29 @@ class TrainingTasksController < ApplicationController
|
|||
if new_jour.save
|
||||
update_user_activity(@training_task.class, @training_task.id)
|
||||
update_forge_activity(@training_task.class, @training_task.id)
|
||||
end
|
||||
respond_to do |format|
|
||||
if params[:is_issue_show]
|
||||
format.js{ redirect_to training_task_path(@training_task) }
|
||||
else
|
||||
format.js
|
||||
respond_to do |format|
|
||||
if params[:is_issue_show]
|
||||
format.js{ redirect_to training_task_path(@training_task) }
|
||||
else
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
=begin
|
||||
@journals = @training_task.journals.includes(:user, :details).reorder("#{Journal.table_name}.id desc").all
|
||||
@journals = get_no_children_comments_all @journals
|
||||
@journals.each_with_index {|j,i| j.indice = i+1}
|
||||
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @training_task.project)
|
||||
@journals.reverse! if User.current.wants_comments_in_reverse_order?
|
||||
@journal = Journal.new(:journalized => @training_task)
|
||||
respond_to do |format|
|
||||
#if params[:is_issue_show]
|
||||
# format.js{ redirect_to training_task_path(@training_task) }
|
||||
#else
|
||||
format.js
|
||||
#end
|
||||
end
|
||||
=end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%= comment.id %>').show();" onmouseout="$('#delete_reply_<%= comment.id %>').hide();">
|
||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'Issue', :user_activity_id => issue.id}%>
|
||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'TrainingTask', :user_activity_id => issue.id}%>
|
||||
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<% if comment.details.any? %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="ReplyToMessageInputContainer">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @jour.id %>' style="display:none;">
|
||||
<%= form_for('new_form', :url => add_reply_training_tasks_path(@training_task.id, :is_issue_show => true, :id => @training_task.id), :method => "post", :remote => true) do |f|%>
|
||||
<%= form_for('new_form', :url => add_reply_training_task_path(@training_task, :is_issue_show => true), :method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="journal_id" value="<%= @jour.id %>"/>
|
||||
<div nhname='toolbar_container_<%= @jour.id %>' ></div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1101,13 +1101,13 @@ RedmineApp::Application.routes.draw do
|
|||
resources :training_tasks do
|
||||
member do
|
||||
post 'complete_training_task'
|
||||
end
|
||||
collection do
|
||||
post 'add_reply'
|
||||
post 'add_journal'
|
||||
post 'add_journal_in_org'
|
||||
get 'delete_journal'
|
||||
get 'reply'
|
||||
post 'add_reply'
|
||||
end
|
||||
collection do
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue