From 8743460134aa2065aaa5cc48f42c1b48edcc4ffe Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 25 Nov 2016 09:59:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=B8=8E=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E5=8F=A0=E5=B1=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/blog_comments_controller.rb | 5 +- app/controllers/messages_controller.rb | 13 +-- app/controllers/news_controller.rb | 2 + .../org_document_comments_controller.rb | 4 +- app/controllers/users_controller.rb | 108 +++++++++++++++--- app/controllers/words_controller.rb | 46 +------- app/helpers/application_helper.rb | 95 +++++++++++++++ .../_blog_comment_show_replies.html.erb | 4 +- app/views/blog_comments/destroy.js.erb | 13 ++- app/views/blog_comments/reply.js.erb | 17 +-- app/views/blog_comments/show.html.erb | 5 +- app/views/blogs/_homepage.html.erb | 7 +- app/views/comments/destroy.js.erb | 2 +- app/views/comments/reply.js.erb | 2 +- app/views/issues/_issue_replies.html.erb | 2 +- .../messages/_course_show_replies.html.erb | 4 +- app/views/messages/_org_show_replies.html.erb | 4 +- .../messages/_project_show_replies.html.erb | 4 +- app/views/messages/destroy.js.erb | 8 +- app/views/messages/reply.js.erb | 8 +- app/views/news/_news_replies_detail.html.erb | 4 +- .../_document_show_replies.html.erb | 4 +- .../org_document_comments/destroy.js.erb | 2 +- app/views/org_document_comments/reply.js.erb | 2 +- app/views/org_document_comments/show.html.erb | 4 - .../_org_document_post_reply.html.erb | 33 ++++++ .../_org_message_post_reply.html.erb | 35 ++++++ .../_org_subfield_message.html.erb | 37 +----- .../organizations/_org_subfield_news.html.erb | 33 +----- .../organizations/_show_org_document.html.erb | 35 +----- app/views/projects/_act_messages.html.erb | 42 +------ .../projects/_comment_reply_detail.html.erb | 20 ++++ .../projects/_journal_comment_reply.html.erb | 4 +- .../_project_issue_comments_reply.html.erb | 4 +- ...oject_issue_comments_reply_detail.html.erb | 20 ++++ .../projects/_project_issue_contents.html.erb | 6 +- .../_project_issue_expand_show.html.erb | 2 +- .../projects/_project_issue_reply.html.erb | 7 +- .../_project_message_contents.html.erb | 6 +- .../_project_message_post_reply.html.erb | 36 ++++++ .../_project_message_replies.html.erb | 6 +- .../projects/_project_reply_banner.html.erb | 4 +- .../syllabuses/_syllabus_post_reply.html.erb | 31 +++++ app/views/syllabuses/show.html.erb | 31 +---- app/views/users/_comment_reply.html.erb | 4 +- .../users/_comment_reply_detail.html.erb | 37 +++++- app/views/users/_course_homework.html.erb | 2 +- .../users/_course_journalsformessage.html.erb | 39 +------ app/views/users/_course_message.html.erb | 41 +------ .../users/_course_message_post_reply.html.erb | 35 ++++++ app/views/users/_course_news.html.erb | 35 +----- .../users/_course_news_post_reply.html.erb | 33 ++++++ app/views/users/_homework_post_reply.html.erb | 8 +- .../users/_journal_comment_reply.html.erb | 4 +- app/views/users/_message_contents.html.erb | 6 +- app/views/users/_message_replies.html.erb | 10 +- app/views/users/_news_contents.html.erb | 6 +- app/views/users/_news_replies.html.erb | 6 +- app/views/users/_project_issue_reply.html.erb | 7 +- app/views/users/_project_message.html.erb | 41 +------ app/views/users/_reply_banner.html.erb | 8 +- app/views/users/_reply_to.html.erb | 6 +- app/views/users/_reply_to_comment.html.erb | 20 ++++ app/views/users/_user_blog.html.erb | 42 +------ .../users/_user_blog_post_reply.html.erb | 39 +++++++ .../users/_user_homework_detail.html.erb | 7 +- .../users/_user_journal_post_reply.html.erb | 36 ++++++ .../users/_user_journalsformessage.html.erb | 39 +------ app/views/users/all_journals.js.erb | 8 +- app/views/users/reply_detail.js.erb | 48 ++++++++ app/views/users/reply_to_comment.js.erb | 10 ++ app/views/users/show_all_replies.js.erb | 6 +- app/views/words/create_reply.js.erb | 4 +- app/views/words/destroy.js.erb | 10 +- app/views/words/leave_homework_message.js.erb | 2 +- app/views/words/reply_to_homework.js.erb | 2 +- app/views/words/reply_to_syllabus.js.erb | 4 +- config/routes.rb | 2 + public/javascripts/application.js | 72 +----------- public/stylesheets/css/public.css | 5 +- 80 files changed, 793 insertions(+), 652 deletions(-) create mode 100644 app/views/organizations/_org_document_post_reply.html.erb create mode 100644 app/views/organizations/_org_message_post_reply.html.erb create mode 100644 app/views/projects/_project_message_post_reply.html.erb create mode 100644 app/views/syllabuses/_syllabus_post_reply.html.erb create mode 100644 app/views/users/_course_message_post_reply.html.erb create mode 100644 app/views/users/_course_news_post_reply.html.erb create mode 100644 app/views/users/_reply_to_comment.html.erb create mode 100644 app/views/users/_user_blog_post_reply.html.erb create mode 100644 app/views/users/_user_journal_post_reply.html.erb create mode 100644 app/views/users/reply_detail.js.erb create mode 100644 app/views/users/reply_to_comment.js.erb diff --git a/app/controllers/blog_comments_controller.rb b/app/controllers/blog_comments_controller.rb index 148f45d2c..b0475097d 100644 --- a/app/controllers/blog_comments_controller.rb +++ b/app/controllers/blog_comments_controller.rb @@ -40,9 +40,10 @@ class BlogCommentsController < ApplicationController end def show @article = BlogComment.find(params[:id]) - all_comments = [] - @replies = get_all_children(all_comments, @article) + @replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc") @reply_count = @replies.count + @replies = get_no_children_comments_all @replies + @limit_count = @replies.count @page = params[:page] ? params[:page].to_i + 1 : 0 @limit = 10 @replies = @replies[@page * @limit..@page * @limit + 9] diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 0c7eb570f..51fcdcc2d 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -50,6 +50,8 @@ class MessagesController < ApplicationController all_comments = [] @replies = Message.where("root_id = #{@topic.id}").reorder("created_on desc") @reply_count = @replies.count + @replies = get_no_children_comments_all @replies + @limit_count = @replies.count @page = params[:page] ? params[:page].to_i + 1 : 0 @limit = 10 @replies = @replies[@page * @limit..@page * @limit + 9] @@ -171,9 +173,6 @@ class MessagesController < ApplicationController @reply.root_id = parent.root_id.nil? ? parent.id : parent.root_id # @reply.reply_id = params[:id] parent.children << @reply - @user_activity_id = params[:user_activity_id] if params[:user_activity_id] - @is_course = params[:is_course] if params[:is_course] - @is_board = params[:is_board] if params[:is_board] else @quote = params[:quote][:quote] @reply = Message.new @@ -207,8 +206,8 @@ class MessagesController < ApplicationController end if params[:user_activity_id] @user_activity_id = params[:user_activity_id] - @is_course = params[:is_course] - @is_board = params[:is_board] + @is_course = params[:is_course] if params[:is_course] + @is_board = params[:is_board] if params[:is_board] respond_to do |format| format.js end @@ -282,8 +281,8 @@ class MessagesController < ApplicationController @message.destroy @topic = Message.find(params[:activity_id].to_i) @user_activity_id = params[:user_activity_id] - @is_course = params[:is_course] - @is_board = params[:is_board] + @is_course = params[:is_course] if params[:is_course] + @is_board = params[:is_board] if params[:is_board] respond_to do |format| format.js end diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 53afa50aa..aa037b8d5 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -172,6 +172,8 @@ class NewsController < ApplicationController @news = result[:news] @comments = result[:comments] @comments_count = @comments.count + @comments = get_no_children_comments_all @comments + @limit_count = @comments.count @page = params[:page] ? params[:page].to_i + 1 : 0 @limit = 10 @comments = @comments[@page * @limit..@page * @limit + 9] diff --git a/app/controllers/org_document_comments_controller.rb b/app/controllers/org_document_comments_controller.rb index 49e970af7..6b8d11479 100644 --- a/app/controllers/org_document_comments_controller.rb +++ b/app/controllers/org_document_comments_controller.rb @@ -41,8 +41,10 @@ class OrgDocumentCommentsController < ApplicationController @org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first @subfield_content = @organization.org_subfields.order("priority") all_comments = [] - @replies = get_all_children(all_comments, @document) + @replies = OrgDocumentComment.where("root_id = #{@document.id}").reorder("created_at desc") @reply_count = @replies.count + @replies = get_no_children_comments_all @replies + @limit_count = @replies.count @page = params[:page] ? params[:page].to_i + 1 : 0 @limit = 10 @replies = @replies[@page * @limit..@page * @limit + 9] diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 04a3df24a..76a47b00d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -171,7 +171,6 @@ class UsersController < ApplicationController else @user_activity_id = -1 end - @hw_status = params[:hw_status].to_i when 'JournalsForMessage' @reply = JournalsForMessage.find params[:reply_id] @user_activity_id = params[:user_activity_id] @@ -181,15 +180,11 @@ class UsersController < ApplicationController @reply = Message.find params[:reply_id] @user_activity_id = params[:user_activity_id] @activity_id = params[:activity_id] - @is_course = params[:is_course] - @is_board = params[:is_board] @type = 'Message' when 'BlogComment' @reply = BlogComment.find params[:reply_id] @user_activity_id = params[:user_activity_id] @activity_id = params[:activity_id] - @homepage = params[:homepage] - @user_id = params[:user_id] @type = 'BlogComment' when 'OrgDocumentComment' @reply = OrgDocumentComment.find params[:reply_id] @@ -215,6 +210,96 @@ class UsersController < ApplicationController end end + #叠层回复框中的回复 + def reply_to_comment + @type = params[:type] + @reply = get_reply_by_type @type, params[:reply_id] + @user_activity_id = params[:user_activity_id] + @is_project = params[:is_project] if params[:is_project] + respond_to do |format| + format.js + end + end + + #多级回复 + def reply_detail + @type = params[:type] + reply = get_reply_by_type @type, params[:reply_id] + @user_activity_id = params[:user_activity_id] + case params[:type] + when 'HomeworkCommon' + @root = HomeworkCommon.find reply.jour_id + options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => User.current.id,:m_parent_id => params[:reply_id].to_i,:m_reply_id => params[:reply_id].to_i, :root_id => reply.root_id} + comment = HomeworkCommon.add_homework_jour(User.current, params[:reply_message], reply.jour_id, reply.root_id, options) + @root.update_column('updated_at', Time.now) + @is_teacher = User.current.allowed_to?(:as_teacher, @root.course) || User.current.admin? + when 'JournalsForMessage' + options = {:user_id => User.current.id, + :status => true, + :m_parent_id => params[:reply_id], + :m_reply_id => params[:reply_id], + :reply_id => reply.user.id, + :notes => params[:reply_message], + :root_id => reply.root_id, + :is_readed => false} + @root = reply.root + comment = add_reply_adapter(@root, options) + @root.update_attribute(:updated_on,Time.now) + when 'Message' + @root = reply.root + comment = Message.new + comment.author = User.current + comment.board = reply.board + comment.content = params[:reply_message] + comment.subject = "RE: #{@root.subject}" + comment.reply_id = params[:reply_id] + comment.root_id = reply.root_id + reply.children << comment + @is_project = params[:is_project] if params[:is_project] + when 'BlogComment' + @root = reply.root + comment = BlogComment.new + comment.author = User.current + comment.blog = reply.blog + comment.title = "RE: #{@root.title}" + comment.content = params[:reply_message] + comment.reply_id = params[:reply_id] + comment.root_id = reply.root_id + reply.children << comment + when 'OrgDocumentComment' + @root = reply.root + comment = OrgDocumentComment.new(:creator_id => User.current.id, :reply_id => params[:reply_id]) + comment.title = "RE:#{@root.title}" + comment.content = params[:reply_message] + comment.root_id = reply.root_id + reply.children << comment + when 'News' + @root = News.find reply.commented_id + comment = @root.comments.build(:author_id => User.current.id, :reply_id => params[:reply_id], :comments => params[:reply_message], :parent_id => reply.id) + comment.save + when 'Issue' + @root = reply.issue + comment = @root.journals.build(:user_id => User.current.id, :reply_id => params[:reply_id], :notes => params[:reply_message], :parent_id => reply.id) + comment.save + @is_project = params[:is_project] if params[:is_project] + when 'Syllabus' + @root = Syllabus.find reply.jour_id + options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => User.current.id,:m_parent_id => params[:reply_id].to_i,:m_reply_id => params[:reply_id].to_i, :root_id => reply.root_id} + comment = Syllabus.add_syllabus_jour(User.current, params[:reply_message], reply.jour_id, reply.root_id, options) + @root.update_column('updated_at', Time.now) + @count = @root.journals_for_messages.count + @comments = @root.journals_for_messages.reorder("created_on desc").limit(3) + end + update_course_activity(@root.class.to_s,@root.id) + update_user_activity(@root.class.to_s,@root.id) + update_forge_activity(@root.class.to_s,@root.id) + update_org_activity(@root.class.to_s,@root.id) + update_principal_activity(@root.class.to_s,@root.id) + respond_to do |format| + format.js + end + end + def refresh_changests if !(@user.nil?) && !(@user.memberships.nil?) @user.memberships.each do |member| @@ -3617,18 +3702,12 @@ class UsersController < ApplicationController if params[:type].present? case params[:type] when 'OrgDocumentComment' - #obj = OrgDocumentComment.where('id = ?', params[:id].to_i).first @user_activity_id = params[:div_id].to_i if params[:div_id] @type = 'OrgDocumentComment' - #comments = [] @journals = OrgDocumentComment.where("root_id = #{params[:id].to_i}").reorder("created_at desc") when 'Message','is_project_message' - #obj = Message.where('id = ?', params[:id].to_i).first @type = 'Message' - @is_course = params[:is_course] - @is_board = params[:is_board] @user_activity_id = params[:div_id].to_i if params[:div_id] - #comments = [] @journals = Message.where("root_id = #{params[:id].to_i}").reorder("created_on desc") when 'News' obj = News.where('id = ?', params[:id].to_i).first @@ -3641,8 +3720,6 @@ class UsersController < ApplicationController @type = 'Syllabus' @user_activity_id = params[:div_id].to_i if params[:div_id] when 'JournalsForMessage' - #obj = JournalsForMessage.where('id = ?', params[:id].to_i).first - #journals = [] @journals = JournalsForMessage.where("root_id = #{params[:id].to_i}").reorder("created_on desc") @type = 'JournalsForMessage' @user_activity_id = params[:div_id].to_i if params[:div_id] @@ -3659,20 +3736,17 @@ class UsersController < ApplicationController when 'BlogComment' obj = BlogComment.where('id = ?', params[:id].to_i).first @user_activity_id = params[:div_id].to_i if params[:div_id] - @homepage = params[:homepage].to_i @type = 'BlogComment' - @user_id = obj.author_id - #comments = [] @journals = BlogComment.where("root_id = #{params[:id].to_i}").reorder("created_on desc") when 'HomeworkCommon' obj = HomeworkCommon.where('id = ?', params[:id].to_i).first @type = 'HomeworkCommon' @journals = obj.journals_for_messages.reorder("created_on desc") - @hw_status = params[:hw_status].to_i if params[:hw_status] @is_teacher = User.current.allowed_to?(:as_teacher,obj.course) @user_activity_id = params[:user_activity_id].to_i if params[:user_activity_id] end end + @journals = get_no_children_comments_all @journals end def homepage diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index e4b480e2f..2ce505e15 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -116,7 +116,7 @@ class WordsController < ApplicationController else @user_activity_id = -1 end - @hw_status = params[:hw_status].to_i + @hw_status = params[:hw_status].to_i if @is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin? elsif @journal_destroyed.jour_type == 'Syllabus' @syllabus = Syllabus.find @journal_destroyed.jour_id @@ -315,7 +315,7 @@ class WordsController < ApplicationController respond_to do |format| format.js{ @user_activity_id = params[:user_activity_id].to_i - @hw_status = params[:hw_status].to_i + @hw_status = params[:hw_status].to_i if params[:hw_status] @is_teacher = User.current.allowed_to?(:as_teacher, @homework_common.course) || User.current.admin? } end @@ -349,7 +349,7 @@ class WordsController < ApplicationController respond_to do |format| format.js{ @user_activity_id = params[:user_activity_id].to_i - @hw_status = params[:hw_status].to_i + @hw_status = params[:hw_status].to_i if params[:hw_status] @is_teacher = User.current.allowed_to?(:as_teacher, @homework_common.course) || User.current.admin? } end @@ -454,45 +454,5 @@ class WordsController < ApplicationController end obj end - - def add_reply_adapter obj, options - #modify by nwb - #添加对课程留言的支持 - #留言回复应该不关系其所属的Class,而关心的是其所属的父留言 - case obj.jour_type - when 'Principal' - obj.jour.add_jour(nil, nil, nil, options) - when 'Project' - Project.add_new_jour(nil, nil, obj.jour_id, options) - when 'Course' - Course.add_new_jour(nil, nil, obj.jour_id, options) - when 'Bid' - obj.jour.add_jour(nil, nil, nil, options) - when 'Contest' - obj.jour.add_jour(nil, nil, obj.jour_id, options) - when 'Softapplication' - obj.jour.add_jour(nil, nil, obj.jour_id, options) - when 'HomeworkAttach' - obj.jour.add_jour(nil, nil, obj.jour_id, options) - end - # obj = obj_distinguish_url_origin || User.find_by_id(2) - # if obj.kind_of? User - # obj.add_jour(nil, nil, nil, options) - # elsif obj.kind_of? Project - # Project.add_new_jour(nil, nil, obj.id, options) - # elsif obj.kind_of? Course - # Course.add_new_jour(nil, nil, obj.id, options) - # elsif obj.kind_of? Bid - # obj.add_jour(nil, nil, nil, options) - # elsif obj.kind_of? Contest - # obj.add_jour(nil, nil, obj.id, options) #new added - # elsif obj.kind_of? Softapplication - # obj.add_jour(nil, nil, obj.id, options) #new added - # elsif obj.kind_of? HomeworkAttach - # obj.add_jour(nil, nil, obj.id, options) #new added - # else - # raise "create reply obj unknow type.#{obj.class}" - # end - end #######end of message end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c52182b01..ad3d2c61d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3394,6 +3394,61 @@ def secdomain_with_protocol secdomain return Setting.protocol + "://" + secdomain + ".trustie.net" end +#根据回复类型获取回复 +def get_reply_by_type type, reply_id + reply = nil + case type + when 'HomeworkCommon' + reply = JournalsForMessage.find reply_id + when 'JournalsForMessage' + reply = JournalsForMessage.find reply_id + when 'Message' + reply = Message.find reply_id + when 'BlogComment' + reply = BlogComment.find reply_id + when 'OrgDocumentComment' + reply = OrgDocumentComment.find reply_id + when 'News' + reply = Comment.find reply_id + when 'Issue' + reply = Journal.find reply_id + when 'Syllabus' + reply = JournalsForMessage.find reply_id + end + reply +end + +#获取不包含子节点的回复(前三个) +def get_no_children_comments comments + result = {} + no_children_comments = [] + count = 0 + three_more = false + comments.each do |comment| + if comment.children.blank? + count = count + 1 + if count > 3 + three_more = true + end + break if count > 3 + no_children_comments << comment + end + end + result[:three_more] = three_more + result[:no_children_comments] = no_children_comments + result +end + +#获取不包含子节点的回复(所有) +def get_no_children_comments_all comments + no_children_comments = [] + comments.each do |comment| + if comment.children.blank? + no_children_comments << comment + end + end + no_children_comments +end #获取回复的所有父节点 def get_reply_parents parents_rely, comment @@ -3746,3 +3801,43 @@ def homework_type_option type end +def add_reply_adapter obj, options + #modify by nwb + #添加对课程留言的支持 + #留言回复应该不关系其所属的Class,而关心的是其所属的父留言 + case obj.jour_type + when 'Principal' + obj.jour.add_jour(nil, nil, nil, options) + when 'Project' + Project.add_new_jour(nil, nil, obj.jour_id, options) + when 'Course' + Course.add_new_jour(nil, nil, obj.jour_id, options) + #when 'Bid' + # obj.jour.add_jour(nil, nil, nil, options) + #when 'Contest' + # obj.jour.add_jour(nil, nil, obj.jour_id, options) + #when 'Softapplication' + # obj.jour.add_jour(nil, nil, obj.jour_id, options) + #when 'HomeworkAttach' + # obj.jour.add_jour(nil, nil, obj.jour_id, options) + end + # obj = obj_distinguish_url_origin || User.find_by_id(2) + # if obj.kind_of? User + # obj.add_jour(nil, nil, nil, options) + # elsif obj.kind_of? Project + # Project.add_new_jour(nil, nil, obj.id, options) + # elsif obj.kind_of? Course + # Course.add_new_jour(nil, nil, obj.id, options) + # elsif obj.kind_of? Bid + # obj.add_jour(nil, nil, nil, options) + # elsif obj.kind_of? Contest + # obj.add_jour(nil, nil, obj.id, options) #new added + # elsif obj.kind_of? Softapplication + # obj.add_jour(nil, nil, obj.id, options) #new added + # elsif obj.kind_of? HomeworkAttach + # obj.add_jour(nil, nil, obj.id, options) #new added + # else + # raise "create reply obj unknow type.#{obj.class}" + # end +end + diff --git a/app/views/blog_comments/_blog_comment_show_replies.html.erb b/app/views/blog_comments/_blog_comment_show_replies.html.erb index ba33aaf5a..3a3e8ef81 100644 --- a/app/views/blog_comments/_blog_comment_show_replies.html.erb +++ b/app/views/blog_comments/_blog_comment_show_replies.html.erb @@ -10,7 +10,7 @@ <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
- <%= render :partial => 'users/message_contents', :locals => {:comment => comment}%> + <%= render :partial => 'users/message_contents', :locals => {:comment => comment, :type => 'BlogComment', :user_activity_id => @article.id}%> <% if !comment.content_detail.blank? %>
@@ -52,7 +52,7 @@
<% end %> -<% if @reply_count > @page * @limit + 10 %> +<% if @limit_count > @page * @limit + 10 %>
diff --git a/app/views/blog_comments/destroy.js.erb b/app/views/blog_comments/destroy.js.erb index 52ecbb925..ffdc27c22 100644 --- a/app/views/blog_comments/destroy.js.erb +++ b/app/views/blog_comments/destroy.js.erb @@ -1,7 +1,8 @@ -<% if @in_user_homepage %> - <% homepage = BlogComment.find(@user.blog.homepage_id) %> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>"); -<% else%> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>"); -<% end %> +<%# if @in_user_homepage %> + <%# homepage = BlogComment.find(@user.blog.homepage_id) %> + //$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>"); +<%# else%> + //$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>"); +<%# end %> +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_blog_post_reply', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>"); sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity'); \ No newline at end of file diff --git a/app/views/blog_comments/reply.js.erb b/app/views/blog_comments/reply.js.erb index f612cfe98..3fb9f4c54 100644 --- a/app/views/blog_comments/reply.js.erb +++ b/app/views/blog_comments/reply.js.erb @@ -1,11 +1,12 @@ -<% if @in_user_homepage %> - <% homepage = BlogComment.find(@user.blog.homepage_id) %> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id}) %>"); -<% elsif @in_user_center%> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); +<%# if @in_user_homepage %> + <%# homepage = BlogComment.find(@user.blog.homepage_id) %> + //$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id}) %>"); +<%# elsif @in_user_center%> + //$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); // init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity'); -<% else%> -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); +<%# else%> +//$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); //init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity'); -<% end %> +<%# end %> +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_blog_post_reply', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity'); \ No newline at end of file diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb index 144560388..8195e5ee3 100644 --- a/app/views/blog_comments/show.html.erb +++ b/app/views/blog_comments/show.html.erb @@ -109,9 +109,7 @@
- <% all_comments = []%> - <% all_replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc") %> - <% count= all_replies.count %> +
回复 @@ -124,7 +122,6 @@
- <%# comments = all_replies %> <% if @reply_count > 0 %>
<%= render :partial => 'blog_comment_show_replies' %> diff --git a/app/views/blogs/_homepage.html.erb b/app/views/blogs/_homepage.html.erb index 6b40a23da..2b921c7a4 100644 --- a/app/views/blogs/_homepage.html.erb +++ b/app/views/blogs/_homepage.html.erb @@ -45,16 +45,15 @@
- <% all_comments = []%> <% all_repies = BlogComment.where("root_id = #{activity.id}").reorder("created_on desc") %> <% count = all_repies.count %> + <% no_children_comments = get_no_children_comments all_repies %>
- <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 1} %> + <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 1, :expand_more =>no_children_comments[:three_more]} %> - <% comments = all_repies[0..2] %> <% if count > 0 %>
- <%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%> + <%= render :partial => 'users/message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%>
<% end %> diff --git a/app/views/comments/destroy.js.erb b/app/views/comments/destroy.js.erb index e8f425a85..1df37cd43 100644 --- a/app/views/comments/destroy.js.erb +++ b/app/views/comments/destroy.js.erb @@ -2,7 +2,7 @@ <% if @news.project_id && @news.project_id != -1 %> $("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); <% elsif @news.course_id %> - $("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); + $("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/course_news_post_reply', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); <% elsif @news.org_subfield_id %> $("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); <% end %> diff --git a/app/views/comments/reply.js.erb b/app/views/comments/reply.js.erb index e8f425a85..1df37cd43 100644 --- a/app/views/comments/reply.js.erb +++ b/app/views/comments/reply.js.erb @@ -2,7 +2,7 @@ <% if @news.project_id && @news.project_id != -1 %> $("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); <% elsif @news.course_id %> - $("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); + $("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/course_news_post_reply', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); <% elsif @news.org_subfield_id %> $("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); <% end %> diff --git a/app/views/issues/_issue_replies.html.erb b/app/views/issues/_issue_replies.html.erb index baf46762c..e67040138 100644 --- a/app/views/issues/_issue_replies.html.erb +++ b/app/views/issues/_issue_replies.html.erb @@ -11,7 +11,7 @@ <%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
- <%= render :partial => 'users/news_contents', :locals => {:comment => comment}%> + <%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'Issue', :user_activity_id => issue.id}%>
<% if comment.details.any? %> diff --git a/app/views/messages/_course_show_replies.html.erb b/app/views/messages/_course_show_replies.html.erb index ad715df20..e56d19406 100644 --- a/app/views/messages/_course_show_replies.html.erb +++ b/app/views/messages/_course_show_replies.html.erb @@ -10,7 +10,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
- <%= render :partial => 'users/message_contents', :locals => {:comment => reply}%> + <%= render :partial => 'users/message_contents', :locals => {:comment => reply, :type => 'Message', :user_activity_id => @topic.id}%>
<%= reply.content.html_safe%> @@ -49,7 +49,7 @@
<% end %> -<% if @reply_count > @page * @limit + 10 %> +<% if @limit_count > @page * @limit + 10 %>
diff --git a/app/views/messages/_org_show_replies.html.erb b/app/views/messages/_org_show_replies.html.erb index fbde35fcf..df1b2c301 100644 --- a/app/views/messages/_org_show_replies.html.erb +++ b/app/views/messages/_org_show_replies.html.erb @@ -10,7 +10,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => 33, :height => 33), user_path(reply.author) %>
- <%= render :partial => 'users/message_contents', :locals => {:comment => reply} %> + <%= render :partial => 'users/message_contents', :locals => {:comment => reply, :type => 'Message', :user_activity_id => @topic.id} %>
<%= reply.content.html_safe %> @@ -48,7 +48,7 @@
<% end %> -<% if @reply_count > @page * @limit + 10 %> +<% if @limit_count > @page * @limit + 10 %>
diff --git a/app/views/messages/_project_show_replies.html.erb b/app/views/messages/_project_show_replies.html.erb index 8a4b615da..b2f22aecb 100644 --- a/app/views/messages/_project_show_replies.html.erb +++ b/app/views/messages/_project_show_replies.html.erb @@ -10,7 +10,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
- <%= render :partial => 'projects/project_message_contents', :locals => {:comment => reply}%> + <%= render :partial => 'projects/project_message_contents', :locals => {:comment => reply, :user_activity_id => @topic.id}%>
<%= reply.content.html_safe%> @@ -49,7 +49,7 @@
<% end %> -<% if @reply_count > @page * @limit + 10 %> +<% if @limit_count > @page * @limit + 10 %>
diff --git a/app/views/messages/destroy.js.erb b/app/views/messages/destroy.js.erb index 6967e0b6f..8c269c1c3 100644 --- a/app/views/messages/destroy.js.erb +++ b/app/views/messages/destroy.js.erb @@ -2,12 +2,12 @@ <% if params[:is_project] %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>"); <% else %> -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>"); +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <% end %> <%elsif @course%> -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>"); +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <% elsif @org_subfield %> -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'organizations/org_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <%end%> -sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity"); \ No newline at end of file +sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity"); diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb index 6967e0b6f..8c269c1c3 100644 --- a/app/views/messages/reply.js.erb +++ b/app/views/messages/reply.js.erb @@ -2,12 +2,12 @@ <% if params[:is_project] %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>"); <% else %> -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>"); +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <% end %> <%elsif @course%> -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>"); +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <% elsif @org_subfield %> -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); +$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'organizations/org_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <%end%> -sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity"); \ No newline at end of file +sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity"); diff --git a/app/views/news/_news_replies_detail.html.erb b/app/views/news/_news_replies_detail.html.erb index f79bbdfc0..924a6a329 100644 --- a/app/views/news/_news_replies_detail.html.erb +++ b/app/views/news/_news_replies_detail.html.erb @@ -10,7 +10,7 @@ <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
- <%= render :partial => 'users/news_contents', :locals => {:comment => comment}%> + <%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'News', :user_activity_id => @news.id}%> <% if !comment.content_detail.blank? %>
@@ -52,7 +52,7 @@
<% end %> -<% if @comments_count > @page * @limit + 10 %> +<% if @limit_count > @page * @limit + 10 %>
diff --git a/app/views/org_document_comments/_document_show_replies.html.erb b/app/views/org_document_comments/_document_show_replies.html.erb index 9032edce6..c3faef645 100644 --- a/app/views/org_document_comments/_document_show_replies.html.erb +++ b/app/views/org_document_comments/_document_show_replies.html.erb @@ -11,7 +11,7 @@ <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
- <%= render :partial => 'users/message_contents', :locals => {:comment => comment}%> + <%= render :partial => 'users/message_contents', :locals => {:comment => comment, :type => 'OrgDocumentComment', :user_activity_id => @document.id}%> <% if !comment.content_detail.blank? %>
@@ -53,7 +53,7 @@ <% end %>
-<% if @reply_count > @page * @limit + 10 %> +<% if @limit_count > @page * @limit + 10 %>
diff --git a/app/views/org_document_comments/destroy.js.erb b/app/views/org_document_comments/destroy.js.erb index 86ef7e857..a544f6cc7 100644 --- a/app/views/org_document_comments/destroy.js.erb +++ b/app/views/org_document_comments/destroy.js.erb @@ -1,6 +1,6 @@ //location.reload(); <% if @act %> - $("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => 2, :act => @act}) %>"); + $("#activity_post_reply_<%= @act.id %>").html("<%= escape_javascript(render :partial => 'organizations/org_document_post_reply', :locals => {:activity => @document, :user_activity_id => @act.id}) %>"); sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>"); <% elsif params[:detail_page] %> window.location.href = '<%= organization_path(params[:organization_id],:org_subfield_id => @org_sub_id )%>'; diff --git a/app/views/org_document_comments/reply.js.erb b/app/views/org_document_comments/reply.js.erb index f12bf0e8d..b9f6622ae 100644 --- a/app/views/org_document_comments/reply.js.erb +++ b/app/views/org_document_comments/reply.js.erb @@ -1,4 +1,4 @@ <% if @user_activity_id %> -$("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => 2, :act => @act}) %>"); +$("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'organizations/org_document_post_reply', :locals => {:activity => @document, :user_activity_id => @user_activity_id}) %>"); <% end %> sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>"); diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb index a8ce5b289..7111c1b21 100644 --- a/app/views/org_document_comments/show.html.erb +++ b/app/views/org_document_comments/show.html.erb @@ -74,9 +74,6 @@ <% end %>
- <% all_comments = []%> - <% all_replies = OrgDocumentComment.where("root_id = #{@document.id}").reorder("created_at desc") %> - <% count = all_replies.count %>
<%# if count > 0 %> @@ -89,7 +86,6 @@
- <%# comments = all_replies %>
<%= render :partial => "document_show_replies" %>
diff --git a/app/views/organizations/_org_document_post_reply.html.erb b/app/views/organizations/_org_document_post_reply.html.erb new file mode 100644 index 000000000..84e6bb67e --- /dev/null +++ b/app/views/organizations/_org_document_post_reply.html.erb @@ -0,0 +1,33 @@ +<% all_replies = OrgDocumentComment.where("root_id = #{activity.id}").reorder("created_at desc") %> +<% count = all_replies.count %> +<% no_children_comments = get_no_children_comments all_replies %> +<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %> + +<% if count > 0 %> +
+ <%= render :partial => 'users/message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'OrgDocumentComment', :activity_id =>activity.id}%> +
+<% end %> + +
+
+ <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %> +
+
+ <% if User.current.logged? %> +
+ <%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => activity.id, :act_id => user_activity_id, :flag => 2), :method => "post", :remote => true) do |f| %> +
+ + + +
+

+ <% end %> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %> +
+
+
\ No newline at end of file diff --git a/app/views/organizations/_org_message_post_reply.html.erb b/app/views/organizations/_org_message_post_reply.html.erb new file mode 100644 index 000000000..0684a57da --- /dev/null +++ b/app/views/organizations/_org_message_post_reply.html.erb @@ -0,0 +1,35 @@ +<% all_replies = Message.where("root_id = #{activity.id}").reorder("created_on desc") %> +<% count = all_replies.count %> +<% no_children_comments = get_no_children_comments all_replies %> +<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %> + +<% if count > 0 %> +
+ <%= render :partial => 'users/message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id}%> +
+<% end %> +<% if !activity.locked? && authorize_for_course('messages', 'reply') %> +
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
+
+ <% if User.current.logged? %> +
+ <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id},:method => "post", :remote => true) do |f|%> + + +
+ + +
+

+ <% end%> +
+
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %> +
+
+
+
+<% end %> diff --git a/app/views/organizations/_org_subfield_message.html.erb b/app/views/organizations/_org_subfield_message.html.erb index 353e9903e..f91acc268 100644 --- a/app/views/organizations/_org_subfield_message.html.erb +++ b/app/views/organizations/_org_subfield_message.html.erb @@ -69,42 +69,11 @@
- <% all_comments = []%> - <% all_replies = OrgDocumentComment.where("root_id = #{activity.id}").reorder("created_at desc") %> - <% count = all_replies.count %> +
- <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => 0,:is_board =>0} %> - - <% comments = all_replies[0..2] %> - <% if count > 0 %> -
- <%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => 0, :is_board =>0}%> -
- <% end %> - -
-
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
-
- <% if User.current.logged? %> -
- <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id,:is_course => 0, :is_board => 0},:method => "post", :remote => true) do |f|%> - - -
- - -
-

- <% end%> -
- <% else %> - <%= render :partial => "users/show_unlogged" %> - <% end %> -
-
-
+
+ <%=render :partial => 'organizations/org_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
-