social_stream 0.3.6 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +6 -0
  3. data/app/controllers/api_controller.rb +39 -0
  4. data/app/controllers/frontpage_controller.rb +2 -0
  5. data/app/controllers/groups_controller.rb +8 -2
  6. data/app/controllers/likes_controller.rb +9 -29
  7. data/app/controllers/logos_controller.rb +21 -0
  8. data/app/controllers/mailbox/conversation_controller.rb +110 -0
  9. data/app/controllers/mailbox_controller.rb +35 -0
  10. data/app/controllers/posts_controller.rb +2 -0
  11. data/app/controllers/profiles_controller.rb +3 -0
  12. data/app/controllers/ties_controller.rb +10 -0
  13. data/app/controllers/users_controller.rb +5 -5
  14. data/app/helpers/groups_helper.rb +0 -2
  15. data/app/helpers/subjects_helper.rb +11 -0
  16. data/app/helpers/ties_helper.rb +1 -1
  17. data/app/models/activity.rb +24 -1
  18. data/app/models/activity_object.rb +10 -0
  19. data/app/models/activity_object_activity.rb +10 -0
  20. data/app/models/actor.rb +87 -60
  21. data/app/models/group.rb +10 -4
  22. data/app/models/like.rb +34 -0
  23. data/app/models/logo.rb +51 -0
  24. data/app/models/permission.rb +7 -5
  25. data/app/models/profile.rb +24 -8
  26. data/app/models/tie.rb +15 -2
  27. data/app/models/user.rb +2 -2
  28. data/app/views/activities/_activities.html.erb +1 -1
  29. data/app/views/activities/_new.html.erb +12 -7
  30. data/app/views/api/activity_atom_feed.atom.builder +40 -0
  31. data/app/views/comments/_new.html.erb +1 -1
  32. data/app/views/devise/passwords/edit.html.erb +21 -0
  33. data/app/views/devise/passwords/new.html.erb +16 -0
  34. data/app/views/devise/registrations/new.html.erb +35 -19
  35. data/app/views/devise/sessions/new.html.erb +30 -0
  36. data/app/views/frontpage/_header.html.erb +18 -20
  37. data/app/views/frontpage/_search.html.erb +13 -0
  38. data/app/views/frontpage/_sponsor.html.erb +12 -13
  39. data/app/views/frontpage/index.html.erb +88 -80
  40. data/app/views/groups/_group.html.erb +2 -6
  41. data/app/views/groups/_index.html.erb +22 -25
  42. data/app/views/groups/_logo.html.erb +1 -1
  43. data/app/views/groups/_new.html.erb +56 -39
  44. data/app/views/groups/_profile.html.erb +142 -0
  45. data/app/views/groups/_sidebar_index.html.erb +73 -0
  46. data/app/views/groups/{_middle_show.html.erb → _sidebar_show.html.erb} +2 -2
  47. data/app/views/groups/_tabs.html.erb +37 -31
  48. data/app/views/groups/_toolbar_show.html.erb +12 -0
  49. data/app/views/groups/edit.html.erb +136 -0
  50. data/app/views/groups/index.html.erb +47 -46
  51. data/app/views/groups/new.html.erb +2 -0
  52. data/app/views/groups/show.html.erb +9 -4
  53. data/app/views/groups/update.js.erb +39 -0
  54. data/app/views/home/_groups.html.erb +4 -5
  55. data/app/views/{users/_middle_index.html.erb → home/_sidebar.html.erb} +0 -2
  56. data/app/views/home/index.html.erb +3 -5
  57. data/app/views/layouts/_footer.html.erb +4 -0
  58. data/app/views/layouts/_header.erb +29 -37
  59. data/app/views/layouts/_representation.html.erb +2 -2
  60. data/app/views/layouts/application.html.erb +47 -74
  61. data/app/views/layouts/frontpage.html.erb +27 -48
  62. data/app/views/layouts/test.html +44 -0
  63. data/app/views/likes/create.js.erb +1 -1
  64. data/app/views/likes/destroy.js.erb +1 -1
  65. data/app/views/logos/_form.html.erb +33 -0
  66. data/app/views/logos/_precrop.html.erb +48 -0
  67. data/app/views/logos/edit.html.erb +6 -0
  68. data/app/views/logos/index.html.erb +27 -0
  69. data/app/views/logos/new.html.erb +20 -0
  70. data/app/views/logos/show.html.erb +5 -0
  71. data/app/views/mailbox/_conversation.html.erb +23 -0
  72. data/app/views/mailbox/_conversations.html.erb +9 -0
  73. data/app/views/mailbox/_index.html.erb +16 -0
  74. data/app/views/{messages → mailbox}/_location.html.erb +0 -0
  75. data/app/views/mailbox/_menu_options.html.erb +19 -0
  76. data/app/views/mailbox/_show.html.erb +15 -0
  77. data/app/views/mailbox/conversation/_conversation.html.erb +40 -0
  78. data/app/views/mailbox/conversation/_form.html.erb +54 -0
  79. data/app/views/mailbox/conversation/_location.html.erb +3 -0
  80. data/app/views/mailbox/conversation/_new.html.erb +19 -0
  81. data/app/views/mailbox/conversation/_show.html.erb +27 -0
  82. data/app/views/mailbox/conversation/edit.html.erb +6 -0
  83. data/app/views/mailbox/conversation/new.html.erb +10 -0
  84. data/app/views/mailbox/conversation/new.js.erb +1 -0
  85. data/app/views/mailbox/conversation/show.html.erb +1 -0
  86. data/app/views/{messages → mailbox}/edit.html.erb +0 -0
  87. data/app/views/mailbox/index.html.erb +10 -0
  88. data/app/views/{messages → mailbox}/index.js.erb +0 -0
  89. data/app/views/mailbox/new.html.erb +14 -0
  90. data/app/views/mailbox/show.html.erb +11 -0
  91. data/app/views/mailbox/show.js.erb +1 -0
  92. data/app/views/menu/_group.html.erb +15 -0
  93. data/{lib/generators/social_stream/templates/public/stylesheets/users.css → app/views/menu/_home_user.html.erb} +0 -0
  94. data/app/views/menu/_options.html.erb +11 -0
  95. data/app/views/menu/_services.html.erb +11 -0
  96. data/app/views/menu/_tiesGroup.html.erb +14 -0
  97. data/app/views/menu/_tiesUser.html.erb +11 -0
  98. data/app/views/menu/_user.html.erb +15 -0
  99. data/app/views/profiles/show.html.erb +1 -0
  100. data/app/views/subjects/_contacts.html.erb +8 -9
  101. data/app/views/subjects/_menu_options.html.erb +14 -0
  102. data/app/views/subjects/_toolbar.html.erb +15 -0
  103. data/app/views/ties/_new.html.erb +3 -2
  104. data/app/views/ties/_pendings.html.erb +7 -12
  105. data/app/views/ties/_suggestions.html.erb +12 -12
  106. data/app/views/ties/_tie.html.erb +9 -7
  107. data/app/views/ties/new.js.erb +1 -2
  108. data/app/views/users/_groups.html.erb +4 -3
  109. data/app/views/users/_index.html.erb +24 -22
  110. data/app/views/users/_logo.html.erb +1 -1
  111. data/app/views/users/_profile.html.erb +167 -164
  112. data/app/views/users/_sidebar_index.html.erb +6 -0
  113. data/app/views/users/{_middle_show.html.erb → _sidebar_show.html.erb} +0 -0
  114. data/app/views/users/_toolbar_show.html.erb +17 -0
  115. data/app/views/users/edit.html.erb +193 -165
  116. data/app/views/users/index.html.erb +34 -47
  117. data/{spec/dummy/public/stylesheets/.gitkeep → app/views/users/info.html.erb} +0 -0
  118. data/app/views/users/show.html.erb +4 -4
  119. data/app/views/users/show.xml.builder +28 -0
  120. data/app/views/users/update.js.erb +3 -1
  121. data/config/locales/en.yml +88 -9
  122. data/config/routes.rb +30 -14
  123. data/lib/generators/social_stream/install_generator.rb +8 -2
  124. data/lib/generators/social_stream/templates/migration.rb +75 -81
  125. data/lib/generators/social_stream/templates/public/images/{frontpage/facebook.png → btn/1-facebook.png} +0 -0
  126. data/lib/generators/social_stream/templates/public/images/btn/edit.png +0 -0
  127. data/lib/generators/social_stream/templates/public/images/btn/facebook.png +0 -0
  128. data/lib/generators/social_stream/templates/public/images/btn/linkedin.png +0 -0
  129. data/lib/generators/social_stream/templates/public/images/btn/twitter-follow-icon.png +0 -0
  130. data/lib/generators/social_stream/templates/public/images/btn/twitter.png +0 -0
  131. data/lib/generators/social_stream/templates/public/images/frontpage/collaborate.png +0 -0
  132. data/lib/generators/social_stream/templates/public/images/frontpage/meet.png +0 -0
  133. data/lib/generators/social_stream/templates/public/images/frontpage/share.png +0 -0
  134. data/lib/generators/social_stream/templates/public/images/icons/favicon.ico +0 -0
  135. data/lib/generators/social_stream/templates/public/images/logo.png +0 -0
  136. data/lib/generators/social_stream/templates/public/images/w3c_css.png +0 -0
  137. data/lib/generators/social_stream/templates/public/images/w3c_xhtml.png +0 -0
  138. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui-1.8.4.custom.min.js +3 -3
  139. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui-personalized-1.5.2.packed.js +1 -0
  140. data/lib/generators/social_stream/templates/public/javascripts/jquery-ui.min.js +3 -3
  141. data/lib/generators/social_stream/templates/public/javascripts/jquery.Jcrop.min.js +163 -0
  142. data/lib/generators/social_stream/templates/public/javascripts/jquery.fcbkcomplete.min.js +76 -76
  143. data/lib/generators/social_stream/templates/public/javascripts/jquery.min.js +156 -5
  144. data/lib/generators/social_stream/templates/public/javascripts/main.js +9 -0
  145. data/lib/generators/social_stream/templates/public/javascripts/menu-collapsed.js +42 -0
  146. data/lib/generators/social_stream/templates/public/javascripts/menu.js +1 -1
  147. data/lib/generators/social_stream/templates/public/javascripts/rails.js +30 -29
  148. data/lib/generators/social_stream/templates/public/javascripts/superfish.js +121 -0
  149. data/lib/generators/social_stream/templates/public/stylesheets/default/activities.css +72 -0
  150. data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +150 -0
  151. data/lib/generators/social_stream/templates/public/stylesheets/default/carousel.css +23 -0
  152. data/lib/generators/social_stream/templates/public/stylesheets/{fcbkComplete.css → default/fcbkComplete.css} +2 -2
  153. data/lib/generators/social_stream/templates/public/stylesheets/default/footer.css +25 -0
  154. data/lib/generators/social_stream/templates/public/stylesheets/default/frontpage.css +54 -0
  155. data/lib/generators/social_stream/templates/public/stylesheets/default/header.css +44 -0
  156. data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +44 -0
  157. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  158. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_flat_75_ffffff_40x100.png +0 -0
  159. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  160. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  161. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_75_dadada_1x400.png +0 -0
  162. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  163. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  164. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  165. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_222222_256x240.png +0 -0
  166. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_2e83ff_256x240.png +0 -0
  167. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_454545_256x240.png +0 -0
  168. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_888888_256x240.png +0 -0
  169. data/lib/generators/social_stream/templates/public/stylesheets/{images → default/images}/ui-icons_cd0a0a_256x240.png +0 -0
  170. data/lib/generators/social_stream/templates/public/stylesheets/default/jqcloud.css +15 -0
  171. data/lib/generators/social_stream/templates/public/stylesheets/{jquery-ui.css → default/jquery-ui.css} +0 -0
  172. data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.Jcrop.css +35 -0
  173. data/lib/generators/social_stream/templates/public/stylesheets/default/menu.css +33 -0
  174. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  175. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  176. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  177. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  178. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  179. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  180. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  181. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  182. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_222222_256x240.png +0 -0
  183. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_2e83ff_256x240.png +0 -0
  184. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_454545_256x240.png +0 -0
  185. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_888888_256x240.png +0 -0
  186. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/images/ui-icons_cd0a0a_256x240.png +0 -0
  187. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/jquery-ui-1.7.3.custom.css +0 -0
  188. data/lib/generators/social_stream/templates/public/stylesheets/{smoothness → default/smoothness}/jquery-ui-1.8.4.custom.css +0 -0
  189. data/lib/social_stream.rb +11 -2
  190. data/lib/social_stream/ability.rb +21 -3
  191. data/lib/social_stream/models/object.rb +5 -3
  192. data/lib/social_stream/models/subject.rb +50 -31
  193. data/lib/social_stream/rails.rb +5 -0
  194. data/lib/social_stream/test_helpers.rb +11 -0
  195. data/lib/social_stream/test_helpers/controllers.rb +64 -0
  196. data/lib/social_stream/version.rb +1 -1
  197. data/lib/tasks/db/populate.rake +110 -25
  198. data/social_stream.gemspec +7 -1
  199. data/spec/controllers/contacts_controller_spec.rb +1 -1
  200. data/spec/controllers/groups_controller_spec.rb +8 -0
  201. data/spec/controllers/home_controller_spec.rb +15 -0
  202. data/spec/controllers/likes_controller_spec.rb +29 -0
  203. data/spec/controllers/posts_controller_spec.rb +41 -0
  204. data/spec/controllers/profiles_controller_spec.rb +46 -0
  205. data/spec/controllers/users_controller_spec.rb +2 -2
  206. data/spec/dummy/.gitignore +4 -0
  207. data/spec/dummy/config/database.yml +8 -0
  208. data/spec/dummy/config/environments/test_pg.rb +35 -0
  209. data/spec/dummy/config/routes.rb +2 -0
  210. data/spec/factories/group.rb +1 -1
  211. data/spec/integration/navigation_spec.rb +1 -1
  212. data/spec/models/actor_spec.rb +4 -4
  213. data/spec/models/user_spec.rb +2 -2
  214. data/spec/spec_helper.rb +1 -1
  215. data/spec/support/db.rb +7 -0
  216. metadata +198 -116
  217. data/app/controllers/messages_controller.rb +0 -3
  218. data/app/models/message.rb +0 -2
  219. data/app/views/groups/_middle_index.html.erb +0 -74
  220. data/app/views/groups/_right_index.html.erb +0 -19
  221. data/app/views/groups/_right_show.html.erb +0 -8
  222. data/app/views/home/_middle.html.erb +0 -4
  223. data/app/views/home/_options.html.erb +0 -8
  224. data/app/views/home/_right.html.erb +0 -17
  225. data/app/views/messages/_form.html.erb +0 -24
  226. data/app/views/messages/_index.html.erb +0 -24
  227. data/app/views/messages/_message.html.erb +0 -17
  228. data/app/views/messages/_messages.html.erb +0 -2
  229. data/app/views/messages/index.html.erb +0 -1
  230. data/app/views/messages/new.html.erb +0 -14
  231. data/app/views/messages/show.html.erb +0 -21
  232. data/app/views/users/_menu.html.erb +0 -7
  233. data/app/views/users/_options.html.erb +0 -5
  234. data/app/views/users/_right_index.html.erb +0 -19
  235. data/app/views/users/_right_show.html.erb +0 -14
  236. data/lib/generators/social_stream/templates/public/images/btn/btn_share.png +0 -0
  237. data/lib/generators/social_stream/templates/public/images/favicon.ico +0 -0
  238. data/lib/generators/social_stream/templates/public/images/frontpage/collaborate.gif +0 -0
  239. data/lib/generators/social_stream/templates/public/images/frontpage/meet.gif +0 -0
  240. data/lib/generators/social_stream/templates/public/images/frontpage/share.gif +0 -0
  241. data/lib/generators/social_stream/templates/public/javascripts/hoverIntent.js +0 -84
  242. data/lib/generators/social_stream/templates/public/stylesheets/activities.css +0 -235
  243. data/lib/generators/social_stream/templates/public/stylesheets/base.css +0 -68
  244. data/lib/generators/social_stream/templates/public/stylesheets/boxy.css +0 -49
  245. data/lib/generators/social_stream/templates/public/stylesheets/browse.css +0 -162
  246. data/lib/generators/social_stream/templates/public/stylesheets/carousel.css +0 -57
  247. data/lib/generators/social_stream/templates/public/stylesheets/edit_user.css +0 -104
  248. data/lib/generators/social_stream/templates/public/stylesheets/frontpage.css +0 -708
  249. data/lib/generators/social_stream/templates/public/stylesheets/header.css +0 -116
  250. data/lib/generators/social_stream/templates/public/stylesheets/home.css +0 -121
  251. data/lib/generators/social_stream/templates/public/stylesheets/index.css +0 -625
  252. data/lib/generators/social_stream/templates/public/stylesheets/jqcloud.css +0 -62
  253. data/lib/generators/social_stream/templates/public/stylesheets/menu.css +0 -83
  254. data/lib/generators/social_stream/templates/public/stylesheets/message.css +0 -46
  255. data/lib/generators/social_stream/templates/public/stylesheets/middle.css +0 -113
  256. data/lib/generators/social_stream/templates/public/stylesheets/right.css +0 -58
  257. data/lib/generators/social_stream/templates/public/stylesheets/social_stream.css +0 -78
  258. data/lib/generators/social_stream/templates/public/stylesheets/ui.dropdownchecklist.css +0 -21
  259. data/spec/dummy/db/.gitignore +0 -2
  260. data/spec/dummy/log/.gitignore +0 -1
  261. data/spec/dummy/public/javascripts/application.js +0 -2
  262. data/spec/dummy/public/javascripts/controls.js +0 -965
  263. data/spec/dummy/public/javascripts/dragdrop.js +0 -974
  264. data/spec/dummy/public/javascripts/effects.js +0 -1123
  265. data/spec/dummy/public/javascripts/prototype.js +0 -6001
  266. data/spec/dummy/public/javascripts/rails.js +0 -175
