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,22 @@
1
+ <div class="space_center"></div>
2
+ <div class="block" id="experience_info">
3
+ <div class="header">
4
+ <div class="header_text">
5
+ <%=t('profile.' + @profile.subject.class.to_s.downcase + '.experience')%>
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 => "my_experience"%>
10
+ </div>
11
+ <%end%>
12
+ </div>
13
+ <div class="content">
14
+ <%if @profile.experience?%>
15
+ <div class="row">
16
+ <%=h @profile.experience %>
17
+ </div>
18
+ <%elsif is_owner?%>
19
+ <%=t('profile.empty')%>
20
+ <%end%>
21
+ </div>
22
+ </div>
@@ -0,0 +1,74 @@
1
+
2
+ <div class="block" id="personal_info" >
3
+ <div class="header">
4
+ <div class="header_text">
5
+ <%=t('profile.' + @profile.subject.class.to_s.downcase + '.info')%>
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 => "about_me"%>
10
+ </div>
11
+ <% end %>
12
+ </div>
13
+ <div class="content">
14
+ <% if !is_personal_empty?%>
15
+ <div class="sub-block" >
16
+ <% if @profile.organization? %>
17
+ <div class="row">
18
+ <div class="label">
19
+ <%=t('profile.organization')%>:
20
+ </div>
21
+ <div class="field">
22
+ <%=h @profile.organization %>
23
+ </div>
24
+ </div>
25
+ <%end%>
26
+ <% if @profile.birthday? %>
27
+ <div class="row">
28
+ <div class="label">
29
+ <%=t('profile.' + @profile.subject.class.to_s.downcase + '.birthday')%>:
30
+ </div>
31
+ <div class="field">
32
+ <%=h I18n.l @profile.birthday, :format => :long %>
33
+ </div>
34
+ </div>
35
+ <% if @profile.subject.class.eql?(User) %>
36
+ <div class="row">
37
+ <div class="label">
38
+ <%=t('profile.age')%>:
39
+ </div>
40
+ <div class="field">
41
+ <%=h @profile.age %>
42
+ </div>
43
+ </div>
44
+ <%end%>
45
+ <%end%>
46
+ <% if @profile.city? %>
47
+ <div class="row">
48
+ <div class="label">
49
+ <%=t('profile.actualcity')%>:
50
+ </div>
51
+ <div class="field">
52
+ <%=h @profile.city %>
53
+ <% if @profile.country? %>
54
+ , <%=@profile.country%>
55
+ <%end%>
56
+ </div>
57
+ </div>
58
+ <%end%>
59
+ <% if @profile.description? %>
60
+ <div class="row">
61
+ <div class="label">
62
+ <%=t('profile.' + @profile.subject.class.to_s.downcase + '.about')%>:
63
+ </div>
64
+ <div class="row">
65
+ <%=h @profile.description %>
66
+ </div>
67
+ </div>
68
+ <%end%>
69
+ </div>
70
+ <%elsif is_owner?%>
71
+ <%=t('profile.empty')%>
72
+ <%end%>
73
+ </div>
74
+ </div>
@@ -1,171 +1,18 @@
1
- <%= location(
2
- link_to(image_tag("btn/btn_edit.png", :class => "menu_icon")+t('menu.information'), [current_subject, :profile])
3
- ) %>
4
1
  <div class="space_center"></div>
5
2
  <h2><%=t('menu.information')%></h2>
6
3
  <div class="space_center"></div>
