social_stream 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. data/app/controllers/api_controller.rb +1 -1
  2. data/app/controllers/contacts_controller.rb +1 -1
  3. data/app/controllers/conversations_controller.rb +5 -5
  4. data/app/controllers/groups_controller.rb +1 -0
  5. data/app/controllers/likes_controller.rb +17 -5
  6. data/app/controllers/messages_controller.rb +3 -1
  7. data/app/controllers/profiles_controller.rb +4 -0
  8. data/app/controllers/representations_controller.rb +12 -1
  9. data/app/controllers/tags_controller.rb +15 -0
  10. data/app/controllers/users_controller.rb +3 -0
  11. data/app/helpers/activities_helper.rb +13 -6
  12. data/app/models/activity.rb +53 -52
  13. data/app/models/activity_object.rb +2 -0
  14. data/app/models/actor.rb +85 -19
  15. data/app/models/avatar.rb +2 -1
  16. data/app/models/like.rb +28 -13
  17. data/app/models/permission.rb +7 -7
  18. data/app/models/profile.rb +1 -1
  19. data/app/models/relation/custom.rb +111 -0
  20. data/app/models/relation/public.rb +42 -0
  21. data/app/models/relation.rb +1 -89
  22. data/app/models/sphere.rb +7 -0
  23. data/app/models/tie.rb +65 -52
  24. data/app/models/tie_activity.rb +38 -0
  25. data/app/views/activities/_new.html.erb +4 -4
  26. data/app/views/activities/_options.html.erb +2 -2
  27. data/app/views/actors/_actor.html.erb +0 -0
  28. data/app/views/avatars/index.html.erb +5 -2
  29. data/app/views/comments/_new.html.erb +2 -2
  30. data/app/views/contacts/index.html.erb +5 -1
  31. data/app/views/conversations/edit.html.erb +4 -0
  32. data/app/views/conversations/index.html.erb +5 -1
  33. data/app/views/conversations/show.html.erb +4 -0
  34. data/app/views/frontpage/index.html.erb +4 -0
  35. data/app/views/groups/_sidebar_index.html.erb +7 -42
  36. data/app/views/groups/index.html.erb +3 -0
  37. data/app/views/groups/new.html.erb +3 -0
  38. data/app/views/groups/show.html.erb +7 -0
  39. data/app/views/layouts/_account.html.erb +16 -0
  40. data/app/views/layouts/_footer.html.erb +1 -1
  41. data/app/views/layouts/_header.erb +7 -22
  42. data/app/views/layouts/_representation.html.erb +25 -12
  43. data/app/views/layouts/application.html.erb +6 -3
  44. data/app/views/layouts/frontpage.html.erb +1 -1
  45. data/app/views/likes/create.js.erb +1 -1
  46. data/app/views/likes/destroy.js.erb +1 -1
  47. data/app/views/messages/new.html.erb +7 -5
  48. data/app/views/profiles/_profile.html.erb +20 -0
  49. data/app/views/profiles/edit.html.erb +42 -0
  50. data/app/views/profiles/show.html.erb +4 -0
  51. data/app/views/profiles/update.js.erb +5 -0
  52. data/app/views/subjects/_toolbar_profile_menu_tie_options.html.erb +3 -1
  53. data/app/views/ties/_new.html.erb +1 -1
  54. data/app/views/users/index.html.erb +4 -0
  55. data/app/views/users/show.html.erb +5 -0
  56. data/config/locales/en.yml +54 -1
  57. data/config/routes.rb +3 -1
  58. data/lib/generators/social_stream/install_generator.rb +2 -1
  59. data/lib/generators/social_stream/templates/migration.rb +23 -27
  60. data/lib/generators/social_stream/templates/public/images/btn/error.png +0 -0
  61. data/lib/generators/social_stream/templates/public/images/btn/info.png +0 -0
  62. data/lib/generators/social_stream/templates/public/images/btn/like.png +0 -0
  63. data/lib/generators/social_stream/templates/public/images/btn/nolike.png +0 -0
  64. data/lib/generators/social_stream/templates/public/images/btn/success.png +0 -0
  65. data/lib/generators/social_stream/templates/public/images/btn/warning.png +0 -0
  66. data/lib/generators/social_stream/templates/public/javascripts/ajax.paginate.js +12 -19
  67. data/lib/generators/social_stream/templates/public/javascripts/jquery.validate.js +1 -1
  68. data/lib/generators/social_stream/templates/public/javascripts/main.js +20 -10
  69. data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +21 -4
  70. data/lib/generators/social_stream/templates/public/stylesheets/default/header.css +8 -3
  71. data/lib/generators/social_stream/templates/relations.yml +7 -13
  72. data/lib/social_stream/ability.rb +39 -20
  73. data/lib/social_stream/controllers/helpers.rb +6 -0
  74. data/lib/social_stream/models/object.rb +8 -4
  75. data/lib/social_stream/models/subject.rb +6 -0
  76. data/lib/social_stream/rails.rb +6 -3
  77. data/lib/social_stream/version.rb +1 -1
  78. data/lib/tasks/db/populate.rake +11 -1
  79. data/social_stream.gemspec +7 -8
  80. data/spec/controllers/comments_controller_spec.rb +6 -2
  81. data/spec/controllers/posts_controller_spec.rb +93 -5
  82. data/spec/controllers/profiles_controller_spec.rb +58 -1
  83. data/spec/controllers/representations_controller_spec.rb +51 -0
  84. data/spec/controllers/users_controller_spec.rb +28 -0
  85. data/spec/dummy/config/relations.yml +7 -13
  86. data/spec/dummy/db/schema.rb +2 -13
  87. data/spec/factories/tie.rb +1 -1
  88. data/spec/models/activity_spec.rb +28 -67
  89. data/spec/models/profile_spec.rb +38 -0
  90. data/spec/models/tie_activity_spec.rb +88 -31
  91. data/spec/models/tie_spec.rb +20 -14
  92. data/spec/support/db.rb +8 -10
  93. data/spec/support/migrations.rb +24 -0
  94. metadata +74 -59
