diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 4e7768785..89fa0e1dc 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -47,7 +47,6 @@ class WordsController < ApplicationController # 删除留言功能要调用destroy,也记得在destroy.js中修改 # deny api. api useless - @show_real_name = params[:show_real_name] || false parent_id = params[:reference_id] author_id = User.current.id reply_user_id = params[:reference_user_id] diff --git a/app/views/homework_attach/_jour.html.erb b/app/views/homework_attach/_jour.html.erb index 055e1a015..fe2eca8dc 100644 --- a/app/views/homework_attach/_jour.html.erb +++ b/app/views/homework_attach/_jour.html.erb @@ -46,7 +46,7 @@
- <%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name, :show_real_name => true } %> + <%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name} %>
diff --git a/app/views/homework_attach/_journal_reply_items.html.erb b/app/views/homework_attach/_journal_reply_items.html.erb index dd09bd84f..ac60709ad 100644 --- a/app/views/homework_attach/_journal_reply_items.html.erb +++ b/app/views/homework_attach/_journal_reply_items.html.erb @@ -1,4 +1,3 @@ -<% show_real_name ||= false %> <% reply_allow = JournalsForMessage.create_by_user? User.current %> <% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
@@ -15,11 +14,7 @@ 回复 <% parent_jour = JournalsForMessage.find reply.m_reply_id %> <% if show_name && parent_jour %> - <% if show_real_name%> - <%= link_to parent_jour.user.lastname+parent_jour.user.firstname, user_path(parent_jour.user) %> - <% else %> - <%= link_to parent_jour.user.name, user_path(parent_jour.user) %> - <% end %> + <%= link_to parent_jour.user.name, user_path(parent_jour.user) %> <% else %> <%= l(:label_anonymous) %> <% end %> diff --git a/app/views/homework_attach/add_jour_reply.js.erb b/app/views/homework_attach/add_jour_reply.js.erb index 34cec1cca..564229d81 100644 --- a/app/views/homework_attach/add_jour_reply.js.erb +++ b/app/views/homework_attach/add_jour_reply.js.erb @@ -1,7 +1,7 @@ <% if @save_succ %> var pre_append = $('<%= j( render :partial => "journal_reply_items", - :locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm, :show_real_name => true} + :locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm} ) %>').hide(); $('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append); pre_append.fadeIn(600); diff --git a/app/views/words/_journal_reply.html.erb b/app/views/words/_journal_reply.html.erb index 2f823ebf6..39321394c 100644 --- a/app/views/words/_journal_reply.html.erb +++ b/app/views/words/_journal_reply.html.erb @@ -1,8 +1,7 @@ <% id = "journal_reply_ul_" + journal.id.to_s%> -<% show_real_name ||= false%>
<% fetch_user_leaveWord_reply(journal).each do |reply|%> - <%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name, :show_real_name => show_real_name} %> + <%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name} %> <% end %>
diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 76359794c..1b20ce45b 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -1,4 +1,3 @@ -<% show_real_name ||= false %> <% reply_allow = JournalsForMessage.create_by_user? User.current %> <% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
@@ -11,19 +10,11 @@
<% id = 'project_respond_form_'+ reply.id.to_s %> - <% if show_real_name%> - <%= link_to reply.user.lastname+reply.user.firstname, user_path(reply.user) %> - <% else %> - <%= link_to reply.user.name, user_path(reply.user) %> - <% end %> + <%= link_to reply.user.name, user_path(reply.user) %> 回复 <% parent_jour = JournalsForMessage.find reply.m_reply_id %> <% if show_name && parent_jour %> - <% if show_real_name%> - <%= link_to parent_jour.user.lastname+parent_jour.user.firstname, user_path(parent_jour.user) %> - <% else %> - <%= link_to parent_jour.user.name, user_path(parent_jour.user) %> - <% end %> + <%= link_to parent_jour.user.name, user_path(parent_jour.user) %> <% else %> <%= l(:label_anonymous) %> <% end %> @@ -51,7 +42,7 @@
<% if reply_allow %> - <%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name, :show_real_name => show_real_name} %> + <%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %> <% end %>
diff --git a/app/views/words/_new_respond.html.erb b/app/views/words/_new_respond.html.erb index a4cad1a38..edb313bb5 100644 --- a/app/views/words/_new_respond.html.erb +++ b/app/views/words/_new_respond.html.erb @@ -1,5 +1,4 @@ -<% show_real_name ||= false%> -<%= form_tag(words_create_reply_path(:show_real_name=>show_real_name), :remote => true) do %> +<%= form_tag(words_create_reply_path, :remote => true) do %> <%= text_area_tag 'user_notes', "", :class => 'noline', :style => "resize: none;", :rows => 4, :placeholder => l(:label_projects_feedback_respond_content), diff --git a/app/views/words/create_reply.js.erb b/app/views/words/create_reply.js.erb index 04cbee26e..eeb4e3ef6 100644 --- a/app/views/words/create_reply.js.erb +++ b/app/views/words/create_reply.js.erb @@ -1,7 +1,7 @@ <% if @save_succ %> var pre_append = $('<%= j( render :partial => "words/journal_reply_items", - :locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm,:show_name => @show_name, :show_real_name=>@show_real_name} + :locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm,:show_name => @show_name} ) %>').hide(); $('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append); pre_append.fadeIn(600);