project leave message.
This commit is contained in:
parent
1d962b98d3
commit
4c4e725b5c
|
@ -299,7 +299,7 @@ class ProjectsController < ApplicationController
|
|||
def project_respond
|
||||
# will_reply = JournalsForMessage.find(params[:reference_id]) if params[:reference_id]
|
||||
project_id = request.headers["Referer"].match((%r|/([0-9]{1,})/|))[1]
|
||||
@project = Project.find(project_id)
|
||||
# @project = Project.find_by_id(project_id)
|
||||
parent_id = params[:reference_id]
|
||||
author_id = User.current.id
|
||||
reply_user_id = params[:reference_user_id]
|
||||
|
@ -312,13 +312,14 @@ class ProjectsController < ApplicationController
|
|||
:notes => content,
|
||||
:is_readed => false}
|
||||
|
||||
@jfm = @project.add_new_jour(nil, nil, nil, options)
|
||||
@jfm = Project.add_new_jour(nil, nil, project_id, options)
|
||||
|
||||
# flash[:notice]=l(:label_projects_feedback_respond_success)
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to :back }
|
||||
format.js
|
||||
#format.api { render_api_ok }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
:maxlength => 250 %>
|
||||
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
|
||||
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "bid_btn"%>
|
||||
|
||||
<%end%>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<tr>
|
||||
<td colspan='2'>
|
||||
<div id=<%= ids%> style="display: none">
|
||||
<%= render :partial => 'new_respond', :locals => {:journal => journal} %>
|
||||
<%= render :partial => 'new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
|
Loading…
Reference in New Issue