@@ -1,3 +1,7 @@
1
+ <% content_for :title do%>
2
+ <%= t('contact.other')%>
3
+ <%end%>
4
+
1
5
  <% content_for :headers do %>
2
6
  <%= javascript_include_tag 'jquery.ba-url','ajax.paginate' %>
3
7
  <% end %>
@@ -16,7 +20,7 @@
16
20
  <%= link_to t('contact.all_n', :count => current_subject.contacts(:direction => :sent).count), contacts_path %> -
17
21
  <% Actor.distinct_initials.
18
22
  contacted_from(current_subject).
19
- merge(Tie.original.related_by(current_subject.relations.find_by_id(params[:relation]))).
23
+ merge(Tie.related_by(current_subject.relations.find_by_id(params[:relation]))).
20
24
  distinct_initials.
21
25
  each do |l| %>
22
26
  <%= link_to l.initial,{:letter => l.initial,:page => 1},:class => "contact_letter_link" %>
@@ -1,3 +1,7 @@
1
+ <% content_for :title do %>
2
+ <%=t('message.other')%>
3
+ <% end %>
4
+
1
5
  <h1>Editing message</h1>
2
6
 
3
7
  <%= render 'form' %>
@@ -1,9 +1,13 @@
1
+ <% content_for :title do %>
2
+ <%=t('message.other')%>
3
+ <% end %>
4
+
1
5
  <% content_for :sidebar do %>
2
6
  <%= render :partial => 'home/sidebar' %>
3
7
  <% end %>
4
8
 
5
9
  <% content_for :headers do %>
6
- <%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
10
+ <%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
7
11
  <% end %>
8
12
 
9
13
  <% content_for :javascript do %>
@@ -1,3 +1,7 @@
1
+ <% content_for :title do %>
2
+ <%=t('message.other')%>
3
+ <% end %>
4
+
1
5
  <% content_for :sidebar do %>
2
6
  <%= render :partial => 'home/sidebar' %>
3
7
  <% end %>
@@ -1,3 +1,7 @@
1
+ <% content_for :title do%>
2
+ <%= t('welcome') %>
3
+ <%end%>
4
+
1
5
  <div class="banner_busqueda">
2
6
  <div id="espacio_busqueda">