@@ -0,0 +1,6 @@
1
+ <% if user_signed_in? %>
2
+ <div class="block space_center"></div>
3
+ <%= render :partial => "ties/suggestions" %>
4
+ <div class="block space_center"></div>
5
+ <%= render :partial => 'ties/pendings' %>
6
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <% content_for :headers, stylesheet_link_tag("menu", :media => "screen, projection") %>
2
+
3
+ <%= render :partial => 'logo' %>
4
+
5
+ <div class="block space_center">
6
+ </div>
7
+ <%= render :partial => 'menu/user' %>
8
+ <div class="block space_center">
9
+ </div>
10
+
11
+ <%= render :partial => 'subjects/contacts', :locals => { :subject => @user } %>
12
+
13
+ <div class="block space_center">
14
+ </div>
15
+ <div class="block space_center">
16
+ </div>
17
+
@@ -1,167 +1,195 @@
1
- <% content_for :right do %>
2
- <%= render :partial => 'right_show' %>
3
- <% end %>
4
-
5
- <% content_for :middle do %>
6
- <%= render :partial => 'middle_show' %>
7
- <% end %>
8
-
9
- <% content_for :head do %>
10
- <%= stylesheet_link_tag "jquery-ui.css", :media => "screen, projection" %>
11
- <%= stylesheet_link_tag "edit_user", :media => "screen, projection" %>
12
- <%= javascript_include_tag 'jquery-ui.min','jquery.validate' %>
13
- <% end %>
14
-
15
- <%= form_for(@user, :remote => true) do |f| %>
16
- <% if @user.errors.any? %>
17
- <div id="error_explanation">
18
- <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
19
- <ul>
20
- <% @user.errors.full_messages.each do |msg| %>
21
- <li>
22
- <%= msg %>
23
- </li>
24
- <% end %>
25
- </ul>
26
- </div>
27
- <% end %>
1
+ <% content_for :toolbar do %>
2
+ <%= render :partial => 'toolbar_show' %>
3
+ <% end %>
4
+
5
+ <% content_for :sidebar do %>
6
+ <%= render :partial => 'sidebar_show' %>
7
+ <% end %>
28
8
 
