social_stream 0.16.1 → 0.16.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/base/app/assets/stylesheets/header.css.scss +3 -1
  2. data/base/app/helpers/sidebar_helper.rb +10 -0
  3. data/base/app/views/avatars/index.html.erb +2 -3
  4. data/base/app/views/contacts/_suggestions.html.erb +1 -1
  5. data/base/app/views/contacts/index.html.erb +1 -3
  6. data/base/app/views/conversations/index.html.erb +1 -3
  7. data/base/app/views/conversations/show.html.erb +1 -3
  8. data/base/app/views/devise/registrations/edit.html.erb +3 -5
  9. data/base/app/views/groups/_show.html.erb +2 -3
  10. data/base/app/views/groups/{_sidebar_index.html.erb → _tag_cloud.html.erb} +0 -2
  11. data/base/app/views/groups/index.html.erb +2 -3
  12. data/base/app/views/groups/new.html.erb +1 -3
  13. data/base/app/views/home/index.html.erb +1 -3
  14. data/base/app/views/invitations/new.html.erb +1 -3
  15. data/base/app/views/layouts/_header_dropdown_menu_sessions.html.erb +1 -1
  16. data/base/app/views/messages/new.html.erb +2 -3
  17. data/base/app/views/notifications/index.html.erb +1 -3
  18. data/base/app/views/profiles/edit.html.erb +1 -3
  19. data/base/app/views/profiles/show.html.erb +2 -4
  20. data/base/app/views/search/index.html.erb +1 -3
  21. data/base/app/views/settings/index.html.erb +1 -3
  22. data/base/app/views/users/_show.html.erb +1 -3
  23. data/base/app/views/users/index.html.erb +1 -3
  24. data/base/lib/social_stream/base/dependencies.rb +47 -0
  25. data/base/lib/social_stream/base/engine.rb +6 -0
  26. data/base/lib/social_stream/base/version.rb +1 -1
  27. data/base/lib/social_stream/controllers/helpers.rb +11 -0
  28. data/base/lib/social_stream/views/list.rb +17 -0
  29. data/base/lib/social_stream/views/settings/base.rb +1 -1
  30. data/base/lib/social_stream/views/sidebar/base.rb +27 -0
  31. data/base/lib/social_stream-base.rb +9 -47
  32. data/base/lib/tasks/db/populate.rake +12 -10
  33. data/base/social_stream-base.gemspec +4 -2
  34. data/documents/app/views/common_documents/_headers.html.erb +2 -4
  35. data/documents/app/views/common_documents/_show.html.erb +1 -3
  36. data/documents/lib/social_stream/documents/version.rb +1 -1
  37. data/documents/social_stream-documents.gemspec +1 -1
  38. data/events/app/assets/stylesheets/events.css.scss +30 -1
  39. data/events/app/helpers/events_helper.rb +16 -0
  40. data/events/app/views/events/_calendar_month.erb +1 -0
  41. data/events/app/views/events/_sidebar_calendar.html.erb +17 -9
  42. data/events/lib/social_stream/events/engine.rb +6 -0
  43. data/events/lib/social_stream/events/version.rb +1 -1
  44. data/events/lib/social_stream/views/sidebar/events.rb +15 -0
  45. data/events/lib/social_stream-events.rb +4 -0
  46. data/events/social_stream-events.gemspec +2 -1
  47. data/lib/social_stream/version.rb +1 -1
  48. data/linkser/lib/social_stream/linkser/version.rb +1 -1
  49. data/linkser/social_stream-linkser.gemspec +2 -2
  50. data/presence/lib/social_stream/presence/version.rb +1 -1
  51. data/presence/social_stream-presence.gemspec +1 -1
  52. data/social_stream.gemspec +4 -4
  53. metadata +36 -32
  54. data/base/app/views/groups/_sidebar_show.html.erb +0 -3
  55. data/base/app/views/home/_sidebar.html.erb +0 -2
  56. data/base/app/views/users/_sidebar_index.html.erb +0 -1
  57. data/base/lib/social_stream/views/settings/item_list.rb +0 -13
@@ -29,6 +29,7 @@
29
29
  background: transparent url('btn/header_notifications.png') no-repeat center center;}
30
30
  #header_inbox_count a{ color: white; background-color: $header-notification-color; padding: 2px 7px 2px 7px;}
31
31
  #representation { display: inline; padding-left:3px; padding-right:3px;}
32
+ .switch_pending_count { color: white; background-color: $header-notification-color; padding: 2px 7px 2px 7px !important; margin-left: 5px !important; float: right; }
32
33
  .txt_config {color: $text-over-main; vertical-align: top; display: inline; padding-top: 2px;
33
34
  border-right: thin solid; padding-right: 3px;}
34
35
  .txt_config2 {color: $text-over-main; vertical-align: top; display: inline; padding-top: 2px; padding-right: 3px;}
@@ -48,8 +49,9 @@
48
49
  #header_dropdown_menu ul li a{padding: .40em 1em .70em 2.5em;}
49
50
  #header_dropdown_menu ul li a:hover{color:$main-color;}
50
51
  #header_dropdown_menu ul li ul li a{padding: .40em 1em .70em 1em;}
52
+ #header_dropdown_menu ul li ul li ul li {width: 160px;}
51
53
  #header_dropdown_menu ul li ul li ul li a{padding: .40em 1em .70em 2.5em;}
52
- #header_dropdown_menu ul li ul li ul{position: absolute; left: -120px;}
54
+ #header_dropdown_menu ul li ul li ul{position: absolute; left: -160px;}
53
55
  #header_dropdown_menu a.session_change{background: transparent url('btn/arrow_session_change.png') no-repeat 3px 6px;}
54
56
 
55
57
  #menu_home ul li.pipe,#menu_account ul li.pipe{padding:0; margin:0;font-size: 20px;font-weight: bold;}
@@ -0,0 +1,10 @@
1
+ module SidebarHelper
2
+ include SocialStream::Views::Sidebar
3
+
4
+ def sidebar type = nil
5
+ content_for :sidebar,
6
+ sidebar_items(type).inject(ActiveSupport::SafeBuffer.new){ |result, item|
7
+ result + item[:html]
8
+ }
9
+ end
10
+ end
@@ -3,9 +3,8 @@
3
3
  <% content_for :title do%>
4
4
  <%= current_subject.name %>
5
5
  <% end%>
6
- <% content_for :sidebar do %>
7
- <%= render :partial => 'home/sidebar' %>
8
- <% end %>
6
+
7
+ <% sidebar %>
9
8
 
10
9
  <%= location(
11
10
  link_to(t('menu.information'), [current_subject,:profile]),
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <div class="content">
10
10
  <div class="suggestions">
11
- <%= render sgs %>
11
+ <%= render :partial => "contacts/contact", :collection => sgs %>
12
12
  </div>
13
13
  </div>
14
14
  </div>
@@ -2,9 +2,7 @@
2
2
  <%= t('contact.other')%>
3
3
  <%end%>
4
4
 
5
- <% content_for :sidebar do %>
6
- <%= render :partial => 'home/sidebar' %>
7
- <% end %>
5
+ <% sidebar %>
8
6
 
9
7
  <% toolbar :option => :contacts %>
10
8
 
@@ -2,9 +2,7 @@
2
2
  <%=t('message.other')%>
3
3
  <% end %>
4
4
 
5
- <% content_for :sidebar do %>
6
- <%= render :partial => 'home/sidebar' %>
7
- <% end %>
5
+ <% sidebar %>
8
6
 
9
7
  <% content_for :javascript do %>
10
8
  $('.pagination a').attr('data-remote', 'true');
@@ -2,9 +2,7 @@
2
2
  <%=t('message.other')%>
3
3
  <% end %>
4
4
 
5
- <% content_for :sidebar do %>
6
- <%= render :partial => 'home/sidebar' %>
7
- <% end %>
5
+ <% sidebar %>
8
6
 
9
7
  <% toolbar :option => :messages %>
10
8
 
@@ -1,7 +1,7 @@
1
1
  <% toolbar :profile => current_subject %>
2
- <% content_for :sidebar do %>
3
- <%= render :partial => 'home/sidebar' %>
4
- <% end %>
2
+
3
+ <% sidebar %>
4
+
5
5
  <%= location(t('account.one'),
6
6
  link_to(t('settings.main'), settings_path)
7
7
  ) %>
@@ -17,6 +17,4 @@
17
17
  <% if current_subject.respond_to? :authentication_token%>
18
18
  <%= render :partial => "settings/api_key" %>
19
19
  <% end %>
20
- <%= render :partial => "settings/contacts" %>
21
20
  <%= render :partial => "delete_account"%>
22
-
@@ -13,9 +13,8 @@
13
13
  <% content_for :keywords do %>
14
14
  <%= @group.profile.subject.tag_list%>
15
15
  <% end %>
16
- <% content_for :sidebar do %>
17
- <%= render :partial => 'sidebar_show' %>
18
- <% end %>
16
+
17
+ <% sidebar %>
19
18
 
20
19
  <%= location(link_to(t('group.one')+": "+truncate_name(sanitize @group.name)))%>
21
20
 
@@ -10,8 +10,6 @@
10
10
  <div id="wordcloud" class="content"></div>
11
11
  </div>
12
12
 
13
- <%= render :partial => 'contacts/suggestions_and_pendings' %>
14
-
15
13
  <% tags = ActivityObject.tag_counts %>
16
14
 
17
15
  <script type="text/javascript">
@@ -4,9 +4,8 @@
4
4
 
5
5
  <% toolbar if user_signed_in? %>
6
6
 
7
- <% content_for :sidebar do %>
8
- <%= render :partial => "groups/sidebar_index" %>
9
- <% end %>
7
+ <% sidebar :group_index %>
8
+
10
9
  <%= location(t('browse') +": "+
11
10
  link_to(t('user.by'), users_path) + ", "+
12
11
  content_tag(:b,content_tag(:span, t('group.all'), :id=>'name_group')))%>
@@ -4,8 +4,6 @@
4
4
 
5
5
  <% toolbar :option => 'groups' %>
6
6
 
7
- <% content_for :sidebar do %>
8
- <%= render :partial => "sidebar_index" %>
9
- <% end %>
7
+ <% sidebar :group_index %>
10
8
 
11
9
  <%= render :partial => 'new' %>
@@ -1,6 +1,4 @@
1
- <% content_for :sidebar do %>
2
- <% render :partial => 'sidebar' %>
3
- <% end %>
1
+ <% sidebar %>
4
2
 
5
3
  <%= location(link_to(t('home')+": "+ truncate_name(sanitize current_subject.name)))%>
6
4
 
@@ -1,8 +1,6 @@
1
1
  <% toolbar %>
2
2
 
3
- <% content_for :sidebar do %>
4
- <%= render :partial => "home/sidebar" %>
5
- <% end %>
3
+ <% sidebar %>
6
4
 
7
5
  <%= location(
8
6
  link_to(t('invitation.other'), new_invitation_path)
@@ -5,7 +5,7 @@
5
5
  <ul>
6
6
  <% representations.each do |representation| %>
7
7
  <li>
8
- <%= link_to truncate_name(representation.name, :length => 15), { :s => representation.slug }, { :style => "background: transparent url('#{ image_path representation.logo.url(:representation)}') no-repeat left center;margin-left:2px;" } %>
8
+ <%= link_to truncate_name(representation.name, :length => 15) + (content_tag(:span, representation.pending_contacts_count.to_s, :class => "switch_pending_count") if representation.pending_contacts_count > 0), { :s => representation.slug }, { :style => "background: transparent url('#{ image_path representation.logo.url(:representation)}') no-repeat left center;margin-left:2px;" } %>
9
9
  </li>
10
10
  <% end %>
11
11
  </ul>
@@ -1,9 +1,8 @@
1
1
  <% content_for :title do %>
2
2
  <%=t('message.other')%>
3
3
  <% end %>
4
- <% content_for :sidebar do %>
5
- <%= render :partial => 'home/sidebar' %>
6
- <% end %>
4
+
5
+ <% sidebar %>
7
6
 
8
7
  <% toolbar :option => :messages %>
9
8
 
@@ -2,9 +2,7 @@
2
2
  <%= current_subject.name %>
3
3
  <% end %>
4
4
 
5
- <% content_for :sidebar do %>
6
- <%= render :partial => 'home/sidebar' %>
7
- <% end %>
5
+ <% sidebar %>
8
6
 
9
7
  <%= location(
10
8
  link_to(t('notification.other'), notifications_path,:remote => true) +' ('+@mailbox.notifications.not_trashed.unread.count.to_s+')'
@@ -1,8 +1,6 @@
1
1
  <% toolbar :profile => current_subject %>
2
2
 
3
- <% content_for :sidebar do %>
4
- <%= render :partial => "#{ current_subject.class.to_s.tableize }/sidebar_index" %>
5
- <% end %>
3
+ <% sidebar %>
6
4
 
7
5
  <%if params[:section].present?
8
6
  case params[:section]
@@ -11,9 +11,7 @@
11
11
  <%= @profile.subject.tag_list%>
12
12
  <% end %>
13
13
 
14
- <% content_for :sidebar do %>
15
- <%= render :partial => 'users/sidebar_index' %>
16
- <% end %>
14
+ <% sidebar %>
17
15
 
18
16
  <% toolbar :profile => @profile.subject %>
19
17
 
@@ -21,4 +19,4 @@
21
19
  <%= location(link_to(t('menu.information'), [@profile.subject, :profile])) %>
22
20
 
23
21
 
24
- <%= render :partial => "profile" %>
22
+ <%= render :partial => "profile" %>
@@ -2,9 +2,7 @@
2
2
  <%= t('search.name')%> <%= params[:search_query].present? ? ": #{params[:search_query]}" : ""%>
3
3
  <% end %>
4
4
 
5
- <% content_for :sidebar do %>
6
- <%= render :partial => 'home/sidebar' %>
7
- <% end %>
5
+ <% sidebar %>
8
6
 
9
7
  <% toolbar if user_signed_in? %>
10
8
 
@@ -2,9 +2,7 @@
2
2
  <%=t('settings.one')%>
3
3
  <% end %>
4
4
 
5
- <% content_for :sidebar do %>
6
- <%= render :partial => 'home/sidebar' %>
7
- <% end %>
5
+ <% sidebar %>
8
6
 
9
7
  <% toolbar :profile => current_subject %>
10
8
 
@@ -15,9 +15,7 @@
15
15
  <%= @user.profile.subject.tag_list%>
16
16
  <% end %>
17
17
 
18
- <% content_for :sidebar do %>
19
- <%= render :partial => 'sidebar_index' %>
20
- <% end %>
18
+ <% sidebar %>
21
19
 
22
20
  <%= location(link_to(t('profile.one')+": "+truncate_name(sanitize @user.name)))%>
23
21
 
@@ -4,9 +4,7 @@
4
4
 
5
5
  <% toolbar if user_signed_in? %>
6
6
 
7
- <% content_for :sidebar do %>
8
- <%= render :partial => "users/sidebar_index" %>
9
- <% end %>
7
+ <% sidebar %>
10
8
 
11
9
  <%= location(t('browse') +": "+
12
10
  content_tag(:b ,content_tag(:span, t('user.other'), :id=>'name_group')) + ", "+
@@ -0,0 +1,47 @@
1
+ # Database foreign keys
2
+ require 'foreigner'
3
+ # jQuery
4
+ require 'jquery-rails'
5
+ # Permalinks:
6
+ require 'stringex'
7
+ # Hierarchical relationships in Activity and Relation:
8
+ require 'ancestry'
9
+ # Messages
10
+ require 'mailboxer'
11
+ # User authentication
12
+ require 'devise'
13
+ # Authorization
14
+ require 'cancan'
15
+ # REST controllers
16
+ require 'inherited_resources'
17
+ # Scopes in controllers
18
+ require 'has_scope'
19
+ # Logo attachments
20
+ require 'paperclip'
21
+ require 'paperclip/social_stream'
22
+ require 'avatars_for_rails'
23
+ # Pagination
24
+ require 'kaminari'
25
+ # Oauth
26
+ require 'omniauth/oauth'
27
+ #Tags
28
+ require 'acts-as-taggable-on'
29
+ require 'acts_as_taggable_on/social_stream'
30
+ # HTML forms
31
+ require 'formtastic'
32
+ #Background tasks
33
+ require 'resque/server'
34
+ #Simple Navigation for menu
35
+ require 'simple-navigation'
36
+ # Modernizr.js library
37
+ require 'modernizr-rails'
38
+ # Sphinx search engine
39
+ require 'thinking-sphinx'
40
+ # Syntactically Awesome Stylesheets
41
+ require 'sass-rails'
42
+ # Autolink text blocks
43
+ require 'rails_autolink'
44
+ # SocialCheesecake
45
+ require 'social_cheesecake'
46
+
47
+
@@ -37,6 +37,12 @@ module SocialStream
37
37
  end
38
38
  end
39
39
 
40
+ initializer "social_stream-base.views.sidebar" do
41
+ SocialStream::Views::Sidebar.module_eval do
42
+ include SocialStream::Views::Sidebar::Base
43
+ end
44
+ end
45
+
40
46
  initializer "social_stream-base.avatars_for_rails" do
41
47
  AvatarsForRails.setup do |config|
42
48
  config.avatarable_model = :actor
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.11.0".freeze
3
+ VERSION = "0.11.1".freeze
4
4
  end
5
5
  end
@@ -7,6 +7,7 @@ module SocialStream
7
7
  included do
8
8
  helper_method :current_subject,
9
9
  :profile_subject,
10
+ :profile_or_current_subject,
10
11
  :profile_subject_is_current?
11
12
  end
12
13
 
@@ -80,6 +81,16 @@ module SocialStream
80
81
  @profile_subject ||= association_chain[-1] || warden.authenticate!
81
82
  end
82
83
 
84
+ # Profile subject is suitable for paths like:
85
+ # /users/demo/posts
86
+ #
87
+ # This method tries {#profile_subject} first and then {#current_subject}
88
+ def profile_or_current_subject
89
+ profile_subject || current_subject
90
+ rescue
91
+ current_subject
92
+ end
93
+
83
94
  # A {User} must be logged in and is equal to {#profile_subject}
84
95
  def profile_subject_is_current?
85
96
  user_signed_in? && profile_subject == current_subject
@@ -0,0 +1,17 @@
1
+ module SocialStream
2
+ module Views
3
+ class List < Array
4
+ def insert_before key, obj
5
+ position = index{ |i| i[:key] == key }
6
+
7
+ insert position, obj
8
+ end
9
+
10
+ def insert_after key, obj
11
+ position = index{ |i| i[:key] == key } + 1
12
+
13
+ insert position, obj
14
+ end
15
+ end
16
+ end
17
+ end
@@ -3,7 +3,7 @@ module SocialStream
3
3
  module Settings
4
4
  module Base
5
5
  def settings_items
6
- SocialStream::Views::Settings::ItemList.new.tap do |items|
6
+ SocialStream::Views::List.new.tap do |items|
7
7
  if current_subject == current_user
8
8
  items << {
9
9
  :key => 'user.edit',
@@ -0,0 +1,27 @@
1
+ module SocialStream
2
+ module Views
3
+ module Sidebar
4
+ module Base
5
+ def sidebar_items type
6
+ SocialStream::Views::List.new.tap do |items|
7
+ if type == :group_index
8
+ items << {
9
+ :key => 'group.cloud',
10
+ :html => render(:partial => 'groups/tag_cloud')
11
+ }
12
+
13
+ end
14
+
15
+ if user_signed_in?
16
+ items << {
17
+ :key => 'suggestions_and_pendings',
18
+ :html => render(:partial => 'contacts/suggestions_and_pendings')
19
+ }
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+
@@ -1,48 +1,5 @@
1
- # Database foreign keys
2
- require 'foreigner'
3
- # jQuery
4
- require 'jquery-rails'
5
- # Permalinks:
6
- require 'stringex'
7
- # Hierarchical relationships in Activity and Relation:
8
- require 'ancestry'
9
- # Messages
10
- require 'mailboxer'
11
- # User authentication
12
- require 'devise'
13
- # Authorization
14
- require 'cancan'
15
- # REST controllers
16
- require 'inherited_resources'
17
- # Scopes in controllers
18
- require 'has_scope'
19
- # Logo attachments
20
- require 'paperclip'
21
- require 'paperclip/social_stream'
22
- require 'avatars_for_rails'
23
- # Pagination
24
- require 'kaminari'
25
- # Oauth
26
- require 'omniauth/oauth'
27
- #Tags
28
- require 'acts-as-taggable-on'
29
- require 'acts_as_taggable_on/social_stream'
30
- # HTML forms
31
- require 'formtastic'
32
- #Background tasks
33
- require 'resque/server'
34
- #Simple Navigation for menu
35
- require 'simple-navigation'
36
- # Modernizr.js library
37
- require 'modernizr-rails'
38
- # Sphinx search engine
39
- require 'thinking-sphinx'
40
- # Syntactically Awesome Stylesheets
41
- require 'sass-rails'
42
- # Autolink text blocks
43
- require 'rails_autolink'
44
- # SocialCheesecake
45
- require 'social_cheesecake'
1
+ # Gem's dependencies
2
+ require 'social_stream/base/dependencies'
46
3
 
47
4
  # Provides your Rails application with social network and activity stream support
48
5
  module SocialStream
@@ -65,9 +22,14 @@ module SocialStream
65
22
  end
66
23
 
67
24
  module Views
25
+ autoload :List, 'social_stream/views/list'
26
+
68
27
  module Settings
69
- autoload :Base, 'social_stream/views/settings/base'
70
- autoload :ItemList, 'social_stream/views/settings/item_list'
28
+ autoload :Base, 'social_stream/views/settings/base'
29
+ end
30
+
31
+ module Sidebar
32
+ autoload :Base, 'social_stream/views/sidebar/base'
71
33
  end
72
34
  end
73
35
 
@@ -13,15 +13,15 @@ namespace :db do
13
13
  LOGOS_PATH = File.join(Rails.root, 'lib', 'logos')
14
14
  USERS = (ENV["USERS"] || 9).to_i
15
15
  GROUPS = (ENV["GROUPS"] || 10).to_i
16
- CHEESECAKE_TESTING = (ENV["CHEESECAKE_TESTING"].present? || false)
17
- if CHEESECAKE_TESTING
16
+ CHEESECAKE = (ENV["CHEESECAKE"].present? || false)
17
+ if CHEESECAKE
18
18
  puts "Cheesecake Testing mode: ON"
19
19
  end
20
20
  if ENV["HARDCORE"].present?
21
21
  USERS = 999
22
22
  GROUPS = 1000
23
23
  puts "Hardcore mode: ON (May the Force be with you brave Padawan)"
24
- if CHEESECAKE_TESTING
24
+ if CHEESECAKE
25
25
  puts "WARNING: Hardcore and Cheesecake Modes activated. This situation is really slow. Please, avoid it."
26
26
  end
27
27
  end
@@ -121,13 +121,15 @@ namespace :db do
121
121
  relations = a.relation_customs + Array.wrap(a.relation_reject)
122
122
  break if actors.size==0
123
123
  Forgery::Basic.number(:at_most => actors.size).times do
124
- actor = actors.delete_at((rand * actors.size).to_i)
125
- a.contact_to!(actor).relation_ids = Array(Forgery::Extensions::Array.new(relations).random.id)
124
+ actor = actors.delete_at((rand * actors.size).to_i)
125
+ a.contact_to!(actor).relation_ids = Array(Forgery::Extensions::Array.new(relations).random.id) unless a==actor
126
126
  end
127
- if CHEESECAKE_TESTING
127
+ if CHEESECAKE
128
128
  actor = Actor.first
129
- puts a.name + " connecting with " + actor.name
130
- a.contact_to!(actor).relation_ids = Array(Forgery::Extensions::Array.new(relations).random.id)
129
+ unless a==actor
130
+ puts a.name + " connecting with " + actor.name
131
+ a.contact_to!(actor).relation_ids = Array(Forgery::Extensions::Array.new(relations).random.id)
132
+ end
131
133
  end
132
134
  end
133
135
 
@@ -136,7 +138,7 @@ namespace :db do
136
138
 
137
139
  # = Posts
138
140
  puts 'Post population'
139
- unless CHEESECAKE_TESTING
141
+ unless CHEESECAKE
140
142
  posts_start = Time.now
141
143
 
142
144
  SocialStream::Populate.power_law(Tie.all) do |t|
@@ -167,7 +169,7 @@ namespace :db do
167
169
 
168
170
  # = Mailboxer
169
171
  puts 'Mailboxer population'
170
- unless CHEESECAKE_TESTING
172
+ unless CHEESECAKE
171
173
  mailboxer_start = Time.now
172
174
  available_actors = Actor.all
173
175
 
@@ -13,6 +13,8 @@ Gem::Specification.new do |s|
13
13
 
14
14
  # Runtime gem dependencies
15
15
  #
16
+ # Do not forget to require the file at lib/social_stream/base/dependencies !
17
+ #
16
18
  # Rails
17
19
  s.add_runtime_dependency('rails', '>= 3.1.0')
18
20
  # Activity and Relation hierarchies
@@ -26,7 +28,7 @@ Gem::Specification.new do |s|
26
28
  # Slug generation
27
29
  s.add_runtime_dependency('stringex', '~> 1.3.0')
28
30
  # Avatar attachments
29
- s.add_runtime_dependency('avatars_for_rails', '~> 0.2.0')
31
+ s.add_runtime_dependency('avatars_for_rails', '~> 0.2.2')
30
32
  # jQuery
31
33
  s.add_runtime_dependency('jquery-rails', '~> 1.0.9')
32
34
  # Authorization
@@ -54,7 +56,7 @@ Gem::Specification.new do |s|
54
56
  # Autolink text blocks
55
57
  s.add_runtime_dependency('rails_autolink', '~> 1.0.4')
56
58
  # SocialCheesecake
57
- s.add_runtime_dependency('social_cheesecake','~> 0.0.4')
59
+ s.add_runtime_dependency('social_cheesecake','~> 0.1.0')
58
60
 
59
61
  # Development gem dependencies
60
62
  #
@@ -2,9 +2,7 @@
2
2
  <%= profile_subject.name + ": " + t('repository.title') %>
3
3
  <% end %>
4
4
 
5
- <% content_for :sidebar do %>
6
- <%= render :partial => 'home/sidebar' %>
7
- <% end %>
5
+ <% sidebar %>
8
6
 
9
7
  <%if profile_subject_is_current?%>
10
8
  <%= location(
@@ -71,4 +69,4 @@ $(document).ready(function() {
71
69
  return false;
72
70
  });
73
71
  })
74
- <% end %>
72
+ <% end %>
@@ -4,9 +4,7 @@
4
4
  <%= profile_subject.name + ": " + t('repository.title') %>
5
5
  <% end %>
6
6
 
7
- <% content_for :sidebar do %>
8
- <%= render :partial => 'home/sidebar' %>
9
- <% end %>
7
+ <% sidebar %>
10
8
 
11
9
  <%if profile_subject_is_current?%>
12
10
  <%= location(
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Documents
3
- VERSION = "0.6.0".freeze
3
+ VERSION = "0.6.1".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.11.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.11.1')
16
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
17
17
  # Waiting for version > 2.4.5, which fixes:
18
18
  # https://github.com/thoughtbot/paperclip/issues/293
@@ -5,6 +5,8 @@
5
5
  //= require fullcalendar
6
6
  //= require boxy
7
7
 
8
+ @import "colors";
9
+
8
10
  #calendar {
9
11
  margin-top: 20px;
10
12
  }
@@ -17,6 +19,8 @@
17
19
  width: 100%;
18
20
  text-align: center;
19
21
  padding-top: 5px;
22
+ border-top: thin solid $separation-color;
23
+ border-bottom: thin solid $separation-color;
20
24
  }
21
25
 
22
26
  #sidebar_calendar a {
@@ -25,7 +29,32 @@
25
29
 
26
30
  #sidebar_calendar td {
27
31
  height: 25px;
28
- border: 1px solid #CCCCCC;
32
+ }
33
+
34
+ #sidebar_calendar td.past {
35
+ opacity: 0.2;
36
+ }
37
+
38
+ #sidebar_calendar td.today {
39
+ border: 1px solid $sentence-color;
40
+ }
41
+
42
+ #sidebar_calendar td.next_month {
43
+ opacity: 0.8;
44
+ background-color: #F2F2F2;
45
+ }
46
+
47
+ .sidebar_calendar_month {
48
+ text-align: center;
49
+ padding: 5px;
50
+ }
51
+
52
+ .sidebar_calendar_month a {
53
+ color: $sentence-color;
54
+ }
55
+
56
+ .sidebar_calendar_month.not_current a {
57
+ color: $details-color;
29
58
  }
30
59
 
31
60
  #new_event div.form_row {
@@ -0,0 +1,16 @@
1
+ module EventsHelper
2
+ def event_class(day)
3
+ [].tap { |css|
4
+ css <<
5
+ if day < Date.today
6
+ "past"
7
+ elsif day == Date.today
8
+ "today"
9
+ elsif day.month != Date.today.month
10
+ "next_month"
11
+ end
12
+
13
+ #TODO: event ocurrence
14
+ }.join(" ")
15
+ end
16
+ end
@@ -0,0 +1 @@
1
+ <div id="sidebar_calendar_month_<%= position %>" class="sidebar_calendar_month<%= " not_current" if date.month != Date.today.month %>"><%= link_to l(date, :format => "%B %Y"), '#' %></div>
@@ -1,12 +1,13 @@
1
1
  <div class="space_center"></div>
2
2
 
3
3
  <div class="block">
4
- <div class="header">
5
- <div class="header_text"><%= t 'event.title' %></div>
6
- </div>
7
-
8
4
  <div class="content">
9
- <span id="sidebar_calendar_date"><%= l Date.today, :format => :long %></span>
5
+
6
+ <%= render :partial => 'events/calendar_month',
7
+ :locals => {
8
+ :position => :top,
9
+ :date => Date.today.beginning_of_week
10
+ } %>
10
11
 
11
12
  <table id="sidebar_calendar">
12
13
  <% bow = Time.now.beginning_of_week %>
@@ -14,13 +15,20 @@
14
15
  <% 28.times do |i| %>
15
16
  <% day = bow + i.days %>
16
17
 
17
- <%= raw cycle("<tr>", *6.times.map{""}, :name => "tr_start") %>
18
- <td<%= " class=\"fc-state-highlight\"".html_safe if day.today? %>>
19
- <%= link_to day.day, polymorphic_path([subject, Event.new], :at => day.to_i) %>
18
+ <%= raw cycle(*(Array.wrap("<tr>") + 6.times.map{""}) + Array.wrap(:name => "tr_start")) %>
19
+ <td class="<%= event_class(day.to_date) %>">
20
+ <%= link_to day.day, polymorphic_path([profile_or_current_subject, Event.new], :at => day.to_i) %>
20
21
  </td>
21
22
 
22
- <%= raw cycle(*6.times.map{""}, '</tr>', :name => "tr_end") %>
23
+ <%= raw cycle(*(6.times.map{""} + Array.wrap('</tr>') + Array.wrap(:name => "tr_end"))) %>
23
24
  <% end %>
24
25
  </table>
26
+
27
+ <%= render :partial => 'events/calendar_month',
28
+ :locals => {
29
+ :position => :bottom,
30
+ :date => Date.today.beginning_of_week + 28
31
+ } %>
32
+
25
33
  </div>