3
7
  <% flash.each do |name, msg| %>
@@ -22,50 +22,15 @@
22
22
  <%= javascript_include_tag "jqcloud-0.1.3.min.js" %>
23
23
  <% end %>
24
24
 
25
+
26
+ <% tags = ActivityObject.tag_counts %>
27
+
25
28
  <script type="text/javascript">
26
29
  var word_list = new Array(
27
- {text: "Lorem", weight: 13, url: "https://github.com/DukeLeNoir/jQCloud"},
28
- {text: "Ipsum", weight: 10.5, url: "http://jquery.com/"},
29
- {text: "Dolor", weight: 9.4},
30
- {text: "Sit", weight: 8},
31
- {text: "Amet", weight: 6.2},
32
- {text: "Consectetur", weight: 5},
33
- {text: "Adipiscing", weight: 5},
34
- {text: "Elit", weight: 5},
35
- {text: "Nam et", weight: 5},
36
- {text: "Leo", weight: 4},
37
- {text: "Sapien", weight: 4, url: "http://www.lucaongaro.eu/"},
38
- {text: "Pellentesque", weight: 3},
39
- {text: "habitant", weight: 3},
40
- {text: "morbi", weight: 3},
41
- {text: "tristisque", weight: 3},
42
- {text: "senectus", weight: 3},
43
- {text: "et netus", weight: 3},
44
- {text: "et malesuada", weight: 3},
45
- {text: "fames", weight: 2},
46
- {text: "ac turpis", weight: 2},
47
- {text: "egestas", weight: 2},
48
- {text: "Aenean", weight: 2},
49
- {text: "vestibulum", weight: 2},
50
- {text: "elit", weight: 2},
51
- {text: "sit amet", weight: 2},
52
- {text: "metus", weight: 2},
53
- {text: "adipiscing", weight: 2},
54
- {text: "ut ultrices", weight: 2},
55
- {text: "justo", weight: 1},
56
- {text: "dictum", weight: 1},
57
- {text: "Ut et leo", weight: 1},
58
- {text: "metus", weight: 1},
59
- {text: "at molestie", weight: 1},
60
- {text: "purus", weight: 1},
61
- {text: "Curabitur", weight: 1},
62
- {text: "diam", weight: 1},
63
- {text: "dui", weight: 1},
64
- {text: "ullamcorper", weight: 1},
65
- {text: "id vuluptate ut", weight: 1},
66
- {text: "mattis", weight: 1},
67
- {text: "et nulla", weight: 1},
68
- {text: "Sed", weight: 1}
30
+ <% tag_cloud(tags, %w(5 7 9 11 13 15)) do |tag, weight| %>
31
+ {text: "<%= tag.name %>", weight: <%= weight %>, url: "?tag=<%= tag.name %>"},
32
+ <% end %>
33
+ {text: "", weight:0, url:""}
69
34
  );