29
- <% content_for :javascript do %>
30
- $(function() {
31
- $("#content").css('border-bottom', 'none');
32
- $("#edit_user_1").validate();
33
- });
34
- <% end %>
35
-
36
- <div class="field">
37
- <% if !params[:section].present? or params[:section].eql?("about_me") %>
38
- <div class="section_edit">
39
- Personal information
40
- </div>
41
- <div class="edit_field">
42
- <div class="edit_label">
43
- <%= f.label :name %>
44
- </div>
45
- <%= f.text_field :name, :class => "required edit_text" %>
46
- </div>
47
-
48
- <% content_for :javascript do %>
49
- $(function () {
50
- $( "#user_profile_attributes_birthday" ).datepicker({ yearRange: '1900:<%= Time.now.utc.to_date.year%>',
51
- changeYear: true, maxDate: '+0d', defaultDate: '-30y'});
52
- $("#personal_info").addClass('section_highlight');
53
-
54
- });
55
- <% end %>
56
-
57
- <%= f.fields_for :profile do |profile_form| %>
58
-
59
- <div class="edit_field">
60
- <div class="edit_label">
61
- <%= profile_form.label :organization %>
62
- </div>
63
- <%= profile_form.text_field :organization, :class => "edit_text" %>
64
- </div>
65
-
66
- <div class="edit_field">
67
- <div class="edit_label">
68
- <%= profile_form.label :birthday %>
69
- </div>
70
- <%= profile_form.text_field( :birthday , :class => "date edit_text") %>
71
- </div>
72
-
73
-
74
- <div class="edit_field">
75
- <div class="edit_label">
76
- <%= profile_form.label :city %>
77
- </div>
78
- <%= profile_form.text_field :city, :class => "edit_text" %>
79
- </div>
80
- <div class="edit_field">
81
- <div class="edit_label">
82
- <%= profile_form.label :country %>
83
- </div>
84
- <%= profile_form.text_field :country, :class => "edit_text" %>
85
- </div>
86
- <div class="edit_field">
87
- <%= profile_form.label "About me" %>
88
- <%= profile_form.text_area :description, :rows =>6, :maxlength => 400, :class => "edit_text" %>
89
- </div>
90
-
91
- <% end %>
92
- <% end %>
93
- <% if !params[:section].present? or params[:section].eql?("contact_info") %>
94
-
95
- <% content_for :javascript do %>
96
-
97
- $(function() {
98
- $("#contact_info").addClass('section_highlight');
99
- });
100
-
101
- <% end %>
102
-
103
- <div class="section_edit">
104
- Contact information
105
- </div>
106
- <%= f.fields_for :profile do |profile_form| %>
107
- <div class="edit_field">
108
- <div class="edit_label">
109
- <%= profile_form.label :phone %>
110
- </div>
111
- <%= profile_form.text_field :phone, :class => "phone edit_text" %>
112
- </div>
113
- <div class="edit_field">
114
- <div class="edit_label">
115
- <%= profile_form.label :mobile %>
116
- </div>
117
- <%= profile_form.text_field :mobile, :class => "phone edit_text" %>
118
- </div>
119
- <div class="edit_field">
120
- <div class="edit_label">
121
- <%= profile_form.label :fax %>
122
- </div>
123
- <%= profile_form.text_field :fax, :class => "phone edit_text" %>
124
- </div>
125
- <div class="edit_field">
126
- <div class="edit_label">
127
- <%= profile_form.label :address %>
128
- </div>
129
- <%= profile_form.text_field :address, :class => "edit_text" %>
130
- </div>
131
- <div class="edit_field">
132
- <div class="edit_label">
133
- <%= profile_form.label :website %>
134
- </div>
135
- <%= profile_form.text_field :website, :class => "url edit_text" %>
136
- </div>
137
-
138
- <% end %>
139
- <% end %>
140
- <% if !params[:section].present? or params[:section].eql?("my_experience") %>
141
-
142
- <% content_for :javascript do %>
143
-
144
- $(function() {
145
- $("#experience_info").addClass('section_highlight');
146
- });
147
-
148
- <% end %>
149
-
150
- <div class="section_edit">
151
- Experience
152
- </div>
153
- <div class="edit_field">
154
- <%= f.fields_for :profile do |profile_form| %>
155
- <%= profile_form.text_area :experience, :rows =>6, :maxlength => 500, :class => "edit_text" %>
156
- </div>
157
- <% end %>
158
- <% end %>
159
- </div>
160
- <% if params[:section].present? %>
161
- <%= hidden_field_tag("section", params[:section]) %>
162
- <% end %>
163
- <div class="actions">
164
- <%= f.submit "Update", :class => "button" %>&nbsp;<button onclick="window.location.href='<%= user_url(@user) %>';">Cancel</button>
165
- </div>
166
- <br/>
9
+ <% content_for :headers do %>
10
+ <%= stylesheet_link_tag "jquery-ui.css", :media => "screen, projection" %>
11
+ <%= javascript_include_tag 'jquery-ui.min','jquery.validate' %>
12
+ <% end %>
13
+
14
+ <%= form_for(@user, :remote => true) do |f| %>
15
+ <% if @user.errors.any? %>
16
+ <div id="error_explanation">
17
+ <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
18
+ <ul>
19
+ <% @user.errors.full_messages.each do |msg| %>
20
+ <li>
21
+ <%= msg %>
22
+ </li>
167
23
  <% end %>
