social_stream 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -2
  3. data/LICENSE +1 -1
  4. data/base/Rakefile +3 -17
  5. data/base/app/assets/images/flags/de.png +0 -0
  6. data/base/app/assets/images/flags/fr.png +0 -0
  7. data/base/app/assets/images/flags/hu.png +0 -0
  8. data/base/app/assets/images/flags/nl.png +0 -0
  9. data/base/app/assets/javascripts/social_stream/actor.js +34 -0
  10. data/base/app/assets/javascripts/social_stream/contact.js +40 -5
  11. data/base/app/assets/javascripts/social_stream/flash.js +6 -1
  12. data/base/app/assets/javascripts/social_stream/group.js +6 -5
  13. data/base/app/assets/javascripts/social_stream/relation_customs.js +0 -1
  14. data/base/app/assets/stylesheets/social_stream/base/adjust/layout/_adjust.css.sass +3 -0
  15. data/base/app/assets/stylesheets/social_stream/base/buttons/_buttons.scss.sass +0 -2
  16. data/base/app/assets/stylesheets/social_stream/base/contacts/_contacts.css.sass +1 -11
  17. data/base/app/assets/stylesheets/social_stream/base/contacts/layouts/_contacts.css.sass +1 -29
  18. data/base/app/assets/stylesheets/social_stream/base/layouts/_header.css.sass +0 -1
  19. data/base/app/assets/stylesheets/social_stream/base/mixins/_buttons.css.sass +5 -0
  20. data/base/app/assets/stylesheets/social_stream/base/mixins/_layout.css.sass +36 -7
  21. data/base/app/controllers/actors_controller.rb +25 -0
  22. data/base/app/controllers/contacts_controller.rb +38 -8
  23. data/base/app/controllers/groups_controller.rb +2 -21
  24. data/base/app/controllers/profiles_controller.rb +4 -0
  25. data/base/app/controllers/settings_controller.rb +12 -2
  26. data/base/app/controllers/users_controller.rb +0 -8
  27. data/base/app/helpers/contacts_helper.rb +8 -0
  28. data/base/app/models/activity.rb +19 -6
  29. data/base/app/models/actor.rb +49 -11
  30. data/base/app/models/contact.rb +12 -5
  31. data/base/app/models/group.rb +13 -11
  32. data/base/app/models/permission.rb +30 -0
  33. data/base/app/models/relation.rb +17 -7
  34. data/base/app/models/relation/custom.rb +2 -40
  35. data/base/app/models/relation/follow.rb +8 -2
  36. data/base/app/models/relation/owner.rb +10 -0
  37. data/base/app/models/relation/single.rb +7 -4
  38. data/base/app/models/site.rb +1 -1
  39. data/base/app/models/tie.rb +8 -4
  40. data/base/app/views/contacts/_add_button.html.erb +9 -0
  41. data/base/app/views/contacts/_button.html.erb +3 -3
  42. data/base/app/views/contacts/_button_multiple.html.erb +4 -0
  43. data/base/app/views/contacts/_button_simple.html.erb +17 -0
  44. data/base/app/views/contacts/_new_modal.html.erb +22 -0
  45. data/base/app/views/contacts/destroy.js.erb +5 -4
  46. data/base/app/views/contacts/update.js.erb +5 -4
  47. data/base/app/views/devise/confirmations/new.html.erb +14 -9
  48. data/base/app/views/frontpage/_presentation.html.erb +2 -2
  49. data/base/app/views/groups/_form.html.erb +20 -20
  50. data/base/app/views/groups/show.html.erb +5 -5
  51. data/base/app/views/layouts/_header_dropdown_menu.html.erb +3 -5
  52. data/base/app/views/layouts/_header_signed_in.erb +3 -3
  53. data/base/app/views/layouts/_logo_in.html.erb +1 -1
  54. data/base/app/views/layouts/application.html.erb +2 -0
  55. data/base/app/views/permissions/_list.html.erb +1 -1
  56. data/base/app/views/profiles/_avatar.html.erb +1 -5
  57. data/base/app/views/profiles/_avatar_edit.html.erb +5 -0
  58. data/base/app/views/profiles/_comunication-info.html.erb +2 -36
  59. data/base/app/views/profiles/_comunication-info_edit.html.erb +27 -0
  60. data/base/app/views/profiles/_edit_icon.html.erb +0 -1
  61. data/base/app/views/profiles/_experience.html.erb +1 -6
  62. data/base/app/views/profiles/_experience_edit.html.erb +5 -0
  63. data/base/app/views/profiles/_personal.html.erb +1 -39
  64. data/base/app/views/profiles/_personal_edit.html.erb +31 -0
  65. data/base/app/views/profiles/_profile_edit.html.erb +7 -0
  66. data/base/app/views/profiles/_tags.html.erb +1 -4
  67. data/base/app/views/profiles/_tags_edit.html.erb +4 -0
  68. data/base/app/views/profiles/edit.html.erb +24 -0
  69. data/base/app/views/settings/_notifications.html.erb +12 -4
  70. data/base/app/views/users/show.html.erb +5 -5
  71. data/base/config/locales/de.yml +654 -0
  72. data/base/config/locales/en.yml +20 -9
  73. data/base/config/locales/es.yml +151 -140
  74. data/base/config/locales/fr.yml +656 -0
  75. data/base/config/locales/hu.yml +653 -0
  76. data/base/config/locales/nl.yml +656 -0
  77. data/base/config/locales/pt.yml +250 -239
  78. data/base/config/locales/rails.de.yml +203 -0
  79. data/base/config/locales/rails.fr.yml +222 -0
  80. data/base/config/locales/rails.hu.yml +199 -0
  81. data/base/config/locales/rails.nl.yml +199 -0
  82. data/base/config/locales/zh.yml +214 -202
  83. data/base/config/routes.rb +22 -30
  84. data/base/db/migrate/20130708152633_set_group_owners.rb +19 -0
  85. data/base/db/migrate/20130723133530_actor_notification_settings.rb +10 -0
  86. data/base/lib/generators/social_stream/base/templates/initializer.rb +13 -7
  87. data/base/lib/rails/social_stream.rb +2 -0
  88. data/base/lib/social_stream/base.rb +27 -7
  89. data/base/lib/social_stream/base/ability.rb +3 -5
  90. data/base/lib/social_stream/base/autoload.rb +1 -0
  91. data/base/lib/social_stream/base/version.rb +1 -1
  92. data/base/lib/social_stream/controllers/authorship.rb +18 -0
  93. data/base/lib/social_stream/controllers/helpers.rb +18 -4
  94. data/base/lib/social_stream/controllers/objects.rb +2 -8
  95. data/base/lib/social_stream/controllers/subjects.rb +9 -2
  96. data/base/lib/social_stream/models/supertype.rb +2 -0
  97. data/base/lib/social_stream/population/activity_object.rb +6 -8
  98. data/base/lib/social_stream/routing/mapper.rb +52 -0
  99. data/base/social_stream-base.gemspec +4 -7
  100. data/base/spec/controllers/groups_controller_spec.rb +19 -8
  101. data/base/spec/controllers/posts_controller_spec.rb +114 -147
  102. data/base/spec/models/post_authorization_spec.rb +190 -204
  103. data/base/spec/models/post_spec.rb +17 -63
  104. data/base/vendor/assets/javascripts/bootstrap-multiselect.js +434 -127
  105. data/documents/Rakefile +1 -6
  106. data/documents/config/locales/de.yml +93 -0
  107. data/documents/config/locales/es.yml +2 -2
  108. data/documents/config/locales/fr.yml +93 -0
  109. data/documents/config/locales/hu.yml +93 -0
  110. data/documents/config/locales/nl.yml +93 -0
  111. data/documents/config/locales/zh.yml +4 -4
  112. data/documents/config/routes.rb +7 -9
  113. data/documents/lib/social_stream/documents/version.rb +1 -1
  114. data/documents/social_stream-documents.gemspec +4 -4
  115. data/events/Rakefile +1 -6
  116. data/events/config/locales/es.yml +3 -3
  117. data/events/config/locales/zh.yml +3 -3
  118. data/events/lib/social_stream/events/models/actor.rb +2 -1
  119. data/events/lib/social_stream/events/version.rb +1 -1
  120. data/events/social_stream-events.gemspec +1 -1
  121. data/lib/generators/social_stream/install_generator.rb +1 -0
  122. data/lib/social_stream.rb +1 -0
  123. data/lib/social_stream/version.rb +1 -1
  124. data/lib/tasks/i18n.rake +22 -2
  125. data/linkser/Rakefile +1 -6
  126. data/linkser/config/locales/de.yml +17 -0
  127. data/linkser/config/locales/es.yml +2 -2
  128. data/linkser/config/locales/fr.yml +17 -0
  129. data/linkser/config/locales/hu.yml +17 -0
  130. data/linkser/config/locales/nl.yml +17 -0
  131. data/linkser/config/locales/zh.yml +2 -2
  132. data/linkser/lib/social_stream/linkser/version.rb +1 -1
  133. data/linkser/social_stream-linkser.gemspec +1 -1
  134. data/oauth2_server/Rakefile +1 -6
  135. data/oauth2_server/app/assets/images/step_1.png +0 -0
  136. data/oauth2_server/app/assets/images/step_2.png +0 -0
  137. data/oauth2_server/app/assets/images/step_3.png +0 -0
  138. data/oauth2_server/app/assets/javascripts/social_stream/site_client.js +27 -0
  139. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/applications/layout/_applications-oauth2server.css.sass +0 -5
  140. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/create/layout/_create-oauth2server.css.sass +3 -5
  141. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/show/layout/_show-oauth2server.css.sass +8 -6
  142. data/oauth2_server/app/controllers/site/clients_controller.rb +17 -41
  143. data/oauth2_server/app/decorators/social_stream/base/relation_decorator.rb +2 -0
  144. data/oauth2_server/app/decorators/social_stream/base/user_decorator.rb +1 -20
  145. data/oauth2_server/app/models/relation/manager.rb +1 -10
  146. data/oauth2_server/app/models/site/client.rb +4 -2
  147. data/oauth2_server/app/views/site/clients/_destroy.html.erb +11 -0
  148. data/oauth2_server/app/views/site/clients/_edit.html.erb +9 -2
  149. data/oauth2_server/app/views/site/clients/_edit_step_2.html.erb +6 -6
  150. data/oauth2_server/app/views/site/clients/_edit_step_3.html.erb +8 -6
  151. data/oauth2_server/app/views/site/clients/_form.html.erb +11 -11
  152. data/oauth2_server/app/views/site/clients/_list.html.erb +23 -11
  153. data/oauth2_server/app/views/site/clients/edit.html.erb +1 -1
  154. data/oauth2_server/app/views/site/clients/index.html.erb +9 -40
  155. data/oauth2_server/app/views/site/clients/show.html.erb +66 -68
  156. data/oauth2_server/config/locales/en.yml +19 -0
  157. data/oauth2_server/config/locales/es.yml +23 -4
  158. data/oauth2_server/config/locales/zh.yml +32 -13
  159. data/oauth2_server/config/routes.rb +3 -1
  160. data/oauth2_server/lib/social_stream/oauth2_server.rb +4 -1
  161. data/oauth2_server/lib/social_stream/oauth2_server/ability.rb +1 -1
  162. data/oauth2_server/lib/social_stream/oauth2_server/models/user.rb +18 -0
  163. data/oauth2_server/lib/social_stream/oauth2_server/version.rb +1 -1
  164. data/oauth2_server/social_stream-oauth2_server.gemspec +1 -1
  165. data/oauth2_server/spec/controllers/site_clients_controller_authorization_spec.rb +7 -0
  166. data/ostatus/Rakefile +1 -6
  167. data/ostatus/config/locales/zh.yml +8 -8
  168. data/ostatus/lib/social_stream-ostatus.rb +3 -0
  169. data/ostatus/lib/social_stream/ostatus/version.rb +1 -1
  170. data/ostatus/social_stream-ostatus.gemspec +1 -1
  171. data/places/config/locales/es.yml +51 -51
  172. data/presence/config/locales/es.yml +48 -48
  173. data/presence/config/locales/zh.yml +48 -48
  174. data/presence/lib/social_stream/presence/version.rb +1 -1
  175. data/presence/social_stream-presence.gemspec +1 -1
  176. data/social_stream.gemspec +8 -7
  177. metadata +60 -29
  178. data/base/app/assets/javascripts/social_stream/follow.js +0 -28
  179. data/base/app/controllers/followers_controller.rb +0 -34
  180. data/base/app/helpers/followers_helper.rb +0 -5
  181. data/base/app/views/contacts/_link_follow.html.erb +0 -16
  182. data/base/app/views/followers/destroy.js.erb +0 -1
  183. data/base/app/views/followers/index.html.erb +0 -30
  184. data/base/app/views/followers/update.js.erb +0 -3
  185. data/base/app/views/frontpage/_characteristics.html.erb +0 -23
  186. data/base/lib/social_stream/routing/constraints/custom.rb +0 -11
  187. data/base/lib/social_stream/routing/constraints/follow.rb +0 -11
  188. data/base/spec/controllers/followers_controller_spec.rb +0 -37