7
- <div class="block" id="personal_info" >
8
- <div class="header">
9
- <div class="header_text">
10
- <%=t('profile.' + @profile.subject.class.to_s.downcase + '.info')%>
11
- </div>
12
- <div class="header_icon_right">
13
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "about_me"%>
14
- </div>
15
- </div>
16
- <div class="content">
17
- <div class="sub-block" >
18
- <% if @profile.organization? %>
19
- <div class="row">
20
- <div class="label">
21
- <%=t('profile.organization')%>:
22
- </div>
23
- <div class="field">
24
- <%=h @profile.organization %>
25
- </div>
26
- </div>
27
- <%end%>
28
- <% if @profile.birthday? %>
29
- <div class="row">
30
- <div class="label">
31
- <%=t('profile.' + current_subject.class.to_s.downcase + '.birthday')%>:
32
- </div>
33
- <div class="field">
34
- <%=h I18n.l @profile.birthday, :format => :long %>
35
- </div>
36
- </div>
37
- <% if current_subject.class.eql?(User) %>
38
- <div class="row">
39
- <div class="label">
40
- <%=t('profile.age')%>:
41
- </div>
42
- <div class="field">
43
- <%=h @profile.age %>
44
- </div>
45
- </div>
46
- <%end%>
47
- <%end%>
48
- <% if @profile.city? %>
49
- <div class="row">
50
- <div class="label">
51
- <%=t('profile.actualcity')%>:
52
- </div>
53
- <div class="field">
54
- <%=h @profile.city %>
55
- <% if @profile.country? %>
56
- , <%=@profile.country%>
57
- <%end%>
58
- </div>
59
- </div>
60
- <%end%>
61
- <% if @profile.description? %>
62
- <div class="row">
63
- <div class="label">
64
- <%=t('profile.' + current_subject.class.to_s.downcase + '.about')%>:
65
- </div>
66
- <div class="row">
67
- <%=h @profile.description %>
68
- </div>
69
- </div>
70
- <%end%>
71
- </div>
72
- </div>
73
- </div>
74
-
75
4
 
76
- <div class="space_center"></div>
77
- <div class="block" id="contact_info">
78
- <div class="header">
79
- <div class="header_text">
80
- <%=t('profile.contact')%>
81
- </div>
82
- <div class="header_icon_right">
83
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "contact_info"%>
84
- </div>
85
- </div>
86
- <div class="content">
87
- <div class="sub-block" >
88
- <% if @profile.phone? %>
89
- <div class="row">
90
- <div class="label">
91
- <%=t('profile.phone')%>
92
- </div>
93
- <div class="field">
94
- <%=h @profile.phone %>
95
- </div>
96
- </div>
97
- <%end%>
98
- <% if @profile.mobile? %>
99
- <div class="row">
100
- <div class="label">
101
- <%=t('profile.mobile')%>
102
- </div>
103
- <div class="field">
104
- <%=h @profile.mobile %>
105
- </div>
106
- </div>
107
- <%end%>
108
- <% if @profile.fax? %>
109
- <div class="row">
110
- <div class="label">
111
- <%=t('profile.fax')%>
112
- </div>
113
- <div class="field">
114
- <%=h @profile.fax %>
115
- </div>
116
- </div>
117
- <%end%>
118
- <% if @profile.address? %>
119
- <div class="row">
120
- <div class="label">
121
- <%=t('profile.address')%>
122
- </div>
123
- <div class="field">
124
- <%=h @profile.address %>
125
- </div>
126
- </div>
127
- <%end%>
128
- <% if @profile.website? %>
129
- <div class="row">
130
- <div class="label">
131
- <%=t('profile.website')%>
132
- </div>
133
- <div class="field">
134
- <a href="<%=h @profile.website %>"><%=h @profile.website %></a>
135
- </div>
136
- </div>
137
- <%end%>
138
-
139
- <div class="row">
140
- <div class="label">
141
- <%=t('profile.email')%>:
142
- </div>
143
- <div class="field">
144
- <%=h @profile.subject.email %>
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
- </div>
5
+ <% if (!is_personal_empty?) or(is_owner?)%>
6
+ <%= render :partial=> "personal"%>
7
+ <%end%>
150
8
 