24
+ </ul>
25
+ </div>
26
+ <% end %>
27
+
28
+ <% content_for :javascript do %>
29
+ $(function() {
30
+ $(".edit_user").validate();
31
+ });
32
+ <% end %>
33
+
34
+ <div class="block">
35
+ <% if !params[:section].present? or params[:section].eql?("about_me") %>
36
+ <div class="row">
37
+ <div class="form_row">
38
+ <h2><%=t('edit.personal_info')%></h2>
39
+ </div>
40
+ <div class="form_row">
41
+ <div class="form_label">
42
+ <%= f.label :name %>
43
+ </div>
44
+ <div class="form_field">
45
+ <%= f.text_field :name, :class => "form_tag" %>
46
+ </div>
47
+ </div>
48
+ </div>
49
+
50
+ <% content_for :javascript do %>
51
+ $(function () {
52
+ $( "#user_profile_attributes_birthday" ).datepicker({ yearRange: '1900:<%= Time.now.utc.to_date.year%>',
53
+ changeYear: true, maxDate: '+0d', defaultDate: '-30y'});
54
+ $("#personal_info").addClass('section_highlight');
55
+
56
+ });
57
+ <% end %>
58
+
59
+ <%= f.fields_for :profile do |profile_form| %>
60
+
61
+ <div class="form_row">
62
+ <div class="form_label">
63
+ <%= profile_form.label :organization %>
64
+ </div>
65
+ <div class="form_field">
66
+ <%= profile_form.text_field :organization , :class => "form_tag" %>
67
+ </div>
68
+ </div>
69
+
70
+ <div class="form_row">
71
+ <div class="form_label">
72
+ <%= profile_form.label :birthday %>
73
+ </div>
74
+ <div class="form_field">
75
+ <%= profile_form.text_field( :birthday , :class => "date form_tag") %>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="form_row">
80
+ <div class="form_label">
81
+ <%= profile_form.label :city %>
82
+ </div>
83
+ <div class="form_field">
84
+ <%= profile_form.text_field :city, :class => "form_tag" %>
85
+ </div>
86
+ </div>
87
+
88
+ <div class="form_row">
89
+ <div class="form_label">
90
+ <%= profile_form.label :country %>
91
+ </div>
92
+ <div class="form_field">
93
+ <%= profile_form.text_field :country, :class => "form_tag" %>
94
+ </div>
95
+ </div>
96
+
97
+ <div class="form_row form_label">
98
+ <%= profile_form.label t('edit.aboutme') %>
99
+ </div>
100
+ <div class="form_row">
101
+ <%= profile_form.text_area :description, :maxlength => 200, :rows => 10, :class => "form_tag_long" %>
102
+ </div>
103
+
104
+ <% end %>
105
+ <% end %>
106
+ <% if !params[:section].present? or params[:section].eql?("contact_info") %>
107
+
108
+ <% content_for :javascript do %>
109
+
110
+ $(function() {
111
+ $("#contact_info").addClass('section_highlight');
112
+ });
113
+
114
+ <% end %>
115
+
116
+ <div class="form_row">
117
+ <h2><%=t('edit.contact')%></h2>
118
+ </div>
119
+ <%= f.fields_for :profile do |profile_form| %>
120
+ <div class="form_row">
121
+ <div class="form_label">
122
+ <%= profile_form.label :phone %>
123
+ </div>
124
+ <div class="form_field">
125
+ <%= profile_form.text_field :phone, :class => "form_tag" %>
126
+ </div>
127
+ </div>
128
+ <div class="form_row">
129
+ <div class="form_label">
130
+ <%= profile_form.label :mobile %>
131
+ </div>
132
+ <div class="form_field">
133
+ <%= profile_form.text_field :mobile, :class => "form_tag" %>
134
+ </div>
135
+ </div>
136
+ <div class="form_row">
137
+ <div class="form_label">
138
+ <%= profile_form.label :fax %>
139
+ </div>
140
+ <div class="form_field">
141
+ <%= profile_form.text_field :fax, :class => "form_tag" %>
142
+ </div>
143
+ </div>
144
+ <div class="form_row">
145
+ <div class="form_label">
146
+ <%= profile_form.label :address %>
147
+ </div>
148
+ <div class="form_field">
149
+ <%= profile_form.text_field :address, :class => "form_tag" %>
150
+ </div>
151
+ </div>
152
+ <div class="form_row">
153
+ <div class="form_label">
154
+ <%= profile_form.label :website %>
155
+ </div>
156
+ <div class="form_field">
157
+ <%= profile_form.text_field :website, :class => "form_tag" %>
158
+ </div>
159
+ </div>
160
+
161
+ <% end %>
162
+ <% end %>
163
+ <% if !params[:section].present? or params[:section].eql?("my_experience") %>
164
+
165
+ <% content_for :javascript do %>
166
+
167
+ $(function() {
168
+ $("#experience_info").addClass('section_highlight');
169
+ });
170
+
171
+ <% end %>
172
+
173
+ <div class="form_row">
174
+ <h2><%=t('edit.experience')%></h2>
175
+ </div>
176
+ <div class="row center">
177
+ <%= f.fields_for :profile do |profile_form| %>
178
+ <%= profile_form.text_area :experience, :maxlength => 500, :rows => 10, :class => "form_tag_long" %>
179
+ </div>
180
+ <% end %>
181
+ <% end %>
182
+
183
+ <% if params[:section].present? %>
184
+ <%= hidden_field_tag("section", params[:section]) %>
185
+ <% end %>
186
+ <div class="form_row space_center">
187
+ <%= f.submit "Update", :class => "button" %>&nbsp;
188
+ <button class="button" onclick="window.location.href='<%= user_url(@user) %>';">Cancel</button>
189
+ </div>
190
+
191
+ <% end %>
192
+
193
+
194
+ </div>
195
+
@@ -1,58 +1,45 @@
1
- <% content_for :head, stylesheet_link_tag("users") %>
2
-
3
-
4
- <% content_for :middle do %>
5
- <%= render :partial => "users/middle_index" %>
1
+ <% content_for :headers do %>
2
+ <%= javascript_include_tag 'ajax.paginate' %>
6
3
  <% end %>
