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.
- 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,20 +1 @@
|
|
1
|
-
User.
|
2
|
-
include SocialStream::Oauth2Server::Models::User
|
3
|
-
|
4
|
-
def as_json_with_client options = {}
|
5
|
-
hash = as_json_without_client options
|
6
|
-
|
7
|
-
if options[:client] && !options[:client].is_a?(User)
|
8
|
-
hash['roles'] = options[:client].contact_to!(self).relations.map{ |r|
|
9
|
-
{
|
10
|
-
id: r.id,
|
11
|
-
name: r.name
|
12
|
-
}
|
13
|
-
}
|
14
|
-
end
|
15
|
-
|
16
|
-
hash
|
17
|
-
end
|
18
|
-
|
19
|
-
alias_method_chain :as_json, :client
|
20
|
-
end
|
1
|
+
User.send :include, SocialStream::Oauth2Server::Models::User
|
@@ -1,19 +1,10 @@
|
|
1
1
|
# Owner of client sites
|
2
2
|
class Relation::Manager < Relation::Single
|
3
|
-
PERMISSIONS =
|
4
|
-
[
|
5
|
-
[ 'manage', nil ],
|
6
|
-
[ 'manage', 'relation/custom' ],
|
7
|
-
[ 'manage', 'contact' ]
|
8
|
-
]
|
3
|
+
PERMISSIONS = SocialStream.available_permissions['site/client']
|
9
4
|
|
10
5
|
class << self
|
11
6
|
def create_activity?
|
12
7
|
false
|
13
8
|
end
|
14
9
|
end
|
15
|
-
|
16
|
-
def available_permissions
|
17
|
-
Permission.instances PERMISSIONS
|
18
|
-
end
|
19
10
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div id="destroy_site_client" class="accordion-group">
|
2
|
+
<header class="accordion-heading">
|
3
|
+
<h5>
|
4
|
+
<%= link_to t("site.client.destroy.title"), "javascript:void(0);", class: 'accordion-toggle', "data-toggle" => 'collapse', "data-parent" => "#site_client-accordion", "data-target" => "#destroy_site_client-content" %>
|
5
|
+
</h5>
|
6
|
+
</header>
|
7
|
+
|
8
|
+
<div class="content collapse" id="destroy_site_client-content">
|
9
|
+
<%= link_to t("site.client.destroy.link"), resource, confirm: t("site.client.destroy.confirm"), method: :delete %>
|
10
|
+
</div>
|
11
|
+
</div>
|
@@ -1,6 +1,13 @@
|
|
1
|
-
|
1
|
+
<section class="edit_form">
|
2
|
+
<%= render partial: 'form' %>
|
3
|
+
</section>
|
2
4
|
|
3
5
|
<section class="site_client_roles">
|
4
6
|
<%= render partial: 'relation/customs/index',
|
5
|
-
locals: { subject:
|
7
|
+
locals: { subject: resource } %>
|
8
|
+
</section>
|
9
|
+
|
10
|
+
<section class="delete">
|
11
|
+
<%= render partial: 'destroy' %>
|
6
12
|
</section>
|
13
|
+
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<%= image_tag 'step_2.png' %>
|
2
2
|
|
3
|
-
<section class="
|
4
|
-
<
|
3
|
+
<section class="create_logo_app">
|
4
|
+
<h4>Set the application's logo</h4>
|
5
5
|
|
6
|
-
<%= render partial: 'avatars/form',
|
7
|
-
|
8
|
-
|
6
|
+
<%= render partial: 'avatars/form',
|
7
|
+
object: resource,
|
8
|
+
as: :avatarable %>
|
9
9
|
|
10
|
-
<%= link_to "Next",
|
10
|
+
<%= link_to "Next", polymorphic_path(resource, action: 'edit', step: 3), class: "next-step" %>
|
11
11
|
</section>
|
@@ -1,10 +1,12 @@
|
|
1
1
|
<%= image_tag 'step_3.png' %>
|
2
2
|
|
3
|
-
<
|
3
|
+
<section class="new_app">
|
4
|
+
<h4>Manage roles and permissions</h4>
|
4
5
|
|
5
|
-
<section class="site_client_roles">
|
6
|
-
|
7
|
-
|
8
|
-
</section>
|
6
|
+
<section class="site_client_roles">
|
7
|
+
<%= render partial: 'relation/customs/index',
|
8
|
+
locals: { subject: resource } %>
|
9
|
+
</section>
|
9
10
|
|
10
|
-
<%= link_to 'Finish',
|
11
|
+
<%= link_to 'Finish', resource, class: "next-step" %>
|
12
|
+
</section>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for(
|
1
|
+
<%= form_for(begin; resource; rescue ActiveRecord::RecordNotFound; end || resource_class.new) do |f| %>
|
2
2
|
|
3
3
|
<% if f.object.errors.any? %>
|
4
4
|
<div id="error_explanation" class="alert alert-error">
|
@@ -14,26 +14,26 @@
|
|
14
14
|
<% end %>
|
15
15
|
|
16
16
|
<section id="site_client_form">
|
17
|
-
<
|
17
|
+
<div class="name">
|
18
18
|
<%= f.label :name %>
|
19
19
|
<%= f.text_field :name %>
|
20
|
-
</
|
20
|
+
</div>
|
21
21
|
|
22
|
-
<
|
22
|
+
<div class="description">
|
23
23
|
<%= f.label :description %>
|
24
24
|
<%= f.text_area :description %>
|
25
|
-
</
|
25
|
+
</div>
|
26
26
|
|
27
|
-
<
|
27
|
+
<div class="url">
|
28
28
|
<%= f.label :url %>
|
29
29
|
<%= f.text_area :url %>
|
30
|
-
</
|
30
|
+
</div>
|
31
31
|
|
32
|
-
<
|
32
|
+
<div class="callback_url">
|
33
33
|
<%= f.label :callback_url %>
|
34
34
|
<%= f.text_area :callback_url %>
|
35
|
-
</
|
36
|
-
|
37
|
-
<%= f.submit %>
|
35
|
+
</div>
|
38
36
|
</section>
|
37
|
+
<%= f.submit :class => "next-step" %>
|
38
|
+
|
39
39
|
<% end %>
|
@@ -2,19 +2,31 @@
|
|
2
2
|
<ul>
|
3
3
|
<% list.each do |client| %>
|
4
4
|
<li>
|
5
|
-
<%=
|
5
|
+
<%= link_to client do %>
|
6
|
+
<%= image_tag client.logo.url(:small) %>
|
7
|
+
<% end %>
|
6
8
|
|
7
|
-
<div class="
|
8
|
-
|
9
|
+
<div class="data">
|
10
|
+
<div class="name">
|
11
|
+
<%= link_to client.name, client %>
|
12
|
+
</div>
|
13
|
+
<div class="url">
|
14
|
+
<%= link_to client.url, client.url, target: '_blank' %>
|
15
|
+
</div>
|
9
16
|
</div>
|
10
|
-
<div class="
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
</
|
17
|
-
|
17
|
+
<div class="team">
|
18
|
+
<div class="users">
|
19
|
+
<span>
|
20
|
+
5
|
21
|
+
</span>
|
22
|
+
users
|
23
|
+
</div>
|
24
|
+
<div class="auth">
|
25
|
+
<span>
|
26
|
+
15
|
27
|
+
</span>
|
28
|
+
authorized
|
29
|
+
</div>
|
18
30
|
</div>
|
19
31
|
<hr class="soften">
|
20
32
|
</li>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<%= render partial: 'toolbar/home' %>
|
4
4
|
|
5
|
-
<section class="edit_site_client" id="edit_<%= dom_id
|
5
|
+
<section class="edit_site_client" id="edit_<%= dom_id resource %>">
|
6
6
|
<% if params[:step].present? %>
|
7
7
|
<%= render partial: "edit_step_#{ params[:step] }" %>
|
8
8
|
<% else %>
|
@@ -5,55 +5,24 @@
|
|
5
5
|
<section class="site_clients">
|
6
6
|
<header>
|
7
7
|
<h3>
|
8
|
-
<%= link_to t('site.client.new.link'),
|
8
|
+
<%= link_to t('site.client.new.link'), polymorphic_path(resource_class.new, action: 'new'), class: "new_site_client-modal-link", 'data-toggle' => 'modal' %>
|
9
9
|
|
10
|
-
|
10
|
+
Applications
|
11
11
|
</h3>
|
12
12
|
</header>
|
13
13
|
<div class="tabbable"> <!-- Only required for left/right tabs -->
|
14
14
|
<ul class="nav nav-tabs">
|
15
|
-
<li class="active"><a href="#tab1" data-toggle="tab">
|
16
|
-
|
17
|
-
|
18
|
-
<div class="search-nav hidden-phone">
|
19
|
-
<%= form_tag search_path, method: 'get', class: "navbar-search pull-left" do %>
|
20
|
-
<%= text_field_tag :q, nil, autocomplete: :off, class: 'search-query input-small', placeholder: t('search.name'), "data-min_query" => SocialStream::Search::MIN_QUERY %>
|
21
|
-
<% end %>
|
22
|
-
<%= javascript_tag do %>
|
23
|
-
$(function() {
|
24
|
-
SocialStream.SearchHeader.show();
|
25
|
-
});
|
26
|
-
<% end %>
|
27
|
-
<div class="mat">
|
28
|
-
<%= render partial: 'layouts/loading' %>
|
29
|
-
|
30
|
-
<div class="query_too_short">
|
31
|
-
<%= t 'search.at_least', count: SocialStream::Search::MIN_QUERY %>
|
32
|
-
</div>
|
33
|
-
|
34
|
-
<div class="no_results">
|
35
|
-
<%= t 'search.nothing' %>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<div class="results">
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
|
15
|
+
<li class="active"><a href="#tab1" data-toggle="tab">Managing</a></li>
|
16
|
+
</ul>
|
17
|
+
</div>
|
43
18
|
|
44
|
-
<div class="tab-content">
|
45
|
-
<div class="tab-pane active" id="tab1">
|
46
|
-
<%= render partial: 'list',
|
47
|
-
object: @clients %>
|
48
|
-
</div>
|
49
19
|
|
50
|
-
|
51
|
-
|
20
|
+
<div class="tab-content">
|
21
|
+
<div class="tab-pane active" id="tab1">
|
22
|
+
<%= render partial: 'list',
|
23
|
+
object: collection %>
|
52
24
|
</div>
|
53
25
|
</div>
|
54
|
-
|
55
26
|
<%= render partial: 'new.modal' %>
|
56
|
-
|
57
|
-
<hr class="soften">
|
58
27
|
</section>
|
59
28
|
</section>
|
@@ -1,14 +1,15 @@
|
|
1
1
|
<section id="site_client">
|
2
2
|
<%= render partial: 'toolbar/home' %>
|
3
3
|
|
4
|
-
<section class="site_client" id="<%= dom_id
|
4
|
+
<section class="site_client" id="<%= dom_id resource %>">
|
5
5
|
<header>
|
6
|
-
<
|
7
|
-
<%=
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
<h4>
|
7
|
+
<%= resource.name %>
|
8
|
+
|
9
|
+
<% if can?(:update, resource) %>
|
10
|
+
<%= link_to t('site.client.button.edit'), polymorphic_path(resource, action: 'edit'), class: "edit" %>
|
11
|
+
<% end %>
|
12
|
+
</h4>
|
12
13
|
|
13
14
|
<%= image_tag('logos/app-default.png', class: "logo-app pull-right") %>
|
14
15
|
|
@@ -20,53 +21,63 @@
|
|
20
21
|
<%= Site::Client.human_attribute_name :description %>
|
21
22
|
</h4>
|
22
23
|
<div class="result">
|
23
|
-
<%=
|
24
|
+
<%= resource.description%>
|
24
25
|
</div>
|
25
26
|
|
26
27
|
<h4>
|
27
28
|
<%= Site::Client.human_attribute_name :url %>
|
28
29
|
</h4>
|
29
30
|
<div class="result">
|
30
|
-
<%= link_to
|
31
|
+
<%= link_to resource.url, resource.url%>
|
31
32
|
</div>
|
32
33
|
|
33
|
-
<% if can? :update,
|
34
|
+
<% if can? :update, resource %>
|
34
35
|
<h4>
|
35
36
|
<%= Site::Client.human_attribute_name :callback_url %>
|
36
37
|
</h4>
|
37
38
|
<div class="result">
|
38
|
-
<%=
|
39
|
+
<%= resource.callback_url %>
|
39
40
|
</div>
|
40
41
|
<% end %>
|
41
42
|
</div>
|
42
43
|
|
43
|
-
<% if can? :
|
44
|
-
<div class="
|
45
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
44
|
+
<% if can? :update_secret, resource %>
|
45
|
+
<div class="accordion" id="accordion2">
|
46
|
+
<div class="accordion-group">
|
47
|
+
<div class="accordion-heading">
|
48
|
+
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
|
49
|
+
<%= t 'site.client.oauth.credentials' %>
|
50
|
+
</a>
|
51
|
+
</div>
|
52
|
+
<div id="collapseOne" class="accordion-body collapse">
|
53
|
+
<div class="accordion-inner">
|
54
|
+
<div class="content settings_content collapse in">
|
55
|
+
<div class="result">
|
56
|
+
<div class="client-id">
|
57
|
+
<h6>
|
58
|
+
<%= Site::Client.human_attribute_name :id %>
|
59
|
+
</h6>
|
60
|
+
<p>
|
61
|
+
<%= resource.id %>
|
62
|
+
</p>
|
63
|
+
</div>
|
64
|
+
<div class="client-secret">
|
65
|
+
<h6>
|
66
|
+
<%= Site::Client.human_attribute_name :secret %>
|
67
|
+
<%= form_tag update_secret_site_client_path(resource, format: :json), class: "site-client-secret" do %>
|
68
|
+
<%= submit_tag t('site.client.oauth.secret.refresh'), class: 'pull-right' %>
|
69
|
+
<% end %>
|
70
|
+
</h6>
|
71
|
+
<p>
|
72
|
+
<span class="site-client-secret"><%= resource.secret %></span>
|
73
|
+
</p>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</div>
|
70
81
|
<% end %>
|
71
82
|
</div>
|
72
83
|
</section>
|
@@ -74,48 +85,35 @@
|
|
74
85
|
<div class="tabbable"> <!-- Only required for left/right tabs -->
|
75
86
|
<ul class="nav nav-tabs">
|
76
87
|
<li class="active"><a href="#authorized" data-toggle="tab">Authorized</a></li>
|
77
|
-
<li><a href="#registered" data-toggle="tab">
|
78
|
-
<li><a href="#stats" data-toggle="tab">Stats</a></li>
|
88
|
+
<li><a href="#registered" data-toggle="tab">Users</a></li>
|
79
89
|
</ul>
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
<
|
91
|
-
<%= render partial: 'layouts/loading' %>
|
92
|
-
|
93
|
-
<div class="query_too_short">
|
94
|
-
<%= t 'search.at_least', count: SocialStream::Search::MIN_QUERY %>
|
95
|
-
</div>
|
96
|
-
|
97
|
-
<div class="no_results">
|
98
|
-
<%= t 'search.nothing' %>
|
99
|
-
</div>
|
100
|
-
|
101
|
-
<div class="results">
|
102
|
-
</div>
|
103
|
-
</div>
|
90
|
+
|
91
|
+
<%= render partial: 'contacts/add_button',
|
92
|
+
locals: {
|
93
|
+
sender: resource,
|
94
|
+
type: [ :user, :group ]
|
95
|
+
}
|
96
|
+
%>
|
97
|
+
|
98
|
+
<div class="btn-group" data-toggle="buttons">
|
99
|
+
<button type="radio" name="options" id="option1">user</button>
|
100
|
+
<button type="radio" name="options" id="option2"">organization</button>
|
104
101
|
</div>
|
105
102
|
|
103
|
+
<%= text_field_tag "contact-filter", "", placeholder: "filter", autocomplete: "off" %>
|
106
104
|
|
107
105
|
<div class="tab-content">
|
108
106
|
<div class="tab-pane active" id="authorized">
|
109
107
|
<%= render partial: 'contacts/contact',
|
110
|
-
collection:
|
108
|
+
collection: resource.sent_contacts.first(12) %>
|
111
109
|
</div>
|
112
110
|
|
113
111
|
<div class="tab-pane" id="registered">
|
114
112
|
</div>
|
115
|
-
|
116
|
-
<div class="tab-pane" id="stats">
|
117
|
-
</div>
|
118
113
|
</div>
|
119
114
|
</div>
|
120
115
|
|
116
|
+
<%= javascript_tag do %>
|
117
|
+
SocialStream.SiteClient.show();
|
118
|
+
<% end %>
|
121
119
|
</section>
|