151
- <div class="space_center"></div>
152
- <div class="block" id="experience_info">
153
- <div class="header">
154
- <div class="header_text">
155
- <%=t('profile.' + @profile.subject.class.to_s.downcase + '.experience')%>
156
- </div>
157
- <div class="header_icon_right">
158
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "my_experience"%>
159
- </div>
160
- </div>
161
- <div class="content">
162
- <div class="row">
163
- <%=h @profile.experience %>
164
- </div>
165
- </div>
166
- </div>
167
- <% if (!@profile.blank?) && (!current_subject.blank?)%>
168
- <% if (@profile.actor == current_subject.actor) %>
9
+ <% if (!is_contact_empty?) or(is_owner?)%>
10
+ <%= render :partial=> "contact"%>
11
+ <%end%>
12
+ <% if (@profile.experience?) or(is_owner?)%>
13
+ <%= render :partial=> "experience"%>
14
+ <%end%>
15
+ <% if is_owner? %>
169
16
  <div class="space_center"></div>
170
17
  <div class="block" id="avatar_info">
171
18
  <div class="header">
@@ -181,7 +28,6 @@
181
28
  </div>
182
29
  </div>
183
30
  </div>
184
- <% end %>
185
31
  <% end %>
186
32
  <div class="space_center"></div>
187
33
  <% if (@profile.to_param==current_user.to_param and @profile.authentication_token) %>
@@ -198,22 +44,7 @@
198
44
  </div>
199
45
  <% end %>
200
46
  <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>
47
+ <% if (@profile.subject.tag_list.count > 0) or (is_owner?) %>
48
+ <%= render :partial=>"tags"%>
218
49
  <% end %>
219
50
 
@@ -0,0 +1,22 @@
1
+ <div class="block" id="tags_info">
2
+ <div class="header">
3
+ <div class="header_text">
4
+ <%=t('profile.tags.other')%>
5
+ </div>
6
+ <% if is_owner? %>
7
+ <div class="header_icon_right">
8
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles ,
9
+ :action => :edit, :section => "tags"%>
10
+ </div>
11
+ <% end %>
12
+ </div>
13
+ <div class="content">
14
+ <div class="field">
15
+ <% if @profile.subject.tag_list.count > 0 %>
16
+ <%= @profile.subject.tag_list %>
17
+ <%else%>
18
+ <%=t('profile.empty')%>
19
+ <%end%>
20
+ </div>
21
+ </div>
22
+ </div>
@@ -88,8 +88,6 @@ end %>
88
88
  $(function () {
89
89
  $( "#profile_birthday" ).datepicker({ yearRange: '1900:<%= Time.now.utc.to_date.year%>',
90
90
  changeYear: true, maxDate: '+0d', defaultDate: '-30y'});
91
- $("#personal_info").addClass('section_highlight');
92
-
93
91
  });
94
92
  <% end %>
95
93
  <div class="row">
@@ -154,13 +152,6 @@ end %>
154
152
  </div>
155
153
  <% end %>
156
154
  <% if !params[:section].present? or params[:section].eql?("contact_info") %>
157
-
158
- <% content_for :javascript do %>
159
- $(function() {
160
- $("#contact_info").addClass('section_highlight');
161
- });
162
- <% end %>
163
-
164
155
  <div class="form_row">
165
156
  <h2><%=t('profile.contact')%></h2>
166
157
  </div>
@@ -207,11 +198,6 @@ end %>
207
198
  </div>
208
199
  <% end %>
209
200
  <% if !params[:section].present? or params[:section].eql?("my_experience") %>
210
- <% content_for :javascript do %>
211
- $(function() {
212
- $("#experience_info").addClass('section_highlight');
213
- });
214
- <% end %>
215
201
  <div class="form_row">
216
202
  <h2><%=t('profile.' + current_subject.class.to_s.downcase + '.experience')%></h2>
217
203
  </div>
@@ -1,6 +1,15 @@
1
1
  <% content_for :title do%>
2
2
  <%= @profile.subject.name %>
3
3
  <%end%>
4
+ <% if @profile.description? %>
5
+ <% content_for :description do %>
6
+ <%= @profile.description%>
7
+ <% end %>
8
+ <%end%>
9
+
10
+ <% content_for :keywords do %>
11
+ <%= @profile.subject.tag_list%>
12
+ <% end %>
4
13
 
