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
@@ -1,11 +1,11 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
1
+ <!-- HTML5 DOCTYPE -->
2
+ <!DOCTYPE html>
2
3
  <html lang="en">
3
4
  <head>
4
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
+ <meta charset="utf-8">
5
6
  <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
-
7
+ <meta name="keywords" content="<%= t('profile.tags.default') %><%= yield(:keywords) %>" >
8
+ <meta name="description" content= "<%= yield(:description).empty? ? t('frontpage.main_title') : yield(:description) %>" >
9
9
  <%= stylesheet_link_tag "base", "header","home","footer",
10
10
  :media => "screen, projection" %>
11
11
  <%= javascript_include_tag 'jquery.min', 'jquery-ui.min','rails', 'jquery.livequery', 'ui.dropdownchecklist'%>
@@ -17,7 +17,7 @@
17
17
  <%= csrf_meta_tag %>
18
18
  <% end %>
19
19
 
20
- <script type="text/javascript" charset="utf-8">
20
+ <script type="text/javascript">
21
21
  $(document).ready(function() {
22
22
  <%= yield :javascript %>
23
23
  })
@@ -25,31 +25,34 @@
25
25
  </head>
26
26
  <body>
27
27
  <div id="wrapper">
28
- <%= render :partial => "layouts/header" %>
28
+ <header><%= render :partial => "layouts/header" %></header>
29
29
  <div id="wrapper_body">
30
- <div id="toolbar">
30
+ <nav id="toolbar">
31
31
  <div id="toolbarContent" class="block">
32
32
  <div class="space_center">
33
33
  </div>
34
34
  <%= yield :toolbar %>
35
35
  </div>
36
+ </nav>
37
+ <div id= "center_body">
38
+ <div id="map_location">
39
+ <%= yield :location %>
40
+ </div>
41
+ <div id="flash">
42
+ <%= render :partial => "layouts/flash", :locals => {:flash => flash} %>
43
+ </div>
44
+ <section id="content">
45
+ <%= yield %>
46
+ </section>
36
47
  </div>
37
- <div id="content">
38
- <% flash.each do |name, msg| %>
39
- <div class="<%= name %>">
40
- <%= msg %>
41
- </div>
42
- <% end %>
43
- <%= yield %>
44
- </div>
45
- <div id="sidebar">
48
+ <aside id="sidebar">
46
49
  <div id="sidebarContent">
47
- <%= yield :sidebar %>
50
+ <%= yield :sidebar %>
48
51
  </div>
49
- </div>
52
+ </aside>
50
53
  <div class="space_center white"></div>
51
54
  </div>
52
- <%= render :partial => "layouts/footer" %>
55
+ <footer><%= render :partial => "layouts/footer" %></footer>
53
56
  </div>
54
57
  </body>
55
58
  </html>
@@ -1,8 +1,11 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
1
+ <!-- HTML5 DOCTYPE -->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
3
4
  <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta charset="utf-8">
5
6
  <title><%= yield(:title).empty? ? t('socialstream') : yield(:title)%></title>
7
+ <meta name="keywords" content="<%= yield(:keywords).empty? ? t('profile.tags.default') : yield(:keywords) %>" >
8
+ <meta name="description" content= "<%= yield(:description).empty? ? "Home" : yield(:description) %>" >
6
9
  <%= stylesheet_link_tag "header","frontpage", "base", "footer",
7
10
  :media => "screen, projection" %>
8
11
  <%= javascript_include_tag 'jquery', 'jquery.livequery' %>
@@ -10,7 +13,7 @@
10
13
  <% if protect_against_forgery? %>
11
14
  <%= csrf_meta_tag %>
12
15
  <% end %>
13
- <script type="text/javascript" charset="utf-8">
16
+ <script type="text/javascript" >
14
17
  $(document).ready(function() {
15
18
  <%= yield :javascript%>
16
19
  });
@@ -19,12 +22,21 @@
19
22
  </head>
20
23
  <body>
21
24
  <div id="wrapper">
22
- <%= render :partial => "frontpage/header" %>
23
- <div id="wrapper_body">
24
- <%= yield %>
25
- </div>
26
- <%= render :partial => "frontpage/sponsor" %>
27
- <%= render :partial => "layouts/footer" %>
25
+ <header>
26
+ <%= render :partial => "frontpage/header" %>
27
+ </header>
28
+ <section>
29
+ <div id="flash">
30
+ <%= render :partial => "layouts/flash", :locals => {:flash => flash} %>
31
+ </div>
32
+ <div id="wrapper_body">
33
+ <%= yield %>
34
+ </div>
35
+ <%= render :partial => "frontpage/sponsor" %>
36
+ </section>
37
+ <footer>
38
+ <%= render :partial => "layouts/footer" %>
39
+ </footer>
28
40
  </div>