26
34
  </div>
@@ -18,6 +18,12 @@ module SocialStream
18
18
  include SocialStream::Views::Settings::Events
19
19
  end
20
20
  end
21
+
22
+ initializer "social_stream-events.views.sidebar" do
23
+ SocialStream::Views::Sidebar.module_eval do
24
+ include SocialStream::Views::Sidebar::Events
25
+ end
26
+ end
21
27
  end
22
28
  end
23
29
  end
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Events
3
- VERSION = "0.3.0".freeze
3
+ VERSION = "0.3.1".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,15 @@
1
+ module SocialStream
2
+ module Views
3
+ module Sidebar
4
+ module Events
5
+ def sidebar_items type
6
+ super.tap do |items|
7
+ items.unshift :key => 'calendar',
8
+ :html => render(:partial => 'events/sidebar_calendar')
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+
@@ -7,6 +7,10 @@ module SocialStream
7
7
  module Settings
8
8
  autoload :Events, 'social_stream/views/settings/events'
9
9
  end
10
+
11
+ module Sidebar
12
+ autoload :Events, 'social_stream/views/sidebar/events'
13
+ end
10
14
  end
11
15
 
12
16
  module Events
@@ -12,8 +12,9 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.11.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.11.1')
16
16
  s.add_runtime_dependency('rails-scheduler', '~> 0.0.4')