@@ -1,8 +1,14 @@
1
1
  # This relation model implements Twitter-like relations:
2
2
  # Users just have followers and followings.
3
3
  #
4
- # Use this model setting <tt>config.relation_model = :follow</tt> in your
5
- # <tt>config/initializers/social_stream.rb</tt>
4
+ # You can achieve a Twitter-like model for users
5
+ # setting custom relations to empty and system relations to [ :follow ]
6
+ # in config/initializers/social_stream.rb
7
+ #
8
+ # config.custom_relations[:user] = {}
9
+ #
10
+ # config.system_relations[:user] = [ :follow ]
11
+ #
6
12
  class Relation::Follow < Relation::Single
7
13
  PERMISSIONS =
8
14
  [
@@ -0,0 +1,10 @@
1
+ # Owner of {Group groups}
2
+ class Relation::Owner < Relation::Single
3
+ PERMISSIONS = SocialStream.available_permissions['group']
4
+
5
+ class << self
6
+ def create_activity?
7
+ false
8
+ end
9
+ end
10
+ end
@@ -14,15 +14,18 @@ class Relation::Single < Relation
14
14
  end
15
15
 
16
16
  def permissions
17
- self::PERMISSIONS.map{ |p|
18
- Permission.find_or_create_by_action_and_object p.first, p.last
19
- }
17
+ Permission.instances self::PERMISSIONS
20
18
  end
21
-
22
19
  end
23
20
 
24
21
  # The name of public relation
25
22
  def name
26
23
  I18n.t("relation_#{ self.class.name.split("::").last.underscore }.name")
27
24
  end
25
+
26
+ # The available permissions for {Relation::Single} match with the permissions
27
+ # described in the variable
28
+ def available_permissions
29
+ self.class.permissions
30
+ end
28
31
  end
@@ -9,7 +9,7 @@ class Site < ActiveRecord::Base
9
9
 
10
10
  class << self
11
11
  def current
12
- Current.instance
12
+ ::Site::Current.instance
13
13
  end
14
14
  end
15
15
  end
@@ -69,7 +69,7 @@ class Tie < ActiveRecord::Base
69
69
 
70
70
  validates_presence_of :contact_id, :relation_id
71
71
 
72
- validate :relation_belongs_to_sender
72
+ validate :relation_must_belong_to_sender
73
73
 
74
74
  after_create :create_activity
75
75
  after_create :set_follow_action
@@ -137,6 +137,11 @@ class Tie < ActiveRecord::Base
137
137
  action.update_attribute(:follow, false)
138
138
  end
139
139
 
140
+ def relation_belongs_to_sender?
141
+ relation.is_a?(Relation::Single) ||
142
+ contact.sender_id == relation.actor_id
143
+ end
144
+
140
145
  private
141
146
 
142
147
  # before_create callback
@@ -152,9 +157,8 @@ class Tie < ActiveRecord::Base
152
157
  :activity_verb => ActivityVerb[contact.verb]
153
158
  end
154
159
 
155
- def relation_belongs_to_sender
160
+ def relation_must_belong_to_sender
156
161
  errors.add(:relation, "must belong to sender") unless
157
- relation.is_a?(Relation::Single) ||
158
- contact.sender_id == relation.actor_id
162
+ relation_belongs_to_sender?
159
163
  end
160
164
  end
@@ -0,0 +1,9 @@
1
+ <% if can? :create, Contact.new(sender: Actor.normalize(sender)) %>
2
+ <%= link_to t('site.client.contact.add'), '#add-contact-modal', id: 'add-contact-link', 'data-toggle' => 'modal' %>
3
+ <%= render partial: 'contacts/new_modal',
4
+ locals: {
5
+ sender: sender,
6
+ type: type
7
+ } %>
8
+ <% end %>
9
+
@@ -1,3 +1,3 @@
1
- <%= form_for contact, remote: true, html: { 'data-contact_id' => contact.id } do |f| %>
2
- <%= f.select :relation_ids, contact.options_for_select, {}, { multiple: true } %>
3
- <% end %>
1
+ <%= render partial: "contacts/button_#{ contact.options_for_select_type }",
2
+ object: contact,
3
+ as: :contact %>
@@ -0,0 +1,4 @@
1
+ <%= form_for contact, remote: true, html: { 'data-contact_id' => contact.id } do |f| %>
2
+ <%= f.select :relation_ids, contact.options_for_select, {}, { multiple: true } %>
3
+ <% end %>
4
+
@@ -0,0 +1,17 @@
1
+ <div class="contact-button-single-<%= contact.id %>">
2
+ <% if contact.sent? %>
3
+ <div class="following-button">
4
+ <%= t 'contact.following' %>
5
+ </div>
6
+ <div class="unfollow-button">
7
+ <%= form_for contact, method: :delete, remote: true do |f| %>
8
+ <%= f.submit t('contact.unfollow') %>
9
+ <% end %>
10
+ </div>
11
+ <% else %>
12
+ <%= form_for contact, remote: true do |f| %>
13
+ <%= f.hidden_field :relation_ids, value: contact.options_for_select.first.last %>
14
+ <%= f.submit t('contact.follow') %>
15
+ <% end %>
16
+ <% end %>
17
+ </div>
@@ -0,0 +1,22 @@
1
+ <div id="add-contact-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
2
+ <%= form_tag polymorphic_path([ sender, Contact.new ]) do %>
3
+ <div class="modal-header">
4
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
5
+ <h3><%= t 'contact.new.modal.title' %></h3>
6
+ </div>
7
+ <div class="modal-body">
8
+ <%= label_tag 'actors', t('actor.title.other') %>
9
+ <%= text_field_tag 'actors', '', 'data-path' => actors_path(stranger: true, sender_id: Actor.normalize_id(sender)), 'data-type' => Array.wrap(type).compact.join(',') %>
10
+
11
+ <%= label_tag 'relations', t('activerecord.attributes.contact.relation_ids') %>
12
+ <%= select_tag 'relations', contact_select_options(sender.options_for_contact_select), multiple: true %>
13
+ </div>
14
+ <div class="modal-footer">
15
+ <%= submit_tag t('contact.new.modal.button') %>
16
+ </div>
17
+ <% end %>
18
+
19
+ <%= javascript_tag do %>
20
+ SocialStream.Contact.new_();
21
+ <% end %>
22
+ </div>
@@ -1,7 +1,8 @@
1
1
  <% if @contact.errors.blank? %>
2
- SocialStream.Contact.destroy({
3
- id: "<%= @contact.id %>"
4
- });
2
+ <% if @contact.options_for_select.count == 1 %>
3
+ $('.contact-button-single-<%= @contact.id %>').replaceWith("<%= j render(partial: 'contacts/button_simple', object: @contact, as: :contact) %>");
4
+ <% end %>
5
+ SocialStream.Contact.destroy({ id: "<%= @contact.id %>" });
5
6
  <% else %>
6
- SocialStream.Flash.error("<%= @contact.errors.full_messages.to_sentence %>");
7
+ SocialStream.Flash.error("<%= @contact.errors.full_messages.to_sentence %>");
7
8
  <% end %>
@@ -1,7 +1,8 @@
1
1
  <% if @contact.errors.blank? %>
2
- SocialStream.Contact.update({
3
- id: "<%= @contact.id %>"
4
- });
2
+ <% if @contact.options_for_select.count == 1 %>
3
+ $('.contact-button-single-<%= @contact.id %>').replaceWith("<%= j render(partial: 'contacts/button_simple', object: @contact.reload, as: :contact) %>");
4
+ <% end %>
5
+ SocialStream.Contact.update({ id: "<%= @contact.id %>" });
5
6
  <% else %>
6
- SocialStream.Flash.error("<%= @contact.errors.full_messages.to_sentence %>");
7
+ SocialStream.Flash.error("<%= @contact.errors.full_messages.to_sentence %>");
7
8
  <% end %>
@@ -1,14 +1,19 @@
1
1
  <section id="confirmation">
2
- <h2>Resend confirmation instructions</h2>
2
+ <header>
3
+ <h2>Resend confirmation instructions</h2>
4
+ </header>
5
+ <section class="confirmation">
6
+ <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
7
+ <%= devise_error_messages! %>
3
8
 
4
- <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
5
- <%= devise_error_messages! %>
9
+ <div><%= f.label :email %><br />
10
+ <%= f.email_field :email, :autofocus => true %></div>
6
11
 
7
- <div><%= f.label :email %><br />
8
- <%= f.email_field :email, :autofocus => true %></div>
12
+ <div><%= f.submit "Resend confirmation instructions" %></div>
9
13
 
10
- <div><%= f.submit "Resend confirmation instructions" %></div>
11
- <% end %>
12
-
13
- <%= render "devise/shared/links" %>
14
+ <hr class="soften">
15
+
16
+ <%= render "devise/shared/links" %>
17
+ <% end %>
18
+ </section>
14
19
  </section>
@@ -1,3 +1,3 @@
1
- <article id="presentation">
1
+ <section id="presentation">
2
2
  <%= render partial: 'frontpage/presentation_default' %>
3
- </article>
3
+ </section>
@@ -1,4 +1,4 @@
1
- <%= form_for group do |f| %>
1
+ <%= form_for group, html: { class: 'ss_group_form' } do |f| %>
2
2
  <% if group.errors.any? %>
3
3
  <div class="error">
4
4
  <h2><%= pluralize(group.errors.count, "error") %> prohibited this group from being saved:</h2>
@@ -11,34 +11,34 @@
11
11
  </ul>
12
12
  </div>
13
13
  <% end %>
14
- <section>
15
- <%= f.label :name, t('group.new.name') %>
16
- <%= f.text_field :name %>
17
- </section>
18
- <section>
19
- <%= f.label :_participants, t('group.new.participants') %>
20
- <%= f.hidden_field :_participants, 'data-path' => contacts_path(format: :json) %>
21
- </section>
22
- <section>
23
- <%= f.label :tags_list, t('group.tags')%>
24
- <%= f.text_field :tag_list, 'data-path' => tags_path(format: :json) %>
25
- </section>
26
- <section>
27
- <%= f.label :description %>
28
- <%= f.text_area :description %>
29
- </section>
30
- <%= f.submit :class => "btn" %>
14
+
15
+ <section class="name">
16
+ <%= f.label :name %>
17
+ <%= f.text_field :name %>
18
+ </section>
19
+ <section class="owners">
20
+ <%= f.label :owners %>
21
+ <%= f.hidden_field :owners, 'data-path' => actors_path(format: :json) %>
22
+ </section>
23
+ <section class="tags">
24
+ <%= f.label :tags_list %>
25
+ <%= f.text_field :tag_list, 'data-path' => tags_path(format: :json) %>
26
+ </section>
27
+ <section class="description">
28
+ <%= f.label :description %>
29
+ <%= f.text_area :description %>
30
+ </section>
31
+ <%= f.submit :class => "btn" %>
31
32
  <% end %>
32
33
 
33
34
  <%= javascript_tag do %>
34
35
  $(function() {
35
36
  SocialStream.Group.new_(
36
37
  {
38
+ form: '.ss_group_form',
37
39
  validate: [
38
40
  {
39
- form: ".new_group",
40
41
  errorClass: "validation_error"
41
-
42
42
  }
43
43
  ]
44
44
  }
@@ -1,17 +1,17 @@
1
1
  <% content_for :title do %>
2
- <%= "#{ @group.name } | #{ t 'site.name' }" %>
2
+ <%= "#{ resource.name } | #{ t 'site.name' }" %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :description do %>
6
- <% if @group.profile.description? %>
7
- <%= @group.profile.description%>
6
+ <% if resource.profile.description? %>
7
+ <%= resource.profile.description%>
8
8
  <% else %>
9
- <%= "#{ @group.name } #{ t 'profile.is_on' } #{ t 'site.name' }" %>
9
+ <%= "#{ resource.name } #{ t 'profile.is_on' } #{ t 'site.name' }" %>
10
10
  <% end %>
11
11
  <% end %>
12
12
 
13
13
  <% content_for :keywords do %>
14
- <%= @group.profile.subject.tag_list%>
14
+ <%= resource.tag_list%>
15
15
  <% end %>
16
16
 
17
17
  <%= render :partial => 'show' %>
@@ -15,11 +15,9 @@
15
15
  <%= link_to t('dropdown.settings'), settings_path, :id => "btn_menu_settings" %>
16
16
  </li>
17
17
 
18
- <% if SocialStream.relation_model == :custom %>
19
- <li class="privacity-menu">
20
- <%= link_to t('dropdown.privacy'), relation_customs_path %>
21
- </li>
22
- <% end %>
18
+ <li class="privacy-menu">
19
+ <%= link_to t('dropdown.privacy'), relation_customs_path %>
20
+ </li>
23
21
 
24
22
  <li class="divider">
25
23
  </li>
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
  <%= form_tag search_path, method: 'get', id: "search-box", class: "navbar-search pull-left search-mobile" do %>
9
- <%= text_field_tag :q, nil, autocomplete: :off, class: "search-query input-small icon_tool16-searcher", placeholder: t('search.name'), "data-min_query" => SocialStream::Search::MIN_QUERY %>
9
+ <%= text_field_tag :q, nil, autocomplete: :off, class: "search-query-mobile input-small icon_tool16-searcher", placeholder: t('search.name'), "data-min_query" => SocialStream::Search::MIN_QUERY %>
10
10
  <% end %>
11
11
  <%= javascript_tag do %>
12
12
  $(function() {
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- <div class="search-nav hidden-phone">
19
+ <div class="search-nav hidden-phone hidden-tablet">
20
20
  <%= form_tag search_path, method: 'get', class: "navbar-search pull-left" do %>
21
21
  <%= text_field_tag :q, nil, autocomplete: :off, class: 'search-query input-small', placeholder: t('search.name'), "data-min_query" => SocialStream::Search::MIN_QUERY %>
22
22
  <% end %>
@@ -50,7 +50,7 @@
50
50
  <ul class="nav pull-right">
51
51
  <li>
52
52
  <%= link_to current_subject do %>
53
- <%= image_tag current_subject.logo.url(:small) %>
53
+ <%= image_tag current_subject.logo.url(:small), :class=>"user" %>
54
54
  <span class="name hidden-phone"><%= truncate_name(current_subject.name, length: 15) %></span>
55
55
  <% end %>
56
56
  </li>
@@ -15,5 +15,5 @@
15
15
  <div class="shadow">
16
16
  </div>
17
17
  <% end %>
18
- <%= link_to(image_tag('header-logo.png', class: "logo hidden-phone hidden-tablet", :alt => t('site.name')), root_path) %>
18
+ <%= link_to(image_tag('header-logo.png', class: "logo", :alt => t('site.name')), root_path) %>
19
19
  </div>
@@ -12,6 +12,8 @@
12
12
  <%= stylesheet_link_tag "application" %>
13
13
  <%= javascript_include_tag "application" %>
14
14
 
15
+ <script>document.write('<script src="http://' + (location.host || '${1:localhost}').split(':')[0] + ':${2:35729}/livereload.js?snipver=1"></' + 'script>')</script>
16
+
15
17
  <%= yield :headers %>
16
18
 
17
19
  <%= favicon_link_tag "icons/favicon.ico" %>
@@ -1,7 +1,7 @@
1
1
  <ul>
2
2
  <% relation.available_permissions.each do |p| %>
3
3
  <li>
4
- <%= check_box_tag 'relation_custom[permission_ids][]', p.id, relation.permission_ids.include?(p.id), id: "checkbox_relation_#{ relation.id }_permission_#{ p.id }" %>
4
+ <%= check_box_tag 'relation_custom[permission_ids][]', p.id, relation.permission_ids.include?(p.id), id: "checkbox_relation_#{ relation.id }_permission_#{ p.id }", disabled: cannot?(:update, relation) %>
5
5
  <%= label_tag "checkbox_relation_#{ relation.id }_permission_#{ p.id }",
6
6
  p.title(subject: current_subject),
7
7
  title: p.description(subject: current_subject, state: (relation.permission_ids.include?(p.id) ? 'positive' : 'negative'), relation: relation.name) %>
@@ -6,10 +6,6 @@
6
6
  <%= t('avatar.profile_change') %>
7
7
  </h4>
8
8
  </header>
9
- <div class="update">
10
- <%= render partial: 'avatars/form',
11
- object: @profile.actor,
12
- as: :avatarable %>
13
- </div>
9
+ <%= render partial: 'avatar_edit' %>
14
10
  <% end %>
15
11
  </section>
@@ -0,0 +1,5 @@
1
+ <section class="avatar-edit">
2
+ <%= render partial: 'avatars/form',
3
+ object: @profile.actor,
4
+ as: :avatarable %>
5
+ </section>
@@ -58,41 +58,7 @@
58
58
 
59
59
  <% if can? :update, @profile %>
60
60
  <div class="update">
61
-
62
- <%= form_for(@profile, :url => [current_subject, :profile]) do |f| %>
63
- <h6>
64
- <%= f.label :phone, t('profile.phone') %>
65
- </h6>
66
- <%= f.phone_field :phone %>
67
-
68
- <h6>
69
- <%= f.label :mobile, t('profile.mobile') %>
70
- </h6>
71
- <%= f.phone_field :mobile %>
72
-
73
- <h6>
74
- <%= f.label :fax, t('profile.fax') %>
75
- </h6>
76
- <%= f.phone_field :fax %>
77
-
78
- <h6>
79
- <%= f.label :address, t('profile.address') %>
80
- </h6>
81
- <%= f.text_field :address %>
82
-
83
- <h6>
84
- <%= f.label :email, t('profile.email') %>
85
- </h6>
86
-
87
- <%= f.email_field :email, :class => "email" %>
88
-
89
- <h6>
90
- <%= f.label :website, t('profile.website') %>
91
- </h6>
92
- <%= f.text_field :website, :class => "url" %>
93
-
94
- <%= f.submit :class => "btn" %>
95
- <% end %>
96
- <% end %>
61
+ <%= render partial: 'comunication-info_edit' %>
97
62
  </div>
63
+ <% end %>
98
64
  </section>
@@ -0,0 +1,27 @@
1
+ <%= form_for(@profile, :url => [current_subject, :profile]) do |f| %>
2
+ <%= f.label :phone, t('profile.phone') %>
3
+
4
+ <%= f.phone_field :phone %>
5
+
6
+ <%= f.label :mobile, t('profile.mobile') %>
7
+
8
+ <%= f.phone_field :mobile %>
9
+
10
+ <%= f.label :fax, t('profile.fax') %>
11
+
12
+ <%= f.phone_field :fax %>
13
+
14
+ <%= f.label :address, t('profile.address') %>
15
+
16
+ <%= f.text_field :address %>
17
+
18
+ <%= f.label :email, t('profile.email') %>
19
+
20
+ <%= f.email_field :email, :class => "email" %>
21
+
22
+ <%= f.label :website, t('profile.website') %>
23
+
24
+ <%= f.text_field :website, :class => "url" %>
25
+
26
+ <%= f.submit %>
27
+ <% end %>