social_stream 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.rdoc +2 -3
- data/app/controllers/likes_controller.rb +2 -2
- data/app/controllers/messages_controller.rb +3 -0
- data/app/controllers/representations_controller.rb +8 -0
- data/app/controllers/ties_controller.rb +1 -1
- data/app/helpers/activities_helper.rb +2 -2
- data/app/helpers/ties_helper.rb +19 -16
- data/app/models/activity.rb +42 -7
- data/app/models/activity_object.rb +1 -0
- data/app/models/activity_verb.rb +5 -1
- data/app/models/actor.rb +113 -68
- data/app/models/group.rb +15 -1
- data/app/models/message.rb +2 -0
- data/app/models/permission.rb +20 -41
- data/app/models/profile.rb +1 -1
- data/app/models/relation.rb +34 -26
- data/app/models/representation.rb +35 -0
- data/app/models/tie.rb +47 -100
- data/app/models/user.rb +12 -17
- data/app/views/activities/_activities.html.erb +2 -2
- data/app/views/activities/_new.html.erb +6 -3
- data/app/views/activities/_options.html.erb +1 -1
- data/app/views/comments/_new.html.erb +2 -2
- data/app/views/frontpage/index.html.erb +0 -2
- data/app/views/groups/_group.html.erb +3 -3
- data/app/views/groups/_index.html.erb +3 -4
- data/app/views/groups/_middle_show.html.erb +7 -4
- data/app/views/groups/_new.html.erb +25 -0
- data/app/views/groups/_right_show.html.erb +4 -2
- data/app/views/groups/new.html.erb +1 -0
- data/app/views/groups/show.html.erb +1 -1
- data/app/views/home/_groups.html.erb +7 -5
- data/app/views/home/_location.html.erb +1 -1
- data/app/views/home/_options.html.erb +2 -2
- data/app/views/home/_right.html.erb +2 -2
- data/app/views/home/index.html.erb +6 -2
- data/app/views/layouts/_footer.html.erb +1 -1
- data/app/views/layouts/_header.erb +4 -1
- data/app/views/layouts/_representation.html.erb +20 -0
- data/app/views/{private_messages → messages}/_form.html.erb +4 -4
- data/app/views/{private_messages → messages}/_index.html.erb +1 -1
- data/app/views/{private_messages → messages}/_location.html.erb +1 -1
- data/app/views/messages/_message.html.erb +17 -0
- data/app/views/messages/_messages.html.erb +2 -0
- data/app/views/messages/edit.html.erb +6 -0
- data/app/views/{private_messages → messages}/index.html.erb +0 -0
- data/app/views/{private_messages → messages}/index.js.erb +0 -0
- data/app/views/{private_messages → messages}/new.html.erb +2 -2
- data/app/views/messages/show.html.erb +21 -0
- data/app/views/subjects/_contacts.html.erb +20 -0
- data/app/views/ties/_new.html.erb +6 -6
- data/app/views/ties/_pendings.html.erb +3 -3
- data/app/views/ties/_suggestions.html.erb +3 -3
- data/app/views/ties/_tie.html.erb +1 -1
- data/app/views/ties/create.js.erb +4 -5
- data/app/views/ties/new.js.erb +1 -1
- data/app/views/users/_groups.html.erb +5 -5
- data/app/views/users/_index.html.erb +3 -1
- data/app/views/users/_options.html.erb +1 -1
- data/app/views/users/_right_show.html.erb +3 -3
- data/app/views/users/show.html.erb +5 -3
- data/config/locales/en.yml +13 -19
- data/config/routes.rb +11 -4
- data/lib/generators/social_stream/install_generator.rb +2 -10
- data/lib/generators/social_stream/templates/initializer.rb +1 -1
- data/lib/generators/social_stream/templates/migration.rb +19 -24
- data/lib/generators/social_stream/templates/public/javascripts/jquery.js +6883 -0
- data/lib/generators/social_stream/templates/public/javascripts/rails.js +146 -0
- data/lib/generators/social_stream/templates/public/javascripts/ui.dropdownchecklist.js +3 -13
- data/lib/generators/social_stream/templates/public/stylesheets/header.css +5 -1
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-icons_454545_256x240.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-icons_888888_256x240.png +0 -0
- data/lib/generators/social_stream/templates/public/{images → stylesheets/images}/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/generators/social_stream/templates/relations.yml +42 -0
- data/lib/social_stream/ability.rb +7 -6
- data/lib/social_stream/controllers/helpers.rb +35 -0
- data/lib/social_stream/models/{activity_object.rb → object.rb} +1 -1
- data/lib/social_stream/models/{actor.rb → subject.rb} +10 -30
- data/lib/social_stream/models/supertype.rb +5 -2
- data/lib/social_stream/rails.rb +25 -6
- data/lib/social_stream/relations.rb +46 -0
- data/lib/social_stream/version.rb +1 -1
- data/lib/social_stream.rb +13 -13
- data/lib/tasks/db/populate.rake +23 -29
- data/spec/controllers/groups_controller_spec.rb +2 -6
- data/spec/controllers/ties_controller_spec.rb +19 -0
- data/spec/controllers/users_controller_spec.rb +0 -2
- data/spec/dummy/config/application.rb +0 -1
- data/spec/dummy/config/initializers/social_stream.rb +14 -2
- data/spec/dummy/config/relations.yml +42 -0
- data/spec/dummy/db/schema.rb +9 -0
- data/spec/dummy/db/seeds.rb +0 -1
- data/spec/factories/activity.rb +2 -2
- data/spec/factories/actor.rb +2 -1
- data/spec/factories/group.rb +1 -0
- data/spec/factories/post.rb +1 -1
- data/spec/factories/tie.rb +16 -22
- data/spec/models/activity_spec.rb +27 -24
- data/spec/models/actor_spec.rb +3 -0
- data/spec/models/representation_spec.rb +16 -0
- data/spec/models/tie_spec.rb +49 -57
- data/spec/models/user_spec.rb +22 -0
- data/spec/support/db.rb +1 -1
- metadata +47 -45
- data/Gemfile.lock +0 -171
- data/app/controllers/private_messages_controller.rb +0 -3
- data/app/models/private_message.rb +0 -6
- data/app/views/groups/_follow.html.erb +0 -9
- data/app/views/groups/_followers.html.erb +0 -16
- data/app/views/home/_contacts.html.erb +0 -17
- data/app/views/private_messages/_messages.html.erb +0 -2
- data/app/views/private_messages/_private_message.html.erb +0 -17
- data/app/views/private_messages/edit.html.erb +0 -6
- data/app/views/private_messages/show.html.erb +0 -21
- data/app/views/ties/_pending.html.erb +0 -21
- data/app/views/users/_contacts.html.erb +0 -19
- data/init.rb +0 -3
- data/lib/generators/social_stream/templates/seeds.yml +0 -64
- data/lib/social_stream/rails/common.rb +0 -36
- data/lib/social_stream/rails/engine.rb +0 -9
- data/lib/social_stream/rails/railtie.rb +0 -9
- data/lib/social_stream/seed.rb +0 -49
- data/spec/dummy/db/seeds/social_stream.yml +0 -64
- data/spec/models/user_space.rb +0 -10
@@ -11,9 +11,13 @@
|
|
11
11
|
<br class="clearfloat" />
|
12
12
|
<div class="space_center">
|
13
13
|
</div>
|
14
|
+
|
15
|
+
<% if current_subject.respond_to?(:recent_groups) %>
|
14
16
|
<div id="my_groups">
|
15
17
|
<%= render :partial => "groups" %>
|
16
18
|
</div>
|
19
|
+
<% end %>
|
20
|
+
|
17
21
|
<%= render :partial => "activities/activities",
|
18
|
-
:locals => { :activities =>
|
19
|
-
:owner =>
|
22
|
+
:locals => { :activities => current_subject.home_wall.paginate,
|
23
|
+
:owner => current_subject } %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
<%=image_tag("btn/btn_profile.png",:class=>"btn_config") %>
|
14
14
|
<div class="txt_config">
|
15
|
-
<%= link_to(t('profile.one'),
|
15
|
+
<%= link_to(t('profile.one'), current_subject)%>
|
16
16
|
</div>
|
17
17
|
<%=image_tag("btn/btn_browse.png",:class=>"btn_config") %>
|
18
18
|
<div class="txt_config2">
|
@@ -24,6 +24,9 @@
|
|
24
24
|
<div class="txt_config">
|
25
25
|
<%= t('account.one') %>
|
26
26
|
</div>
|
27
|
+
|
28
|
+
<%= render :partial => 'layouts/representation' %>
|
29
|
+
|
27
30
|
<%=image_tag("btn/btn_exit.png",:class=>"btn_config") %>
|
28
31
|
<div class="txt_config2">
|
29
32
|
<%= link_to t('sign_out_user', :user => current_user.name), destroy_user_session_path %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%= link_to(image_tag(current_user.logo.url(:tie)), current_user) %>
|
2
|
+
|
3
|
+
<div class="txt_config">
|
4
|
+
<%= link_to(current_user.name, current_user) %>
|
5
|
+
|
6
|
+
<%= t('representation.action') %>
|
7
|
+
|
8
|
+
<%= form_for(Representation.new(current_subject), :url => representation_path) do |f| %>
|
9
|
+
<%= f.select :subject_dom_id, current_user.represented.unshift(current_user).map{ |s| [ s.name, dom_id(s) ] } %>
|
10
|
+
<%= f.submit t('representation.change') %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%-# this should be in content_for(:javascript), but the partial is rendered after yield(:javascript) -%>
|
15
|
+
<script type="text/javascript" charset="utf-8">
|
16
|
+
$("#representation_submit").hide();
|
17
|
+
$("#representation_subject_dom_id").change(function() {
|
18
|
+
$(this).closest("form").submit();
|
19
|
+
});
|
20
|
+
</script>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<%= form_for(@
|
2
|
-
<% if @
|
1
|
+
<%= form_for(@message) do |f| %>
|
2
|
+
<% if @message.errors.any? %>
|
3
3
|
<div id="error_explanation">
|
4
|
-
<h2><%= pluralize(@
|
4
|
+
<h2><%= pluralize(@message.errors.count, "error") %> prohibited this message from being saved:</h2>
|
5
5
|
|
6
6
|
<ul>
|
7
|
-
<% @
|
7
|
+
<% @message.errors.full_messages.each do |msg| %>
|
8
8
|
<li><%= msg %></li>
|
9
9
|
<% end %>
|
10
10
|
</ul>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<div class="space_center">
|
13
13
|
</div>
|
14
14
|
|
15
|
-
<div id="new_message" ><%= link_to 'New Message',
|
15
|
+
<div id="new_message" ><%= link_to 'New Message', new_message_path %></div>
|
16
16
|
<div class="space_center">
|
17
17
|
</div>
|
18
18
|
<div class="space_center">
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<div id="map_location" class="content_size">
|
2
|
-
<%= t('location.message', :location => "#{ image_tag('btn/btn_inbox.png' , :class => 'btn_config') } #{ t('inbox.one') }: <span class=\"name_group\">#{ sanitize
|
2
|
+
<%= t('location.message', :location => "#{ image_tag('btn/btn_inbox.png' , :class => 'btn_config') } #{ t('inbox.one') }: <span class=\"name_group\">#{ sanitize current_subject.name }</span>").html_safe %>
|
3
3
|
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= div_for (message) do %>
|
2
|
+
<div class="actor_logo">
|
3
|
+
<%= link_to image_tag(message.text,
|
4
|
+
:alt => message.text),
|
5
|
+
message %>
|
6
|
+
</div>
|
7
|
+
<div class="activity_content_message">
|
8
|
+
<div class="actor_name_message">
|
9
|
+
<%= link_to(message.text, message) %>
|
10
|
+
</div>
|
11
|
+
<div class="option_msg">
|
12
|
+
<div class="edit_message"><%= link_to ( image_tag('btn/btn_edit.png', :class=>"btn_config"), edit_message_path(message)) %></div>
|
13
|
+
<div class="detele_message"><%= link_to ( image_tag('btn/btn_delete.png', :class=>"btn_config"), message, :confirm => 'Are you sure?', :method => :delete) %></div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<% end %>
|
File without changes
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
<p id="notice"><%= notice %></p>
|
3
|
+
|
4
|
+
<p>
|
5
|
+
<b>Sender:</b>
|
6
|
+
<%= @message.sender %>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p>
|
10
|
+
<b>Receiver:</b>
|
11
|
+
<%= @message.receiver %>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
<b>Text:</b>
|
16
|
+
<%= @message.text %>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
|
20
|
+
<%= link_to 'Edit', edit_message_path(@message) %> |
|
21
|
+
<%= link_to 'Back', messages_path %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<% if (cs = subject.subjects(:direction => :receivers)).present? %>
|
2
|
+
|
3
|
+
<div class="contacts_header">
|
4
|
+
<%=image_tag("btn/btn_friend.png", :class => "contacts_icon")%>
|
5
|
+
<div class="contacts_text_header">
|
6
|
+
<%= cs.count %> <%= t('contact', :count => cs.count) %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<div class ="contacts">
|
10
|
+
<div class="contact">
|
11
|
+
<% cs.each do |contact| %>
|
12
|
+
<%= link_to(image_tag(contact.logo.url, :alt => contact.name , :size => "40x40"), contact) %>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="contacts_footer">
|
17
|
+
<%=link_to(image_tag("btn/btn_next.png", :alt => "next"), '#') %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<% end %>
|
@@ -7,17 +7,17 @@
|
|
7
7
|
@tie.receiver_subject %>
|
8
8
|
</div>
|
9
9
|
<div class="activity_add_ties">
|
10
|
-
<div><%= t('message')+":" %><br />
|
10
|
+
<div><%= t('message.one')+":" %><br />
|
11
11
|
<%= form_for @tie,
|
12
12
|
:remote => true do |f| %>
|
13
13
|
<%= f.hidden_field :receiver_id %>
|
14
14
|
<%= f.hidden_field :sender_id %>
|
15
|
-
<%= f.
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
<%= f.text_area :message, :class =>"input_new_tie" %>
|
16
|
+
|
17
|
+
<%= f.select :relation_name, @tie.sender.relations.sort.map{ |r| [ r.name, r.name ] } %>
|
18
|
+
|
19
19
|
<div class="ties_btn">
|
20
|
-
<%= submit_tag t('
|
20
|
+
<%= submit_tag t('contact.new.submit'), :class => "tie_btn" %>
|
21
21
|
</div>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
<% if
|
1
|
+
<% if current_subject.pending_ties.any? %>
|
2
2
|
<div class="middle_box">
|
3
3
|
<div class="middle_box_header">
|
4
|
-
<%= image_tag('
|
4
|
+
<%= image_tag('btn/btn_notifications.png', :class => "middle_box_picture_icon") %>
|
5
5
|
<div class="middle_box_text_header"><%= t 'tie.pending.other' %></div>
|
6
6
|
<div class="title_righ">
|
7
7
|
<a href="#"><%= t 'tie.pending.all' %></a>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
|
11
|
-
<%= render
|
11
|
+
<%= render current_subject.pending_ties %>
|
12
12
|
|
13
13
|
</div>
|
14
14
|
<% end -%>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if
|
1
|
+
<% if current_subject.suggestion.present? %>
|
2
2
|
<% content_for :javascript do %>
|
3
3
|
|
4
4
|
$(".suggestions .tie_close").livequery("click",function(){
|
@@ -19,8 +19,8 @@
|
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
<div class="suggestions">
|
22
|
-
<% if (sgs =
|
22
|
+
<% if (sgs = current_subject.suggestions(2)).present? %>
|
23
23
|
<%= render sgs %>
|
24
24
|
<%end%>
|
25
25
|
</div>
|
26
|
-
<%end%>
|
26
|
+
<%end%>
|
@@ -3,14 +3,14 @@
|
|
3
3
|
<% else %>
|
4
4
|
var old_tie = $("#tie_<%= dom_id(@tie.receiver_subject) %>");
|
5
5
|
var link_tie = $("#tie_link<%= dom_id(@tie.receiver_subject) %>");
|
6
|
-
<% if @tie.receiver_subject.is_a?(Group)
|
6
|
+
<% if @tie.receiver_subject.is_a?(Group) #group tie %>
|
7
7
|
// add to group list
|
8
8
|
if ($('#carousel_ul').length) { // element found
|
9
9
|
$("#carousel_ul").prepend("<%= escape_javascript(render @tie.receiver_subject) %>");
|
10
10
|
}else{ // no element found
|
11
11
|
$("#my_groups").html("<%= escape_javascript(render 'users/groups' )%>");
|
12
12
|
}
|
13
|
-
$("#group_count").html("<%=
|
13
|
+
$("#group_count").html("<%=current_subject.recent_groups.count%>");
|
14
14
|
link_tie.replaceWith("<%= escape_javascript(link_follow_state) %>");
|
15
15
|
link_tie.slideUp(300).delay(800).fadeIn(400);
|
16
16
|
<% else %>
|
@@ -20,8 +20,7 @@
|
|
20
20
|
} else {
|
21
21
|
old_tie.hide();
|
22
22
|
}
|
23
|
-
|
24
|
-
|
25
|
-
<% end %>
|
23
|
+
|
24
|
+
$(".boxy-inner .close").click();
|
26
25
|
<% end %>
|
27
26
|
<% end %>
|
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('contact.new.title', :name => @tie.receiver_subject.name )) %>" });
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<% if
|
1
|
+
<% if user.recent_groups.any? %>
|
2
2
|
<div id="groups_title" class="content_size">
|
3
|
-
<%=t('group.one', :count =>
|
3
|
+
<%=t('group.one', :count => user.recent_groups.count) %> (<span id="group_count"><%=user.recent_groups.count%></span>)
|
4
4
|
</div>
|
5
5
|
<div id="groups_list" class="content_size">
|
6
|
-
<% if (
|
6
|
+
<% if (user.recent_groups.count) > 10 %>
|
7
7
|
<div id='carousel_container'>
|
8
8
|
<div id='left_scroll'><%=image_tag("btn/group_left.png")%></div>
|
9
9
|
<div id='carousel_inner'>
|
@@ -11,8 +11,8 @@
|
|
11
11
|
<% else %>
|
12
12
|
<div class="space_center"></div>
|
13
13
|
<%end%>
|
14
|
-
<%= render
|
15
|
-
<% if (
|
14
|
+
<%= render user.recent_groups %>
|
15
|
+
<% if (user.recent_groups.count) > 10 %>
|
16
16
|
</ul>
|
17
17
|
</div>
|
18
18
|
<div id='right_scroll'><%=image_tag("btn/group_right.png")%></div>
|
@@ -11,7 +11,9 @@
|
|
11
11
|
<div class="post_picture"><%= link_to (image_tag(user.logo.url , :size => "50x50", :alt => user.name )),user %></div>
|
12
12
|
<div class="post_browse_content_people content_size">
|
13
13
|
<div class="post_browse_title content_size" ><%=link_to(user.name, user)%></div>
|
14
|
-
|
14
|
+
<div class="content_size">
|
15
|
+
<%= ties_to(user) %>
|
16
|
+
</div>
|
15
17
|
</div>
|
16
18
|
</div>
|
17
19
|
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<%= render :partial => 'menu' %>
|
5
5
|
<div class="space_center">
|
6
6
|
</div>
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
|
8
|
+
<%= render :partial => 'subjects/contacts', :locals => { :subject => @user } %>
|
9
|
+
|
10
10
|
<div class="space_center">
|
11
11
|
</div>
|
12
12
|
<div class="space_center">
|
@@ -12,7 +12,9 @@
|
|
12
12
|
<div class="space_center">
|
13
13
|
</div>
|
14
14
|
|
15
|
-
<%= render :partial => "users/groups"
|
15
|
+
<%= render :partial => "users/groups",
|
16
|
+
:locals => { :user => @user } %>
|
17
|
+
|
16
18
|
<%= render :partial => "activities/activities",
|
17
|
-
:locals
|
18
|
-
|
19
|
+
:locals => { :activities => @user.profile_wall(current_subject).paginate,
|
20
|
+
:owner => @user } %>
|
data/config/locales/en.yml
CHANGED
@@ -15,28 +15,18 @@ en:
|
|
15
15
|
comment:
|
16
16
|
input: "Write a comment..."
|
17
17
|
confirm_delete: "Delete comment?"
|
18
|
+
contact:
|
19
|
+
one: "Contact"
|
20
|
+
other: "Contacts"
|
21
|
+
new:
|
22
|
+
link: "+ Add contact"
|
23
|
+
title: "Add %{name} as contact"
|
24
|
+
submit: "+ Add contact"
|
18
25
|
copyright: "2010 Copyright - All rights reserved"
|
19
26
|
days: Days
|
20
27
|
delete:
|
21
28
|
confirm: Delete %{element}}?
|
22
|
-
follow: "Follow"
|
23
|
-
follower:
|
24
|
-
one: Follower
|
25
|
-
other: Followers
|
26
|
-
new: "+ Follow"
|
27
|
-
confirm_new: "Do you want to follow %{name}?"
|
28
|
-
submit: "+ Follow"
|
29
29
|
forgot_password?: "Forgot you password?"
|
30
|
-
friend:
|
31
|
-
one: Friend
|
32
|
-
other: Friends
|
33
|
-
my: "My Friends"
|
34
|
-
add: Add as Friend
|
35
|
-
submit: "Accept as friend"
|
36
|
-
friend_request:
|
37
|
-
new: "+ Add as friend"
|
38
|
-
send: "Send Request"
|
39
|
-
confirm_new: "Do you want to add %{name} as friend?"
|
40
30
|
frontpage:
|
41
31
|
collaborate:
|
42
32
|
sentence1: "Organize your projects and activities"
|
@@ -48,7 +38,7 @@ en:
|
|
48
38
|
participants: "Participants"
|
49
39
|
groups: "Groups"
|
50
40
|
tags: "Tags"
|
51
|
-
main_title: "SocialStream a core for building social network
|
41
|
+
main_title: "SocialStream is a core for building social network websites."
|
52
42
|
meet:
|
53
43
|
sentence1: "Meet interesting people and groups"
|
54
44
|
share:
|
@@ -72,7 +62,8 @@ en:
|
|
72
62
|
one: "Inbox"
|
73
63
|
location:
|
74
64
|
message: "You are here > %{location}"
|
75
|
-
message:
|
65
|
+
message:
|
66
|
+
one: "Message"
|
76
67
|
menu:
|
77
68
|
options: "Menu Options"
|
78
69
|
post:
|
@@ -81,6 +72,9 @@ en:
|
|
81
72
|
one: "Profile"
|
82
73
|
public:
|
83
74
|
other: "Everybody"
|
75
|
+
representation:
|
76
|
+
action: "representing"
|
77
|
+
change: "Change"
|
84
78
|
sign_in: "Sign in"
|
85
79
|
sign_up: "Sign up"
|
86
80
|
sign_out_user: "Sign out (%{user})"
|
data/config/routes.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
-
|
3
|
-
|
2
|
+
|
3
|
+
root :to => "frontpage#index"
|
4
4
|
|
5
5
|
match 'home' => 'home#index', :as => :home
|
6
6
|
match 'home' => 'home#index', :as => :user_root # devise after_sign_in_path_for
|
7
7
|
|
8
|
+
devise_for :users
|
9
|
+
resources :users
|
10
|
+
|
11
|
+
resource :representation
|
12
|
+
|
8
13
|
resources :groups
|
9
14
|
|
10
15
|
resources :ties do
|
@@ -12,12 +17,14 @@ Rails.application.routes.draw do
|
|
12
17
|
get 'suggestion'
|
13
18
|
end
|
14
19
|
end
|
20
|
+
|
15
21
|
resources :activities do
|
16
22
|
resource :like
|
17
23
|
end
|
24
|
+
|
25
|
+
|
18
26
|
resources :posts
|
19
27
|
resources :comments
|
20
|
-
resources :
|
28
|
+
resources :messages
|
21
29
|
|
22
|
-
root :to => "frontpage#index"
|
23
30
|
end
|
@@ -10,8 +10,8 @@ class SocialStream::InstallGenerator < Rails::Generators::Base #:nodoc:
|
|
10
10
|
copy_file 'initializer.rb', 'config/initializers/social_stream.rb'
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
14
|
-
copy_file '
|
13
|
+
def create_config_relations_file
|
14
|
+
copy_file 'relations.yml', 'config/relations.yml'
|
15
15
|
end
|
16
16
|
|
17
17
|
def copy_public
|
@@ -28,14 +28,6 @@ class SocialStream::InstallGenerator < Rails::Generators::Base #:nodoc:
|
|
28
28
|
'app/views/layouts/application.html.erb'
|
29
29
|
end
|
30
30
|
|
31
|
-
def create_seed_code
|
32
|
-
seed_code = "\nSocialStream.seed!"
|
33
|
-
|
34
|
-
in_root do
|
35
|
-
append_file 'db/seeds.rb', seed_code
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
31
|
# TODO: hook_for :orm
|
40
32
|
require 'rails/generators/active_record'
|
41
33
|
|
@@ -13,5 +13,5 @@ SocialStream.setup do |config|
|
|
13
13
|
# Type of activities managed by actors
|
14
14
|
# Remember you must add an "activity_object_id" foreign key column to your migration!
|
15
15
|
#
|
16
|
-
# config.activity_objects = [ :post, :comment ]
|
16
|
+
# config.activity_objects = [ :post, :comment, :messages ]
|
17
17
|
end
|
@@ -67,10 +67,19 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
67
67
|
|
68
68
|
add_index "groups", "actor_id"
|
69
69
|
|
70
|
+
create_table "messages", :force => true do |t|
|
71
|
+
t.integer "activity_object_id"
|
72
|
+
t.datetime "created_at"
|
73
|
+
t.datetime "updated_at"
|
74
|
+
t.text "text"
|
75
|
+
end
|
76
|
+
|
77
|
+
add_index "messages", "activity_object_id"
|
78
|
+
|
70
79
|
create_table "permissions", :force => true do |t|
|
71
80
|
t.string "action"
|
72
81
|
t.string "object"
|
73
|
-
t.string "
|
82
|
+
t.string "function"
|
74
83
|
t.datetime "created_at"
|
75
84
|
t.datetime "updated_at"
|
76
85
|
end
|
@@ -84,19 +93,8 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
84
93
|
|
85
94
|
add_index "posts", "activity_object_id"
|
86
95
|
|
87
|
-
create_table "private_messages", :force => true do |t|
|
88
|
-
t.integer "sender_id"
|
89
|
-
t.integer "receiver_id"
|
90
|
-
t.datetime "created_at"
|
91
|
-
t.datetime "updated_at"
|
92
|
-
t.text "text"
|
93
|
-
end
|
94
|
-
|
95
|
-
add_index "private_messages", "sender_id"
|
96
|
-
add_index "private_messages", "receiver_id"
|
97
|
-
|
98
96
|
create_table "profiles", :force => true do |t|
|
99
|
-
t.integer "
|
97
|
+
t.integer "actor_id"
|
100
98
|
t.date "birthday"
|
101
99
|
t.datetime "created_at"
|
102
100
|
t.datetime "updated_at"
|
@@ -117,7 +115,7 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
117
115
|
t.string "im", :limit => 45
|
118
116
|
end
|
119
117
|
|
120
|
-
add_index "profiles", "
|
118
|
+
add_index "profiles", "actor_id"
|
121
119
|
|
122
120
|
create_table "relation_permissions", :force => true do |t|
|
123
121
|
t.integer "relation_id"
|
@@ -139,9 +137,6 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
139
137
|
t.integer "parent_id"
|
140
138
|
t.integer "lft"
|
141
139
|
t.integer "rgt"
|
142
|
-
t.integer "inverse_id"
|
143
|
-
t.integer "granted_id"
|
144
|
-
t.boolean "reflexive", :default => false
|
145
140
|
end
|
146
141
|
|
147
142
|
add_index "relations", "parent_id"
|
@@ -164,7 +159,6 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
164
159
|
t.integer "tie_id"
|
165
160
|
t.integer "activity_id"
|
166
161
|
t.boolean "read"
|
167
|
-
t.boolean "deleted"
|
168
162
|
t.boolean "original", :default => true
|
169
163
|
end
|
170
164
|
|
@@ -177,7 +171,6 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
177
171
|
t.integer "relation_id"
|
178
172
|
t.datetime "created_at"
|
179
173
|
t.datetime "updated_at"
|
180
|
-
t.text "message"
|
181
174
|
end
|
182
175
|
|
183
176
|
add_index "ties", "receiver_id"
|
@@ -198,8 +191,6 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
198
191
|
|
199
192
|
t.timestamps
|
200
193
|
t.integer "actor_id"
|
201
|
-
# FIXME: move to profile
|
202
|
-
t.date "birthday"
|
203
194
|
end
|
204
195
|
|
205
196
|
add_index "users", "actor_id"
|
@@ -218,9 +209,11 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
218
209
|
|
219
210
|
add_foreign_key "groups", "actors", :name => "groups_on_actor_id"
|
220
211
|
|
212
|
+
add_foreign_key "messages", "activity_objects", :name => "messages_on_activity_object_id"
|
213
|
+
|
221
214
|
add_foreign_key "posts", "activity_objects", :name => "posts_on_activity_object_id"
|
222
215
|
|
223
|
-
add_foreign_key "profiles", "
|
216
|
+
add_foreign_key "profiles", "actors", :name => "profiles_on_actor_id"
|
224
217
|
|
225
218
|
add_foreign_key "relation_permissions", "relations", :name => "relation_permissions_on_relation_id"
|
226
219
|
add_foreign_key "relation_permissions", "permissions", :name => "relation_permissions_on_permission_id"
|
@@ -250,9 +243,11 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
250
243
|
|
251
244
|
remove_foreign_key "groups", :name => "groups_on_actor_id"
|
252
245
|
|
246
|
+
remove_foreign_key "messages", :name => "messages_on_activity_object_id"
|
247
|
+
|
253
248
|
remove_foreign_key "posts", :name => "posts_on_activity_object_id"
|
254
249
|
|
255
|
-
remove_foreign_key "profiles", :name => "
|
250
|
+
remove_foreign_key "profiles", :name => "profiles_on_actor_id"
|
256
251
|
|
257
252
|
remove_foreign_key "relation_permissions", :name => "relation_permissions_on_relation_id"
|
258
253
|
remove_foreign_key "relation_permissions", :name => "relation_permissions_on_permission_id"
|
@@ -276,9 +271,9 @@ class CreateSocialStream < ActiveRecord::Migration
|
|
276
271
|
drop_table :actors
|
277
272
|
drop_table :comments
|
278
273
|
drop_table :groups
|
274
|
+
drop_table :messages
|
279
275
|
drop_table :permissions
|
280
276
|
drop_table :posts
|
281
|
-
drop_table :private_messages
|
282
277
|
drop_table :profiles
|
283
278
|
drop_table :relation_permissions
|
284
279
|
drop_table :relations
|