项目issue二级回复,讨论区帖子一级回复
This commit is contained in:
parent
a9fb270b54
commit
378ef6add5
|
@ -47,6 +47,8 @@ class AtController < ApplicationController
|
|||
find_topic(id)
|
||||
when 'JournalsForMessage'
|
||||
find_journals_for_message(id)
|
||||
when 'Journal'
|
||||
find_journal(id)
|
||||
when 'Principal'
|
||||
find_principal(id)
|
||||
when 'BlogComment'
|
||||
|
@ -159,6 +161,12 @@ class AtController < ApplicationController
|
|||
|
||||
#Journal
|
||||
def find_journal(id)
|
||||
journal = Journal.find id
|
||||
if journal.journalized_type == 'Issue'
|
||||
issue_id = journal.issue.id
|
||||
find_at_users(journal.journalized_type, issue_id)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#Document
|
||||
|
|
|
@ -192,13 +192,15 @@ class MessagesController < ApplicationController
|
|||
# @reply.reply_id = params[:id]
|
||||
parent.children << @reply
|
||||
else
|
||||
@quote = params[:quote][:quote]
|
||||
#@quote = params[:quote][:quote]
|
||||
@reply = Message.new
|
||||
@reply.author = User.current
|
||||
@reply.board = @board
|
||||
@reply.subject = @topic.subject
|
||||
@reply.content = params[:content]
|
||||
@reply.safe_attributes = params[:reply]
|
||||
@reply.content = @quote + @reply.content
|
||||
@reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject]
|
||||
#@reply.content = @quote + @reply.content
|
||||
#@reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject]
|
||||
@reply.root_id = @topic.id
|
||||
@topic.children << @reply
|
||||
# @reply.reply_id = params[:id]
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
@ -165,11 +165,21 @@
|
|||
<em class="talkWrapArrow"></em>
|
||||
<div class="cl"></div>
|
||||
<div class="talkConIpt ml5 mb10" id="reply<%= @topic.id %>">
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
||||
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'project_board_cancel_message_replay();', :class => "grey_btn fr c_white mt10 mr5 ml10" %>
|
||||
<%= link_to l(:button_submit), "javascript:void(0)", :onclick => 'project_board_submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-left: 50px;" %>
|
||||
<% end %>
|
||||
<div nhname='new_message_<%= @topic.id%>' style="display:none;">
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
||||
<%#= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||
<%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'project_board_cancel_message_replay();', :class => "grey_btn fr c_white mt10 mr5 ml10" %>
|
||||
<%#= link_to l(:button_submit), "javascript:void(0)", :onclick => 'project_board_submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-left: 50px;" %>
|
||||
<input type="hidden" name="journal_id" value="<%= @topic.id %>"/>
|
||||
<div nhname='toolbar_container_<%= @topic.id %>' ></div>
|
||||
<div class="cl"></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @topic.id%>' name="content"></textarea>
|
||||
<div class="cl"></div>
|
||||
<span nhname='contentmsg_<%= @topic.id%>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @topic.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue