From b2ad753b2b0197b4ed5d1e34461dcfd2e236e9a9 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Thu, 5 Jan 2012 12:17:16 -0200 Subject: [PATCH] Allowing reply of scraps reply --- app/controllers/public/profile_controller.rb | 4 ++-- app/views/profile/_profile_activity.rhtml | 2 +- app/views/profile/_profile_comment_form.rhtml | 2 +- app/views/profile/_profile_scrap.rhtml | 17 +++-------------- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 8e2b061..e25277b 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -179,7 +179,7 @@ class ProfileController < PublicController @tab_action = params[:tab_action] @message = @scrap.save ? _("Message successfully sent.") : _("You can't leave an empty message.") @activities = @profile.activities.paginate(:per_page => 30, :page => params[:page]) if params[:not_load_scraps].nil? - render :partial => 'leave_scrap' + render :partial => 'profile_activities_list' end def leave_comment_on_activity @@ -192,7 +192,7 @@ class ProfileController < PublicController @tab_action = params[:tab_action] @message = @comment.save ? _("Comment successfully added.") : _("You can't leave an empty comment.") @activities = @profile.activities.paginate(:per_page => 30, :page => params[:page]) if params[:not_load_scraps].nil? - render :partial => 'leave_comment_on_activity' + render :partial => 'profile_activities_list' end def view_more_scraps diff --git a/app/views/profile/_profile_activity.rhtml b/app/views/profile/_profile_activity.rhtml index 034ab32..bccdbd9 100644 --- a/app/views/profile/_profile_activity.rhtml +++ b/app/views/profile/_profile_activity.rhtml @@ -3,7 +3,7 @@
<% if logged_in? && current_person.follows?(activity.user) %> - <%= link_to_function _('Comment'), "hide_and_show(['#profile-wall-reply-response-#{activity.id}'],['#profile-wall-reply-#{activity.id}', '#profile-wall-reply-form-#{activity.id}']);$('reply_content_#{activity.id}').value='';$('activity_id_#{activity.id}').value='#{activity.id}';return false", :class => "profile-send-reply" %> + <%= link_to_function _('Comment'), "hide_and_show(['#profile-wall-reply-response-#{activity.id}'],['#profile-wall-reply-#{activity.id}', '#profile-wall-reply-form-#{activity.id}']);$('reply_content_#{activity.id}').value='';$('reply_content_#{activity.id}').focus();$('activity_id_#{activity.id}').value='#{activity.id}';return false", :class => "profile-send-reply" %> <% end %>