social_stream-base 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,7 @@
24
24
  .content_size {font-size: 13px;}
25
25
  .space_center_border { padding-top: 8px; padding-right: 4px; border-bottom: thin solid #D4E4EA;}
26
26
  .title_bold{font-size:14px; font-weight:bold;}
27
+
27
28
  /********GROUPS HOME************/
28
29
  .browse_letter{ text-align:center;}
29
30
  .btn_group{ vertical-align:top;}
@@ -36,7 +37,12 @@
36
37
  #my_groups { width: 100%;}
37
38
 
38
39
 
40
+ /********SUBJECTS HOME************/
39
41
 
42
+ .btn_subject{ vertical-align:top;}
43
+ .user .logo, .group .logo{ display:block; text-align:center;}
44
+ .user .title a, .group .title a{ display:block; font-size:9px; text-decoration:none; text-align:center;}
45
+ .user .title a:hover, .group .title a:hover{ display:block; text-decoration:underline;}
40
46
 
41
47
 
42
48
 
@@ -254,6 +254,7 @@ class Activity < ActiveRecord::Base
254
254
  subject.present? &&
255
255
  direct_object.present? &&
256
256
  ! direct_object.is_a?(Actor) &&
257
+ ! direct_object.class.ancestors.include?(SocialStream::Models::Subject) &&
257
258
  allow?(subject, 'destroy')
258
259
  end
259
260
 
@@ -1,10 +1,4 @@
1
1
  <li>
2
- <%= div_for group do %>
3
- <div class="group_content">
4
- <%=link_to(image_tag(group.logo.url(:actor), :class => 'btn_group', :alt => group.name, :title => group.name), group) %>
5
- </div>
6
- <div class="group_title">
7
- <%=link_to(truncate_name(group.name), group)%>
8
- </div>
9
- <% end %>
2
+ <%= render :partial => 'subjects/subject',
3
+ :object => group %>
10
4
  </li>
@@ -0,0 +1,8 @@
1
+ <%= div_for subject do %>
2
+ <div class="logo">
3
+ <%=link_to(image_tag(subject.logo.url(:actor), :class => 'btn_subject', :alt => subject.name, :title => subject.name), subject) %>
4
+ </div>
5
+ <div class="title">
6
+ <%=link_to(truncate_name(subject.name), subject)%>
7
+ </div>
8
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <%= render :partial => 'subjects/subject',
2
+ :object => user %>
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.7.3".freeze
3
+ VERSION = "0.7.4".freeze
4
4
  end
5
5
  end
@@ -16,6 +16,18 @@ describe UsersController do
16
16
  assert_response :success
17
17
  end
18
18
 
19
+ context "with fans" do
20
+ before do
21
+ @user = Factory(:fan_activity).receiver_subject
22
+ end
23
+
24
+ it "should render show" do
25
+ get :show, :id => @user.to_param
26
+
27
+ response.should be_success
28
+ end
29
+ end
30
+
19
31
  it "should render show with public activity" do
20
32
  activity = Factory(:public_activity)
21
33
 
@@ -81,7 +93,6 @@ describe UsersController do
81
93
  assert true
82
94
  end
83
95
  end
84
-
85
96
  end
86
97
  end
87
98
 
@@ -19,3 +19,8 @@ Factory.define :like_activity, :parent => :activity do |a|
19
19
  a.activity_verb { ActivityVerb["like"] }
20
20
  a.relation_ids { |b| Array(b.parent.contact.ties.first.relation.id) }
21
21
  end
22
+
23
+
24
+ Factory.define :fan_activity, :parent => :public_activity do |a|
25
+ a.activity_objects { |b| Array(b.receiver.activity_object) }
26
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-base
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 3
10
- version: 0.7.3
9
+ - 4
10
+ version: 0.7.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - GING - DIT - UPM
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-21 00:00:00 +02:00
19
+ date: 2011-07-22 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -839,12 +839,14 @@ files:
839
839
  - app/views/settings/index.html.erb
840
840
  - app/views/settings/index.js.erb
841
841
  - app/views/subjects/_contacts.html.erb
842
+ - app/views/subjects/_subject.html.erb
842
843
  - app/views/toolbar/_home.html.erb
843
844
  - app/views/toolbar/_logo.html.erb
844
845
  - app/views/toolbar/_profile.html.erb
845
846
  - app/views/users/_groups.html.erb
846
847
  - app/views/users/_index.html.erb
847
848
  - app/views/users/_sidebar_index.html.erb
849
+ - app/views/users/_user.html.erb
848
850
  - app/views/users/index.html.erb
849
851
  - app/views/users/index.js.erb
850
852
  - app/views/users/info.html.erb