17
+ s.add_runtime_dependency('coffee-rails', '> 3.1.0')
17
18
 
18
19
  # Development Gem dependencies
19
20
  s.add_development_dependency('sqlite3-ruby')
@@ -1,3 +1,3 @@
1
1
  module SocialStream
2
- VERSION = "0.16.1".freeze
2
+ VERSION = "0.16.2".freeze
3
3
  end
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Linkser
3
- VERSION = "0.1.0".freeze
3
+ VERSION = "0.1.1".freeze
4
4
  end
5
5
  end
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.11.0')
16
- s.add_runtime_dependency('linkser', '~> 0.0.8')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.11.1')
16
+ s.add_runtime_dependency('linkser', '~> 0.0.9')
17
17
  # Development Gem dependencies
18
18
  s.add_development_dependency('sqlite3-ruby')
19
19
  if RUBY_VERSION < '1.9'
@@ -1,5 +1,5 @@
1
1
  module Socialstream
2
2
  module Presence
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  # Gem dependencies
22
- s.add_runtime_dependency('social_stream-base','~> 0.10.0')
22
+ s.add_runtime_dependency('social_stream-base','~> 0.11.0')
23
23
 
24
24
  s.add_runtime_dependency "xmpp4r"
25
25
 
@@ -11,10 +11,10 @@ Gem::Specification.new do |s|
11
11
  s.files = `git ls-files`.split("\n")
