social_stream 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +5 -1
  3. data/README.rdoc +2 -2
  4. data/app/controllers/api_controller.rb +2 -1
  5. data/app/controllers/contacts_controller.rb +25 -2
  6. data/app/controllers/groups_controller.rb +12 -2
  7. data/app/controllers/notifications_controller.rb +72 -0
  8. data/app/controllers/permissions_controller.rb +10 -0
  9. data/app/controllers/relation/customs_controller.rb +8 -0
  10. data/app/controllers/spheres_controller.rb +12 -0
  11. data/app/helpers/contacts_helper.rb +24 -0
  12. data/app/helpers/location_helper.rb +26 -12
  13. data/app/helpers/notifications_helper.rb +23 -0
  14. data/app/helpers/permissions_helper.rb +16 -0
  15. data/app/helpers/profiles_helper.rb +31 -0
  16. data/app/helpers/subjects_helper.rb +0 -83
  17. data/app/helpers/toolbar_helper.rb +83 -0
  18. data/app/models/activity.rb +43 -36
  19. data/app/models/actor.rb +71 -14
  20. data/app/models/contact.rb +121 -0
  21. data/app/models/group.rb +3 -3
  22. data/app/models/permission.rb +33 -2
  23. data/app/models/relation.rb +1 -1
  24. data/app/models/relation/custom.rb +12 -1
  25. data/app/models/relation/public.rb +1 -1
  26. data/app/models/sphere.rb +3 -1
  27. data/app/models/tie.rb +35 -18
  28. data/app/views/activities/_walls.html.erb +2 -2
  29. data/app/views/api/activity_atom_feed.atom.builder +38 -38
  30. data/app/views/avatars/index.html.erb +12 -40
  31. data/app/views/comments/_new.html.erb +9 -8
  32. data/app/views/contacts/_contact.html.erb +20 -0
  33. data/app/views/contacts/_edit.html.erb +76 -0
  34. data/app/views/contacts/_form.html.erb +72 -0
  35. data/app/views/contacts/_index.html.erb +1 -1
  36. data/app/views/{ties → contacts}/_pendings.html.erb +3 -3
  37. data/app/views/{ties → contacts}/_suggestions.html.erb +5 -5
  38. data/app/views/contacts/_suggestions_and_pendings.html.erb +6 -0
  39. data/app/views/contacts/edit.html.erb +5 -0
  40. data/app/views/contacts/index.html.erb +1 -1
  41. data/app/views/contacts/new.html.erb +5 -0
  42. data/app/views/conversations/_conversation.html.erb +1 -1
  43. data/app/views/conversations/_index.html.erb +0 -5
  44. data/app/views/conversations/_show.html.erb +1 -2
  45. data/app/views/conversations/index.html.erb +4 -0
  46. data/app/views/conversations/index.js.erb +1 -0
  47. data/app/views/frontpage/index.html.erb +2 -3
  48. data/app/views/groups/_index.html.erb +5 -1
  49. data/app/views/groups/_new.html.erb +4 -3
  50. data/app/views/groups/_sidebar_index.html.erb +3 -10
  51. data/app/views/groups/_sidebar_show.html.erb +1 -9
  52. data/app/views/groups/index.html.erb +6 -8
  53. data/app/views/groups/show.html.erb +11 -4
  54. data/app/views/home/_sidebar.html.erb +1 -15
  55. data/app/views/home/index.html.erb +3 -2
  56. data/app/views/layouts/_account.html.erb +1 -1
  57. data/app/views/layouts/_flash.html.erb +5 -0
  58. data/app/views/layouts/_footer.html.erb +5 -4
  59. data/app/views/layouts/_representation.html.erb +5 -12
  60. data/app/views/layouts/application.html.erb +23 -20
  61. data/app/views/layouts/frontpage.html.erb +22 -10
  62. data/app/views/location/_location.html.erb +1 -1
  63. data/app/views/messages/_new.html.erb +0 -2
  64. data/app/views/notification_mailer/new_notification_email.html.erb +21 -0
  65. data/app/views/notification_mailer/new_notification_email.text.erb +11 -0
  66. data/app/views/notifications/_index.html.erb +21 -0
  67. data/app/views/notifications/_notification.html.erb +47 -0
  68. data/app/views/notifications/_show.html.erb +3 -0
  69. data/app/views/notifications/activities/_follow_body.html.erb +2 -0
  70. data/app/views/notifications/activities/_follow_subject.html.erb +2 -0
  71. data/app/views/notifications/activities/_like_body.html.erb +5 -0
  72. data/app/views/notifications/activities/_like_object_body.html.erb +2 -0
  73. data/app/views/notifications/activities/_like_object_subject.html.erb +2 -0
  74. data/app/views/notifications/activities/_like_subject.html.erb +5 -0
  75. data/app/views/notifications/activities/_like_subject_body.html.erb +1 -0
  76. data/app/views/notifications/activities/_like_subject_subject.html.erb +2 -0
  77. data/app/views/notifications/activities/_make-friend_body.html.erb +3 -0
  78. data/app/views/notifications/activities/_make-friend_subject.html.erb +2 -0
  79. data/app/views/notifications/activities/_post_body.html.erb +2 -0
  80. data/app/views/notifications/activities/_post_subject.html.erb +1 -0
  81. data/app/views/notifications/activities/_update_body.html.erb +1 -0
  82. data/app/views/notifications/activities/_update_subject.html.erb +1 -0
  83. data/app/views/notifications/index.html.erb +19 -0
  84. data/app/views/notifications/index.js.erb +8 -0
  85. data/app/views/notifications/show.html.erb +5 -0
  86. data/app/views/permissions/_index.html.erb +39 -0
  87. data/app/views/permissions/index.js.erb +10 -0
  88. data/app/views/profiles/_contact.html.erb +81 -0
  89. data/app/views/profiles/_experience.html.erb +22 -0
  90. data/app/views/profiles/_personal.html.erb +74 -0
  91. data/app/views/profiles/_profile.html.erb +12 -181
  92. data/app/views/profiles/_tags.html.erb +22 -0
  93. data/app/views/profiles/edit.html.erb +0 -14
  94. data/app/views/profiles/show.html.erb +14 -0
  95. data/app/views/profiles/update.js.erb +2 -28
  96. data/app/views/relation/customs/_form.html.erb +29 -0
  97. data/app/views/relation/customs/_index.html.erb +30 -0
  98. data/app/views/relation/customs/_list.html.erb +36 -0
  99. data/app/views/relation/customs/create.js.erb +20 -0
  100. data/app/views/relation/customs/index.js.erb +2 -0
  101. data/app/views/relation/customs/update.js.erb +6 -0
  102. data/app/views/spheres/_form.html.erb +28 -0
  103. data/app/views/spheres/_jquery.erb +130 -0
  104. data/app/views/spheres/_list.html.erb +19 -0
  105. data/app/views/spheres/create.js.erb +20 -0
  106. data/app/views/spheres/index.html.erb +74 -0
  107. data/app/views/ties/_edit.html.erb +1 -33
  108. data/app/views/toolbar/_home.html.erb +9 -0
  109. data/app/views/{subjects/_toolbar_home_menu.html.erb → toolbar/_home_menu.html.erb} +1 -1
  110. data/app/views/{subjects/_toolbar_home_menu_options.html.erb → toolbar/_home_menu_options.html.erb} +7 -3
  111. data/app/views/{subjects/_toolbar_home_menu_options_subjects.html.erb → toolbar/_home_menu_options_subjects.html.erb} +0 -0
  112. data/app/views/{subjects/_toolbar_logo.html.erb → toolbar/_logo.html.erb} +1 -1
  113. data/app/views/{subjects/_toolbar_message_menu.html.erb → toolbar/_message_menu.html.erb} +0 -0
  114. data/app/views/toolbar/_notifications_menu.html.erb +3 -0
  115. data/app/views/{subjects/_toolbar_profile.html.erb → toolbar/_profile.html.erb} +2 -2
  116. data/app/views/toolbar/_profile_menu.html.erb +15 -0
  117. data/app/views/toolbar/_profile_menu_basic_options.html.erb +5 -0
  118. data/app/views/toolbar/_profile_menu_tie_options.html.erb +35 -0
  119. data/app/views/users/_index.html.erb +1 -1
  120. data/app/views/users/_sidebar_index.html.erb +1 -6
  121. data/app/views/users/index.html.erb +3 -3
  122. data/app/views/users/show.html.erb +12 -2
  123. data/config/locales/en.yml +106 -79
  124. data/config/routes.rb +19 -5
  125. data/lib/generators/social_stream/templates/initializer.rb +2 -2
  126. data/lib/generators/social_stream/templates/migration.rb +3 -1
  127. data/lib/generators/social_stream/templates/public/images/HTML5.png +0 -0
  128. data/lib/generators/social_stream/templates/public/images/HTML5_Semantics.png +0 -0
  129. data/lib/generators/social_stream/templates/public/images/HTML5_Styling.png +0 -0
  130. data/lib/generators/social_stream/templates/public/images/Jcrop.gif +0 -0
  131. data/lib/generators/social_stream/templates/public/images/btn/btn_notification.png +0 -0
  132. data/lib/generators/social_stream/templates/public/images/btn/btn_notification_delete.png +0 -0
  133. data/lib/generators/social_stream/templates/public/images/btn/error.png +0 -0
  134. data/lib/generators/social_stream/templates/public/images/btn/info.png +0 -0
  135. data/lib/generators/social_stream/templates/public/images/btn/success.png +0 -0
  136. data/lib/generators/social_stream/templates/public/images/btn/warning.png +0 -0
  137. data/lib/generators/social_stream/templates/public/images/cancel.png +0 -0
  138. data/lib/generators/social_stream/templates/public/images/html5-badge-h-css3-semantics.png +0 -0
  139. data/lib/generators/social_stream/templates/public/images/icon_checkbox.png +0 -0
  140. data/lib/generators/social_stream/templates/public/images/logos/actor/remote_subject.png +0 -0
  141. data/lib/generators/social_stream/templates/public/images/logos/actor/remote_user.png +0 -0
  142. data/lib/generators/social_stream/templates/public/images/logos/representation/group.png +0 -0
  143. data/lib/generators/social_stream/templates/public/images/logos/representation/user.png +0 -0
  144. data/lib/generators/social_stream/templates/public/images/pbar-ani.gif +0 -0
  145. data/lib/generators/social_stream/templates/public/javascripts/jquery.fileupload-ui.js +259 -0
  146. data/lib/generators/social_stream/templates/public/javascripts/jquery.fileupload.js +475 -0
  147. data/lib/generators/social_stream/templates/public/javascripts/jquery.form.js +815 -0
  148. data/lib/generators/social_stream/templates/public/javascripts/jquery.ui.mouse.js +156 -0
  149. data/lib/generators/social_stream/templates/public/javascripts/jquery.ui.slider.js +684 -0
  150. data/lib/generators/social_stream/templates/public/javascripts/jquery.ui.widget.js +236 -0
  151. data/lib/generators/social_stream/templates/public/javascripts/ui.checkbox.js +309 -0
  152. data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +13 -12
  153. data/lib/generators/social_stream/templates/public/stylesheets/default/contacts.css +88 -0
  154. data/lib/generators/social_stream/templates/public/stylesheets/default/footer.css +1 -0
  155. data/lib/generators/social_stream/templates/public/stylesheets/default/header.css +5 -3
  156. data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +1 -1
  157. data/lib/generators/social_stream/templates/public/stylesheets/default/images/loading.gif +0 -0
  158. data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.fileupload-ui.css +73 -0
  159. data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.ui.slider.css +24 -0
  160. data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.ui.slidertheme.css +32 -0
  161. data/lib/generators/social_stream/templates/public/stylesheets/default/messages.css +4 -0
  162. data/lib/generators/social_stream/templates/public/stylesheets/default/spheres.css +226 -0
  163. data/lib/generators/social_stream/templates/relations.yml +12 -12
  164. data/lib/social_stream.rb +2 -1
  165. data/lib/social_stream/ability.rb +5 -4
  166. data/lib/social_stream/controllers/helpers.rb +19 -0
  167. data/lib/social_stream/models/object.rb +3 -1
  168. data/lib/social_stream/models/subject.rb +19 -6
  169. data/lib/social_stream/rails.rb +23 -1
  170. data/lib/social_stream/test_helpers/controllers.rb +1 -1
  171. data/lib/social_stream/version.rb +1 -1
  172. data/lib/tasks/db/populate.rake +6 -9
  173. data/social_stream.gemspec +7 -4
  174. data/spec/controllers/comments_controller_spec.rb +1 -1
  175. data/spec/controllers/contacts_controller_spec.rb +23 -0
  176. data/spec/controllers/groups_controller_spec.rb +12 -1
  177. data/spec/controllers/permissions_controller_spec.rb +48 -0
  178. data/spec/controllers/posts_controller_spec.rb +4 -4
  179. data/spec/controllers/relation_customs_controller_spec.rb +130 -0
  180. data/spec/controllers/representations_spec.rb +74 -0
  181. data/spec/controllers/spheres_controller_spec.rb +108 -0
  182. data/spec/dummy/config/initializers/mailboxer.rb +8 -0
  183. data/spec/dummy/config/initializers/social_stream.rb +2 -2
  184. data/spec/dummy/config/relations.yml +12 -12
  185. data/spec/factories/relation_custom.rb +4 -0
  186. data/spec/factories/sphere.rb +5 -0
  187. data/spec/factories/tie.rb +4 -4
  188. data/spec/models/activity_spec.rb +58 -38
  189. data/spec/models/actor_spec.rb +1 -1
  190. data/spec/models/group_spec.rb +12 -0
  191. data/spec/models/like_spec.rb +68 -0
  192. data/spec/models/profile_spec.rb +2 -1
  193. data/spec/models/relation_custom_spec.rb +14 -0
  194. data/spec/models/tie_spec.rb +26 -2
  195. metadata +195 -94
  196. data/app/controllers/avatars_controller.rb +0 -51
  197. data/app/controllers/representations_controller.rb +0 -19
  198. data/app/controllers/ties_controller.rb +0 -22
  199. data/app/helpers/ties_helper.rb +0 -37
  200. data/app/models/avatar.rb +0 -91
  201. data/app/models/representation.rb +0 -35
  202. data/app/views/avatars/_form.html.erb +0 -12
  203. data/app/views/avatars/_precrop.html.erb +0 -66
  204. data/app/views/avatars/edit.html.erb +0 -6
  205. data/app/views/avatars/new.html.erb +0 -32
  206. data/app/views/avatars/show.html.erb +0 -5
  207. data/app/views/groups/_location.html.erb +0 -3
  208. data/app/views/groups/_logo.html.erb +0 -5
  209. data/app/views/home/_location.html.erb +0 -3
  210. data/app/views/subjects/_toolbar_home.html.erb +0 -9
  211. data/app/views/subjects/_toolbar_profile_menu.html.erb +0 -12
  212. data/app/views/subjects/_toolbar_profile_menu_basic_options.html.erb +0 -13
  213. data/app/views/subjects/_toolbar_profile_menu_tie_options.html.erb +0 -41
  214. data/app/views/ties/_new.html.erb +0 -64
  215. data/app/views/ties/_tie.html.erb +0 -23
  216. data/app/views/ties/new.html.erb +0 -1
  217. data/app/views/users/_location.html.erb +0 -3
  218. data/lib/generators/social_stream/templates/public/images/w3c_css.png +0 -0
  219. data/lib/generators/social_stream/templates/public/images/w3c_xhtml.png +0 -0
  220. data/lib/generators/social_stream/templates/public/javascripts/addContact.js +0 -100
  221. data/lib/generators/social_stream/templates/public/stylesheets/default/addContact.css +0 -29
  222. data/spec/controllers/representations_controller_spec.rb +0 -51
  223. data/spec/controllers/ties_controller_spec.rb +0 -19
  224. data/spec/models/representation_spec.rb +0 -16
