Commit 090bb72ba0aab8b6a450bb7a19a563365995c338
1 parent
173bc36f
Exists in
master
and in
29 other branches
More enhancements
Showing
20 changed files
with
121 additions
and
68 deletions
Show diff stats
app/controllers/public/profile_controller.rb
... | ... | @@ -8,10 +8,10 @@ class ProfileController < PublicController |
8 | 8 | helper TagsHelper |
9 | 9 | |
10 | 10 | def index |
11 | - @network_activities = !@profile.is_a?(Person) ? @profile.tracked_notifications.paginate(:per_page => 30, :page => params[:page]) : [] | |
11 | + @network_activities = !@profile.is_a?(Person) ? @profile.tracked_notifications.paginate(:per_page => 15, :page => params[:page]) : [] | |
12 | 12 | if logged_in? && current_person.follows?(@profile) |
13 | - @network_activities = @profile.tracked_notifications.paginate(:per_page => 30, :page => params[:page]) if @network_activities.empty? | |
14 | - @activities = @profile.activities.paginate(:per_page => 30, :page => params[:page]) | |
13 | + @network_activities = @profile.tracked_notifications.paginate(:per_page => 15, :page => params[:page]) if @network_activities.empty? | |
14 | + @activities = @profile.activities.paginate(:per_page => 15, :page => params[:page]) | |
15 | 15 | end |
16 | 16 | @tags = profile.article_tags |
17 | 17 | unless profile.display_info_to?(user) |
... | ... | @@ -186,8 +186,6 @@ class ProfileController < PublicController |
186 | 186 | @comment = Comment.new(params[:comment]) |
187 | 187 | @comment.author = user |
188 | 188 | @activity = ActionTracker::Record.find(params[:source_id]) |
189 | - #FIXME pq n colocar source direto? | |
190 | - #@comment.source = ActionTracker::Record.find(params[:source_id]) | |
191 | 189 | @comment.source_type, @comment.source_id = (@activity.target_type == 'Article' ? ['Article', @activity.target_id] : [@activity.class.to_s, @activity.id]) |
192 | 190 | @tab_action = params[:tab_action] |
193 | 191 | @message = @comment.save ? _("Comment successfully added.") : _("You can't leave an empty comment.") |
... | ... | @@ -201,12 +199,12 @@ class ProfileController < PublicController |
201 | 199 | end |
202 | 200 | |
203 | 201 | def view_more_activities |
204 | - @activities = @profile.activities.paginate(:per_page => 30, :page => params[:page]) | |
202 | + @activities = @profile.activities.paginate(:per_page => 10, :page => params[:page]) | |
205 | 203 | render :partial => 'profile_activities_list', :locals => {:activities => @activities} |
206 | 204 | end |
207 | 205 | |
208 | 206 | def view_more_network_activities |
209 | - @activities = @profile.tracked_notifications.paginate(:per_page => 30, :page => params[:page]) | |
207 | + @activities = @profile.tracked_notifications.paginate(:per_page => 10, :page => params[:page]) | |
210 | 208 | render :partial => 'profile_network_activities', :locals => {:network_activities => @activities} |
211 | 209 | end |
212 | 210 | ... | ... |
app/models/article.rb
... | ... | @@ -62,7 +62,7 @@ class Article < ActiveRecord::Base |
62 | 62 | validate :translation_must_have_language |
63 | 63 | |
64 | 64 | def is_trackable? |
65 | - self.published? && self.notifiable? && self.advertise? | |
65 | + self.published? && self.notifiable? && self.advertise? && self.profile.public_profile | |
66 | 66 | end |
67 | 67 | |
68 | 68 | def external_link=(link) | ... | ... |
app/views/profile/_comment.rhtml
app/views/profile/_create_article.rhtml
... | ... | @@ -10,7 +10,14 @@ |
10 | 10 | <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %> |
11 | 11 | <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) %></p> |
12 | 12 | <div class='profile-wall-actions'> |
13 | - <%= link_to_function _('Comment'), "$('reply_content_#{activity.id}').focus()" %> | |
13 | + <%= link_to_function s_('profile|Comment'), "$('reply_content_#{activity.id}').focus()" %> | |
14 | 14 | <%= 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 %> |
15 | 15 | </div> |
16 | 16 | </div> |
17 | + | |
18 | +<hr /> | |
19 | +<ul class="profile-wall-activities-comments comments-count-<%= activity.comments_count %>" > | |
20 | + <%= render :partial => 'comment', :collection => activity.comments %> | |
21 | +</ul> | |
22 | + | |
23 | +<%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> | ... | ... |
app/views/profile/_default_activity.rhtml
... | ... | @@ -5,7 +5,14 @@ |
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 _('Comment'), "$('reply_content_#{activity.id}').focus()" %> | |
8 | + <%= link_to_function s_('profile|Comment'), "$('reply_content_#{activity.id}').focus()" %> | |
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> |
12 | + | |
13 | +<hr /> | |
14 | +<ul class="profile-wall-activities-comments comments-count-<%= activity.comments_count %>" > | |
15 | + <%= render :partial => 'comment', :collection => activity.comments %> | |
16 | +</ul> | |
17 | + | |
18 | +<%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> | ... | ... |
app/views/profile/_leave_scrap.rhtml
1 | -NÂO DEVE APARECER | |
1 | +<div class='profile-activity-image'> | |
2 | + <%= link_to(profile_image(activity.user, :minor), activity.user.url) %> | |
3 | +</div> | |
4 | +<div class='profile-activity-description'> | |
5 | + <p class='profile-activity-text'><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></p> | |
6 | + <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) %></p> | |
7 | + <div class='profile-wall-actions'> | |
8 | + <%= 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 %> | |
9 | + </div> | |
10 | +</div> | |
11 | + | |
12 | +<br/> | ... | ... |
app/views/profile/_leave_scrap_to_self.rhtml
... | ... | @@ -1 +0,0 @@ |
1 | -NÃO É PRA APARECER |
app/views/profile/_profile_activities_list.rhtml
... | ... | @@ -8,3 +8,9 @@ |
8 | 8 | <% end %> |
9 | 9 | <% end %> |
10 | 10 | <% end %> |
11 | + | |
12 | +<% if activities.current_page < activities.total_pages %> | |
13 | + <div id='profile_activities_page_<%= activities.current_page %>'> | |
14 | + <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_activities', :page => (activities.current_page + 1)}, :update => "profile_activities_page_#{activities.current_page}" %> | |
15 | + </div> | |
16 | +<% end %> | ... | ... |
app/views/profile/_profile_activity.rhtml
1 | 1 | <li class='profile-activity-item <%= activity.verb %>' id='profile-activity-item-<%= activity.id %>'> |
2 | 2 | <%= render :partial => activity.verb, :locals => { :activity => activity }%> |
3 | 3 | <hr /> |
4 | - | |
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 | - | |
11 | 4 | </li> | ... | ... |
app/views/profile/_profile_scrap.rhtml
... | ... | @@ -9,30 +9,17 @@ |
9 | 9 | <div class='profile-wall-actions'> |
10 | 10 | <% if logged_in? && current_person.follows?(scrap.sender) %> |
11 | 11 | <span class='profile-activity-send-reply'> |
12 | - <%= link_to_function _('Comment'), "hide_and_show(['#profile-wall-reply-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();$('scrap_id_#{scrap.id}').value='#{scrap.id}';return false", :class => "profile-send-reply" %> | |
12 | + <%= link_to_function s_('profile|Comment'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();return false", :class => "profile-send-reply" %> | |
13 | 13 | </span> |
14 | 14 | <% end %> |
15 | 15 | <%= link_to_remote(content_tag(:span, _('Remove')), :confirm => _('Are you sure?'), :url =>{:action => 'remove_scrap', :scrap_id => scrap.id}, :update => "profile-activity-item-#{scrap.id}") if logged_in? && user.can_control_scrap?(scrap) %> |
16 | 16 | </div> |
17 | 17 | </div> |
18 | - <ul class="profile-activity-scrap-replies"> | |
18 | + <ul class="profile-wall-activities-comments scrap-replies" style='width: auto;'> | |
19 | 19 | <% scrap.replies.map do |reply| %> |
20 | 20 | <%= render :partial => 'profile_scrap', :locals => {:scrap => reply} %> |
21 | 21 | <% end %> |
22 | 22 | </ul> |
23 | - <div id='profile-activity-message-<%= scrap.id%>' style='display:none;'> | |
24 | - <div id='profile-activity-form-<%= scrap.id%>' style='display:none;'> | |
25 | - <p class='profile-activity-message'> | |
26 | - <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :not_load_scraps => true}, :update => "profile-activity-message-response-#{scrap.id}", :success =>"hide_and_show(['#profile-activity-form-#{scrap.id}'],['#profile-activity-message-response-#{scrap.id}'])" do %> | |
27 | - <%= limited_text_area :scrap, :content, 420, "content_#{scrap.id}", :cols => 50, :rows => 2 %> | |
28 | - <%= hidden_field_tag 'receiver_id', scrap.sender.id %> | |
29 | - <%= submit_button :add, _('Leave a scrap') %> | |
30 | - <%= button_to_function :cancel, _('Cancel'), "hide_and_show(['#profile-activity-message-#{scrap.id}'],[]);return false" %> | |
31 | - <% end %> | |
32 | - </p> | |
33 | - </div> | |
34 | - <div id='profile-activity-message-response-<%=scrap.id%>' class='profile-activity-message-response'></div> | |
35 | - </div> | |
36 | 23 | <%= render :partial => 'profile_scrap_reply_form', :locals => { :scrap => scrap } %> |
37 | 24 | <hr /> |
38 | 25 | </li> | ... | ... |
app/views/profile/_profile_scrap_reply_form.rhtml
1 | -<div id='profile-wall-reply-<%= scrap.id%>' style='display:none;'> | |
2 | - <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none;'> | |
1 | +<div id='profile-wall-reply-<%= scrap.id%>' style='display:none'> | |
2 | + <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none'> | |
3 | 3 | <p class='profile-wall-reply'> |
4 | - <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap'}, :update => "profile_activities", :success =>"hide_and_show(['#profile-wall-reply-form-#{scrap.id}'],['#profile-wall-reply-response-#{scrap.id}'])" do %> | |
4 | + <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap'}, :update => "profile_activities", :html => { :class => 'profile-wall-reply-form'} do %> | |
5 | 5 | <%= text_area :scrap, :content, { :id => "reply_content_#{scrap.id}", |
6 | 6 | :cols => 50, |
7 | 7 | :rows => 1, |
8 | 8 | :class => 'submit-with-keypress', |
9 | + :title => _('Leave your comment'), | |
9 | 10 | :onfocus => ('if(this.value==this.title){this.value="";this.style.color="#000"};this.style.backgroundImage="url(' + profile_icon(current_person, :icon, false) + ')"' if logged_in?), |
10 | 11 | :onblur => ('if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"' if logged_in?), |
11 | - | |
12 | + :value => _('Leave your comment') | |
12 | 13 | } %> |
13 | - <%= hidden_field :scrap, :scrap_id, :id => "scrap_id_#{scrap.id}" %> | |
14 | + <%= hidden_field_tag 'scrap[scrap_id]', scrap.id %> | |
14 | 15 | <%= hidden_field_tag 'receiver_id', scrap.sender.id %> |
15 | 16 | <% end %> |
16 | 17 | </p> | ... | ... |
app/views/profile/_profile_wall.rhtml
... | ... | @@ -3,16 +3,10 @@ |
3 | 3 | <%= flash[:error] %> |
4 | 4 | <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :tab_action => 'wall' }, :update => 'profile_activities', :success => "$('leave_scrap_content').value=''" do %> |
5 | 5 | <%= limited_text_area :scrap, :content, 420, 'leave_scrap_content', :cols => 50, :rows => 2 %> |
6 | - <%= submit_button :scrap, _('Share') %> | |
6 | + <%= submit_button :new, _('Share') %> | |
7 | 7 | <% end %> |
8 | 8 | </div> |
9 | 9 | <div id='leave_scrap_response'></div> |
10 | -<ul id='profile_activities'> | |
10 | +<ul id='profile_activities' class='profile-activities'> | |
11 | 11 | <%= render :partial => 'profile_activities_list', :locals => {:activities => @activities} %> |
12 | 12 | </ul> |
13 | - | |
14 | -<% if @activities.current_page < @activities.total_pages %> | |
15 | - <div id='profile_activities_page_<%= @activities.current_page %>'> | |
16 | - <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_activities', :page => (@activities.current_page + 1)}, :update => "profile_activities_page_#{@activities.current_page}" %> | |
17 | - </div> | |
18 | -<% end %> | ... | ... |
app/views/profile/_update_article.rhtml
app/views/profile/_upload_image.rhtml
1 | 1 | <div class="activity-gallery-images-count-<%= activity.get_view_url.size %>"> |
2 | - <%= render :partial => 'default_activity', :locals => {:activity => activity} %> | |
2 | + <div class='profile-activity-image'> | |
3 | + <%= link_to(profile_image(activity.user, :minor), activity.user.url) %> | |
4 | + </div> | |
5 | + <div class='profile-activity-description'> | |
6 | + <p class='profile-activity-text'><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></p> | |
7 | + <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) %></p> | |
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 %> | |
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 | + </div> | |
12 | + </div> | |
3 | 13 | </div> |
4 | 14 | <div title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-newgallery'></div> |
15 | + | |
16 | +<% if activity.get_view_url.size == 1 %> | |
17 | + <hr /> | |
18 | + <ul class="profile-wall-activities-comments comments-count-<%= activity.comments_count %>" > | |
19 | + <%= render :partial => 'comment', :collection => activity.comments %> | |
20 | + </ul> | |
21 | + | |
22 | + <%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> | |
23 | +<% end %> | |
24 | + | |
25 | +<br/> | ... | ... |
config/initializers/action_tracker.rb
... | ... | @@ -23,7 +23,7 @@ ActionTrackerConfig.verbs = { |
23 | 23 | }, |
24 | 24 | |
25 | 25 | :upload_image => { |
26 | - :description => lambda { n_('uploaded 1 image<br />%{thumbnails}<br style="clear: both;" />', 'uploaded %{num} images<br />%{thumbnails}<br style="clear: both;" />', get_view_url.size) % { :num => get_view_url.size, :thumbnails => '{{ta.collect_group_with_index(:thumbnail_path){ |t,i| content_tag(:span, image_tag(t) + link_to(nil, ta.get_view_url[i]))}.last(3).join}}' } }, | |
26 | + :description => lambda { n_('uploaded 1 image<br />%{thumbnails}<br style="clear: both;" />', 'uploaded %{num} images<br />%{thumbnails}<br style="clear: both;" />', get_view_url.size) % { :num => get_view_url.size, :thumbnails => '{{ta.collect_group_with_index(:thumbnail_path){ |t,i| content_tag(:span, link_to(image_tag(t), ta.get_view_url[i]))}.last(3).join}}' } }, | |
27 | 27 | :type => :groupable |
28 | 28 | }, |
29 | 29 | ... | ... |
lib/notify_activity_to_profiles_job.rb
1 | 1 | class NotifyActivityToProfilesJob < Struct.new(:tracked_action_id) |
2 | 2 | NOTIFY_ONLY_COMMUNITY = [ |
3 | - 'add_member_in_community', | |
3 | + 'add_member_in_community' | |
4 | 4 | ] |
5 | 5 | |
6 | 6 | NOT_NOTIFY_COMMUNITY = [ |
7 | - 'join_community', | |
7 | + 'join_community' | |
8 | 8 | ] |
9 | 9 | def perform |
10 | 10 | return unless ActionTracker::Record.exists?(tracked_action_id) |
... | ... | @@ -17,6 +17,7 @@ class NotifyActivityToProfilesJob < Struct.new(:tracked_action_id) |
17 | 17 | |
18 | 18 | ActionTrackerNotification.create(:profile_id => tracked_action.user.id, :action_tracker_id => tracked_action.id) |
19 | 19 | |
20 | + #Notify all friends | |
20 | 21 | ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) select f.friend_id, #{tracked_action.id} from friendships as f where person_id=#{tracked_action.user.id} and f.friend_id not in (select atn.profile_id from action_tracker_notifications as atn where atn.action_tracker_id = #{tracked_action.id})") |
21 | 22 | |
22 | 23 | if target.is_a?(Community) | ... | ... |
public/stylesheets/application.css
... | ... | @@ -5907,7 +5907,7 @@ h1#agenda-title { |
5907 | 5907 | |
5908 | 5908 | .profile-activity-lead { |
5909 | 5909 | width: 370px; |
5910 | - float: right; | |
5910 | + display: inline-block; | |
5911 | 5911 | text-align: left; |
5912 | 5912 | margin: 5px 0; |
5913 | 5913 | } |
... | ... | @@ -5958,22 +5958,29 @@ h1#agenda-title { |
5958 | 5958 | } |
5959 | 5959 | |
5960 | 5960 | #profile-wall li.profile-activity-item.upload_image span, |
5961 | -#Xprofile-wall li.profile-activity-item.upload_image span img, | |
5962 | 5961 | #profile-wall li.profile-activity-item.upload_image span a, |
5963 | 5962 | #profile-network li.profile-activity-item.upload_image span, |
5964 | -#Xprofile-network li.profile-activity-item.upload_image span img, | |
5965 | 5963 | #profile-network li.profile-activity-item.upload_image span a { |
5966 | - width: 120px; | |
5964 | + width: 110px; | |
5967 | 5965 | height: 100px; |
5968 | 5966 | display: block; |
5969 | 5967 | overflow: hidden; |
5970 | 5968 | position: absolute; |
5971 | 5969 | } |
5972 | 5970 | |
5971 | +#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-2 span a img, | |
5972 | +#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-3 span a img, | |
5973 | +#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-2 span a img, | |
5974 | +#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-3 span a img { | |
5975 | + width: 110px; | |
5976 | + height: 100px; | |
5977 | +} | |
5978 | + | |
5973 | 5979 | #profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span, |
5974 | 5980 | #profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a, |
5981 | +#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img, | |
5975 | 5982 | #profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span, |
5976 | -#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a { | |
5983 | +#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img { | |
5977 | 5984 | width: 383px; |
5978 | 5985 | height: auto; |
5979 | 5986 | } |
... | ... | @@ -5986,19 +5993,27 @@ h1#agenda-title { |
5986 | 5993 | #profile-wall li.profile-activity-item.upload_image span, |
5987 | 5994 | #profile-network li.profile-activity-item.upload_image span { |
5988 | 5995 | position: relative; |
5989 | - float: left; | |
5996 | + display: inline-block; | |
5990 | 5997 | margin: 5px 0px 0px 5px; |
5991 | 5998 | } |
5992 | 5999 | |
6000 | +#profile-wall li.profile-activity-item.upload_image .profile-activity-text span, | |
6001 | +#profile-network li.profile-activity-item.upload_image .profile-activity-text span { | |
6002 | + border: 4px solid #D2D2D2; | |
6003 | + border-radius: 4px; | |
6004 | + -webkit-border-radius: 4px; | |
6005 | + -moz-border-radius: 4px; | |
6006 | +} | |
6007 | + | |
5993 | 6008 | #profile-wall li.profile-activity-item.upload_image span a, |
5994 | 6009 | #profile-network li.profile-activity-item.upload_image span a { |
5995 | - background: transparent url(/images/gallery-image-activity-border.png) center center no-repeat; | |
6010 | + Xbackground: transparent url(/images/gallery-image-activity-border.png) center center no-repeat; | |
5996 | 6011 | text-indent: -5000em; |
5997 | 6012 | } |
5998 | 6013 | |
5999 | 6014 | #profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a, |
6000 | 6015 | #profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a { |
6001 | - background-image: url(/images/gallery-image-activity-border-big.png); | |
6016 | + Xbackground-image: url(/images/gallery-image-activity-border-big.png); | |
6002 | 6017 | position: relative; |
6003 | 6018 | } |
6004 | 6019 | |
... | ... | @@ -6044,8 +6059,8 @@ h1#agenda-title { |
6044 | 6059 | height: 16px; |
6045 | 6060 | display: inline-block; |
6046 | 6061 | position: absolute; |
6047 | - top: -4px; | |
6048 | - right: -16px; | |
6062 | + top: 0px; | |
6063 | + right: 0px; | |
6049 | 6064 | } |
6050 | 6065 | |
6051 | 6066 | #profile-activity .profile-wall-scrap-replies li, |
... | ... | @@ -6108,7 +6123,7 @@ h1#agenda-title { |
6108 | 6123 | padding-top: 0; |
6109 | 6124 | } |
6110 | 6125 | |
6111 | -#profile_activities .profile-activity-time, | |
6126 | +.profile-activities .profile-activity-time, | |
6112 | 6127 | #profile-network .profile-activity-time, |
6113 | 6128 | #profile-wall .profile-wall-time { |
6114 | 6129 | font-size: 11px; |
... | ... | @@ -6118,7 +6133,7 @@ h1#agenda-title { |
6118 | 6133 | } |
6119 | 6134 | |
6120 | 6135 | #profile-wall .profile-wall-send-reply, |
6121 | -#profile_activities .profile-activity-time, | |
6136 | +.profile-activities .profile-activity-time, | |
6122 | 6137 | #profile-network .profile-activity-time, |
6123 | 6138 | #profile-wall .profile-wall-time, |
6124 | 6139 | .profile-wall-actions a { |
... | ... | @@ -6139,7 +6154,8 @@ h1#agenda-title { |
6139 | 6154 | font-weight: normal; |
6140 | 6155 | } |
6141 | 6156 | |
6142 | -.profile-wall-actions a:hover, | |
6157 | +#profile-wall li .profile-wall-actions a:hover, | |
6158 | +#profile-network li .profile-wall-actions a:hover, | |
6143 | 6159 | #profile-wall .profile-wall-send-reply a:hover { |
6144 | 6160 | text-decoration: underline; |
6145 | 6161 | } |
... | ... | @@ -6330,6 +6346,8 @@ h1#agenda-title { |
6330 | 6346 | #profile-wall ul.profile-wall-activities-comments, |
6331 | 6347 | #profile-network ul.profile-wall-activities-comments { |
6332 | 6348 | margin-top: 35px; |
6349 | + padding-left: 50px; | |
6350 | + width: auto; | |
6333 | 6351 | } |
6334 | 6352 | |
6335 | 6353 | #profile-wall .profile-wall-activities-comments li, |
... | ... | @@ -6582,7 +6600,7 @@ h1#agenda-title { |
6582 | 6600 | width: 98%; |
6583 | 6601 | } |
6584 | 6602 | |
6585 | -#profile_activities .profile-activity-image, | |
6603 | +.profile-activities .profile-activity-image, | |
6586 | 6604 | #profile-network .profile-activity-image, |
6587 | 6605 | #profile-wall .profile-wall-image { |
6588 | 6606 | width: 50px; | ... | ... |
test/unit/article_test.rb
... | ... | @@ -1036,6 +1036,12 @@ class ArticleTest < ActiveSupport::TestCase |
1036 | 1036 | assert_equal false, a.is_trackable? |
1037 | 1037 | end |
1038 | 1038 | |
1039 | + should "not be trackable if article is inside a private community" do | |
1040 | + private_community = fast_create(Community, :public_profile => false) | |
1041 | + a = fast_create(TinyMceArticle, :profile_id => private_community.id) | |
1042 | + assert_equal false, a.is_trackable? | |
1043 | + end | |
1044 | + | |
1039 | 1045 | should 'create the notification to organization and all organization members' do |
1040 | 1046 | community = fast_create(Community) |
1041 | 1047 | member_1 = Person.first | ... | ... |
vendor/plugins/access_control/lib/role_assignment.rb
... | ... | @@ -7,7 +7,7 @@ class RoleAssignment < ActiveRecord::Base |
7 | 7 | |
8 | 8 | track_actions :join_community, :after_create, :keep_params => ["resource.name", "resource.url", "resource.profile_custom_icon"], :if => Proc.new { |x| x.resource.is_a?(Community) && x.accessor.role_assignments.count(:conditions => { :resource_id => x.resource.id, :resource_type => 'Profile' }) == 1 }, :custom_user => :accessor, :custom_target => :resource |
9 | 9 | |
10 | - track_actions :add_member_in_community, :after_create, :if => Proc.new { |x| x.resource.is_a?(Community) && x.accessor.role_assignments.count(:conditions => { :resource_id => x.resource.id, :resource_type => 'Profile' }) == 1 }, :custom_user => :accessor, :custom_target => :resource | |
10 | +# track_actions :add_member_in_community, :after_create, :if => Proc.new { |x| x.resource.is_a?(Community) && x.accessor.role_assignments.count(:conditions => { :resource_id => x.resource.id, :resource_type => 'Profile' }) == 1 }, :custom_user => :accessor, :custom_target => :resource | |
11 | 11 | |
12 | 12 | def has_permission?(perm, res) |
13 | 13 | return false unless role.has_permission?(perm.to_s) && (resource || is_global) | ... | ... |