70
35
  $(document).ready(function() {
71
36
  $("#wordcloud").jQCloud(word_list);
@@ -1,3 +1,6 @@
1
+ <% content_for :title do%>
2
+ <%= t('group.other') %>
3
+ <%end%>
1
4
  <% content_for :headers do -%>
2
5
  <%= javascript_include_tag 'jqcloud-0.1.3.min','jquery.ba-url','ajax.paginate' %>
3
6
  <%= stylesheet_link_tag 'smoothness/jquery-ui-1.8.4.custom' %>
@@ -1,3 +1,6 @@
1
+ <% content_for :title do%>
2
+ <%= t('group.new.action')%>
3
+ <%end%>
1
4
  <% content_for :headers do %>
2
5
  <%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
3
6
  <%= javascript_include_tag 'jquery.fcbkcomplete.min', 'jquery.validate' %>
@@ -1,3 +1,10 @@
1
+ <% content_for :title do %>
2
+ <%= @group.name%>
3
+ <% end %>
4
+ <% content_for :description do %>
5
+ <%= @group.profile.description%>
6
+ <% end %>
7
+
1
8
  <% content_for :sidebar do %>
2
9
  <%= render :partial => 'sidebar_show' %>
3
10
  <% end %>
@@ -0,0 +1,16 @@
1
+ <ul class="sf-menu" >
2
+ <li class="current" id="account">
3
+ <a href="#" class="sf-with-ul" id="btn_menu_config"><%= t('account.one') %><span class="sf-sub-indicator"> »</span></a>
4
+ <ul>
5
+ <li>
6
+ <%= link_to 'Configurations', '#' %>
7
+ </li>
8
+ <li>
9
+ <%= link_to 'Notifications', '#' %>
10
+ </li>
11
+ <li class="current">
12
+ <%= link_to 'Privacy', '#' %>
13
+ </li>
14
+ </ul>
15
+ </li>
16
+ </ul>
@@ -1,7 +1,7 @@
1
1
  <div id="footerFront">
2
2
  <div id="footer">
3
3
  <ul>
4
- <li>2010 © </li>
4
+ <li>2011 © </li>
5
5
  <li id="trade_mark"><%= link_to t('socialstream'), 'http://social-stream.dit.upm.es/' %></li>
6
6
  </ul>
7
7
  <div class="row">
@@ -13,39 +13,24 @@
13
13
  <li class="btn_menu_home"><%= link_to t('home'), home_path %></li>
14
14
  <li class="pipe">|</li>
15
15
  <li class="btn_menu_profile"><%= link_to(t('profile.one'), current_subject)%></li>
16
- <li class="pipe"> | </li>
16
+ <li class="pipe">|</li>
17
17
  <li class="btn_menu_browse"><%=link_to(t('browse'),users_path) %></li>
18
18
  </ul>
19
19
  </div>
20
20
  <% end %>
21
21
  </div>
22
22
  <div id="header_right">
23
- <% if user_signed_in? %>
24
- <div id="account">
25
- <ul class="sf-menu">
26
- <li class="current" >
27
- <%# link_to t('account.one')+ '<span class='+'sf-sub-indicator> »</span>' , '#' , :class=>"sf-with-ul" %>
28
- <a href="#" class="sf-with-ul" id="btn_menu_config">Account<span class="sf-sub-indicator"> »</span></a>
29
-
30
- <ul>
31
- <li>
32
- <%= link_to 'Configurations', '#' %>
33
- </li>
34
- <li>
35
- <%= link_to 'Notifications', '#' %>
36
- </li>
37
- <li class="current">
38
- <%= link_to 'Privacy', '#' %>
39
- </li>
40
- </ul>
41
- </li>
23
+ <% if user_signed_in? %>
24
+ <%= render :partial => 'layouts/account' %>
25
+ <div class="menu_list menu_white" id="menu_pipe" >
26
+ <ul>
27
+ <li class="pipe">|</li>
42
28
  </ul>
43
29
  </div>
30
+ <%= render :partial => 'layouts/representation' %>
44
31
  <div class="menu_list menu_white" id="menu_account">
45
32
  <ul>
46
33
  <li class="pipe">|</li>
47
- <li class="pipe"><%= render :partial => 'layouts/representation' %></li>
48
- <li class="pipe"> | </li>
49
34
  <li class="btn_menu_exit"><%= link_to t('sign_out'), destroy_user_session_path %></li>
50
35
  </ul>
51
36
  </div>
@@ -1,17 +1,30 @@
1
-
2
- <%= link_to(image_tag(current_user.logo.url(:tie), :width => 20, :height => 20, :class => 'menu_icon'), current_user) %>
1
+ <div id="current_user_info">
2
+ <%= link_to(image_tag(current_user.logo.url(:representation), :width => 20, :height => 20, :class => 'menu_icon'), current_user) %>
3
3
  <%= link_to(current_user.name, current_user) %>
4
4
  <%= t('representation.action') %>
5
- <%= form_for(Representation.new(current_subject), :url => representation_path) do |f| %>
6
- <%= f.select :subject_dom_id, current_user.represented.unshift(current_user).map{ |s| [ s.name, dom_id(s) ] }, :class=>"button" %>
7
- <%= f.submit t('representation.change') %>
8
- <% end %>
9
-
10
-
5
+ </div>
6
+ <%= form_for(Representation.new(current_subject), :url => representation_path) do |f| %>
7
+ <%= f.select :subject_dom_id, current_user.represented.unshift(current_user).map{ |s| [ s.name, dom_id(s) ] }, :class=>"button sf-menu" %>
8
+ <%= f.submit t('representation.change') %>
9
+ <% end %>
10
+ <% representations = current_user.represented.unshift(current_user) %>
11
+ <% representations.delete(current_subject) %>
12
+ <div id="representations_menu">
13
+ <ul class="sf-menu" >
14
+ <li id="representation_li">
15
+ <a href="#" class="sf-with-ul" style="background: transparent url('<%= current_subject.logo.url(:representation)%>') no-repeat left top;"><%= current_subject.name %><span class="sf-sub-indicator"> »</span></a>
16
+ <ul>
17
+ <% representations.each do |representation| %>
18
+ <li>
19
+ <%= link_to representation.name , representation_path(:representation => {:subject_dom_id => dom_id(representation)}),:method => :post,:hola => "yes", :style => "background: transparent url('#{representation.logo.url(:representation)}') no-repeat left center;margin-left:2px;"%>
20
+ </li>
21
+ <% end %>
22
+ </ul>
23
+ </li>
24
+ </ul>
25
+ </div>
11
26
  <%-# this should be in content_for(:javascript), but the partial is rendered after yield(:javascript) -%>
12
27
  <script type="text/javascript" charset="utf-8">
13
- $("#representation_submit").hide();
14
- $("#representation_subject_dom_id").change(function() {
15
- $(this).closest("form").submit();
16
- });
28
+ $("#new_representation").hide();
29
+ $("#representation_li").show();
17
30
  </script>
@@ -2,7 +2,10 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
- <title><%= yield(:title) || t('socialstream') %></title>
5
+ <title><%= yield(:title).empty? ? t('socialstream') : yield(:title)%></title>
6
+ <meta name="keywords" content="SNA, social, stream, activity" >
7
+ <meta name="description" content= <%= yield(:description).empty? ? "" : yield(:description) %> >
8
+
6
9
  <%= stylesheet_link_tag "base", "header","home","footer",
7
10
  :media => "screen, projection" %>
8
11
  <%= javascript_include_tag 'jquery.min', 'jquery-ui.min','rails', 'jquery.livequery', 'ui.dropdownchecklist'%>
@@ -33,8 +36,8 @@
33
36
  </div>
34
37
  <div id="content">
35
38
  <% flash.each do |name, msg| %>
36
- <div id="<%= name %>">
37
- &laquo; <%= msg %> &raquo;
39
+ <div class="<%= name %>">
40
+ <%= msg %>
38
41
  </div>
39
42
  <% end %>
40
43
  <%= yield %>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
- <title><%= yield(:title) || t('socialstream') %></title>
5
+ <title><%= yield(:title).empty? ? t('socialstream') : yield(:title)%></title>
6
6
  <%= stylesheet_link_tag "header","frontpage", "base", "footer",
7
7
  :media => "screen, projection" %>
8
8
  <%= javascript_include_tag 'jquery', 'jquery.livequery' %>
@@ -1,2 +1,2 @@
1
- $(".verb_like#like_activity_<%= @like.activity.id %>").html("<%= escape_javascript(link_like(@like.activity) ) %>");
1
+ $(".verb_like#like_<%= dom_id(@like.object) %>").html("<%= escape_javascript(link_like(@like.object) ) %>");
2
2
 
@@ -1 +1 @@
1
- $(".verb_like#like_<%= dom_id(@like.activity) %>").html("<%= escape_javascript(link_like(@like.activity) ) %>");
1
+ $(".verb_like#like_<%= dom_id(@like.object) %>").html("<%= escape_javascript(link_like(@like.object) ) %>");
@@ -1,14 +1,16 @@
1
+ <% content_for :title do %>
2
+ <%=t('message.other')%>
3
+ <% end %>
1
4
  <% content_for :sidebar do %>
2
- <%= render :partial => 'home/sidebar' %>
5
+ <%= render :partial => 'home/sidebar' %>
3
6
  <% end %>
4
7
 
5
8
  <% toolbar :option => :messages %>
6
9
 
7
10
  <% content_for :headers do %>
8
- <%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
9
- <%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
10
- <%= javascript_include_tag 'jquery.fcbkcomplete.min','jquery.validate','ckeditor/ckeditor.js','ckeditor/adapters/jquery.js' %>
11
-
11
+ <%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
12
+ <%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
13
+ <%= javascript_include_tag 'jquery.fcbkcomplete.min','jquery.validate','ckeditor/ckeditor.js','ckeditor/adapters/jquery.js' %>
12
14
  <% end %>
13
15
 
14
16
  <% content_for :javascript do %>
@@ -197,3 +197,23 @@
197
197
  </div>
198
198
  </div>
199
199
  <% end %>
200
+ <div class="space_center"></div>
201
+ <% if @profile.subject.tag_list.count > 0 %>
202
+ <div class="block" id="tags_info">
203
+ <div class="header">
204
+ <div class="header_text">
205
+ Tags:
206
+ </div>
207
+ <div class="header_icon_right">
208
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles ,
209
+ :action => :edit, :section => "tags"%>
210
+ </div>
211
+ </div>
212
+ <div class="content">
213
+ <div class="field">
214
+ <%= @profile.subject.tag_list %>
215
+ </div>
216
+ </div>
217
+ </div>
218
+ <% end %>
219
+
@@ -26,6 +26,9 @@
26
26
  when "my_experience"
27
27
  level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.' + current_subject.class.to_s.downcase + '.experience'),
28
28
  :controller => :profiles , :action => :edit, :section => "my_experience")
29
+ when "tags"
30
+ level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.' + current_subject.class.to_s.downcase + '.tags'),
31
+ :controller => :profiles , :action => :edit, :section => "tags")
29
32
  end