@@ -0,0 +1,72 @@
1
+ <% content_for :headers do %>
2
+ <%= stylesheet_link_tag "contacts.css", :media => "screen, projection" %>
3
+ <%= javascript_include_tag 'ui.checkbox'%>
4
+ <% end %>
5
+
6
+ <%= javascript_tag do %>
7
+ $(function() {
8
+ $('input[id^="relation_custom"]').checkBox();
9
+ })
10
+
11
+ function checkBoxEnable(id) {
12
+ $('div[contain$=' + id + ']').addClass("checked-option");
13
+
14
+ var sphere = $("#"+id).attr("optionOf");
15
+ $(':checkbox[optionOf$='+sphere+']:checked:not(#'+id+')').checkBox('changeCheckStatus', false);
16
+ }
17
+
18
+ function checkBoxDisable(id) {
19
+ $('div[contain$='+id+']').removeClass("checked-option");
20
+ }
21
+ <% end %>
22
+
23
+ <div class="dialog_add_contact" id="new_contact">
24
+ <div class="content_add_user" >
25
+ <div class="activity_add_contact">
26
+
27
+ <%= form_for @contact, :url => contact_path(@contact.to_param), :html => { :method => :put } do |f| %>
28
+ <%= hidden_field_tag "contact[relation_ids][]", "gotcha" %>
29
+
30
+ <div class="block">
31
+ <div class="form_row center">
32
+ <h2><%= t("contact.#{ controller.action_name }.title") %></h2>
33
+ </div>
34
+
35
+ <div class="two_columns_container">
36
+ <div class="form_column_left">
37
+ <p class="colum_field_title"><%= t('message.one') %></p>
38
+ <%= f.text_area :message, :class =>"new_contact_text_area" %>
39
+ </div>
40
+
41
+ <div class="form_column_right">
42
+ <div class="select_relations">
43
+ <div id="relationsSelect" class="dropdown">
44
+ <dd>
45
+ <ul>
46
+ <% @contact.sender.spheres.each do |sphere| %>
47
+ <li class="sphere_name"><span class="sphere_name"><%= sphere.name %></span></li>
48
+ <% sphere.customs.sort.each do |relation| %>
49
+ <li>
50
+ <div contain="<%= dom_id relation %>">
51
+ <input id="<%= dom_id relation %>" name="contact[relation_ids][]" value="<%= relation.id %>" type="checkbox" optionOf="<%= sphere.name %>" <%= raw('checked="checked"') if @contact.relation_ids.include?(relation.id) %> />
52
+ <label for="<%= dom_id relation %>">
53
+ <%= relation.name %>
54
+ </label>
55
+ </div>
56
+ </li>
57
+ <% end %>
58
+ <% end %>
59
+ </ul>
60
+ </dd>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ <div class="form_bottom">
66
+ <%= submit_tag t("contact.#{ controller.action_name }.submit"), :class => "button" %>
67
+ </div>
68
+ </div>
69
+ <% end %>
70
+ </div>
71
+ </div>
72
+ </div>
@@ -16,7 +16,7 @@
16
16
  <%=link_to(contact.name, contact)%>
