issue 详情页面二级回复局部刷新

This commit is contained in:
huang 2016-12-19 15:16:45 +08:00
parent 3c1de111c6
commit 1caf8d9935
3 changed files with 8 additions and 4 deletions

View File

@ -646,7 +646,11 @@ class IssuesController < ApplicationController
update_user_activity(@issue.class,@issue.id)
update_forge_activity(@issue.class,@issue.id)
respond_to do |format|
format.js
if params[:is_issue_show]
format.js{redirect_to issue_path(@issue)}
else
format.js
end
end
end
end

View File

@ -28,7 +28,7 @@
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
</span>
<span style="position: relative" class="fr mr20">
<%= link_to(
<%= link_to(
l(:button_reply),
{:controller => 'issues', :action => 'reply', :user_id => comment.user_id, :id => issue.id, :journal_id => comment.id},
:remote => true,
@ -36,7 +36,7 @@
:title => l(:button_reply)) %>
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
</span>
<%= link_to(
<%= link_to(
l(:button_delete),
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>comment.id},
:method => :get,

View File

@ -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_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id, :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>