From 9b2304e3a776e7e9ae4d406d0a5bab61b8ac77ed Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Mon, 21 May 2012 21:53:05 -0300 Subject: [PATCH] More enhancements on wall --- app/controllers/public/profile_controller.rb | 7 +------ app/views/profile/_create_article.rhtml | 2 +- app/views/profile/_default_activity.rhtml | 2 +- app/views/profile/_profile_network_activities.rhtml | 6 ------ app/views/profile/_profile_scrap.rhtml | 2 +- app/views/profile/_profile_scraps.rhtml | 9 +-------- app/views/profile/_upload_image.rhtml | 2 +- public/javascripts/application.js | 5 +++++ public/stylesheets/application.css | 7 ++++++- 9 files changed, 17 insertions(+), 25 deletions(-) diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 6de2dd0..bfef279 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -3,7 +3,7 @@ class ProfileController < PublicController needs_profile before_filter :check_access_to_profile, :except => [:join, :join_not_logged, :index, :add] before_filter :store_location, :only => [:join, :join_not_logged, :report_abuse] - before_filter :login_required, :only => [:add, :join, :join_not_logged, :leave, :unblock, :leave_scrap, :remove_scrap, :remove_activity, :view_more_scraps, :view_more_activities, :view_more_network_activities, :report_abuse, :register_report, :leave_comment_on_activity] + before_filter :login_required, :only => [:add, :join, :join_not_logged, :leave, :unblock, :leave_scrap, :remove_scrap, :remove_activity, :view_more_activities, :view_more_network_activities, :report_abuse, :register_report, :leave_comment_on_activity] helper TagsHelper @@ -193,11 +193,6 @@ class ProfileController < PublicController render :partial => 'profile_activities_list', :locals => {:activities => activities} end - def view_more_scraps - @scraps = @profile.scraps_received.not_replies.paginate(:per_page => 30, :page => params[:page]) - render :partial => 'profile_scraps', :locals => {:scraps => @scraps} - end - def view_more_activities @activities = @profile.activities.paginate(:per_page => 10, :page => params[:page]) render :partial => 'profile_activities_list', :locals => {:activities => @activities} diff --git a/app/views/profile/_create_article.rhtml b/app/views/profile/_create_article.rhtml index d5bba14..31cff3b 100644 --- a/app/views/profile/_create_article.rhtml +++ b/app/views/profile/_create_article.rhtml @@ -14,7 +14,7 @@ <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>

<%= time_ago_as_sentence(activity.created_at) %>

- <%= link_to_function s_('profile|Comment'), "$('reply_content_#{activity.id}').focus()" %> + <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %> <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_activity', :activity_id => activity.id, :only_hide => true}, :confirm => _('Are you sure?'), :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %>
diff --git a/app/views/profile/_default_activity.rhtml b/app/views/profile/_default_activity.rhtml index 054d3a8..0195183 100644 --- a/app/views/profile/_default_activity.rhtml +++ b/app/views/profile/_default_activity.rhtml @@ -5,7 +5,7 @@

<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>

<%= time_ago_as_sentence(activity.created_at) %>

- <%= link_to_function s_('profile|Comment'), "$('reply_content_#{activity.id}').focus()" %> + <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %> <%= link_to_remote(content_tag(:span, _('Remove')), :confirm => _('Are you sure?'), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %>
diff --git a/app/views/profile/_profile_network_activities.rhtml b/app/views/profile/_profile_network_activities.rhtml index c7e34f7..688c89b 100644 --- a/app/views/profile/_profile_network_activities.rhtml +++ b/app/views/profile/_profile_network_activities.rhtml @@ -2,12 +2,6 @@
  • <%= render :partial => activity.verb, :locals => { :activity => activity }%>
    - - - <%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> -
  • <% end %> <% if network_activities.current_page < network_activities.total_pages %> diff --git a/app/views/profile/_profile_scrap.rhtml b/app/views/profile/_profile_scrap.rhtml index 45fe0cd..be62faf 100644 --- a/app/views/profile/_profile_scrap.rhtml +++ b/app/views/profile/_profile_scrap.rhtml @@ -22,7 +22,7 @@ <% end %> -