5
14
  <% content_for :sidebar do %>
6
15
  <%= render :partial => 'users/sidebar_index' %>
@@ -8,4 +17,9 @@
8
17
 
9
18
  <% toolbar :profile => @profile.subject %>
10
19
 
20
+
21
+ <%= location(link_to(image_tag("btn/btn_edit.png", :class => "menu_icon")+t('menu.information'),
22
+ [@profile.subject, :profile])) %>
23
+
24
+
11
25
  <%= render :partial => "profile" %>
@@ -5,38 +5,12 @@
5
5
 
6
6
  <% if @profile.valid? %>
7
7
 
8
- $("#profile_notice").html("<h2>Form Submitted!</h2>");
8
+ $("#profile_notice").html("<%= t('profile.update.success')%>");
9
9
  $("#profile_notice").removeClass('error');
10
10
  $("#profile_notice").addClass('success');
11
11
 
12
- /*$("#sidebarContent").replaceWith("<%#= escape_javascript(render(:partial => 'sidebar_show'))%>");*/
13
-
14
- $("#contact_info").addClass('section_normal');
15
- $("#experience_info").addClass('section_normal');
16
- $("#personal_info").addClass('section_normal');
17
-
18
- <% if !params[:section].present? or params[:section].eql?("about_me") %>
19
- $("#personal_info").removeClass('section_normal');
20
- $("#personal_info").addClass('section_highlight');
21
- <%end%>
22
-
23
- <% if !params[:section].present? or params[:section].eql?("contact_info") %>
24
- $("#contact_info").removeClass('section_normal');
25
- $("#contact_info").addClass('section_highlight');
26
- <%end%>
27
-
28
- <% if !params[:section].present? or params[:section].eql?("my_experience") %>
29
- $("#experience_info").removeClass('section_normal');
30
- $("#experience_info").addClass('section_highlight');
31
- <%end%>
32
-
33
- <% if !params[:section].present? or params[:section].eql?("tags") %>
34
- $("#tags").removeClass('section_normal');
35
- $("#tags").addClass('section_highlight');
36
- <%end%>
37
-
38
12
  <% else %>
39
- $("#profile_notice").html("<h2><%= pluralize(@profile.errors.count, "error") %> prohibited this profile from being saved:</h2>"
13
+ $("#profile_notice").html("<h2><%= pluralize(@profile.errors.count, "error") %> <%= t('profile.update.error')%></h2>"
40
14
  +"<ul><% @profile.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul>");
41
15
  $("#profile_notice").removeClass('success');
42
16
  $("#profile_notice").addClass('error');
@@ -0,0 +1,29 @@
1
+ <% @custom ||= @sphere.customs.build %>
2
+
3
+ <%= form_for @custom, :remote => true do |f| %>
4
+ <%= f.hidden_field :sphere_id %>
5
+
6
+ <% if @custom.errors.any? %>
7
+ <div id="error_explanation">
8
+ <h2><%= pluralize(@custom.errors.count, "error") %> prohibited this custom relation from being saved:</h2>
9
+
10
+ <ul>
11
+ <% @custom.errors.full_messages.each do |msg| %>
12
+ <li><%= msg %></li>
13
+ <% end %>
14
+ </ul>
15
+ </div>
16
+ <% end %>
17
+
18
+ <p><%= f.text_field :name, :class => "privacy_input_new", :size => 20 %></p>
19
+ <%= f.submit nil, :class => "button" %>
20
+ <button class="button" id="cancel_new_relation_custom" ><%= t('button.cancel') %></button>
21
+ <% end %>
22
+
23
+ <%= javascript_tag do %>
24
+ $("#cancel_new_relation_custom").click(function() {
25
+ $("#new_relation_custom_input_block").hide();
26
+ $("#new_relation_custom_title_block").show();
27
+ return false;
28
+ });
29
+ <% end %>