social_stream 0.16.1 → 0.16.2
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.
- data/base/app/assets/stylesheets/header.css.scss +3 -1
- data/base/app/helpers/sidebar_helper.rb +10 -0
- data/base/app/views/avatars/index.html.erb +2 -3
- data/base/app/views/contacts/_suggestions.html.erb +1 -1
- data/base/app/views/contacts/index.html.erb +1 -3
- data/base/app/views/conversations/index.html.erb +1 -3
- data/base/app/views/conversations/show.html.erb +1 -3
- data/base/app/views/devise/registrations/edit.html.erb +3 -5
- data/base/app/views/groups/_show.html.erb +2 -3
- data/base/app/views/groups/{_sidebar_index.html.erb → _tag_cloud.html.erb} +0 -2
- data/base/app/views/groups/index.html.erb +2 -3
- data/base/app/views/groups/new.html.erb +1 -3
- data/base/app/views/home/index.html.erb +1 -3
- data/base/app/views/invitations/new.html.erb +1 -3
- data/base/app/views/layouts/_header_dropdown_menu_sessions.html.erb +1 -1
- data/base/app/views/messages/new.html.erb +2 -3
- data/base/app/views/notifications/index.html.erb +1 -3
- data/base/app/views/profiles/edit.html.erb +1 -3
- data/base/app/views/profiles/show.html.erb +2 -4
- data/base/app/views/search/index.html.erb +1 -3
- data/base/app/views/settings/index.html.erb +1 -3
- data/base/app/views/users/_show.html.erb +1 -3
- data/base/app/views/users/index.html.erb +1 -3
- data/base/lib/social_stream/base/dependencies.rb +47 -0
- data/base/lib/social_stream/base/engine.rb +6 -0
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/lib/social_stream/controllers/helpers.rb +11 -0
- data/base/lib/social_stream/views/list.rb +17 -0
- data/base/lib/social_stream/views/settings/base.rb +1 -1
- data/base/lib/social_stream/views/sidebar/base.rb +27 -0
- data/base/lib/social_stream-base.rb +9 -47
- data/base/lib/tasks/db/populate.rake +12 -10
- data/base/social_stream-base.gemspec +4 -2
- data/documents/app/views/common_documents/_headers.html.erb +2 -4
- data/documents/app/views/common_documents/_show.html.erb +1 -3
- data/documents/lib/social_stream/documents/version.rb +1 -1
- data/documents/social_stream-documents.gemspec +1 -1
- data/events/app/assets/stylesheets/events.css.scss +30 -1
- data/events/app/helpers/events_helper.rb +16 -0
- data/events/app/views/events/_calendar_month.erb +1 -0
- data/events/app/views/events/_sidebar_calendar.html.erb +17 -9
- data/events/lib/social_stream/events/engine.rb +6 -0
- data/events/lib/social_stream/events/version.rb +1 -1
- data/events/lib/social_stream/views/sidebar/events.rb +15 -0
- data/events/lib/social_stream-events.rb +4 -0
- data/events/social_stream-events.gemspec +2 -1
- data/lib/social_stream/version.rb +1 -1
- data/linkser/lib/social_stream/linkser/version.rb +1 -1
- data/linkser/social_stream-linkser.gemspec +2 -2
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/presence/social_stream-presence.gemspec +1 -1
- data/social_stream.gemspec +4 -4
- metadata +36 -32
- data/base/app/views/groups/_sidebar_show.html.erb +0 -3
- data/base/app/views/home/_sidebar.html.erb +0 -2
- data/base/app/views/users/_sidebar_index.html.erb +0 -1
- 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: -
|
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;}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% toolbar :profile => current_subject %>
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
-
|
17
|
-
|
18
|
-
<% end %>
|
16
|
+
|
17
|
+
<% sidebar %>
|
19
18
|
|
20
19
|
<%= location(link_to(t('group.one')+": "+truncate_name(sanitize @group.name)))%>
|
21
20
|
|
@@ -4,9 +4,8 @@
|
|
4
4
|
|
5
5
|
<% toolbar if user_signed_in? %>
|
6
6
|
|
7
|
-
<%
|
8
|
-
|
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')))%>
|
@@ -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>
|
@@ -2,9 +2,7 @@
|
|
2
2
|
<%= current_subject.name %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
-
<%
|
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+')'
|
@@ -11,9 +11,7 @@
|
|
11
11
|
<%= @profile.subject.tag_list%>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<%
|
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" %>
|
@@ -4,9 +4,7 @@
|
|
4
4
|
|
5
5
|
<% toolbar if user_signed_in? %>
|
6
6
|
|
7
|
-
<%
|
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
|
@@ -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
|
@@ -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
|
-
#
|
2
|
-
require '
|
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,
|
70
|
-
|
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
|
-
|
17
|
-
if
|
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
|
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
|
127
|
+
if CHEESECAKE
|
128
128
|
actor = Actor.first
|
129
|
-
|
130
|
-
|
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
|
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
|
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.
|
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
|
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
|
-
<%
|
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 %>
|
@@ -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.
|
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
|
-
|
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
|
-
|
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>"
|
18
|
-
<td
|
19
|
-
<%= link_to day.day, polymorphic_path([
|
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{""}
|
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
|
@@ -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
|
+
|
@@ -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.
|
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')
|
@@ -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.
|
16
|
-
s.add_runtime_dependency('linkser', '~> 0.0.
|
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'
|
data/social_stream.gemspec
CHANGED
@@ -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.
|
15
|
-
s.add_runtime_dependency('social_stream-documents', '~> 0.6.
|
16
|
-
s.add_runtime_dependency('social_stream-events', '~> 0.3.
|
17
|
-
s.add_runtime_dependency('social_stream-linkser', '~> 0.1.
|
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.
|
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-
|
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: &
|
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.
|
22
|
+
version: 0.11.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *83134570
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: social_stream-documents
|
28
|
-
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.
|
33
|
+
version: 0.6.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *83134160
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: social_stream-events
|
39
|
-
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.
|
44
|
+
version: 0.3.1
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *83133860
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: social_stream-linkser
|
50
|
-
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.
|
55
|
+
version: 0.1.1
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *83121040
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: capybara
|
61
|
-
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: *
|
69
|
+
version_requirements: *83120690
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: sqlite3
|
72
|
-
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: *
|
80
|
+
version_requirements: *83120430
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec-rails
|
83
|
-
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: *
|
91
|
+
version_requirements: *83119970
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: factory_girl
|
94
|
-
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: *
|
102
|
+
version_requirements: *83119500
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: forgery
|
105
|
-
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: *
|
113
|
+
version_requirements: *83119090
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: ci_reporter
|
116
|
-
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: *
|
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/
|
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/
|
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.
|
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 +0,0 @@
|
|
1
|
-
<%= render :partial => 'contacts/suggestions_and_pendings' %>
|