12
12
 
13
13
  # Gem dependencies
14
- s.add_runtime_dependency('social_stream-base', '~> 0.11.0')
15
- s.add_runtime_dependency('social_stream-documents', '~> 0.6.0')
16
- s.add_runtime_dependency('social_stream-events', '~> 0.3.0')
17
- s.add_runtime_dependency('social_stream-linkser', '~> 0.1.0')
14
+ s.add_runtime_dependency('social_stream-base', '~> 0.11.1')
15
+ s.add_runtime_dependency('social_stream-documents', '~> 0.6.1')
16
+ s.add_runtime_dependency('social_stream-events', '~> 0.3.1')
17
+ s.add_runtime_dependency('social_stream-linkser', '~> 0.1.1')
18
18
 
19
19
  # Development Gem dependencies
20
20
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.16.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,55 +10,55 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-12-21 00:00:00.000000000Z
13
+ date: 2011-12-22 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: social_stream-base
17
- requirement: &81048520 !ruby/object:Gem::Requirement
17
+ requirement: &83134570 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.11.0
22
+ version: 0.11.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *81048520
25
+ version_requirements: *83134570
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: social_stream-documents
28
- requirement: &81048140 !ruby/object:Gem::Requirement
28
+ requirement: &83134160 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.6.0
33
+ version: 0.6.1
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *81048140
36
+ version_requirements: *83134160
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: social_stream-events
39
- requirement: &81047780 !ruby/object:Gem::Requirement
39
+ requirement: &83133860 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- version: 0.3.0
44
+ version: 0.3.1
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *81047780
47
+ version_requirements: *83133860
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: social_stream-linkser
50
- requirement: &81047300 !ruby/object:Gem::Requirement
50
+ requirement: &83121040 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: 0.1.0
55
+ version: 0.1.1
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *81047300
58
+ version_requirements: *83121040
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: capybara
61
- requirement: &81046550 !ruby/object:Gem::Requirement
61
+ requirement: &83120690 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.3.9
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *81046550
69
+ version_requirements: *83120690
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: sqlite3
72
- requirement: &81046250 !ruby/object:Gem::Requirement
72
+ requirement: &83120430 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *81046250
80
+ version_requirements: *83120430
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rspec-rails
83
- requirement: &81045830 !ruby/object:Gem::Requirement
83
+ requirement: &83119970 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 2.5.0
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *81045830
91
+ version_requirements: *83119970
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: factory_girl
94
- requirement: &81045520 !ruby/object:Gem::Requirement
94
+ requirement: &83119500 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ~>
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: 1.3.2
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *81045520
102
+ version_requirements: *83119500
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: forgery
105
- requirement: &80949110 !ruby/object:Gem::Requirement
105
+ requirement: &83119090 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: 0.3.6
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *80949110
113
+ version_requirements: *83119090
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: ci_reporter
116
- requirement: &80948750 !ruby/object:Gem::Requirement
116
+ requirement: &83118760 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ~>
@@ -121,7 +121,7 @@ dependencies:
121
121
  version: 1.6.4
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *80948750
124
+ version_requirements: *83118760
125
125
  description: Social Stream is a Ruby on Rails engine for building social network websites.