30
33
  else
31
34
  level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.one'),
@@ -41,6 +44,45 @@ end %>
41
44
  <%= form_for(@profile, :url => [current_subject, :profile], :remote => true) do |f| %>
42
45
 
43
46
  <div class="block" id="profile_form">
47
+
48
+ <% if !params[:section].present? or params[:section].eql?("tags") %>
49
+ <% content_for :headers do %>
50
+ <%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
51
+ <%= javascript_include_tag 'jquery.fcbkcomplete.min', 'jquery.validate' %>
52
+ <% end %>
53
+
54
+ <% content_for :javascript do %>
55
+ $(function() {
56
+ $(".new_group").validate();
57
+ });
58
+ $("#profile_actor_attributes_tag_list").fcbkcomplete({
59
+ json_url: "<%= tags_path(:format => :json) %>",
60
+ cache: false,
61
+ filter_case: true,
62
+ filter_hide: true,
63
+ newel: false,
64
+ height: 6
65
+ });
66
+ <% @profile.subject.tag_list.each do |tag| %> $("#profile_actor_attributes_tag_list").trigger("addItem",{"title":"<%= tag %>","value":"<%= tag %>"});
67
+ <% end %>
68
+ <% end %>
69
+
70
+ <div class="row">
71
+ <div class="form_row">
72
+ <%= f.fields_for :actor do |actor_form| %>
73
+ <div class="form_row">
74
+ <div class="form_label">
75
+ <%= f.label t(current_subject.class.to_s.downcase + '.tags') %>
76
+ </div>
77
+ <div class="form_field">
78
+ <%= actor_form.select :tag_list, [], :class => "form_tag" %>
79
+ </div>
80
+ </div>
81
+ <%end%>
82
+ </div>
83
+ </div>
84
+ <% end %>
85
+
44
86
  <% if !params[:section].present? or params[:section].eql?("about_me") %>