29
41
  </body>
30
42
  </html>
@@ -1,3 +1,3 @@
1
- <div id="map_location" class="content_size">
1
+ <div class="content_size">
2
2
  <%= raw(location_body) %>
3
3
  </div>
@@ -1,10 +1,8 @@
1
-
2
1
  <%= location(
3
2
  link_to(image_tag("btn/new.png", :class => "menu_icon")+t('message.other'), conversations_path,:remote => true),
4
3
  link_to(image_tag("btn/message_new.png", :class => "menu_icon")+ t('message.new'), new_message_path, :remote => true)
5
4
  ) %>
6
5
 
7
-
8
6
  <br class="clearfloat" />
9
7
  <div class="space_center"></div>
10
8
  <div class="space_center"></div>
@@ -0,0 +1,21 @@
1
+ <% self.class.send :include, NotificationsHelper %>
2
+ <!DOCTYPE html>
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
6
+ </head>
7
+ <body>
8
+ <h1>You have a new notification: <%= strip_tags decode_notification @notification.subject,@notification.object %></h1>
9
+ <p>
10
+ You have received a new notification:
11
+ </p>
12
+ <blockquote>
13
+ <p>
14
+ <%= raw decode_notification @notification.body,@notification.object %>
15
+ </p>
16
+ </blockquote>
17
+ <p>
18
+ Visit <%= link_to root_url,root_url %> and go to your notifications for more info.
19
+ </p>
20
+ </body>
21
+ </html>
@@ -0,0 +1,11 @@
1
+ <% self.class.send :include, NotificationsHelper %>
2
+ You have a new notification: <%= strip_tags decode_notification @notification.subject,@notification.object %>
3
+ ===============================================
4
+
5
+ You have received a new notification:
6
+
7
+ -----------------------------------------------
8
+ <%= strip_tags decode_notification @notification.body,@notification.object %>
9
+ -----------------------------------------------
10
+
11
+ Visit <%= root_url %> and go to your notifications for more info.
@@ -0,0 +1,21 @@
1
+
2
+ <br class="clearfloat" />
3
+ <div class="space_center">
4
+ </div>
5
+ <div class="space_center"></div>
6
+
7
+ <h2><%= t('notification.other') %></h2>
8
+
9
+ <div class="read_all">
10
+ <%= link_to(t('notification.read_all'), update_all_notifications_path(:page => params[:page]),
11
+ :confirm => t('sure'),:method => :put, :remote => true) %>
12
+ </div>
13
+
14
+ <div class="conversations">
15
+ <% @notifications.each do |notification|%>
16
+ <% read_class = notification.is_unread?(@actor) ? 'unread' : '' %>
17
+ <%= render :partial => 'notification', :object => notification, :locals => {:read_class => read_class} %>
18
+ <% end %>
19
+ <%= will_paginate @notifications %>
20
+ </div>
21
+
@@ -0,0 +1,47 @@
1
+ <%= div_for(notification, :class => read_class + ' conversation') do %>
2
+
3
+ <div class="notification">
4
+ </div>
5
+ <div class="sender_photo">
6
+ <%= link_to image_tag(current_subject.logo.url(:actor),
7
+ :title => current_subject.name, :alt => current_subject.name),
8
+ current_subject %>
9
+ </div>
10
+ <div class="content_left">
11
+ <div class="sender_name">
12
+ <%#= link_to conversation.last_sender.name, conversation.last_sender.subject %>
13
+ </div>
14
+ <div class="date">
15
+ <%= t('time.ago', :time => time_ago_in_words(notification.created_at)) %>
16
+ </div>
17
+ </div>
18
+ <div class="content_right">
19
+ <div class="subject">
20
+ <%= raw decode_notification notification.subject,notification.object %>
21
+ </div>
22
+ <div class="briefing">
23
+ <%= raw decode_notification notification.body, notification.object %>
24
+ </div>
25
+ <div class="clearfloat">
26
+ </div>
27
+ </div>
28
+ <div class="action">
29
+ <% if notification.is_unread?(current_subject) %>
30
+ <%= link_to(image_tag('btn/btn_notification_delete.png', :alt => t('notification.read'),
31
+ :title => t('notification.read')), notification_path(notification, :page => params[:page], :read => "Read"),
32
+ :method => :put, :remote => true) %>
33
+ <% else%>
34
+ <%= link_to(image_tag('btn/btn_notification_delete.png', :alt => t('notification.unread'),
35
+ :title => t('notification.unread')), notification_path(notification, :page => params[:page], :read => "Unread"),
36
+ :method => :put, :remote => true) %>
37
+ <% end%>
38
+ </div>
39
+ <div class="action">
40
+ <%= link_to(image_tag('btn/btn_notification_delete.png', :alt => "Delete", :title => "Delete"),
41
+ notification_path(notification, :page => params[:page]),
42
+ :confirm => 'Do you want to delete "' + notification.subject,
43
+ :method => :delete, :remote => true) %>
44
+ </div>
45
+ <div class="clearfloat">
46
+ </div>
47
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <div>
2
+ <%= @notification.body%>
3
+ </div>
@@ -0,0 +1,2 @@
1
+ %{sender} added you as contact.
2
+
@@ -0,0 +1,2 @@
1
+ %{sender.name} added you as contact.
2
+
@@ -0,0 +1,5 @@
1
+ <% if activity.direct_object.is_a? Actor %>
2
+ <%= render :partial => 'notifications/activities/like_subject_body' %>
3
+ <% else %>
4
+ <%= render :partial => 'notifications/activities/like_object_body'%>
5
+ <% end %>
@@ -0,0 +1,2 @@
1
+ %{sender} likes your %{object}.
2
+
@@ -0,0 +1,2 @@
1
+ %{sender.name} likes your %{object.name}
2
+
@@ -0,0 +1,5 @@
1
+ <% if activity.direct_object.is_a? Actor %>
2
+ <%= render :partial => 'notifications/activities/like_subject_subject' %>
3
+ <% else %>
4
+ <%= render :partial => 'notifications/activities/like_object_subject' %>
5
+ <% end %>
@@ -0,0 +1 @@
1
+ %{sender} is now your fan.
@@ -0,0 +1,2 @@
1
+ %{sender.name} is now your fan.
2
+
@@ -0,0 +1,3 @@
1
+ %{sender} also added you as contact.
2
+
3
+
@@ -0,0 +1,2 @@
1
+ %{sender.name} added you as contact.
2
+
@@ -0,0 +1,2 @@
1
+ %{sender} added a %{object} in your wall.
2
+
@@ -0,0 +1 @@
1
+ %{sender.name} added a %{object.name} in your wall
@@ -0,0 +1 @@
1
+ %{sender} updated a %{object} in your wall.
@@ -0,0 +1 @@
1
+ %{sender.name} updated a %{object.name} in your wall
@@ -0,0 +1,19 @@
1
+ <% content_for :title do %>
2
+ <%= current_subject.name %>
3
+ <% end %>
4
+
5
+ <% content_for :headers do %>
6
+ <%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
7
+ <% end %>
8
+
9
+ <% content_for :sidebar do %>
10
+ <%= render :partial => 'home/sidebar' %>
11
+ <% end %>
12
+
13
+ <%= location(
14
+ link_to(image_tag("btn/btn_notification.png", :class => "menu_icon")+t('notification.other'), notifications_path,:remote => true)
15
+ ) %>
16
+
17
+ <% toolbar %>
18
+
19
+ <%= render :partial => 'index' %>
@@ -0,0 +1,8 @@
1
+ $("#content").html("<%=escape_javascript(render :partial => 'index') %>");
2
+
3
+ <%= location(link_to(image_tag("btn/btn_notification.png", :class => "menu_icon")+t('notification.other'), notifications_path,:remote => true)) %>
4
+
5
+ $('.pagination a').attr('data-remote', 'true');
6
+
7
+
8
+ $("head").append($("<%= escape_javascript(stylesheet_link_tag "messages.css", :media => "screen, projection") %>"));
@@ -0,0 +1,5 @@
1
+ <% content_for :title do %>
2
+ <%= current_subject.name %>
3
+ <% end %>
4
+
5
+ <%= render :partial => 'show' %>
@@ -0,0 +1,39 @@
1
+ <div id="columns_container">
2
+
3
+ <div id="permissions_list_block">
4
+
5
+ <p class="sectionTitle"><%= raw t('permission.of_relation.choose', :name => h(@relation.name)) %></p>
6
+
7
+ <div class="privacy_add_element"></div>
8
+
9
+ <table class="tableCheckBoxOptions">
10
+ <% default_permissions.each do |p| %>
11
+ <tr>
12
+ <td>
13
+ <div contain=<%= dom_id p %> class="checkboxPermissionOptionLeft">
14
+ <input id=<%= dom_id p %> optionOf="permissions" type="checkbox"/>
15
+ <label for=<%= dom_id p %>><%= p.description(:brief) %></label>
16
+ </div>
17
+ </td>
18
+ </tr>
19
+ <% end %>
20
+ </table>
21
+ </div>
22
+
23
+ <div id="privacy_rules">
24
+ <p class="sectionTitle"><%= t 'privacy.rule.title' %></p>
25
+
26
+ <%= raw t('privacy.intro', :relation => h(@relation.name)) %>
27
+
28
+ <%= semantic_form_for @relation, :remote => true do |f| %>
29
+ <%= f.input :permissions, :as => :check_boxes, :collection => default_permissions.map{ |p| [p.description(:detailed, @relation), p.id] } %>
30
+ <%= f.submit t('button.save'), :class => 'button' %>
31
+ <% end %>
32
+ </div>
33
+ </div>
34
+
35
+ <%= javascript_tag do %>
36
+ $(function() {
37
+ initPrivacyRules();
38
+ })
39
+ <% end %>
@@ -0,0 +1,10 @@
1
+ $('#permissions').html("<%= escape_javascript render(:partial => 'index') %>");
2
+ $('input[id^="permission"]').checkBox();
3
+ <% default_permissions.each do |p| %>
4
+ <% if @relation.permission_ids.include? p.id %>
5
+ $('input[id="permission_<%= p.id %>"]').checkBox('changeCheckStatus', true);
6
+ <% else %>
7
+ $('label[for="relation_custom_permission_ids_' + <%= p.id %> + '"]').parent().hide();
8
+ <% end %>
9
+ <% end %>
10
+ $('#permissions').show();
@@ -0,0 +1,81 @@
1
+ <div class="space_center"></div>
2
+ <div class="block" id="contact_info">
3
+ <div class="header">
4
+ <div class="header_text">
5
+ <%=t('profile.contact')%>
6
+ </div>
7
+ <% if is_owner? %>
8
+ <div class="header_icon_right">
9
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "contact_info"%>
10
+ </div>
11
+ <%end%>
12
+ </div>
13
+ <div class="content">
14
+ <% if !is_contact_empty?%>
15
+ <div class="sub-block" >
16
+ <% if @profile.phone? %>
17
+ <div class="row">
18
+ <div class="label">
19
+ <%=t('profile.phone')%>
20
+ </div>
21
+ <div class="field">
22
+ <%=h @profile.phone %>
23
+ </div>
24
+ </div>
25
+ <%end%>
26
+ <% if @profile.mobile? %>
27
+ <div class="row">
28
+ <div class="label">
29
+ <%=t('profile.mobile')%>
30
+ </div>
31
+ <div class="field">
32
+ <%=h @profile.mobile %>
33
+ </div>
34
+ </div>
35
+ <%end%>
36
+ <% if @profile.fax? %>
37
+ <div class="row">
38
+ <div class="label">
39
+ <%=t('profile.fax')%>
40
+ </div>
41
+ <div class="field">
42
+ <%=h @profile.fax %>
43
+ </div>
44
+ </div>
45
+ <%end%>
46
+ <% if @profile.address? %>
47
+ <div class="row">
48
+ <div class="label">
49
+ <%=t('profile.address')%>
50
+ </div>
51
+ <div class="field">
52
+ <%=h @profile.address %>
53
+ </div>
54
+ </div>
55
+ <%end%>
56
+ <% if @profile.website? %>
57
+ <div class="row">
58
+ <div class="label">
59
+ <%=t('profile.website')%>
60
+ </div>
61
+ <div class="field">
62
+ <a href="<%=h @profile.website %>"><%=h @profile.website %></a>
63
+ </div>
64
+ </div>
65
+ <%end%>
66
+ <% if @profile.subject.email? %>
67
+ <div class="row">
68
+ <div class="label">
69
+ <%=t('profile.email')%>:
70
+ </div>
71
+ <div class="field">
72
+ <%=h @profile.subject.email %>
73
+ </div>
74
+ </div>
75
+ <%end%>
76
+ </div>
77
+ <%elsif is_owner?%>
78
+ <%=t('profile.empty')%>
79
+ <%end%>
80
+ </div>
81
+ </div>