126
126
  It supports contacts, posts, file uploads, private messages and many more.
127
127
  email:
@@ -388,6 +388,7 @@ files:
388
388
  - base/app/helpers/profiles_helper.rb
389
389
  - base/app/helpers/search_helper.rb
390
390
  - base/app/helpers/settings_helper.rb
391
+ - base/app/helpers/sidebar_helper.rb
391
392
  - base/app/helpers/subjects_helper.rb
392
393
  - base/app/helpers/toolbar_helper.rb
393
394
  - base/app/helpers/users_helper.rb
@@ -481,15 +482,13 @@ files:
481
482
  - base/app/views/groups/_index.html.erb
482
483
  - base/app/views/groups/_new.html.erb
483
484
  - base/app/views/groups/_show.html.erb
484
- - base/app/views/groups/_sidebar_index.html.erb
485
- - base/app/views/groups/_sidebar_show.html.erb
485
+ - base/app/views/groups/_tag_cloud.html.erb
486
486
  - base/app/views/groups/index.html.erb
487
487
  - base/app/views/groups/index.js.erb
488
488
  - base/app/views/groups/new.html.erb
489
489
  - base/app/views/groups/show.html.erb
490
490
  - base/app/views/groups/show.js.erb
491
491
  - base/app/views/home/_groups.html.erb
492
- - base/app/views/home/_sidebar.html.erb
493
492
  - base/app/views/home/index.html.erb
494
493
  - base/app/views/home/index.js.erb
495
494
  - base/app/views/invitation_mailer/send_invitation.html.erb
@@ -592,7 +591,6 @@ files:
592
591
  - base/app/views/users/_groups.html.erb
593
592
  - base/app/views/users/_index.html.erb
594
593
  - base/app/views/users/_show.html.erb
595
- - base/app/views/users/_sidebar_index.html.erb
596
594
  - base/app/views/users/_user.html.erb
597
595
  - base/app/views/users/_user_focus_search.html.erb
598
596
  - base/app/views/users/_user_global_search.html.erb
@@ -624,6 +622,7 @@ files:
624
622
  - base/lib/social_stream-base.rb
625
623
  - base/lib/social_stream/ability.rb
626
624
  - base/lib/social_stream/ability/base.rb
625
+ - base/lib/social_stream/base/dependencies.rb
627
626
  - base/lib/social_stream/base/engine.rb
628
627
  - base/lib/social_stream/base/version.rb
629
628
  - base/lib/social_stream/controllers/cancan_devise_integration.rb
@@ -639,8 +638,9 @@ files:
639
638
  - base/lib/social_stream/test_helpers.rb
640
639
  - base/lib/social_stream/test_helpers/controllers.rb
641
640
  - base/lib/social_stream/toolbar_config/base.rb
641
+ - base/lib/social_stream/views/list.rb
642
642
  - base/lib/social_stream/views/settings/base.rb
643
- - base/lib/social_stream/views/settings/item_list.rb
643
+ - base/lib/social_stream/views/sidebar/base.rb
644
644
  - base/lib/tasks/db/populate.rake
645
645
  - base/lib/tasks/workers.rake
646
646
  - base/social_stream-base.gemspec
@@ -950,8 +950,10 @@ files:
950
950
  - events/app/assets/stylesheets/social_stream-events.css
951
951
  - events/app/controllers/events_controller.rb
952
952
  - events/app/controllers/rooms_controller.rb
953
+ - events/app/helpers/events_helper.rb
953
954
  - events/app/models/event.rb
954
955
  - events/app/models/room.rb
956
+ - events/app/views/events/_calendar_month.erb
955
957
  - events/app/views/events/_event.html.erb
956
958
  - events/app/views/events/_new.html.erb
957
959
  - events/app/views/events/_sidebar_calendar.html.erb
@@ -979,6 +981,7 @@ files:
979
981
  - events/lib/social_stream/migrations/events.rb
980
982
  - events/lib/social_stream/toolbar_config/events.rb
981
983
  - events/lib/social_stream/views/settings/events.rb
984
+ - events/lib/social_stream/views/sidebar/events.rb
982
985
  - events/social_stream-events.gemspec
983
986
  - events/vendor/assets/images/boxy-ne.png
984
987
  - events/vendor/assets/images/boxy-nw.png
@@ -1329,8 +1332,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1329
1332
  version: '0'
1330
1333
  requirements: []
1331
1334
  rubyforge_project:
1332
- rubygems_version: 1.8.10
1335
+ rubygems_version: 1.8.12
1333
1336
  signing_key:
1334
1337
  specification_version: 3
1335
1338
  summary: A core for building social network websites
1336
1339
  test_files: []
1340
+ has_rdoc:
@@ -1,3 +0,0 @@
1
- <div class="space_center"></div>
2
-
3
- <%= render :partial => 'contacts/suggestions_and_pendings' %>
@@ -1,2 +0,0 @@
1
- <%= render :partial => 'contacts/suggestions_and_pendings' %>
2
-
@@ -1 +0,0 @@
1
- <%= render :partial => 'contacts/suggestions_and_pendings' %>
@@ -1,13 +0,0 @@
1
- module SocialStream
2
- module Views
3
- module Settings
4
- class ItemList < Array
5
- def insert_before key, obj
6
- position = index{ |i| i[:key] == 'notifications' } + 1
7
-
8
- insert position, obj
9
- end
10
- end
11
- end
12
- end
13
- end