social_stream 0.1.0 → 0.1.1
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/README.rdoc +8 -9
- data/app/helpers/groups_helper.rb +5 -0
- data/app/helpers/ties_helper.rb +1 -1
- data/app/helpers/users_helper.rb +4 -0
- data/app/views/activities/_jquery.html.erb +51 -0
- data/app/views/activities/_root.html.erb +9 -3
- data/app/views/frontpage/_header.html.erb +3 -3
- data/app/views/frontpage/index.html.erb +4 -4
- data/app/views/groups/_follow.html.erb +1 -1
- data/app/views/groups/_group.html.erb +13 -2
- data/app/views/groups/_groups.html.erb +23 -0
- data/app/views/home/index.html.erb +3 -1
- data/app/views/layouts/_footer.html.erb +1 -2
- data/app/views/layouts/application.html.erb +1 -8
- data/app/views/ties/_new.html.erb +2 -2
- data/app/views/ties/_suggestions.html.erb +11 -11
- data/app/views/ties/_tie.html.erb +2 -2
- data/app/views/ties/create.js.erb +9 -3
- data/app/views/ties/new.js.erb +1 -1
- data/config/locales/en.yml +25 -2
- data/init.rb +0 -2
- data/lib/generators/social_stream/templates/public/stylesheets/activities.css +2 -3
- data/lib/generators/social_stream/templates/public/stylesheets/carousel.css +57 -0
- data/lib/generators/social_stream/templates/public/stylesheets/home.css +24 -1
- data/lib/generators/social_stream/templates/public/stylesheets/middle.css +26 -7
- data/lib/social_stream/version.rb +1 -1
- data/lib/tasks/db/populate.rake +62 -0
- metadata +9 -5
- data/app/views/home/_groups.html.erb +0 -13
data/README.rdoc
CHANGED
@@ -37,9 +37,8 @@ Then, execute:
|
|
37
37
|
This will generate the following:
|
38
38
|
* A jquery:install generation for jQuery support
|
39
39
|
* A devise:install generation for authentication support
|
40
|
-
* An initializer configuration
|
41
|
-
* A database seeds file for defining Social Stream relations, along with an entry
|
42
|
-
in db/seeds.rb to load it.
|
40
|
+
* An initializer file with configuration for Social Stream.
|
41
|
+
* A database seeds file for defining custom Social Stream relations, along with an entry in db/seeds.rb to load it.
|
43
42
|
* A new application layout
|
44
43
|
* A migration providing the database schema
|
45
44
|
|
@@ -50,21 +49,21 @@ Do not forget to migrate and seed your database
|
|
50
49
|
|
51
50
|
== Actors and Activity Objects
|
52
51
|
|
53
|
-
{Social Stream}[http://github.com/ging/social_stream] relies in Devise[http://github.com/plataformatec/devise].
|
52
|
+
{Social Stream}[http://github.com/ging/social_stream] relies in Devise[http://github.com/plataformatec/devise].
|
53
|
+
You have authenticated users support in your application by default.
|
54
54
|
|
55
|
-
Besides, there is another kind of actor: groups. If you want other type of
|
55
|
+
Besides, there is another kind of actor: groups. If you want other type of actor
|
56
56
|
(like organizations or social events) you must include an <tt>actor_id</tt> column in
|
57
|
-
the migration. Then add it to <tt>config/initializers/social_stream.rb</tt>
|
57
|
+
the new actor migration. Then add it to <tt>config/initializers/social_stream.rb</tt>
|
58
58
|
|
59
59
|
There is also support for two types of basic activity objects: posts and comments.
|
60
|
-
|
60
|
+
You can create other types, like photos, bookmarks or videos, but you must do the same:
|
61
61
|
add a <tt>activity_object_id</tt> column in the migration and include it in the
|
62
62
|
initializer.
|
63
63
|
|
64
64
|
= Documentation
|
65
65
|
|
66
|
-
{Social Stream documentation}[http://rdoc.info/github/ging/social_stream/frames]
|
67
|
-
{rdoc.info}[http://rdoc.info/]
|
66
|
+
{Social Stream documentation is available at rdoc.info}[http://rdoc.info/github/ging/social_stream/frames]}
|
68
67
|
|
69
68
|
= Discussion
|
70
69
|
|
data/app/helpers/ties_helper.rb
CHANGED
@@ -50,3 +50,54 @@ $(".to_comment").livequery("blur", function(){
|
|
50
50
|
$(this).parents(".activity_content").find(".input_new_comments").blur();
|
51
51
|
return false;
|
52
52
|
});
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
//move he last list item before the first item. The purpose of this is if the user clicks to slide left he will be able to see the last item.
|
62
|
+
$('#carousel_ul li:first').before($('#carousel_ul li:last'));
|
63
|
+
|
64
|
+
|
65
|
+
//when user clicks the image for sliding right
|
66
|
+
$('#right_scroll img').livequery("click",function(){
|
67
|
+
|
68
|
+
//get the width of the items ( i like making the jquery part dynamic, so if you change the width in the css you won't have o change it here too ) '
|
69
|
+
var item_width = $('#carousel_ul li').outerWidth() + 10;
|
70
|
+
|
71
|
+
//calculae the new left indent of the unordered list
|
72
|
+
var left_indent = parseInt($('#carousel_ul').css('left')) - item_width;
|
73
|
+
|
74
|
+
//make the sliding effect using jquery's anumate function '
|
75
|
+
$('#carousel_ul:not(:animated)').animate({'left' : left_indent},500,function(){
|
76
|
+
|
77
|
+
//get the first list item and put it after the last list item (that's how the infinite effects is made) '
|
78
|
+
$('#carousel_ul li:last').after($('#carousel_ul li:first'));
|
79
|
+
|
80
|
+
//and get the left indent to the default -210px
|
81
|
+
$('#carousel_ul').css({'left' : '-210px'});
|
82
|
+
});
|
83
|
+
});
|
84
|
+
|
85
|
+
//when user clicks the image for sliding left
|
86
|
+
$('#left_scroll img').livequery("click",function(){
|
87
|
+
|
88
|
+
var item_width = $('#carousel_ul li').outerWidth() + 10;
|
89
|
+
|
90
|
+
/* same as for sliding right except that it's current left indent + the item width (for the sliding right it's - item_width) */
|
91
|
+
var left_indent = parseInt($('#carousel_ul').css('left')) + item_width;
|
92
|
+
|
93
|
+
$('#carousel_ul:not(:animated)').animate({'left' : left_indent},500,function(){
|
94
|
+
|
95
|
+
/* when sliding to left we are moving the last item before the first list item */
|
96
|
+
$('#carousel_ul li:first').before($('#carousel_ul li:last'));
|
97
|
+
|
98
|
+
/* and again, when we make that change we are setting the left indent of our unordered list to the default -210px */
|
99
|
+
$('#carousel_ul').css({'left' : '-210px'});
|
100
|
+
});
|
101
|
+
|
102
|
+
|
103
|
+
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= div_for activity do %>
|
2
2
|
<div class="actor_logo">
|
3
3
|
<%= link_to image_tag(activity.sender_subject.logo.url,
|
4
|
-
:size => "
|
4
|
+
:size => "35x35",
|
5
5
|
:alt => activity.sender_subject.name),
|
6
6
|
activity.sender_subject %>
|
7
7
|
</div>
|
@@ -26,7 +26,13 @@
|
|
26
26
|
|
27
27
|
</div>
|
28
28
|
<div class="space_comments"></div>
|
29
|
+
|
30
|
+
|
29
31
|
<div class="space_activities">
|
30
|
-
|
32
|
+
<% if activity.activity_objects.count > 1 %>
|
33
|
+
<div class="space_sub"></div>
|
34
|
+
<%else %>
|
35
|
+
<div class="space_center"></div>
|
36
|
+
<%end%>
|
31
37
|
</div>
|
32
|
-
<% end %>
|
38
|
+
<% end %>
|
@@ -10,12 +10,12 @@
|
|
10
10
|
<%= f.email_field :email, :class => "input_username" %>
|
11
11
|
<span><%= f.label :password %></span>
|
12
12
|
<%= f.password_field :password, :class => "input_username" %>
|
13
|
-
<%= f.submit t(:
|
13
|
+
<%= f.submit t(:sign_in), :class => 'other_blue'%>
|
14
14
|
<% end -%>
|
15
15
|
<div class="subtexto">
|
16
|
-
<%= link_to t('
|
16
|
+
<%= link_to t('sign_up'), new_user_registration_path, :class => "register_link" %>
|
17
17
|
<span>|</span>
|
18
|
-
<%= link_to t('
|
18
|
+
<%= link_to t('forgot_password?'), new_user_password_path, :class => "register_link" %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
<br class="clearfloat" />
|
@@ -17,11 +17,11 @@
|
|
17
17
|
<span>
|
18
18
|
<ul class="purple">
|
19
19
|
</li>
|
20
|
-
<li><%=image_tag("../images/frontpage/purple_sq.png") %><%= t('frontpage.share.
|
20
|
+
<li><%=image_tag("../images/frontpage/purple_sq.png") %><%= t('frontpage.share.sentence1') %>
|
21
21
|
</img>
|
22
22
|
</li>
|
23
23
|
<li>
|
24
|
-
<%=image_tag("../images/frontpage/purple_sq.png") %><%= t('frontpage.share.
|
24
|
+
<%=image_tag("../images/frontpage/purple_sq.png") %><%= t('frontpage.share.sentence2') %>
|
25
25
|
</img>
|
26
26
|
</li>
|
27
27
|
</ul>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<span><%=image_tag("../images/frontpage/meet.gif") %></span>
|
32
32
|
<span class="no_float">
|
33
33
|
<ul class="green">
|
34
|
-
<li><%=image_tag("../images/frontpage/green_sq.png") %><%= t('frontpage.meet.
|
34
|
+
<li><%=image_tag("../images/frontpage/green_sq.png") %><%= t('frontpage.meet.sentence1') %>
|
35
35
|
</img>
|
36
36
|
</li>
|
37
37
|
</ul>
|
@@ -46,7 +46,7 @@
|
|
46
46
|
</img>
|
47
47
|
</li>
|
48
48
|
<li>
|
49
|
-
<%=image_tag("../images/frontpage/yellow_sq.png") %><%= t('frontpage.collaborate.
|
49
|
+
<%=image_tag("../images/frontpage/yellow_sq.png") %><%= t('frontpage.collaborate.sentence2') %>
|
50
50
|
</img>
|
51
51
|
</li>
|
52
52
|
</ul>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="bookmark">
|
2
|
-
<%=image_tag("btn/btn_bookmark.png")
|
2
|
+
<%=image_tag("btn/btn_bookmark.png", :class=>"btn_config")%> <%= link_to "Follow "+@group.name,
|
3
3
|
ties_path("tie[sender_id]" => current_user.actor.id,
|
4
4
|
"tie[receiver_id]" => @group,
|
5
5
|
"tie[relation_name]" => "follower"),
|
@@ -1,3 +1,14 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<% if (current_user.recent_groups.count)>10 %>
|
2
|
+
<li>
|
3
3
|
<% end %>
|
4
|
+
<%= div_for group do %>
|
5
|
+
<div class="group_content">
|
6
|
+
<%=link_to(image_tag(group.logo.url, :class => 'btn_group', :alt => group.name, :title => group.name), group) %>
|
7
|
+
</div>
|
8
|
+
<div class="group_title">
|
9
|
+
<%=link_to(group.name, group)%>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
<% if (current_user.recent_groups.count)>10 %>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% if current_user.recent_groups.any? %>
|
2
|
+
<div id="groups_title" class="content_size">
|
3
|
+
<%=t('group.other') %> (<span id="group_count"><%=current_user.recent_groups.count%></span>)
|
4
|
+
</div>
|
5
|
+
<div id="groups_list" class="content_size">
|
6
|
+
<% if (current_user.recent_groups.count) > 10 %>
|
7
|
+
<div id='carousel_container'>
|
8
|
+
<div id='left_scroll'><%=image_tag("btn/group_left.png")%></div>
|
9
|
+
<div id='carousel_inner'>
|
10
|
+
<ul id='carousel_ul'>
|
11
|
+
<% else %>
|
12
|
+
<div class="space_center"></div>
|
13
|
+
<%end%>
|
14
|
+
|
15
|
+
<%= render current_user.recent_groups %>
|
16
|
+
<% if (current_user.recent_groups.count) > 10 %>
|
17
|
+
</ul>
|
18
|
+
</div>
|
19
|
+
<div id='right_scroll'><%=image_tag("btn/group_right.png")%></div>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
@@ -11,7 +11,9 @@
|
|
11
11
|
<br class="clearfloat" />
|
12
12
|
<div class="space_center">
|
13
13
|
</div>
|
14
|
-
|
14
|
+
<div id="my_groups">
|
15
|
+
<%= render :partial => "groups/groups" %>
|
16
|
+
</div>
|
15
17
|
<%= render :partial => "activities/activities",
|
16
18
|
:locals => { :activities => current_user.wall,
|
17
19
|
:owner => current_user } %>
|
@@ -15,15 +15,8 @@
|
|
15
15
|
<%= stylesheet_link_tag "boxy", :media => "screen, projection" %>
|
16
16
|
<%= stylesheet_link_tag "middle", :media => "screen, projection" %>
|
17
17
|
<%= stylesheet_link_tag "menu", :media => "screen, projection" %>
|
18
|
+
<%= stylesheet_link_tag "carousel", :media => "screen, projection" %>
|
18
19
|
|
19
|
-
<!--[if IE]>
|
20
|
-
<%= stylesheet_link_tag "ie", :media => "screen, projection" %>
|
21
|
-
<![endif]-->
|
22
|
-
<script type="text/javascript">
|
23
|
-
if (navigator.userAgent.indexOf('Mac') != -1) {
|
24
|
-
document.write("<link href='/stylesheets/mac.css' media='screen, projection' rel='stylesheet' type='text/css' />");
|
25
|
-
}
|
26
|
-
</script>
|
27
20
|
<%= javascript_include_tag :defaults %>
|
28
21
|
|
29
22
|
<%= javascript_include_tag 'hoverIntent', 'superfish', 'main',
|
@@ -14,10 +14,10 @@
|
|
14
14
|
<%= f.hidden_field :sender_id %>
|
15
15
|
<%= f.hidden_field :relation_name %>
|
16
16
|
<% if @tie.relation!.granted %>
|
17
|
-
<%= f.text_area :message, :class =>"
|
17
|
+
<%= f.text_area :message, :class =>"input_new_tie" %>
|
18
18
|
<% end %>
|
19
19
|
<div class="ties_btn">
|
20
|
-
<%= submit_tag t('
|
20
|
+
<%= submit_tag t('send', :scope => @tie.relation_name), :class => "tie_btn" %>
|
21
21
|
</div>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
@@ -5,16 +5,16 @@
|
|
5
5
|
});
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
|
9
|
+
<div class="tie_header">
|
10
|
+
<%= image_tag('btn/notifications.png', :class => "tie_icon") %>
|
11
|
+
<div class="tie_text_header">
|
12
|
+
<%=t('tie.suggestion.one') %>
|
13
13
|
</div>
|
14
|
-
|
15
|
-
|
14
|
+
</div>
|
15
|
+
<div class="suggestions">
|
16
|
+
<% if (sgs = current_user.suggestions(2)).present? %>
|
16
17
|
<%= render sgs %>
|
17
|
-
|
18
|
-
|
19
|
-
<%
|
20
|
-
|
18
|
+
<%end%>
|
19
|
+
</div>
|
20
|
+
<%end%>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
</div>
|
6
6
|
<div class="tie_content">
|
7
7
|
<div class="tie_name">
|
8
|
-
<%= link_to(tie.receiver_subject.name, tie.receiver_subject) %>
|
8
|
+
<%= link_to(tie.receiver_subject.name, tie.receiver_subject, :class => "tie_link") %>
|
9
9
|
</div>
|
10
10
|
<div class="tie_brief">
|
11
11
|
<%= tie_brief(tie.receiver_subject) %>
|
12
12
|
</div>
|
13
|
-
<div class="tie_link" id="
|
13
|
+
<div class="tie_link" id="tie_link<%= dom_id(tie.receiver_subject)%>">
|
14
14
|
<%= tie_link(tie) %>
|
15
15
|
</div>
|
16
16
|
</div>
|
@@ -2,11 +2,17 @@
|
|
2
2
|
$("#tie_<%=dom_id(@tie.receiver_subject)%>").html(<%= @tie.errors.to_xml %>);
|
3
3
|
<% else %>
|
4
4
|
var old_tie = $("#tie_<%= dom_id(@tie.receiver_subject) %>");
|
5
|
+
var link_tie = $("#tie_link<%= dom_id(@tie.receiver_subject) %>");
|
5
6
|
<% if @tie.receiver_subject.is_a?(Group) && ! @tie.relation.granted #group follower %>
|
6
7
|
// add to group list
|
7
|
-
$(
|
8
|
-
|
9
|
-
|
8
|
+
if ($('#carousel_ul').length) { // element found
|
9
|
+
$("#carousel_ul").prepend("<%= escape_javascript(render @tie.receiver_subject) %>");
|
10
|
+
}else{ // no element found
|
11
|
+
$("#my_groups").html("<%= escape_javascript(render "groups/groups" )%>");
|
12
|
+
}
|
13
|
+
$("#group_count").html("<%=current_user.recent_groups.count%>");
|
14
|
+
link_tie.replaceWith("<%= escape_javascript(link_follow_state) %>");
|
15
|
+
link_tie.slideUp(300).delay(800).fadeIn(400);
|
10
16
|
<% else %>
|
11
17
|
if (old_tie.parent().hasClass('suggestions')) {
|
12
18
|
//replace with new suggestion
|
data/app/views/ties/new.js.erb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
new Boxy("<%= escape_javascript(render(:partial => "ties/new")) %>",
|
2
|
-
{ title: "<%= escape_javascript(t('
|
2
|
+
{ title: "<%= escape_javascript(t('confirm_new', :name => @tie.receiver_subject.name , :scope => @tie.relation_name)) %>" });
|
data/config/locales/en.yml
CHANGED
@@ -9,6 +9,7 @@ en:
|
|
9
9
|
like: I like
|
10
10
|
unlike: Already I do not like
|
11
11
|
last: Last Activities
|
12
|
+
browse: "Browse"
|
12
13
|
comment:
|
13
14
|
input: "Write a comment..."
|
14
15
|
confirm_delete: "Delete comment?"
|
@@ -22,7 +23,8 @@ en:
|
|
22
23
|
other: Followers
|
23
24
|
new: "+ Follow"
|
24
25
|
confirm_new: "Do you want to follow %{name}?"
|
25
|
-
submit: "Follow"
|
26
|
+
submit: "+ Follow"
|
27
|
+
forgot_password?: "Forgot you password?"
|
26
28
|
friend:
|
27
29
|
one: Friend
|
28
30
|
other: Friends
|
@@ -31,7 +33,26 @@ en:
|
|
31
33
|
submit: "Accept as friend"
|
32
34
|
friend_request:
|
33
35
|
new: "+ Add as friend"
|
36
|
+
send: "Send Request"
|
34
37
|
confirm_new: "Do you want to add %{name} as friend?"
|
38
|
+
frontpage:
|
39
|
+
collaborate:
|
40
|
+
sentence1: "Organize your projects and activities"
|
41
|
+
sentence2: "Create your own groups"
|
42
|
+
elements:
|
43
|
+
comments: "Comments"
|
44
|
+
networks: "Social Networks"
|
45
|
+
organizers: "Organizers"
|
46
|
+
participants: "Participants"
|
47
|
+
groups: "Groups"
|
48
|
+
tags: "Tags"
|
49
|
+
main_title: "SocialStream a core for building social network applications."
|
50
|
+
meet:
|
51
|
+
sentence1: "Meet interesting people and groups"
|
52
|
+
share:
|
53
|
+
sentence1: "Your contacts and relations"
|
54
|
+
sentence2: "Posts, comments and activities"
|
55
|
+
stats: "%{users} users and %{groups} groups registered"
|
35
56
|
group:
|
36
57
|
other: "Groups"
|
37
58
|
all: All Groups
|
@@ -48,6 +69,9 @@ en:
|
|
48
69
|
options: "Menu Options"
|
49
70
|
post:
|
50
71
|
confirm_delete: "Delete post?"
|
72
|
+
sign_in: "Sign in"
|
73
|
+
sign_up: "Sign up"
|
74
|
+
socialstream: "SocialStream"
|
51
75
|
tie:
|
52
76
|
pending:
|
53
77
|
other: Pending requests
|
@@ -58,5 +82,4 @@ en:
|
|
58
82
|
all: All
|
59
83
|
time:
|
60
84
|
ago: "%{time} ago"
|
61
|
-
socialstream: "SocialStream"
|
62
85
|
|
data/init.rb
CHANGED
@@ -27,7 +27,6 @@
|
|
27
27
|
padding-top: 5px;
|
28
28
|
}
|
29
29
|
|
30
|
-
|
31
30
|
#input_activities {
|
32
31
|
border-color: #0656a4;
|
33
32
|
color: #2A3890;
|
@@ -56,7 +55,7 @@
|
|
56
55
|
}
|
57
56
|
|
58
57
|
.actor_logo {
|
59
|
-
width:
|
58
|
+
width: 38px;
|
60
59
|
padding: 8px 0px 8px 5px;
|
61
60
|
display: inline-block;
|
62
61
|
vertical-align: top;
|
@@ -66,7 +65,7 @@
|
|
66
65
|
padding: 8px 0px 0px 0px;
|
67
66
|
display: inline-block;
|
68
67
|
color: #000;
|
69
|
-
width:
|
68
|
+
width: 90%;
|
70
69
|
}
|
71
70
|
|
72
71
|
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#carousel_container{
|
2
|
+
text-align:center;
|
3
|
+
}
|
4
|
+
|
5
|
+
#carousel_inner {
|
6
|
+
float:left; /* important for inline positioning */
|
7
|
+
width:490px; /* important (this width = width of list item(including margin) * items shown */
|
8
|
+
overflow: hidden; /* important (hide the items outside the div) */
|
9
|
+
/* non-important styling bellow */
|
10
|
+
background: #fff;
|
11
|
+
text-align:center;
|
12
|
+
|
13
|
+
}
|
14
|
+
|
15
|
+
#carousel_ul {
|
16
|
+
position:relative;
|
17
|
+
left:-210px; /* important (this should be negative number of list items width(including margin) */
|
18
|
+
list-style-type: none; /* removing the default styling for unordered list items */
|
19
|
+
margin: 0px;
|
20
|
+
padding: 0px;
|
21
|
+
width:9999px; /* important */
|
22
|
+
/* non-important styling bellow */
|
23
|
+
padding-bottom:10px;
|
24
|
+
}
|
25
|
+
|
26
|
+
#carousel_ul li{
|
27
|
+
float: left; /* important for inline positioning of the list items */
|
28
|
+
width:55px; /* fixed width, important */
|
29
|
+
/* just styling bellow*/
|
30
|
+
padding:0px;
|
31
|
+
height:38px;
|
32
|
+
background: #fff;
|
33
|
+
margin-top:10px;
|
34
|
+
margin-bottom:10px;
|
35
|
+
margin-left:5px;
|
36
|
+
margin-right:5px;
|
37
|
+
}
|
38
|
+
|
39
|
+
#carousel_ul li img {
|
40
|
+
.margin-bottom:-4px; /* IE is making a 4px gap bellow an image inside of an anchor (<a href...>) so this is to fix that*/
|
41
|
+
/* styling */
|
42
|
+
cursor:pointer;
|
43
|
+
cursor: hand;
|
44
|
+
border:0px;
|
45
|
+
}
|
46
|
+
#left_scroll, #right_scroll{
|
47
|
+
float:left;
|
48
|
+
height:10px;
|
49
|
+
padding-top:15px;
|
50
|
+
width:26px;
|
51
|
+
background: #fff;
|
52
|
+
}
|
53
|
+
#left_scroll img, #right_scroll img{
|
54
|
+
/*styling*/
|
55
|
+
cursor: pointer;
|
56
|
+
cursor: hand;
|
57
|
+
}
|
@@ -4,13 +4,14 @@
|
|
4
4
|
|
5
5
|
.group{
|
6
6
|
display:inline-block;
|
7
|
+
width:50px;
|
7
8
|
}
|
8
9
|
|
9
10
|
#groups_list {
|
10
11
|
width: 100%;
|
11
|
-
border-bottom: thin solid #D4E4Ea;
|
12
12
|
padding-bottom: 5px;
|
13
13
|
text-align: center;
|
14
|
+
display: inline-block;
|
14
15
|
}
|
15
16
|
|
16
17
|
#group_todos {
|
@@ -25,6 +26,28 @@
|
|
25
26
|
font-weight: bold;
|
26
27
|
}
|
27
28
|
|
29
|
+
.group_title a{
|
30
|
+
display:block;
|
31
|
+
font-size:9px;
|
32
|
+
text-decoration:none;
|
33
|
+
text-align:center;
|
34
|
+
}
|
35
|
+
|
36
|
+
.group_title a:hover{
|
37
|
+
display:block;
|
38
|
+
text-decoration:underline;
|
39
|
+
}
|
40
|
+
|
41
|
+
.group_content{
|
42
|
+
display:block;
|
43
|
+
text-align:center;
|
44
|
+
}
|
45
|
+
|
46
|
+
.btn_group{
|
47
|
+
vertical-align:top;
|
48
|
+
}
|
49
|
+
|
50
|
+
|
28
51
|
#my_conferences {
|
29
52
|
background-color: #deeff8;
|
30
53
|
/*border-bottom: thin solid #D4E4Ea;*/
|
@@ -26,19 +26,31 @@
|
|
26
26
|
}
|
27
27
|
|
28
28
|
.follow_btn{
|
29
|
-
color: #
|
30
|
-
background-color: #1F4A75;
|
31
|
-
padding: 2px 2px 2px 2px;
|
32
|
-
border:1px solid #BDC7D8;
|
29
|
+
color: #2A3890;
|
33
30
|
font-size: 11px;
|
34
31
|
cursor: pointer;
|
32
|
+
text-decoration:underline;
|
33
|
+
background:none;
|
34
|
+
border:0;
|
35
|
+
|
36
|
+
}
|
37
|
+
.follow_btn button{
|
38
|
+
overflow: visible;
|
35
39
|
}
|
36
40
|
|
41
|
+
.tie_btn{
|
42
|
+
color:#fff;
|
43
|
+
background:#1F4A75;
|
44
|
+
padding: 2px 0px 2px 0px;
|
45
|
+
font-size: 11px;
|
46
|
+
}
|
37
47
|
|
38
48
|
.ties_btn{
|
39
|
-
|
40
|
-
|
41
|
-
|
49
|
+
text-align: right;
|
50
|
+
padding: 2px 0px 2px 0px;
|
51
|
+
vertical-align: middle;
|
52
|
+
text-decoration:underline;
|
53
|
+
|
42
54
|
}
|
43
55
|
|
44
56
|
|
@@ -89,6 +101,13 @@
|
|
89
101
|
|
90
102
|
}
|
91
103
|
|
104
|
+
.tie_link a{
|
105
|
+
text-decoration:none;
|
106
|
+
}
|
107
|
+
|
108
|
+
.tie_link a:hover{
|
109
|
+
text-decoration:underline;
|
110
|
+
}
|
92
111
|
|
93
112
|
|
94
113
|
|
@@ -0,0 +1,62 @@
|
|
1
|
+
namespace :db do
|
2
|
+
desc 'Populate database with fake data for development'
|
3
|
+
task :populate => [ 'db:seed', 'db:populate:create' ]
|
4
|
+
|
5
|
+
namespace :populate do
|
6
|
+
|
7
|
+
desc "Reload populate data"
|
8
|
+
task :reload => [ 'db:reset', :create ]
|
9
|
+
|
10
|
+
desc "Create populate data"
|
11
|
+
task :create => :environment do
|
12
|
+
|
13
|
+
# Create demo user if not present
|
14
|
+
if User.find_by_name('demo').blank?
|
15
|
+
u = User.create! :full_name => 'demo',
|
16
|
+
:email => 'demo@dit.upm.es',
|
17
|
+
:password => 'demo',
|
18
|
+
:password_confirmation => 'demo'
|
19
|
+
u.confirm!
|
20
|
+
end
|
21
|
+
|
22
|
+
puts "* Create Users"
|
23
|
+
20.times do
|
24
|
+
u = User.create :full_name => Forgery::Name.full_name,
|
25
|
+
:email => Forgery::Internet.email_address,
|
26
|
+
:password => 'test',
|
27
|
+
:password_confirmation => 'test'
|
28
|
+
u.confirm!
|
29
|
+
end
|
30
|
+
|
31
|
+
available_users = User.all
|
32
|
+
|
33
|
+
puts "* Create Groups"
|
34
|
+
20.times do
|
35
|
+
Group.create :name => Forgery::Name.company_name,
|
36
|
+
:email => Forgery::Internet.email_address
|
37
|
+
end
|
38
|
+
|
39
|
+
available_groups = Group.all
|
40
|
+
|
41
|
+
puts "* Create Ties"
|
42
|
+
User.all.each do |u|
|
43
|
+
users = available_users.dup - Array(u)
|
44
|
+
user_relations = %w( Friend FriendOfFriend ).map{ |r| Relation.mode('User', 'User').find_by_name(r) }
|
45
|
+
|
46
|
+
Forgery::Basic.number.times do
|
47
|
+
user = users.delete_at((rand * users.size).to_i)
|
48
|
+
u.ties.create :receiver => user.actor,
|
49
|
+
:relation => user_relations.random
|
50
|
+
end
|
51
|
+
groups = available_groups.dup
|
52
|
+
group_relations = Relation.mode('User', 'Group')
|
53
|
+
|
54
|
+
Forgery::Basic.number.times do
|
55
|
+
group = groups.delete_at((rand * groups.size).to_i)
|
56
|
+
u.ties.create :receiver => group.actor,
|
57
|
+
:relation => group_relations.random
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Antonio Tapiador
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-11-03 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -138,7 +138,9 @@ files:
|
|
138
138
|
- app/controllers/posts_controller.rb
|
139
139
|
- app/controllers/ties_controller.rb
|
140
140
|
- app/helpers/activities_helper.rb
|
141
|
+
- app/helpers/groups_helper.rb
|
141
142
|
- app/helpers/ties_helper.rb
|
143
|
+
- app/helpers/users_helper.rb
|
142
144
|
- app/models/activity.rb
|
143
145
|
- app/models/activity_object.rb
|
144
146
|
- app/models/activity_object_activity.rb
|
@@ -172,13 +174,13 @@ files:
|
|
172
174
|
- app/views/groups/_follow.html.erb
|
173
175
|
- app/views/groups/_followers.html.erb
|
174
176
|
- app/views/groups/_group.html.erb
|
177
|
+
- app/views/groups/_groups.html.erb
|
175
178
|
- app/views/groups/_logo.html.erb
|
176
179
|
- app/views/groups/_middle_show.html.erb
|
177
180
|
- app/views/groups/_right_show.html.erb
|
178
181
|
- app/views/groups/_tabs.html.erb
|
179
182
|
- app/views/groups/show.html.erb
|
180
183
|
- app/views/home/_contacts.html.erb
|
181
|
-
- app/views/home/_groups.html.erb
|
182
184
|
- app/views/home/_location.html.erb
|
183
185
|
- app/views/home/_middle.html.erb
|
184
186
|
- app/views/home/_options.html.erb
|
@@ -314,6 +316,7 @@ files:
|
|
314
316
|
- lib/generators/social_stream/templates/public/stylesheets/base.css
|
315
317
|
- lib/generators/social_stream/templates/public/stylesheets/boxy.css
|
316
318
|
- lib/generators/social_stream/templates/public/stylesheets/browse.css
|
319
|
+
- lib/generators/social_stream/templates/public/stylesheets/carousel.css
|
317
320
|
- lib/generators/social_stream/templates/public/stylesheets/frontpage.css
|
318
321
|
- lib/generators/social_stream/templates/public/stylesheets/header.css
|
319
322
|
- lib/generators/social_stream/templates/public/stylesheets/home.css
|
@@ -334,6 +337,7 @@ files:
|
|
334
337
|
- lib/social_stream/rails/railtie.rb
|
335
338
|
- lib/social_stream/seed.rb
|
336
339
|
- lib/social_stream/version.rb
|
340
|
+
- lib/tasks/db/populate.rake
|
337
341
|
- social_stream.gemspec
|
338
342
|
- spec/dummy/Rakefile
|
339
343
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<div id="my_groups">
|
2
|
-
<div id="groups_title" class="content_size">
|
3
|
-
<%=t('group.other') %>
|
4
|
-
</div>
|
5
|
-
<div id="groups_list" class="content_size">
|
6
|
-
<% if current_user.recent_groups.any? %>
|
7
|
-
<%= render current_user.recent_groups %>
|
8
|
-
<% else %>
|
9
|
-
<div class="space_center">
|
10
|
-
</div>
|
11
|
-
<% end %>
|
12
|
-
</div>
|
13
|
-
</div>
|