social_stream-base 2.0.0.beta2 → 2.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/icons/files_ico-50.png +0 -0
  3. data/app/assets/images/icons/files_ico-70.png +0 -0
  4. data/app/assets/images/logos/medium/group.png +0 -0
  5. data/app/assets/images/logos/medium/user.png +0 -0
  6. data/app/assets/images/logos/original/group.png +0 -0
  7. data/app/assets/images/logos/original/user.png +0 -0
  8. data/app/assets/images/logos/small/group.png +0 -0
  9. data/app/assets/images/logos/small/user.png +0 -0
  10. data/app/assets/javascripts/social_stream/contact.js +23 -56
  11. data/app/assets/javascripts/social_stream/object.js +5 -0
  12. data/app/assets/javascripts/social_stream/relation_customs.js +1 -1
  13. data/app/assets/javascripts/social_stream/wall.js +1 -0
  14. data/app/assets/stylesheets/social_stream/base/{_adjust.css.sass → adjust/_adjust.css.sass} +1 -5
  15. data/app/assets/stylesheets/social_stream/base/adjust/layout/_adjust.css.sass +10 -0
  16. data/app/assets/stylesheets/social_stream/base/adjust.css.sass +5 -0
  17. data/app/assets/stylesheets/social_stream/base/{_buttons.scss.sass → buttons/_buttons.scss.sass} +0 -0
  18. data/app/assets/stylesheets/social_stream/base/buttons.css.sass +2 -0
  19. data/app/assets/stylesheets/social_stream/base/contacts/_contacts.css.sass +12 -7
  20. data/app/assets/stylesheets/social_stream/base/contacts/layouts/_contacts.css.sass +35 -27
  21. data/app/assets/stylesheets/social_stream/base/contacts/responsive/_responsive-1200px-min.css.sass +13 -3
  22. data/app/assets/stylesheets/social_stream/base/contacts/responsive/_responsive-767px-max.css.sass +38 -3
  23. data/app/assets/stylesheets/social_stream/base/contacts.css.sass +10 -0
  24. data/app/assets/stylesheets/social_stream/base/conversation/_conversation.css.sass +3 -3
  25. data/app/assets/stylesheets/social_stream/base/conversation/layout/_conversation.css.sass +3 -0
  26. data/app/assets/stylesheets/social_stream/base/conversation/responsive/_responsive-767px-max.css.sass +4 -1
  27. data/app/assets/stylesheets/social_stream/base/conversation.css.sass +10 -0
  28. data/app/assets/stylesheets/social_stream/base/explore/_explore.css.sass +8 -3
  29. data/app/assets/stylesheets/social_stream/base/explore/layout/_explore-search.css.sass +1 -0
  30. data/app/assets/stylesheets/social_stream/base/explore/layout/_explore-timeline.css.sass +9 -5
  31. data/app/assets/stylesheets/social_stream/base/explore/layout/_explore.css.sass +4 -5
  32. data/app/assets/stylesheets/social_stream/base/explore/responsive/_responsive-1200px-min.css.sass +12 -10
  33. data/app/assets/stylesheets/social_stream/base/explore/responsive/_responsive-767px-max.css.sass +2 -0
  34. data/app/assets/stylesheets/social_stream/base/explore/responsive/_responsive-768px-979px.css.sass +2 -0
  35. data/app/assets/stylesheets/social_stream/base/explore.css.sass +18 -0
  36. data/app/assets/stylesheets/social_stream/base/footer/layout/_footer.css.sass +4 -3
  37. data/app/assets/stylesheets/social_stream/base/footer.css.sass +2 -0
  38. data/app/assets/stylesheets/social_stream/base/frontpage_devise.css.sass +16 -0
  39. data/app/assets/stylesheets/social_stream/base/groups/_groups.css.sass +17 -0
  40. data/app/assets/stylesheets/social_stream/base/{_groups.css.sass → groups/layout/_groups.css.sass} +2 -7
  41. data/app/assets/stylesheets/social_stream/base/icons/icon.css.css +52 -38
  42. data/app/assets/stylesheets/social_stream/base/icons.css.sass +2 -0
  43. data/app/assets/stylesheets/social_stream/base/{_jquery-ui.css.sass → jquery-ui/_jquery-ui.css.sass} +0 -0
  44. data/app/assets/stylesheets/social_stream/base/jquery-ui.css.sass +10 -0
  45. data/app/assets/stylesheets/social_stream/base/layouts/_header.css.sass +10 -5
  46. data/app/assets/stylesheets/social_stream/base/layouts/_layout.css.sass +4 -2
  47. data/app/assets/stylesheets/social_stream/base/layouts.css.sass +2 -0
  48. data/app/assets/stylesheets/social_stream/base/logo.css.sass +7 -0
  49. data/app/assets/stylesheets/social_stream/base/mixins/_buttons.css.sass +11 -12
  50. data/app/assets/stylesheets/social_stream/base/mixins/_colorfont.css.sass +2 -1
  51. data/app/assets/stylesheets/social_stream/base/mixins.css.sass +10 -0
  52. data/app/assets/stylesheets/social_stream/base/notifications.css.sass +10 -0
  53. data/app/assets/stylesheets/social_stream/base/profile/_profile.css.sass +29 -19
  54. data/app/assets/stylesheets/social_stream/base/profile/layout/_profile.css.sass +42 -47
  55. data/app/assets/stylesheets/social_stream/base/profile/responsive/_responsive-1200px-min.css.sass +2 -4
  56. data/app/assets/stylesheets/social_stream/base/profile/responsive/_responsive-767px-max.css.sass +12 -4
  57. data/app/assets/stylesheets/social_stream/base/profile/responsive/_responsive-768px-979px.css.sass +4 -5
  58. data/app/assets/stylesheets/social_stream/base/profile.css.sass +10 -0
  59. data/app/assets/stylesheets/social_stream/base/responsive/_responsive-1200px-min.css.sass +7 -4
  60. data/app/assets/stylesheets/social_stream/base/responsive/_responsive-767px-max.css.sass +1 -2
  61. data/app/assets/stylesheets/social_stream/base/responsive/_responsive-768px-979px.css.sass +4 -1
  62. data/app/assets/stylesheets/social_stream/base/responsive.css.sass +6 -0
  63. data/app/assets/stylesheets/social_stream/base/search.css.sass +2 -0
  64. data/app/assets/stylesheets/social_stream/base/select2.css.sass +5 -0
  65. data/app/assets/stylesheets/social_stream/base/settings/_settings.css.sass +1 -2
  66. data/app/assets/stylesheets/social_stream/base/settings/layout/_settings.css.sass +5 -0
  67. data/app/assets/stylesheets/social_stream/base/settings/responsive/_responsive-767px-max.css.sass +2 -1
  68. data/app/assets/stylesheets/social_stream/base/settings/responsive/_responsive-768px-979px.css.sass +4 -2
  69. data/app/assets/stylesheets/social_stream/base/settings.css.sass +10 -0
  70. data/app/assets/stylesheets/social_stream/base/sidebar/_sidebar.css.sass +1 -1
  71. data/app/assets/stylesheets/social_stream/base/sidebar/layout/_sidebar.css.sass +4 -1
  72. data/app/assets/stylesheets/social_stream/base/sidebar.css.sass +8 -0
  73. data/app/assets/stylesheets/social_stream/base/timeline/_timeline.css.sass +4 -9
  74. data/app/assets/stylesheets/social_stream/base/timeline/_wrapper_activities.css.sass +4 -2
  75. data/app/assets/stylesheets/social_stream/base/timeline/layout/_timeline.css.sass +34 -0
  76. data/app/assets/stylesheets/social_stream/base/timeline/responsive/_responsive-1200px-min.css.sass +14 -0
  77. data/app/assets/stylesheets/social_stream/base/timeline/responsive/_responsive-767px-max.css.sass +28 -0
  78. data/app/assets/stylesheets/social_stream/base/timeline/responsive/_responsive-768px-979px.css.sass +14 -0
  79. data/app/assets/stylesheets/social_stream/base/timeline.css.sass +14 -0
  80. data/app/assets/stylesheets/social_stream/base/toolbar/_toolbar.css.sass +28 -8
  81. data/app/assets/stylesheets/social_stream/base/toolbar/responsive/_responsive-1200px-min.css.sass +1 -2
  82. data/app/assets/stylesheets/social_stream/base/toolbar/responsive/_responsive-767px-max.css.sass +14 -2
  83. data/app/assets/stylesheets/social_stream/base/toolbar.css.sass +10 -0
  84. data/app/assets/stylesheets/social_stream/bootstrap-rewrite/_button-groups.scss +1 -1
  85. data/app/assets/stylesheets/social_stream/bootstrap-rewrite/_forms.scss +8 -0
  86. data/app/assets/stylesheets/social_stream/bootstrap-rewrite/_nav.scss +4 -0
  87. data/app/assets/stylesheets/social_stream/fonts/JosefinSlabOverlay.ttf +0 -0
  88. data/app/assets/stylesheets/social_stream/fonts/JosefinSlabRegular-Outline.ttf +0 -0
  89. data/app/assets/stylesheets/social_stream/fonts/JosefinSlabRegular.ttf +0 -0
  90. data/app/assets/stylesheets/social_stream/fonts/colorfont.css +4 -4
  91. data/app/assets/stylesheets/social_stream/fonts/fonts.css +4 -4
  92. data/app/assets/stylesheets/social_stream/fonts/social-stream:fonts:colorfont.css.sass +5 -0
  93. data/app/assets/stylesheets/social_stream/fonts/social-stream:fonts:fonts.css.sass +5 -0
  94. data/app/assets/stylesheets/social_stream-base.css.sass +81 -2
  95. data/app/controllers/repositories_controller.rb +2 -3
  96. data/app/helpers/contacts_helper.rb +30 -17
  97. data/app/models/activity_object.rb +16 -17
  98. data/app/models/profile.rb +0 -4
  99. data/app/views/activities/_root.html.erb +1 -1
  100. data/app/views/activities/_timeline_modal.html.erb +2 -2
  101. data/app/views/contacts/_contact.html.erb +2 -2
  102. data/app/views/contacts/index.html.erb +6 -0
  103. data/app/views/explore/_followed.html.erb +6 -6
  104. data/app/views/groups/{_new.html.erb → _form.html.erb} +4 -7
  105. data/app/views/groups/_new_modal.html.erb +11 -0
  106. data/app/views/groups/new.html.erb +5 -1
  107. data/app/views/layouts/_footer.html.erb +1 -1
  108. data/app/views/layouts/application.html.erb +7 -8
  109. data/app/views/profiles/_avatar.html.erb +9 -9
  110. data/app/views/profiles/_comunication-info.html.erb +8 -8
  111. data/app/views/profiles/_experience.html.erb +15 -15
  112. data/app/views/profiles/_personal.html.erb +13 -12
  113. data/app/views/profiles/_profile.html.erb +33 -26
  114. data/app/views/profiles/_tags.html.erb +8 -12
  115. data/app/views/subjects/_subject.html.erb +1 -1
  116. data/app/views/toolbar/_logo.html.erb +6 -7
  117. data/app/views/toolbar/_profile.html.erb +9 -12
  118. data/config/locales/en.yml +462 -444
  119. data/config/locales/es.yml +464 -461
  120. data/config/locales/pt.yml +504 -379
  121. data/config/locales/zh.yml +479 -409
  122. data/lib/social_stream/base/version.rb +1 -1
  123. data/lib/social_stream/population/actor.rb +10 -0
  124. data/lib/social_stream/search.rb +11 -2
  125. data/lib/tasks/db/populate.rake +57 -16
  126. data/social_stream-base.gemspec +1 -1
  127. data/spec/views/profiles_spec.rb +5 -3
  128. metadata +41 -31
  129. data/app/assets/stylesheets/social_stream/fonts/BreeSerif-Regular.ttf +0 -0
  130. data/app/assets/stylesheets/social_stream/fonts/DIN_OSP/DIN_OSP-Original.ttf +0 -0
  131. data/app/assets/stylesheets/social_stream/fonts/DIN_OSP/DIN_OSP-Outline.ttf +0 -0
  132. data/app/assets/stylesheets/social_stream/fonts/DIN_OSP/DIN_OSP-Overlay.ttf +0 -0
  133. data/app/assets/stylesheets/social_stream/fonts/DIN_OSP-Original.ttf +0 -0
  134. data/app/assets/stylesheets/social_stream/fonts/DIN_OSP-Outline.ttf +0 -0
  135. data/app/assets/stylesheets/social_stream/fonts/DIN_OSP-Overlay.ttf +0 -0
  136. data/app/assets/stylesheets/social_stream/fonts/RockSalt.ttf +0 -0
  137. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SIL OFL Font License - Source Sans Pro.txt +0 -93
  138. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-Black.otf +0 -0
  139. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-BlackIt.otf +0 -0
  140. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-Bold.otf +0 -0
  141. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-BoldIt.otf +0 -0
  142. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-ExtraLight.otf +0 -0
  143. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-ExtraLightIt.otf +0 -0
  144. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-It.otf +0 -0
  145. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-Light.otf +0 -0
  146. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-LightIt.otf +0 -0
  147. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-Regular.otf +0 -0
  148. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-Semibold.otf +0 -0
  149. data/app/assets/stylesheets/social_stream/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf +0 -0