7
4
 
8
- <% content_for :right do %>
9
- <%= render :partial => "users/right_index" %>
10
- <% end %>
5
+ <% toolbar_menu if user_signed_in? %>
11
6
 
7
+ <% content_for :sidebar do %>
8
+ <%= render :partial => "users/sidebar_index" %>
9
+ <% end %>
12
10
 
13
11
  <div id="map_location" class="content_size">
14
- Your are here ><img src="images/btn/btn_browse.png" class="btn_config" /> <%= t('browse') %>: <span id="name_group"><%= t('user.other')%></span>
15
- </div>
16
- <div id="by_options" class="content_size"><%=link_to(t('group.by'),groups_path)%></div>
17
- <br class="clearfloat" />
18
- <div class="space_center">
12
+ Your are here ><img src="images/btn/btn_browse.png" class="btn_config" /> <%= t('browse') %>: <span id="name_group"><b><%= t('user.other')%></b></span>, <%=link_to(t('group.by'),groups_path)%>
19
13
  </div>
20
14
 
21
- <div id="my_conferences">
22
- <div id="tabconference_browse" class="widget content_size">
23
-
24
- <div id="contacts" class="tabconference_browse">
25
- <div class="space_center">
26
- </div>
27
- <div class="search_field_wrapper"><input type="text" value="Search by name" id="search_field" class="search_input" /><%= image_tag("btn/search.png",:size=>"20x20",:id=>"search_button") %></div>
28
- <div class="space_center">
29
- </div>
30
- <div class="letters" class="content_size">
31
- <ul class="tabconference_browse">
32
- <li>
33
- <%= link_to t('user.all_n', :count => User.count), users_path %>
34
- </li>
35
- </ul>
36
- <% for char in 'A'..'Z' %>
37
- <%= link_to char,{:letter => char,:page => 1},:class => "user_letter_link" %>
38
- <% end %>
39
- </div>
40
- <div class="space_center" class="content_size">
41
-
42
- </div>
43
- <div id="list_users_ajax">
44
- <%= render :partial => "users/index"%>
45
- </div>
46
- <div class="space_center">
47
- </div>
48
- </div>
49
15
 
