Commit 9b2304e3a776e7e9ae4d406d0a5bab61b8ac77ed
1 parent
185ab972
Exists in
master
and in
28 other branches
More enhancements on wall
Showing
9 changed files
with
17 additions
and
25 deletions
Show diff stats
app/controllers/public/profile_controller.rb
... | ... | @@ -3,7 +3,7 @@ class ProfileController < PublicController |
3 | 3 | needs_profile |
4 | 4 | before_filter :check_access_to_profile, :except => [:join, :join_not_logged, :index, :add] |
5 | 5 | before_filter :store_location, :only => [:join, :join_not_logged, :report_abuse] |
6 | - 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] | |
6 | + 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] | |
7 | 7 | |
8 | 8 | helper TagsHelper |
9 | 9 | |
... | ... | @@ -193,11 +193,6 @@ class ProfileController < PublicController |
193 | 193 | render :partial => 'profile_activities_list', :locals => {:activities => activities} |
194 | 194 | end |
195 | 195 | |
196 | - def view_more_scraps | |
197 | - @scraps = @profile.scraps_received.not_replies.paginate(:per_page => 30, :page => params[:page]) | |
198 | - render :partial => 'profile_scraps', :locals => {:scraps => @scraps} | |
199 | - end | |
200 | - | |
201 | 196 | def view_more_activities |
202 | 197 | @activities = @profile.activities.paginate(:per_page => 10, :page => params[:page]) |
203 | 198 | render :partial => 'profile_activities_list', :locals => {:activities => @activities} | ... | ... |
app/views/profile/_create_article.rhtml
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %> |
15 | 15 | <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) %></p> |
16 | 16 | <div class='profile-wall-actions'> |
17 | - <%= link_to_function s_('profile|Comment'), "$('reply_content_#{activity.id}').focus()" %> | |
17 | + <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %> | |
18 | 18 | <%= 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 %> |
19 | 19 | </div> |
20 | 20 | </div> | ... | ... |
app/views/profile/_default_activity.rhtml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <p class='profile-activity-text'><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></p> |
6 | 6 | <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) %></p> |
7 | 7 | <div class='profile-wall-actions'> |
8 | - <%= link_to_function s_('profile|Comment'), "$('reply_content_#{activity.id}').focus()" %> | |
8 | + <%= link_to s_('profile|Comment'), '#', { :class => 'focus-on-comment'} %> | |
9 | 9 | <%= 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 %> |
10 | 10 | </div> |
11 | 11 | </div> | ... | ... |
app/views/profile/_profile_network_activities.rhtml
... | ... | @@ -2,12 +2,6 @@ |
2 | 2 | <li class='profile-activity-item <%= activity.verb %>' id='profile-network-item-<%= activity.id %>'> |
3 | 3 | <%= render :partial => activity.verb, :locals => { :activity => activity }%> |
4 | 4 | <hr/> |
5 | - <ul class="profile-wall-activities-comments" style='padding-left: 50px;width:auto'> | |
6 | - <%= render :partial => 'comment', :collection => activity.comments %> | |
7 | - </ul> | |
8 | - | |
9 | - <%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> | |
10 | - <hr /> | |
11 | 5 | </li> |
12 | 6 | <% end %> |
13 | 7 | <% if network_activities.current_page < network_activities.total_pages %> | ... | ... |
app/views/profile/_profile_scrap.rhtml
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | </div> |
23 | 23 | <% end %> |
24 | 24 | |
25 | - <ul class="profile-wall-activities-comments scrap-replies" style="width: auto;padding-left:0px; <%= 'display:none;' if (scrap.replies.count > 2) %>" > | |
25 | + <ul class="profile-wall-activities-comments scrap-replies" style="width: auto; <%= 'display:none;' if (scrap.replies.count > 2) %>" > | |
26 | 26 | <% scrap.replies.map do |reply| %> |
27 | 27 | <%= render :partial => 'profile_scrap', :locals => {:scrap => reply} %> |
28 | 28 | <% end %> | ... | ... |
app/views/profile/_profile_scraps.rhtml
1 | -<% scraps.map do |scrap| %> | |
2 | - <%= render :partial => 'profile_scrap', :locals => {:scrap => scrap} %> | |
3 | -<% end %> | |
4 | -<% if scraps.current_page < scraps.total_pages %> | |
5 | - <div id='profile_scraps_page_<%= scraps.current_page %>'> | |
6 | - <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_scraps', :page => (scraps.current_page + 1)}, :update => "profile_scraps_page_#{scraps.current_page}" %> | |
7 | - </div> | |
8 | -<% end %> | |
1 | +NÃO DEVE APARECER | ... | ... |
app/views/profile/_upload_image.rhtml
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <p class='profile-activity-text'><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></p> |
7 | 7 | <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) %></p> |
8 | 8 | <div class='profile-wall-actions'> |
9 | - <%= link_to_function(s_('profile|Comment'), "$('reply_content_#{activity.id}').focus()") unless activity.get_view_url.size == 1 %> | |
9 | + <%= link_to(s_('profile|Comment'), '#', { :class => 'focus-on-comment'}) unless activity.get_view_url.size == 1 %> | |
10 | 10 | <%= 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 %> |
11 | 11 | </div> |
12 | 12 | </div> | ... | ... |
public/javascripts/application.js
... | ... | @@ -738,4 +738,9 @@ jQuery(function($){ |
738 | 738 | $(link).hide(); |
739 | 739 | return false; |
740 | 740 | }); |
741 | + $('.focus-on-comment').live('click', function(e) { | |
742 | + var link = this; | |
743 | + $(link).parents('.profile-activity-item').find('textarea').focus(); | |
744 | + return false; | |
745 | + }); | |
741 | 746 | }); | ... | ... |
public/stylesheets/application.css
... | ... | @@ -6350,6 +6350,11 @@ h1#agenda-title { |
6350 | 6350 | width: auto; |
6351 | 6351 | } |
6352 | 6352 | |
6353 | +#profile-wall ul.profile-wall-activities-comments ul, | |
6354 | +#profile-network ul.profile-wall-activities-comments ul { | |
6355 | + padding-left: 0px; | |
6356 | +} | |
6357 | + | |
6353 | 6358 | #profile-wall .profile-wall-activities-comments li, |
6354 | 6359 | #profile-network .profile-wall-activities-comments li { |
6355 | 6360 | background: #f0f0f1; |
... | ... | @@ -6577,7 +6582,7 @@ h1#agenda-title { |
6577 | 6582 | background: #f0f0f1; |
6578 | 6583 | border-bottom: 1px solid #d2d2d2; |
6579 | 6584 | border-top: 1px solid #fff; |
6580 | - Xmargin-left: 50px; | |
6585 | + margin-left: 50px; | |
6581 | 6586 | padding: 0 5px; |
6582 | 6587 | } |
6583 | 6588 | ... | ... |