@@ -38,7 +38,8 @@
38
38
 
39
39
  @import "social_stream/base/search/header"
40
40
 
41
- @import "social_stream/base/adjust"
41
+ @import "social_stream/base/adjust/adjust"
42
+ @import "social_stream/base/adjust/layout/adjust"
42
43
 
43
44
  @import "social_stream/base/buttons"
44
45
 
@@ -145,7 +146,7 @@
145
146
 
146
147
 
147
148
 
148
- @import "social_stream/base/groups"
149
+ @import "social_stream/base/groups/groups"
149
150
 
150
151
 
151
152
 
@@ -182,11 +183,89 @@
182
183
 
183
184
 
184
185
  @import "social_stream/base/timeline/timeline"
186
+
185
187
  @import "social_stream/base/timeline/wrapper_activities"
188
+
186
189
  @import "social_stream/base/timeline/layout/timeline"
190
+
187
191
  @import "social_stream/base/timeline/layout/wrapper_activities"
188
192
 
193
+ @import "social_stream/base/timeline/responsive/responsive-768px-979px"
194
+ @import "social_stream/base/timeline/responsive/responsive-1200px-min"
195
+ @import "social_stream/base/timeline/responsive/responsive-767px-max"
196
+
189
197
 
190
198
  @import "social_stream/base/responsive/responsive-768px-979px"