50
16
 
51
- </div>
52
- </div>
17
+ <div class="space_center"></div>
53
18
 
54
-
55
- <br class="clearfloat" />
56
- <div class="space_center">
19
+ <div id="my_conferences">
20
+ <div id="contacts" class="block">
21
+ <div class="search_field_wrapper">
22
+ <input type="text" value="Search by name" id="search_field" class="search_input" />
23
+ <%= image_tag("btn/search.png",:size=>"20x20",:id=>"search_button") %>
24
+ </div>
25
+ <div class="space_center"></div>
26
+ <div class="row" >
27
+ <div class="center">
28
+ <%= link_to t('user.all_n', :count => User.count), users_path %> -
29
+ <% for u in User.distinct_initials %>
30
+ <%= link_to u.initial,{:letter => u.initial,:page => 1},:class => "user_letter_link" %>
31
+ <% end %>
32
+ </div>
33
+ </div>
34
+ <div class="space_center"></div>
35
+ <div id="list_users_ajax" class="tab_content block">
36
+ <%= render :partial => "users/index"%>
37
+ </div>
38
+ <div class="space_center"></div>
39
+ </div>
57
40
  </div>
58
- <%= javascript_include_tag "ajax.paginate" %>
41
+
42
+
43
+ <div class="space_center"></div>
44
+
45
+