17
17
  </div>
18
18
  <div class="link">
19
- <%= ties_to(contact) %>
19
+ <%= contact_to(contact) %>
20
20
  </div>
21
21
  </div>
22
22
  </div>
@@ -1,11 +1,11 @@
1
- <% if current_subject.pending_ties.any? %>
1
+ <% if current_subject.pending_contacts.any? %>
2
2
  <div class="block">
3
3
  <div class="header">
4
4
  <%= image_tag('btn/btn_notifications.png', :class => "header_icon") %>
5
- <div class="header_text"><%= t 'tie.pending.other' %></div>
5
+ <div class="header_text"><%= t 'contact.pending.other' %></div>
6
6
  </div>
7
7
  <div class="content">
8
- <%= render current_subject.pending_ties %>
8
+ <%= render current_subject.pending_contacts %>
9
9
  </div>
10
10
  </div>
11
11
  <% end -%>
@@ -1,10 +1,10 @@
1
1
  <% if current_subject.suggestion.present? %>
2
2
  <% content_for :javascript do %>
3
3
 
4
- $(".suggestions .tie_close").livequery("click",function(){
4
+ $(".suggestions .contact_close").livequery("click",function(){
5
5
  temp = $(this);
6
- $.get("<%=suggestion_ties_path%>", function(data) {
7
- temp.parents(".tie").replaceWith(data);
6
+ $.get("<%=suggestion_contacts_path%>", function(data) {
7
+ temp.parents(".contact").replaceWith(data);
8
8
  });
9
9
 
10
10
  });
@@ -15,12 +15,12 @@
15
15
  <div class="header">
16
16
  <%= image_tag('btn/notifications.png', :class => "header_icon") %>
17
17
  <div class="header_text">
18
- <%=t('tie.suggestion.one') %>
18
+ <%=t('contact.suggestion.one') %>
19
19
  </div>
20
20
  </div>
21
21
  <div class="content">
22
22
  <% if (sgs = current_subject.suggestions(2)).present? %>
23
- <%= render :partial => '/ties/tie', :collection => sgs %>
23
+ <%= render :partial => 'contacts/contact', :collection => sgs %>
24
24
  <%end%>
25
25
  </div>
26
26
  </div>
@@ -0,0 +1,6 @@
1
+ <% if user_signed_in? %>
2
+ <div class="space_center"></div>
3
+ <%= render :partial => "contacts/suggestions" %>
4
+ <div class="space_center"></div>
5
+ <%= render :partial => 'contacts/pendings' %>
6
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <% toolbar :profile => @contact.receiver_subject, :option => 'contacts' %>
2
+ <% location link_to(image_tag("btn/btn_friend.png", :class => "menu_icon") +
3
+ t('contact.edit.title'), edit_contact_path(@contact.to_param)) %>
4
+
5
+ <%= render :partial => 'form' %>
@@ -20,7 +20,7 @@
20
20
  <%= link_to t('contact.all_n', :count => current_subject.contacts(:direction => :sent).count), contacts_path %> -
21
21
  <% Actor.distinct_initials.
22
22
  contacted_from(current_subject).
23
- merge(Tie.related_by(current_subject.relations.find_by_id(params[:relation]))).
23
+ merge(Tie.related_by(current_subject.relation_customs.find_by_id(params[:relation]))).
24
24
  distinct_initials.
25
25
  each do |l| %>
26
26
  <%= link_to l.initial,{:letter => l.initial,:page => 1},:class => "contact_letter_link" %>
@@ -0,0 +1,5 @@
1
+ <% toolbar :profile => @contact.receiver_subject, :option => 'contacts' %>
2
+ <% location link_to(image_tag("btn/btn_friend.png", :class => "menu_icon") +
3
+ t('contact.new.title'), new_contact_path(:id => @contact.to_param)) %>
4
+
5
+ <%= render :partial => 'form' %>
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  <% unless @box.eql?'trash' %>
28
28
  <div class="action">
29
- <%= link_to(image_tag('btn/btn_delete.png', :atl => "Delete", :title => "Delete"),
29
+ <%= link_to(image_tag('btn/btn_delete.png', :alt => "Delete", :title => "Delete"),
30
30
  conversation_path(conversation, :location => @box, :box => @box, :page => params[:page]),
31
31
  :confirm => 'Do you want to move "' + conversation.subject + '" to trash?',
32
32
  :method => :delete, :remote => true) %>
@@ -1,8 +1,3 @@
1
- <%= location(
2
- link_to(image_tag("btn/message_" + @box + ".png", :class => "menu_icon")+t('message.' + @box), conversations_path(:box => @box),:remote => true)
3
- ) %>
4
-
5
-
6
1
 
7
2
  <br class="clearfloat" />
8
3
  <div class="space_center">
@@ -1,9 +1,8 @@
1
-
2
-
3
1
  <%= location(
4
2
  link_to(image_tag("btn/message_" + @box + ".png", :class => "menu_icon")+t('message.' + @box), conversations_path(:box => @box),:remote => true),
5
3
  link_to(image_tag("btn/message_conversation.png", :class => "menu_icon")+ truncate(@conversation.subject, :length => 45), conversation_path(@conversation.id,:box => @box,:page => params[:page]))
6
4
  ) %>
5
+
7
6
  <br class="clearfloat" />
8
7
  <div class="space_center">
9
8
  </div>
@@ -14,6 +14,10 @@
14
14
  $('.pagination a').attr('data-remote', 'true');
15
15
  <% end %>
16
16
 
17
+ <%= location(
18
+ link_to(image_tag("btn/message_" + @box + ".png", :class => "menu_icon")+t('message.' + @box), conversations_path(:box => @box),:remote => true)
19
+ ) %>
20
+
17
21
  <% toolbar :option => :messages %>
18
22
 
19
23
  <%= render :partial => 'index' %>
@@ -1,4 +1,5 @@
1
1
  $("#content").html("<%=escape_javascript(render :partial => 'index') %>");
2
+ <%= location(link_to(image_tag("btn/message_" + @box + ".png", :class => "menu_icon")+t('message.' + @box), conversations_path(:box => @box),:remote => true)) %>
2
3
 
3
4
  $('.pagination a').attr('data-remote', 'true');
4
5
 
@@ -3,10 +3,9 @@
3
3
  <%end%>
4
4
 
5
5
  <div class="banner_busqueda">
6
+
6
7
  <div id="espacio_busqueda">
7
- <% flash.each do |name, msg| %>
8
- <div id="<%= name %>">&laquo; <%= msg %> &raquo;</div>
9
- <% end %>
8
+
10
9
  </div>
11
10
  <%= render :partial => "search" %>
12
11
  </div>
@@ -12,8 +12,12 @@
12
12
  <div class="name black" >
13
13
  <%= link_to group.name, group %>
14
14
  </div>
15
+ <div class="brief">
16
+ <%= t 'follower.n', :count => group.follower_count %>,
17
+ <%= t 'like.n', :count => group.like_count %>
18
+ </div>
15
19
  <div class="link">
16
- <%= ties_to(group) %>
20
+ <%= contact_to(group) %>
17
21
  </div>
18
22
  </div>
19
23
  </div>
@@ -18,9 +18,10 @@
18
18
  <% end %>
19
19
 
20
20
  <%= location(
21
- link_to(image_tag("btn/btn_group.png", :class => "menu_icon")+t('group.other'), groups_path),
22
- link_to(image_tag("btn/btn_group.png", :class => "menu_icon")+t('group.new.action'), new_group_path('group' => { '_founder' => current_subject.slug }))
23
- ) %>
21
+ link_to(image_tag("btn/btn_group.png", :class => "menu_icon")+t('group.other'), groups_path),
22
+ link_to(image_tag("btn/btn_group.png", :class => "menu_icon")+t('group.new.action'), new_group_path('group' => { '_founder' => current_subject.slug }))
23
+ ) %>
24
+
24
25
  <div class="space_center"></div>
25
26
 
26
27
  <%= form_for @group do |f| %>
@@ -10,18 +10,11 @@
10
10
  </div>
11
11
  </div>
12
12
  <div id="wordcloud" class="content"></div>
13
- </div>
14
-
15
- <% if user_signed_in? %>
16
- <div class="space_center"></div>
17
- <%= render :partial => "ties/suggestions" %>
18
- <div class="space_center"></div>
19
- <%= render :partial => 'ties/pendings' %>
13
+ </div
20
14
 
15
+ <%= render :partial => 'contacts/suggestions_and_pendings' %>
21
16
 
22
17
  <%= javascript_include_tag "jqcloud-0.1.3.min.js" %>
23
- <% end %>
24
-
25
18
 
26
19
  <% tags = ActivityObject.tag_counts %>
27
20
 
@@ -35,4 +28,4 @@
35
28
  $(document).ready(function() {
36
29
  $("#wordcloud").jQCloud(word_list);
37
30
  });
38
- </script>
31
+ </script>
@@ -1,11 +1,3 @@
1
1
  <div class="space_center"></div>
2
2
 
3
- <% if user_signed_in? %>
4
- <%= render :partial => "ties/suggestions" %>
5
- <div class="space_center">
6
- </div>
7
- <%= render :partial => 'ties/pendings' %>
8
- <% end %>
9
-
10
-
11
-
3
+ <%= render :partial => 'contacts/suggestions_and_pendings' %>
@@ -11,11 +11,9 @@
11
11
  <% content_for :sidebar do %>
12
12
  <%= render :partial => "groups/sidebar_index" %>
13
13
  <% end %>
14
-
15
- <div id="map_location" class="content_size">
16
- Your are here ><img src="images/btn/btn_browse.png" class="btn_config"> <%=t('browse')%>: <span id="name_group"><b><%= t('group.all')%></b></span>, <%= link_to(t('user.by'), users_path) %>
17
- </div>
18
-
14
+ <%= location(image_tag("btn/btn_browse.png", :class=>"btn_config") + t('browse') +": "+
15
+ link_to(t('user.by'), users_path) + ", "+
16
+ content_tag(:b,content_tag(:span, t('group.all'), :id=>'name_group')))%>
19
17
 
20
18
  <div class="space_center"></div>
21
19
  <div class="space_center"></div>
@@ -26,13 +24,13 @@
26
24
  <div id="tab" class="widget content_size">
27
25
  <ul class="tab">
28
26
  <li>
29
- <a href="/groups">All <%= t('group.other')%> (<%=Group.count%>) </a>
27
+ <%= link_to t('group.all_n', :count => Group.count), :most => nil %>
30
28
  </li>
31
29
  <li>
32
- <a href="#most_popular"> <%= t('group.popular.most')%></a>
30
+ <%= link_to t('group.most.followed'), :most => :followed %>
33
31
  </li>
34
32
  <li>
35
- <a href="#most_voted"> <%= t('group.voted.most')%> </a>
33
+ <%= link_to t('group.most.liked'), :most=> :liked %>
36
34
  </li>
37
35
  </ul>
38
36
  <div id="spaces" class="tab">
@@ -1,18 +1,25 @@
1
1
  <% content_for :title do %>
2
2
  <%= @group.name%>
3
3
  <% end %>
4
- <% content_for :description do %>
5
- <%= @group.profile.description%>
4
+
5
+ <% if @group.profile.description? %>
6
+ <% content_for :description do %>
7
+ <%= @group.profile.description%>
8
+ <% end %>
6
9
  <% end %>
7
10
 
11
+ <% content_for :keywords do %>
12
+ <%= @group.profile.subject.tag_list%>
13
+ <% end %>
8
14
  <% content_for :sidebar do %>
9
15
  <%= render :partial => 'sidebar_show' %>
10
16
  <% end %>
11
17
 
18
+ <%= location(link_to(image_tag("btn/btn_group.png", :class => "btn_config")+t('group.one')+": "+
19
+ content_tag(:span, ( sanitize @group.name), :class=>"name_group")))%>
20
+
12
21
  <% toolbar :profile => @group %>
13
22
 
14
- <%= render :partial => 'location' %>
15
-
16
23
  <br class="clearfloat" />
17
24
  <div class="space_center">
18
25
  </div>
@@ -1,16 +1,2 @@
1
- <div class="space_center"></div>
2
- <%= render :partial => "ties/suggestions" %>
3
- <div class="space_center"></div>
4
- <%= render :partial => 'ties/pendings' %>
1
+ <%= render :partial => 'contacts/suggestions_and_pendings' %>
5
2
 
6
- <% content_for :javascript do %>
7
-
8
- $(".suggestions .tie_close").livequery("click",function(){
9
- temp = $(this);
10
- $.get("<%=suggestion_ties_path%>", function(data) {
11
- temp.parents(".tie").replaceWith(data);
12
- });
13
-
14
- });
15
-
16
- <% end %>
@@ -2,10 +2,11 @@
2
2
  <% render :partial => 'sidebar' %>
3
3
  <% end %>
4
4
 
5
+ <%= location(link_to(image_tag("btn/btn_home.png", :class => "btn_config")+t('home')+": "+
6
+ content_tag(:span, ( sanitize current_subject.name), :class=>"name_group")))%>
7
+
5
8
  <% toolbar %>
6
9
 
7
- <%= render :partial => 'location' %>
8
-
9
10
  <br class="clearfloat" />
10
11
  <div class="space_center">
11
12
  </div>
@@ -9,7 +9,7 @@
9
9
  <%= link_to 'Notifications', '#' %>
10
10
  </li>
11
11
  <li class="current">
12
- <%= link_to 'Privacy', '#' %>
12
+ <%= link_to 'Privacy', spheres_path %>
13
13
  </li>
14
14
  </ul>
15
15
  </li>
@@ -0,0 +1,5 @@
1
+ <% flash.each do |name, msg| %>
2
+ <div class="<%= name %>">
3
+ <%= msg %>
4
+ </div>
5
+ <% end %>
@@ -1,13 +1,14 @@
1
1
  <div id="footerFront">
2
2
  <div id="footer">
3
+ <div class="rowfooter">
4
+ <%= link_to(image_tag('HTML5.png'), 'http://validator.w3.org/check?uri=referer') %>
5
+ <%= link_to(image_tag('HTML5_Styling.png'),'http://jigsaw.w3.org/css-validator/check/referer') %>
6
+ <%= link_to(image_tag('HTML5_Semantics.png'),'http://jigsaw.w3.org/css-validator/check/referer') %>
7
+ </div>
3
8
  <ul>
4
9
  <li>2011 © </li>
5
10
  <li id="trade_mark"><%= link_to t('socialstream'), 'http://social-stream.dit.upm.es/' %></li>
6
11
  </ul>
7
- <div class="row">
8
- <%= link_to(image_tag('w3c_xhtml.png'), 'http://validator.w3.org/check?uri=referer') %> -
9
- <%= link_to(image_tag('w3c_css.png'),'http://jigsaw.w3.org/css-validator/check/referer') %>
10
- </div>
11
12
  </div>
12
13
  </div>
13
14
 
@@ -1,14 +1,12 @@
1
1
  <div id="current_user_info">
2
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
5
  <%= t('representation.action') %>
5
6
  </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) %>
7
+
8
+ <% representations = current_user.represented.unshift(current_user) - [current_subject] %>
9
+
12
10
  <div id="representations_menu">
13
11
  <ul class="sf-menu" >
14
12
  <li id="representation_li">
@@ -16,15 +14,10 @@
16
14
  <ul>
17
15
  <% representations.each do |representation| %>
18
16
  <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;"%>
17
+ <%= link_to representation.name, { :s => representation.slug }, { :style => "background: transparent url('#{representation.logo.url(:representation)}') no-repeat left center;margin-left:2px;" } %>
20
18
  </li>
21
19
  <% end %>
22
20
  </ul>
23
21
  </li>
24
22
  </ul>
25
23
  </div>
26
- <%-# this should be in content_for(:javascript), but the partial is rendered after yield(:javascript) -%>
27
- <script type="text/javascript" charset="utf-8">
28
- $("#new_representation").hide();
29
- $("#representation_li").show();
30
- </script>