social_stream 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -2
- data/LICENSE +1 -1
- data/base/Rakefile +3 -17
- data/base/app/assets/images/flags/de.png +0 -0
- data/base/app/assets/images/flags/fr.png +0 -0
- data/base/app/assets/images/flags/hu.png +0 -0
- data/base/app/assets/images/flags/nl.png +0 -0
- data/base/app/assets/javascripts/social_stream/actor.js +34 -0
- data/base/app/assets/javascripts/social_stream/contact.js +40 -5
- data/base/app/assets/javascripts/social_stream/flash.js +6 -1
- data/base/app/assets/javascripts/social_stream/group.js +6 -5
- data/base/app/assets/javascripts/social_stream/relation_customs.js +0 -1
- data/base/app/assets/stylesheets/social_stream/base/adjust/layout/_adjust.css.sass +3 -0
- data/base/app/assets/stylesheets/social_stream/base/buttons/_buttons.scss.sass +0 -2
- data/base/app/assets/stylesheets/social_stream/base/contacts/_contacts.css.sass +1 -11
- data/base/app/assets/stylesheets/social_stream/base/contacts/layouts/_contacts.css.sass +1 -29
- data/base/app/assets/stylesheets/social_stream/base/layouts/_header.css.sass +0 -1
- data/base/app/assets/stylesheets/social_stream/base/mixins/_buttons.css.sass +5 -0
- data/base/app/assets/stylesheets/social_stream/base/mixins/_layout.css.sass +36 -7
- data/base/app/controllers/actors_controller.rb +25 -0
- data/base/app/controllers/contacts_controller.rb +38 -8
- data/base/app/controllers/groups_controller.rb +2 -21
- data/base/app/controllers/profiles_controller.rb +4 -0
- data/base/app/controllers/settings_controller.rb +12 -2
- data/base/app/controllers/users_controller.rb +0 -8
- data/base/app/helpers/contacts_helper.rb +8 -0
- data/base/app/models/activity.rb +19 -6
- data/base/app/models/actor.rb +49 -11
- data/base/app/models/contact.rb +12 -5
- data/base/app/models/group.rb +13 -11
- data/base/app/models/permission.rb +30 -0
- data/base/app/models/relation.rb +17 -7
- data/base/app/models/relation/custom.rb +2 -40
- data/base/app/models/relation/follow.rb +8 -2
- data/base/app/models/relation/owner.rb +10 -0
- data/base/app/models/relation/single.rb +7 -4
- data/base/app/models/site.rb +1 -1
- data/base/app/models/tie.rb +8 -4
- data/base/app/views/contacts/_add_button.html.erb +9 -0
- data/base/app/views/contacts/_button.html.erb +3 -3
- data/base/app/views/contacts/_button_multiple.html.erb +4 -0
- data/base/app/views/contacts/_button_simple.html.erb +17 -0
- data/base/app/views/contacts/_new_modal.html.erb +22 -0
- data/base/app/views/contacts/destroy.js.erb +5 -4
- data/base/app/views/contacts/update.js.erb +5 -4
- data/base/app/views/devise/confirmations/new.html.erb +14 -9
- data/base/app/views/frontpage/_presentation.html.erb +2 -2
- data/base/app/views/groups/_form.html.erb +20 -20
- data/base/app/views/groups/show.html.erb +5 -5
- data/base/app/views/layouts/_header_dropdown_menu.html.erb +3 -5
- data/base/app/views/layouts/_header_signed_in.erb +3 -3
- data/base/app/views/layouts/_logo_in.html.erb +1 -1
- data/base/app/views/layouts/application.html.erb +2 -0
- data/base/app/views/permissions/_list.html.erb +1 -1
- data/base/app/views/profiles/_avatar.html.erb +1 -5
- data/base/app/views/profiles/_avatar_edit.html.erb +5 -0
- data/base/app/views/profiles/_comunication-info.html.erb +2 -36
- data/base/app/views/profiles/_comunication-info_edit.html.erb +27 -0
- data/base/app/views/profiles/_edit_icon.html.erb +0 -1
- data/base/app/views/profiles/_experience.html.erb +1 -6
- data/base/app/views/profiles/_experience_edit.html.erb +5 -0
- data/base/app/views/profiles/_personal.html.erb +1 -39
- data/base/app/views/profiles/_personal_edit.html.erb +31 -0
- data/base/app/views/profiles/_profile_edit.html.erb +7 -0
- data/base/app/views/profiles/_tags.html.erb +1 -4
- data/base/app/views/profiles/_tags_edit.html.erb +4 -0
- data/base/app/views/profiles/edit.html.erb +24 -0
- data/base/app/views/settings/_notifications.html.erb +12 -4
- data/base/app/views/users/show.html.erb +5 -5
- data/base/config/locales/de.yml +654 -0
- data/base/config/locales/en.yml +20 -9
- data/base/config/locales/es.yml +151 -140
- data/base/config/locales/fr.yml +656 -0
- data/base/config/locales/hu.yml +653 -0
- data/base/config/locales/nl.yml +656 -0
- data/base/config/locales/pt.yml +250 -239
- data/base/config/locales/rails.de.yml +203 -0
- data/base/config/locales/rails.fr.yml +222 -0
- data/base/config/locales/rails.hu.yml +199 -0
- data/base/config/locales/rails.nl.yml +199 -0
- data/base/config/locales/zh.yml +214 -202
- data/base/config/routes.rb +22 -30
- data/base/db/migrate/20130708152633_set_group_owners.rb +19 -0
- data/base/db/migrate/20130723133530_actor_notification_settings.rb +10 -0
- data/base/lib/generators/social_stream/base/templates/initializer.rb +13 -7
- data/base/lib/rails/social_stream.rb +2 -0
- data/base/lib/social_stream/base.rb +27 -7
- data/base/lib/social_stream/base/ability.rb +3 -5
- data/base/lib/social_stream/base/autoload.rb +1 -0
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/lib/social_stream/controllers/authorship.rb +18 -0
- data/base/lib/social_stream/controllers/helpers.rb +18 -4
- data/base/lib/social_stream/controllers/objects.rb +2 -8
- data/base/lib/social_stream/controllers/subjects.rb +9 -2
- data/base/lib/social_stream/models/supertype.rb +2 -0
- data/base/lib/social_stream/population/activity_object.rb +6 -8
- data/base/lib/social_stream/routing/mapper.rb +52 -0
- data/base/social_stream-base.gemspec +4 -7
- data/base/spec/controllers/groups_controller_spec.rb +19 -8
- data/base/spec/controllers/posts_controller_spec.rb +114 -147
- data/base/spec/models/post_authorization_spec.rb +190 -204
- data/base/spec/models/post_spec.rb +17 -63
- data/base/vendor/assets/javascripts/bootstrap-multiselect.js +434 -127
- data/documents/Rakefile +1 -6
- data/documents/config/locales/de.yml +93 -0
- data/documents/config/locales/es.yml +2 -2
- data/documents/config/locales/fr.yml +93 -0
- data/documents/config/locales/hu.yml +93 -0
- data/documents/config/locales/nl.yml +93 -0
- data/documents/config/locales/zh.yml +4 -4
- data/documents/config/routes.rb +7 -9
- data/documents/lib/social_stream/documents/version.rb +1 -1
- data/documents/social_stream-documents.gemspec +4 -4
- data/events/Rakefile +1 -6
- data/events/config/locales/es.yml +3 -3
- data/events/config/locales/zh.yml +3 -3
- data/events/lib/social_stream/events/models/actor.rb +2 -1
- data/events/lib/social_stream/events/version.rb +1 -1
- data/events/social_stream-events.gemspec +1 -1
- data/lib/generators/social_stream/install_generator.rb +1 -0
- data/lib/social_stream.rb +1 -0
- data/lib/social_stream/version.rb +1 -1
- data/lib/tasks/i18n.rake +22 -2
- data/linkser/Rakefile +1 -6
- data/linkser/config/locales/de.yml +17 -0
- data/linkser/config/locales/es.yml +2 -2
- data/linkser/config/locales/fr.yml +17 -0
- data/linkser/config/locales/hu.yml +17 -0
- data/linkser/config/locales/nl.yml +17 -0
- data/linkser/config/locales/zh.yml +2 -2
- data/linkser/lib/social_stream/linkser/version.rb +1 -1
- data/linkser/social_stream-linkser.gemspec +1 -1
- data/oauth2_server/Rakefile +1 -6
- data/oauth2_server/app/assets/images/step_1.png +0 -0
- data/oauth2_server/app/assets/images/step_2.png +0 -0
- data/oauth2_server/app/assets/images/step_3.png +0 -0
- data/oauth2_server/app/assets/javascripts/social_stream/site_client.js +27 -0
- data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/applications/layout/_applications-oauth2server.css.sass +0 -5
- data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/create/layout/_create-oauth2server.css.sass +3 -5
- data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/show/layout/_show-oauth2server.css.sass +8 -6
- data/oauth2_server/app/controllers/site/clients_controller.rb +17 -41
- data/oauth2_server/app/decorators/social_stream/base/relation_decorator.rb +2 -0
- data/oauth2_server/app/decorators/social_stream/base/user_decorator.rb +1 -20
- data/oauth2_server/app/models/relation/manager.rb +1 -10
- data/oauth2_server/app/models/site/client.rb +4 -2
- data/oauth2_server/app/views/site/clients/_destroy.html.erb +11 -0
- data/oauth2_server/app/views/site/clients/_edit.html.erb +9 -2
- data/oauth2_server/app/views/site/clients/_edit_step_2.html.erb +6 -6
- data/oauth2_server/app/views/site/clients/_edit_step_3.html.erb +8 -6
- data/oauth2_server/app/views/site/clients/_form.html.erb +11 -11
- data/oauth2_server/app/views/site/clients/_list.html.erb +23 -11
- data/oauth2_server/app/views/site/clients/edit.html.erb +1 -1
- data/oauth2_server/app/views/site/clients/index.html.erb +9 -40
- data/oauth2_server/app/views/site/clients/show.html.erb +66 -68
- data/oauth2_server/config/locales/en.yml +19 -0
- data/oauth2_server/config/locales/es.yml +23 -4
- data/oauth2_server/config/locales/zh.yml +32 -13
- data/oauth2_server/config/routes.rb +3 -1
- data/oauth2_server/lib/social_stream/oauth2_server.rb +4 -1
- data/oauth2_server/lib/social_stream/oauth2_server/ability.rb +1 -1
- data/oauth2_server/lib/social_stream/oauth2_server/models/user.rb +18 -0
- data/oauth2_server/lib/social_stream/oauth2_server/version.rb +1 -1
- data/oauth2_server/social_stream-oauth2_server.gemspec +1 -1
- data/oauth2_server/spec/controllers/site_clients_controller_authorization_spec.rb +7 -0
- data/ostatus/Rakefile +1 -6
- data/ostatus/config/locales/zh.yml +8 -8
- data/ostatus/lib/social_stream-ostatus.rb +3 -0
- data/ostatus/lib/social_stream/ostatus/version.rb +1 -1
- data/ostatus/social_stream-ostatus.gemspec +1 -1
- data/places/config/locales/es.yml +51 -51
- data/presence/config/locales/es.yml +48 -48
- data/presence/config/locales/zh.yml +48 -48
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/presence/social_stream-presence.gemspec +1 -1
- data/social_stream.gemspec +8 -7
- metadata +60 -29
- data/base/app/assets/javascripts/social_stream/follow.js +0 -28
- data/base/app/controllers/followers_controller.rb +0 -34
- data/base/app/helpers/followers_helper.rb +0 -5
- data/base/app/views/contacts/_link_follow.html.erb +0 -16
- data/base/app/views/followers/destroy.js.erb +0 -1
- data/base/app/views/followers/index.html.erb +0 -30
- data/base/app/views/followers/update.js.erb +0 -3
- data/base/app/views/frontpage/_characteristics.html.erb +0 -23
- data/base/lib/social_stream/routing/constraints/custom.rb +0 -11
- data/base/lib/social_stream/routing/constraints/follow.rb +0 -11
- 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
|
-
#
|
5
|
-
#
|
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
|
[
|
@@ -14,15 +14,18 @@ class Relation::Single < Relation
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def permissions
|
17
|
-
self::PERMISSIONS
|
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
|
data/base/app/models/site.rb
CHANGED
data/base/app/models/tie.rb
CHANGED
@@ -69,7 +69,7 @@ class Tie < ActiveRecord::Base
|
|
69
69
|
|
70
70
|
validates_presence_of :contact_id, :relation_id
|
71
71
|
|
72
|
-
validate :
|
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
|
160
|
+
def relation_must_belong_to_sender
|
156
161
|
errors.add(:relation, "must belong to sender") unless
|
157
|
-
|
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
|
-
<%=
|
2
|
-
|
3
|
-
|
1
|
+
<%= render partial: "contacts/button_#{ contact.options_for_select_type }",
|
2
|
+
object: contact,
|
3
|
+
as: :contact %>
|
@@ -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
|
-
|
3
|
-
|
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
|
-
|
3
|
-
|
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
|
-
<
|
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
|
-
|
5
|
-
|
9
|
+
<div><%= f.label :email %><br />
|
10
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
6
11
|
|
7
|
-
|
8
|
-
<%= f.email_field :email, :autofocus => true %></div>
|
12
|
+
<div><%= f.submit "Resend confirmation instructions" %></div>
|
9
13
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
<hr class="soften">
|
15
|
+
|
16
|
+
<%= render "devise/shared/links" %>
|
17
|
+
<% end %>
|
18
|
+
</section>
|
14
19
|
</section>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<
|
1
|
+
<section id="presentation">
|
2
2
|
<%= render partial: 'frontpage/presentation_default' %>
|
3
|
-
</
|
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
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
<%= "#{
|
2
|
+
<%= "#{ resource.name } | #{ t 'site.name' }" %>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :description do %>
|
6
|
-
<% if
|
7
|
-
<%=
|
6
|
+
<% if resource.profile.description? %>
|
7
|
+
<%= resource.profile.description%>
|
8
8
|
<% else %>
|
9
|
-
<%= "#{
|
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
|
-
<%=
|
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
|
-
|
19
|
-
|
20
|
-
|
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
|
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) %>
|
@@ -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 %>
|