45
87
  <% content_for :javascript do %>
46
88
  $(function () {
@@ -1,3 +1,7 @@
1
+ <% content_for :title do%>
2
+ <%= @profile.subject.name %>
3
+ <%end%>
4
+
1
5
  <% content_for :sidebar do %>
2
6
  <%= render :partial => 'users/sidebar_index' %>
3
7
  <% end %>
@@ -30,6 +30,11 @@
30
30
  $("#experience_info").addClass('section_highlight');
31
31
  <%end%>
32
32
 
33
+ <% if !params[:section].present? or params[:section].eql?("tags") %>
34
+ $("#tags").removeClass('section_normal');
35
+ $("#tags").addClass('section_highlight');
36
+ <%end%>
37
+
33
38
  <% else %>
34
39
  $("#profile_notice").html("<h2><%= pluralize(@profile.errors.count, "error") %> prohibited this profile from being saved:</h2>"
35
40
  +"<ul><% @profile.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul>");
@@ -1,6 +1,8 @@
1
1
  <%= menu_options[:like] || capture do %>
2
2
  <li>
3
- <%= link_to( image_tag("btn/btn_bookmark.png", :class => "menu_icon")+t('tie.add.bookmark'), '#') %>
3
+ <div class="verb_like" id="like_<%= dom_id(subject) %>">
4
+ <%= link_like(subject)%>
5
+ </div>
4
6
  </li>
5
7
  <% end %>
6
8
 
@@ -50,7 +50,7 @@
50
50
  <div id="relationPermissions">
51
51
  <p class="relationPermision"><input type="checkbox" class="checkbox_permission" name="tie[relation_permissions][]" value="<%= Permission.find_by_action_and_function_and_object("read","star_ties","activity").id%>"> <%= t('permissions.read.activity.star_ties', :user=> @tie.receiver.name) %></p>
52
52
  <p class="relationPermision"><input type="checkbox" class="checkbox_permission" name="tie[relation_permissions][]" value="<%= Permission.find_by_action("follow").id%>" checked="true"> <%= t('permissions.follow', :user=> @tie.receiver.name) %></p>
53
- <p class="relationPermision"><input type="checkbox" class="checkbox_permission" name="tie[relation_permissions][]" value="<%= Permission.find_by_action_and_function_and_object("create","tie","activity").id%>"> <%= t('permissions.create.activity.tie', :user=> @tie.receiver.name) %></p>
53
+ <p class="relationPermision"><input type="checkbox" class="checkbox_permission" name="tie[relation_permissions][]" value="<%= Permission.find_by_action_and_function_and_object("create", nil, "activity").id%>"> <%= t('permissions.create.activity.tie', :user=> @tie.receiver.name) %></p>
54
54
  </div>
55
55
  </div>
56
56
  </div>
@@ -1,3 +1,7 @@
1
+ <% content_for :title do%>
2
+ <%= t('user.other') %>
3
+ <%end%>
4
+
1
5
  <% content_for :headers do %>
2
6
  <%= javascript_include_tag 'jquery.ba-url','ajax.paginate' %>
3
7
  <% end %>
@@ -1,3 +1,8 @@
1
+ <% content_for :title do %>
2
+ <%= @user.name%>
3
+ <% end %>
4
+
5
+
1
6
  <% content_for :sidebar do %>
2
7
  <%= render :partial => 'sidebar_index' %>
3
8
  <% end %>
@@ -15,22 +15,66 @@ en:
15
15
  one: "Activity"
16
16
  other: "Activities"
17
17
  to_comment: "Comment"
18
- unlike: "Already I do not like"
18
+ unlike: "I do not like anymore"
19
19
  verb:
20
20
  follow:
21
21
  User:
22
22
  title: "%{subject} added %{contact} as contact."
23
23
  message: "%{name} added you as contact."
24
+ notification:
25
+ subject: "%{name} added you as contact."
26
+ body: "%{name} added you as contact."
24
27
  Group:
25
28
  title: "%{subject} added %{contact} as contact."
26
29
  message: "%{name} added you as contact."
30
+ notification:
31
+ subject: "%{name} added you as contact."
32
+ body: "%{name} added you as contact."
33
+ like:
34
+ User:
35
+ title: "%{subject} is a fan of %{contact}."
36
+ message: "%{name} is now your fan."
37
+ notification:
38
+ subject: "%{name} is now your fan."
39
+ body: "%{name} is now your fan."
40
+ Group:
41
+ title: "%{subject} is a fan of %{contact}."
42
+ message: "%{name} is now your fan."
43
+ notification:
44
+ subject: "%{name} is now your fan."
45
+ body: "%{name} is now your fan."
27
46
  make-friend:
28
47
  User:
29
48
  title: "%{subject} and %{contact} are now connected."
30
49
  message: "%{name} also added you as contact."
50
+ notification:
51
+ subject: "%{name} also added you as contact."
52
+ body: "%{name} also added you as contact."
31
53
  Group:
32
54
  title: "%{subject} added %{contact} as contact."
33
55
  message: "%{name} added you as contact."
56
+ notification:
57
+ subject: "%{name} added you as contact."
58
+ body: "%{name} added you as contact."
59
+ post:
60
+ User:
61
+ notification:
62
+ subject: "%{name} has posted something(%{direct_object}) in your wall"
63
+ body: "%{name} has posted something(%{direct_object}) in your wall"
64
+ Group:
65
+ notification:
66
+ subject: "%{name} has posted %{direct_object} in your wall"
67
+ body: "%{name} has posted something(%{direct_object}) in your wall"
68
+ update:
69
+ User:
70
+ notification:
71
+ subject: "%{name} has updated %{direct_object} in your wall"
72
+ body: "%{name} has updated something(%{direct_object}) in your wall"
73
+ Group:
74
+ notification:
75
+ subject: "%{name} has updated %{direct_object} in your wall"
76
+ body: "%{name} has updated something(%{direct_object}) in your wall"
77
+
34
78
  avatar:
35
79
  crop_image: "Crop the uploaded image"
36
80
  crop_submit: "Crop image"
@@ -50,6 +94,9 @@ en:
50
94
  profile_change: "Change your avatar"
51
95
  set_default: "Set as default"
52
96
  set_default_sure: "Are you sure you wan't to set this avatar as default?"
97
+ text:
98
+ new: "... or upload a new one"
99
+ use: "Use your saved avatars ..."
53
100
  upload: "Upload"
54
101
  browse: "Browse"
55
102
  button:
@@ -179,11 +226,13 @@ en:
179
226
  birthday: "Anniversary"
180
227
  experience: "Area of expertise"
181
228
  info: "Group information"
229
+ tags: "Group tags"
182
230
  user:
183
231
  about: "About me"
184
232
  birthday: "Birthday"
185
233
  experience: "Experience"
186
234
  info: "Personal information"
235
+ tags: "User tags"
187
236
  actualcity: "Actual City"
188
237
  address: "Address"
189
238
  contact: "Contact information"
@@ -217,6 +266,9 @@ en:
217
266
  products:
218
267
  one: "Product"
219
268
  other: "Products"
269
+ relation:
270
+ public:
271
+ name: "Public"
220
272
  share: "Share"
221
273
  sign_in: "Sign in"
222
274
  sign_out: "Sign out"
@@ -253,4 +305,5 @@ en:
253
305
  other: "Users"
254
306
  all: "All users"
255
307
  all_n: "All users (%{count})"
308
+ welcome: "Welcome to SocialStream!"
256
309
 
data/config/routes.rb CHANGED
@@ -18,13 +18,15 @@ Rails.application.routes.draw do
18
18
  # Social Stream subjects configured in config/initializers/social_stream.rb
19
19
  SocialStream.subjects.each do |actor|
20
20
  resources actor.to_s.pluralize do
21
+ resource :like
21
22
  resource :profile
22
23
  resources :activities
23
24
  end
24
25
  end
25
26
 
26
27
  match 'contacts' => 'contacts#index', :as => 'contacts'
27
-
28
+ match 'tags' => 'tags#index', :as => 'tags'
29
+
28
30
  # Find subjects by slug
29
31
  match 'subjects/lrdd/:id' => 'subjects#lrdd', :as => 'subject_lrdd'
30
32
 
@@ -1,6 +1,7 @@
1
1
  class SocialStream::InstallGenerator < Rails::Generators::Base #:nodoc:
2
2
  include Rails::Generators::Migration
3
3
 
4
+ hook_for :taggings, :as => :migration
4
5
  hook_for :authentication
5
6
  hook_for :messages
6
7
 
@@ -52,5 +53,5 @@ class SocialStream::InstallGenerator < Rails::Generators::Base #:nodoc:
52
53
  def create_migration_file
53
54
  migration_template 'migration.rb', 'db/migrate/create_social_stream.rb'
54
55
  end
55
-
56
+
56
57
  end