191
199
  @import "social_stream/base/responsive/responsive-1200px-min"
192
200
  @import "social_stream/base/responsive/responsive-767px-max"
201
+
202
+
203
+
204
+ /*@import "social_stream/bootstrap-rewrite/variables"
205
+ /****************************** Bootstrap
206
+ /*@import "bootstrap"
207
+
208
+ /*@import "bootstrap-responsive"
209
+
210
+
211
+ /****************************** Base
212
+ /*@import "social_stream/base/mixins"
213
+
214
+
215
+
216
+ /****************************** Bootstrap-rewrite
217
+ /*@import "social_stream/bootstrap-rewrite/alerts"
218
+
219
+ /*@import "social_stream/bootstrap-rewrite/forms"
220
+
221
+ /*@import "social_stream/bootstrap-rewrite/modal"
222
+
223
+ /*@import "social_stream/bootstrap-rewrite/navbar"
224
+
225
+ /*@import "social_stream/bootstrap-rewrite/nav"
226
+
227
+ /*@import "social_stream/bootstrap-rewrite/dropdowns"
228
+
229
+
230
+ /****************************** Fonts
231
+ /*@import "social_stream/fonts/fonts"
232
+
233
+ /*@import "social_stream/fonts/colorfont"
234
+
235
+
236
+
237
+ /****************************** Base
238
+
239
+ /*@import "social_stream/base/logo"
240
+
241
+ /*@import "social_stream/base/search"
242
+
243
+ /*@import "social_stream/base/icons"
244
+
245
+ /*@import "social_stream/base/layouts"
246
+
247
+ /*@import "social_stream/base/footer"
248
+
249
+ /*@import "social_stream/base/settings"
250
+
251
+ /*@import "social_stream/base/notifications"
252
+
253
+ /*@import "social_stream/base/conversation"
254
+
255
+ /*@import "social_stream/base/contacts"
256
+
257
+ /*@import "social_stream/base/explore"
258
+
259
+ /*@import "social_stream/base/select2"
260
+
261
+ /*@import "social_stream/base/frontpage_devise"
262
+
263
+ /*@import "social_stream/base/profile"
264
+
265
+ /*@import "social_stream/base/sidebar"
266
+
267
+ /*@import "social_stream/base/toolbar"
268
+
269
+ /*@import "social_stream/base/timeline"
270
+
271
+ /*@import "social_stream/base/responsive"
@@ -1,5 +1,4 @@
1
1
  class RepositoriesController < ApplicationController
2
-
3
2
  before_filter :profile_or_current_subject!
4
3
 
5
4
  def show
@@ -15,7 +14,7 @@ class RepositoriesController < ApplicationController
15
14
  end
16
15
 
17
16
  def search
18
- render SocialStream::Search.search(params[:q], current_subject, mode: :repository)
17
+ render SocialStream::Search.search(params[:q], current_subject, mode: :repository, owner: profile_subject!)
19
18
  end
20
19
 
21
20
  private
@@ -26,7 +25,7 @@ class RepositoriesController < ApplicationController
26
25
  select("DISTINCT activity_objects.*").
27
26
  where(object_type: SocialStream.repository_models.map(&:to_s).map(&:classify)).
28
27
  includes(SocialStream.repository_models).
29
- collection(profile_subject, current_subject).
28
+ collection(profile_or_current_subject, current_subject).
30
29
  page(params[:page])
31
30
  end
32
31
  end
@@ -1,34 +1,47 @@
1
1
  module ContactsHelper
2
- def contact_brief(subject)
2
+ def contact_count(actor)
3
3
  if user_signed_in?
4
- t 'contact.in_common', :count => current_subject.common_contacts_count(subject)
4
+ t 'contact.in_common', :count => current_subject.common_contacts_count(actor)
5
5
  else
6
- t 'contact.n', count: subject.sent_active_contact_count
6
+ t 'contact.n', count: actor.sent_active_contact_count
7
7
  end
8
8
  end
9
9
 
10
- def contact_link(c)
10
+ # Add contact button
11
+ def contact_button(contact_or_actor)
12
+ if user_signed_in?
13
+ current_actor_contact_button contact_or_actor
14
+ else
15
+ anonymous_contact_button
16
+ end
17
+ end
18
+
19
+ def current_actor_contact_button contact_or_actor
20
+ c =
21
+ if contact_or_actor.is_a?(Contact)
22
+ if contact_or_actor.sender == current_actor
23
+ contact_or_actor
24
+ else
25
+ current_actor.contact_to!(contact_or_actor.receiver)
26
+ end
27
+ else
28
+ current_actor.contact_to!(contact_or_actor)
29
+ end
30
+
11
31
  if c.reflexive?
12
32
  t('subject.this_is_you')
13
33
  else
14
34
  render :partial => "contacts/link_#{ SocialStream.relation_model }", :locals => { :contact => c }
15
35
  end
16
-
17
36
  end
18
37
 
19
- # Show current ties from current user to actor, if they exist, or provide a link
20
- # to create new ties to actor
21
- def contact_to(a)
22
- if user_signed_in?
23
- contact_link current_subject.contact_to!(a)
24
- else
25
- if SocialStream.relation_model == :follow
26
- form_tag new_user_session_path do |f|
27
- submit_tag t('contact.follow')
28
- end
29
- else
30
- link_to t("contact.new.link"), new_user_session_path
38
+ def anonymous_contact_button
39
+ if SocialStream.relation_model == :follow
40
+ form_tag new_user_session_path do |f|
41
+ submit_tag t('contact.follow')
31
42
  end
43
+ else
44
+ link_to t("contact.new.link"), new_user_session_path
32
45
  end
33
46
  end
34
47
 
@@ -67,24 +67,23 @@ class ActivityObject < ActiveRecord::Base
67
67
  }
68
68
 
69
69
  scope :collection, lambda { |profile_subject = nil, current_subject = nil|
70
+ col = self
71
+
72
+ # /users/demo/posts
73
+ #
74
+ # get posts posted to demo's wall
70
75
  if profile_subject.present?
71
- # /users/demo/posts
72
- #
73
- # get posts posted to demo's wall
74
- col = owned_by(profile_subject)
75
-
76
- # if current_subject != demo, auth filter results
77
- if profile_subject != current_subject
78
- col = col.shared_with(current_subject)
79
- end
80
- else
81
- # auth filter results
82
- col = shared_with(current_subject)
83
-
84
- # if logged in, show the posts from the people following
85
- if current_subject.present?
86
- col = col.followed_by(current_subject)
87
- end
76
+ col = col.owned_by(profile_subject)
77
+ end
78
+
79
+ # Auth filter results
80
+ if current_subject != profile_subject || current_subject.blank?
81
+ col = col.shared_with(current_subject)
82
+ end
83
+
84
+ # Show the posts from the people following
85
+ if profile_subject.blank? && current_subject.present?
86
+ col = col.followed_by(current_subject)
88
87
  end
89
88
 
90
89
  col
@@ -27,9 +27,6 @@ class Profile < ActiveRecord::Base
27
27
  validate :validate_birthday
28
28
 
29
29
  def birthday=(value)
30
-
31
- puts "He entrado en el metodo birthday con un :" + value.class.to_s
32
-
33
30
  if value.blank?
34
31
  @birthday_formatted_invalid = false
35
32
  super value
@@ -42,7 +39,6 @@ class Profile < ActiveRecord::Base
42
39
  @birthday_formatted_invalid = true
43
40
  end
44
41
  end
45
-
46
42
  end
47
43
 
48
44
  def age
@@ -8,7 +8,7 @@
8
8
  <header class="media-heading">
9
9
  <%= activity.title(self) %>
10
10
 
11
- <% if activity.direct_object && can?(:destroy, activity.direct_object) %>
11
+ <% if activity.direct_object && !activity.direct_object.acts_as_actor? && can?(:destroy, activity.direct_object) %>
12
12
  <div class="x" style="float: right">
13
13
  <%= link_to ('X'), activity.direct_object , :confirm => t('confirm_delete',
14
14
  :scope => activity.direct_object.class.to_s.underscore), :method => :delete,
@@ -1,10 +1,10 @@
1
1
  <div class="timeline-modal-carousel modal hide fade">
2
2
  <div class="modal-body">
3
3
  <div id="modal-carousel" class="carousel slide" data-interval="false">
4
- <ol class="carousel-indicators">
5
- </ol>
6
4
  <div class="carousel-inner">
7
5
  </div>
6
+ <ol class="carousel-indicators">
7
+ </ol>
8
8
  </div>
9
9
  <a class="carousel-control left" href="#modal-carousel" data-slide="prev">&lsaquo;</a>
10
10
  <a class="carousel-control right" href="#modal-carousel" data-slide="next">&rsaquo;</a>
@@ -11,11 +11,11 @@
11
11
  </div>
12
12
 
13
13
  <div class="info">
14
- <%= contact_brief(contact.receiver_subject) %>
14
+ <%= contact_count(contact.receiver) %>
15
15
  </div>
16
16
  </div>
17
17
  <div class="add">
18
- <%= contact_link(contact) %>
18
+ <%= contact_button(contact) %>
19
19
  </div>
20
20
  <div class="x">
21
21
  <%= link_to 'X', contact_path(contact, destroy_params), method: :delete, remote: true, confirm: t('contact.confirm_delete') %>
@@ -20,6 +20,12 @@
20
20
  <div id="<%= type %>" class="tab-pane <%= 'active' if current_contact_section?(type) %>">
21
21
  <%= text_field_tag "contact-filter-#{ type }", (current_contact_section?(type) ? params[:q] : ""), class: "pull-right contact-filter", placeholder: "filter", autocomplete: "off" %>
22
22
 
23
+ <% if type == :group %>
24
+ <%= link_to t('group.new.link'), new_group_path, class: 'new_group-modal-link', 'data-toggle' => 'modal' %>
25
+
26
+ <%= render partial: 'groups/new_modal' %>
27
+ <% end %>
28
+
23
29
  <div class="contact-list">
24
30
  <% if current_contact_section?(type) %>
25
31
  <% if @contacts.any? %>
@@ -6,11 +6,11 @@
6
6
  <section class="second-line">
7
7
  <%= actor.description %>
8
8
  </section>
9
- <aside class="well well-small">
10
- <div class="top">
11
- <%= t 'follower.n', count: actor.follower_count %>
12
- </div>
13
- </aside>
14
- </nav>
9
+ </div>
10
+ <aside class="well well-small">
11
+ <div class="top">
12
+ <%= t 'follower.n', count: actor.follower_count %>
13
+ </div>
14
+ </aside>
15
15
  </section>
16
16
 
@@ -1,9 +1,9 @@
1
- <%= form_for @group do |f| %>
2
- <% if @group.errors.any? %>
1
+ <%= form_for group do |f| %>
2
+ <% if group.errors.any? %>
3
3
  <div class="error">
4
- <h2><%= pluralize(@group.errors.count, "error") %> prohibited this group from being saved:</h2>
4
+ <h2><%= pluralize(group.errors.count, "error") %> prohibited this group from being saved:</h2>
5
5
  <ul>
6
- <% @group.errors.full_messages.each do |msg| %>
6
+ <% group.errors.full_messages.each do |msg| %>
7
7
  <li>
8
8
  <%= msg %>
9
9
  </li>
@@ -12,8 +12,6 @@
12
12
  </div>
13
13
  <% end %>
14
14
 
15
- <h2><%= t('group.new.action') %></h2>
16
-
17
15
  <%= f.label :name, t('group.new.name') %>
18
16
  <%= f.text_field :name %>
19
17
 
@@ -44,4 +42,3 @@
44
42
  );
45
43
  });
46
44
  <% end %>
47
-
@@ -0,0 +1,11 @@
1
+ <div id="new_group-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="new_group-modal-title" aria-hidden="true">
2
+ <div class="modal-header">
3
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
4
+ <h3 id="new_group-modal-title"><%= t 'group.new.title' %></h3>
5
+ </div>
6
+ <div class="modal-body">
7
+ <%= render partial: 'groups/form',
8
+ object: Group.new,
9
+ as: :group %>
10
+ </div>
11
+ </div>
@@ -5,5 +5,9 @@
5
5
 
6
6
  <%= render partial: 'toolbar/home' %>
7
7
 
8
- <%= render :partial => 'new' %>
8
+ <h2><%= t('group.new.title') %></h2>
9
+
10
+ <%= render partial: 'form',
11
+ object: @group,
12
+ as: :group %>
9
13
  </section>
@@ -1,4 +1,4 @@
1
- <footer class="container">
1
+ <footer>
2
2
  <ul>
3
3
  <li>
4
4
  <%= Date.today.year %> ©
@@ -33,16 +33,15 @@
33
33
  </head>
34
34
 
35
35
  <body>
36
- <div class="wrapper container-fluid">
37
- <%= render :partial => "layouts/header" %>
36
+ <div class="container-fluid">
37
+ <div class="wrapper">
38
+ <%= render :partial => "layouts/header" %>
38
39
 
39
- <%= flashy %>
40
+ <%= flashy %>
40
41
 
41
- <%= yield %>
42
-
42
+ <%= yield %>
43
+ </div>
44
+ <%= render :partial => "layouts/footer" %>
43
45
  </div>
44
-
45
- <%= render :partial => "layouts/footer" %>
46
-
47
46
  </body>
48
47
  </html>
@@ -1,16 +1,16 @@
1
- <section class="avatar">
2
- <header>
3
- <%= render partial: 'edit_icon' %>
4
- <h4>
1
+ <section class="accordion-group avatar">
2
+ <div class="accordion-heading">
3
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion5" href="#collapseFive">
5
4
  <%= t('avatar.profile_change') %>
6
- </h4>
7
- </header>
8
-
5
+ </a>
6
+ </div>
9
7
  <% if can? :update, @profile %>
10
- <div class="update">
8
+ <div id="collapseFive" class="accordion-body collapse">
9
+ <div class="accordion-inner">
11
10
  <%= render partial: 'avatars/form',
12
11
  object: @profile.actor,
13
12
  as: :avatarable %>
14
- </div>
13
+ </div>
15
14
  <% end %>
15
+ </div>
16
16
  </section>
@@ -1,12 +1,9 @@
1
- <section class="comunication-info">
2
- <header>
3
- <%= render partial: 'edit_icon' %>
4
- <h4>
1
+ <section class="accordion-group comunication-info">
2
+ <div class="accordion-heading">
3
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTree">
5
4
  <%= t('profile.contact') %>
6
- </h4>
7
- </header>
5
+ </a>
8
6
 
9
- <div class="briefing">
10
7
  <% if @profile.contact_present? %>
11
8
  <% if @profile.phone? %>
12
9
  <h5>
@@ -56,9 +53,11 @@
56
53
  <%= render partial: 'empty' %>
57
54
  <% end %>
58
55
  </div>
56
+
59
57
 
60
58
  <% if can? :update, @profile %>
61
- <div class="update">
59
+ <div id="collapseTree" class="accordion-body collapse">
60
+ <div class="accordion-inner">
62
61
  <%= form_for(@profile, :url => [current_subject, :profile]) do |f| %>
63
62
  <h6>
64
63
  <%= f.label :phone, t('profile.phone') %>
@@ -95,4 +94,5 @@
95
94
  <% end %>
96
95
  </div>
97
96
  <% end %>
97
+ </div>
98
98
  </section>
@@ -1,27 +1,27 @@
1
- <section class="experience">
2
- <header>
3
- <%= render partial: 'edit_icon' %>
4
- <h4>
1
+ <section class="accordion-group experience">
2
+ <div class="accordion-heading">
3
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion4" href="#collapseFour">
5
4
  <%= t("profile.#{ @profile.subject.class.to_s.downcase }.experience") %>
6
- </h4>
7
- </header>
5
+ </a>
8
6
 
9
- <div class="briefing">
10
- <% if @profile.experience? %>
11
- <%= simple_format @profile.experience %>
12
- <% else %>
13
- <%= render partial: 'empty' %>
14
- <% end %>
15
- </div>
7
+
8
+ <% if @profile.experience? %>
9
+ <%= simple_format @profile.experience %>
10
+ <% else %>
11
+ <%= render partial: 'empty' %>
12
+ <% end %>
16
13
 
14
+ </div>
17
15
  <% if can? :update, @profile %>
18
- <div class="update">
16
+ <div id="collapseFour" class="accordion-body collapse">
17
+ <div class="accordion-inner">
19
18
  <%= form_for(@profile, :url => [current_subject, :profile]) do |f| %>
20
19
 
21
20
  <%= f.text_area :experience, :maxlength => 246, :rows => 5 %>
22
21
 
23
22
  <%= f.submit :class => "btn" %>
24
23
  <% end %>
25
- </div>
26
24
  <% end %>
25
+ </div>
26
+ </div>
27
27
  </section>
@@ -1,12 +1,9 @@
1
- <section class="personal">
2
- <header>
3
- <%= render partial: 'edit_icon' %>
4
- <h4>
1
+ <section class="accordion-group personal">
2
+ <div class="accordion-heading">
3
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
5
4
  <%= t("profile.#{ @profile.subject.class.to_s.downcase }.info") %>
6
- </h4>
7
- </header>
8
-
9
- <div class="briefing">
5
+ </a>
6
+
10
7
  <% if @profile.personal_present? %>
11
8
  <% if @profile.organization? %>
12
9
  <h5>
@@ -64,12 +61,15 @@
64
61
  <% end %>
65
62
  </div>
66
63
 
67
- <% if can? :update, @profile %>
68
- <div class="update">
64
+ <div id="collapseTwo" class="accordion-body collapse">
65
+ <div class="accordion-inner">
66
+ <% if can? :update, @profile %>
67
+
69
68
  <%= form_for(@profile, :url => [current_subject, :profile]) do |f| %>
70
69
  <h6>
71
- <%= f.label t('actor.name') %>
72
70
  <span class="required">*</span>
71
+ <%= f.label t('*actor.name') %>
72
+
73
73
  </h6>
74
74
 
75
75
  <%= f.text_field :name, :class => "required" %>
@@ -102,6 +102,7 @@
102
102
  </p>
103
103
  <%= f.submit :class => "btn" %>
104
104
  <% end %>
105
+ <% end %>
105
106
  </div>
106
- <% end %>
107
+ </div>
107
108
  </section>
@@ -2,32 +2,39 @@
2
2
  <h2 class="colorfont">
3
3
  <%= t('profile.one') %>
4
4
  </h2>
5
+ <div class="accordion" id="accordion2">
6
+ <div class="accordion-group">
7
+ <% if can?(:update, @profile) || @profile.tags_present? %>
8
+ <%= render partial: "tags" %>
9
+ <% end %>
10
+ </div>
11
+ <div class="accordion-group">
12
+ <% if can?(:update, @profile) || @profile.personal_present? %>
13
+ <%= render partial: "personal" %>
14
+ <% end %>
15
+ </div>
16
+ <div class="accordion-group">
17
+ <% if can?(:update, @profile) || @profile.contact_present? %>
18
+ <%= render :partial => "comunication-info" %>
19
+ <% end %>
20
+ </div>
21
+ <div class="accordion-group">
22
+ <% if can?(:update, @profile) || @profile.experience? %>
23
+ <%= render :partial => "experience" %>
24
+ <% end %>
25
+ </div>
26
+ <div class="accordion-group">
27
+ <% if can?(:update, @profile) || @profile.personal_present? %>
28
+ <%= render :partial => "avatar" %>
29
+ <% end %>
30
+ </div>
5
31
 
6
- <% if can?(:update, @profile) || @profile.tags_present? %>
7
- <%= render partial: "tags" %>
8
- <% end %>
9
-
10
- <% if can?(:update, @profile) || @profile.personal_present? %>
11
- <%= render partial: "personal" %>
12
- <% end %>
13
-
14
- <% if can?(:update, @profile) || @profile.contact_present? %>
15
- <%= render :partial => "comunication-info" %>
16
- <% end %>
17
-
18
- <% if can?(:update, @profile) || @profile.experience? %>
19
- <%= render :partial => "experience" %>
20
- <% end %>
21
-
22
- <% if can?(:update, @profile) || @profile.personal_present? %>
23
- <%= render :partial => "avatar" %>
24
- <% end %>
25
-
26
- <%= javascript_tag do %>
27
- $(function() {
28
- SocialStream.Profile.show({
29
- section: "<%= params[:section ] %>"
32
+ <%= javascript_tag do %>
33
+ $(function() {
34
+ SocialStream.Profile.show({
35
+ section: "<%= params[:section ] %>"
36
+ });
30
37
  });
31
- });
32
- <% end %>
38
+ <% end %>
39
+ </div>
33
40
  </div>