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
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.files = `git ls-files`.split("\n")
|
13
13
|
|
14
14
|
# Gem dependencies
|
15
|
-
s.add_runtime_dependency('social_stream-base', '~> 2.
|
15
|
+
s.add_runtime_dependency('social_stream-base', '~> 2.2.0')
|
16
16
|
|
17
|
-
s.add_runtime_dependency('paperclip','~> 3.
|
18
|
-
s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.
|
19
|
-
s.add_runtime_dependency('delayed_paperclip','>= 2.
|
17
|
+
s.add_runtime_dependency('paperclip','~> 3.5.1')
|
18
|
+
s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.11.0')
|
19
|
+
s.add_runtime_dependency('delayed_paperclip','>= 2.6.1')
|
20
20
|
end
|
data/events/Rakefile
CHANGED
@@ -3,12 +3,7 @@ require 'bundler/gem_tasks'
|
|
3
3
|
|
4
4
|
require 'rdoc/task'
|
5
5
|
|
6
|
-
|
7
|
-
require 'rspec/core/rake_task'
|
8
|
-
|
9
|
-
RSpec::Core::RakeTask.new(:spec)
|
10
|
-
|
11
|
-
task :default => :spec
|
6
|
+
task :default => :rdoc
|
12
7
|
|
13
8
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
14
9
|
rdoc.rdoc_dir = 'rdoc'
|
@@ -3,9 +3,9 @@ es:
|
|
3
3
|
activerecord:
|
4
4
|
attributes:
|
5
5
|
event:
|
6
|
-
title: Título
|
7
|
-
room: Espacio
|
8
6
|
frequency: Repetición
|
7
|
+
room: Espacio
|
8
|
+
title: Título
|
9
9
|
room:
|
10
10
|
name: Nombre
|
11
11
|
errors:
|
@@ -51,7 +51,7 @@ es:
|
|
51
51
|
confirm_delete: ¿Borrar espacio?
|
52
52
|
delete: Borrar
|
53
53
|
settings:
|
54
|
-
title: Espacios
|
55
54
|
description: Salas disponibles para la realización de eventos
|
55
|
+
title: Espacios
|
56
56
|
watermark:
|
57
57
|
name: Nuevo espacio
|
@@ -3,9 +3,9 @@ zh:
|
|
3
3
|
activerecord:
|
4
4
|
attributes:
|
5
5
|
event:
|
6
|
-
title: Title
|
7
|
-
room: Room
|
8
6
|
frequency: Frequency
|
7
|
+
room: Room
|
8
|
+
title: Title
|
9
9
|
room:
|
10
10
|
name: Name
|
11
11
|
errors:
|
@@ -51,7 +51,7 @@ zh:
|
|
51
51
|
confirm_delete: Delete room?
|
52
52
|
delete: Delete
|
53
53
|
settings:
|
54
|
-
title: Rooms
|
55
54
|
description: Rooms available for event celebration
|
55
|
+
title: Rooms
|
56
56
|
watermark:
|
57
57
|
name: New room
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.files = `git ls-files`.split("\n")
|
13
13
|
|
14
14
|
# Gem dependencies
|
15
|
-
s.add_runtime_dependency('social_stream-base', '~> 2.
|
15
|
+
s.add_runtime_dependency('social_stream-base', '~> 2.2.0')
|
16
16
|
s.add_runtime_dependency('rails-scheduler', '~> 0.1.2')
|
17
17
|
|
18
18
|
# Development Gem dependencies
|
data/lib/social_stream.rb
CHANGED
@@ -18,6 +18,7 @@ module SocialStream
|
|
18
18
|
config.app_generators.linkser 'social_stream:linkser'
|
19
19
|
config.app_generators.chat 'social_stream:presence'
|
20
20
|
config.app_generators.federation 'social_stream:ostatus'
|
21
|
+
config.app_generators.oauth2_server 'social_stream:oauth2_server'
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
data/lib/tasks/i18n.rake
CHANGED
@@ -9,7 +9,6 @@ namespace :i18n do
|
|
9
9
|
en_hash = h.dup
|
10
10
|
|
11
11
|
each_key do |self_key|
|
12
|
-
# require 'debugger'; debugger
|
13
12
|
en_val = en_hash.delete(self_key)
|
14
13
|
|
15
14
|
case en_val
|
@@ -30,21 +29,42 @@ namespace :i18n do
|
|
30
29
|
end
|
31
30
|
end
|
32
31
|
|
32
|
+
# Merge missing keys
|
33
33
|
merge! en_hash
|
34
|
+
|
35
|
+
# Order alphabetically
|
36
|
+
replace sort_by{ |k, v| k }.inject({}){ |h, a| h[a.first] = a.last; h }
|
34
37
|
end
|
35
38
|
end
|
36
39
|
|
37
40
|
SocialStream::ALL_COMPONENTS.each do |c|
|
38
41
|
path = "#{ c }/config/locales/"
|
42
|
+
|
39
43
|
files = Dir[path + '*'].select{ |f| f =~ /\/\w+\.yml$/ }
|
44
|
+
|
40
45
|
en = files.find{ |f| f =~ /\/en.yml$/ }
|
41
46
|
files.delete(en)
|
47
|
+
|
42
48
|
en_h = Psych.load_file(en)
|
43
49
|
|
44
50
|
files.each do |f|
|
45
51
|
h = Psych.load_file(f)
|
46
52
|
|
47
|
-
|
53
|
+
# Leave language_name at the begining of the hash
|
54
|
+
if c == "base"
|
55
|
+
orig_h = h.first.last
|
56
|
+
orig_en_h = en_h.first.last.dup
|
57
|
+
|
58
|
+
language_name = orig_h.delete('language_name')
|
59
|
+
language_name_en = orig_en_h.delete('language_name')
|
60
|
+
language_name ||= language_name_en
|
61
|
+
|
62
|
+
orig_h.sync orig_en_h
|
63
|
+
|
64
|
+
h.first.last.replace({ 'language_name' => language_name }.merge!(orig_h))
|
65
|
+
else
|
66
|
+
h.first.last.sync en_h.first.last
|
67
|
+
end
|
48
68
|
|
49
69
|
Psych.dump h, File.open(f, 'w')
|
50
70
|
end
|
data/linkser/Rakefile
CHANGED
@@ -3,12 +3,7 @@ require 'bundler/gem_tasks'
|
|
3
3
|
|
4
4
|
require 'rdoc/task'
|
5
5
|
|
6
|
-
|
7
|
-
require 'rspec/core/rake_task'
|
8
|
-
|
9
|
-
RSpec::Core::RakeTask.new(:spec)
|
10
|
-
|
11
|
-
task :default => :spec
|
6
|
+
task :default => :rdoc
|
12
7
|
|
13
8
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
14
9
|
rdoc.rdoc_dir = 'rdoc'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
de:
|
3
|
+
link:
|
4
|
+
by: by %{author}
|
5
|
+
confirm_delete: Link löschen?
|
6
|
+
errors:
|
7
|
+
loading: Fehler beim Laden
|
8
|
+
only_webs: Nur Webseiten werden unterstützt
|
9
|
+
form:
|
10
|
+
title: Link
|
11
|
+
input: Gib die Web Addresse ein
|
12
|
+
name: Link
|
13
|
+
one: Ein Link
|
14
|
+
other: links
|
15
|
+
title: Links
|
16
|
+
linkser:
|
17
|
+
title: Linkser
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
fr:
|
3
|
+
link:
|
4
|
+
by: by %{author}
|
5
|
+
confirm_delete: Supprimer le lien ?
|
6
|
+
errors:
|
7
|
+
loading: Erreur de chargement
|
8
|
+
only_webs: Seules les pages Web sont prises en charge
|
9
|
+
form:
|
10
|
+
title: Lien
|
11
|
+
input: Saisir l'adresse Web
|
12
|
+
name: lien
|
13
|
+
one: un lien
|
14
|
+
other: links
|
15
|
+
title: Liens
|
16
|
+
linkser:
|
17
|
+
title: Linkser
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
hu:
|
3
|
+
link:
|
4
|
+
by: by %{author}
|
5
|
+
confirm_delete: Törlöd a linket?
|
6
|
+
errors:
|
7
|
+
loading: Töltési hiba
|
8
|
+
only_webs: Csak a weboldalak támogatottak
|
9
|
+
form:
|
10
|
+
title: Link
|
11
|
+
input: Írd be a web címet
|
12
|
+
name: link
|
13
|
+
one: egy link
|
14
|
+
other: links
|
15
|
+
title: Linkek
|
16
|
+
linkser:
|
17
|
+
title: Hivatkozás megosztása
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
nl:
|
3
|
+
link:
|
4
|
+
by: by %{author}
|
5
|
+
confirm_delete: Link verwijderen?
|
6
|
+
errors:
|
7
|
+
loading: Fout bij het laden
|
8
|
+
only_webs: Alleen webpagina’s worden ondersteund
|
9
|
+
form:
|
10
|
+
title: Link
|
11
|
+
input: Het webadres schrijven
|
12
|
+
name: link
|
13
|
+
one: een link
|
14
|
+
other: links
|
15
|
+
title: Links
|
16
|
+
linkser:
|
17
|
+
title: Linkser
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.files = `git ls-files`.split("\n")
|
13
13
|
|
14
14
|
# Gem dependencies
|
15
|
-
s.add_runtime_dependency('social_stream-base', '~> 2.
|
15
|
+
s.add_runtime_dependency('social_stream-base', '~> 2.2.0')
|
16
16
|
s.add_runtime_dependency('linkser', '~> 0.0.12')
|
17
17
|
# Development Gem dependencies
|
18
18
|
s.add_development_dependency('sqlite3-ruby')
|
data/oauth2_server/Rakefile
CHANGED
@@ -3,12 +3,7 @@ require 'bundler/gem_tasks'
|
|
3
3
|
|
4
4
|
require 'rdoc/task'
|
5
5
|
|
6
|
-
|
7
|
-
require 'rspec/core/rake_task'
|
8
|
-
|
9
|
-
RSpec::Core::RakeTask.new(:spec)
|
10
|
-
|
11
|
-
task :default => :spec
|
6
|
+
task :default => :rdoc
|
12
7
|
|
13
8
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
14
9
|
rdoc.rdoc_dir = 'rdoc'
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,4 +1,5 @@
|
|
1
1
|
//= require social_stream/callback
|
2
|
+
//= require social_stream/flash
|
2
3
|
|
3
4
|
SocialStream.SiteClient = (function(SS, $, undefined) {
|
4
5
|
var callback = new SS.Callback();
|
@@ -7,8 +8,34 @@ SocialStream.SiteClient = (function(SS, $, undefined) {
|
|
7
8
|
$('.new_site_client-modal-link').attr('href', '#new_site_client-modal');
|
8
9
|
};
|
9
10
|
|
11
|
+
var initRefreshButton = function() {
|
12
|
+
$('form.site-client-secret').submit(sendSecretRefresh);
|
13
|
+
};
|
14
|
+
|
15
|
+
var sendSecretRefresh = function(e) {
|
16
|
+
var form = $(e.target);
|
17
|
+
|
18
|
+
e.preventDefault();
|
19
|
+
|
20
|
+
$.ajax({
|
21
|
+
url: form.attr('action'),
|
22
|
+
method: form.attr('method'),
|
23
|
+
dataType: 'json',
|
24
|
+
success: function(data) {
|
25
|
+
SS.Flash.success(I18n.t('site.client.oauth.secret.refreshed'));
|
26
|
+
|
27
|
+
$('span.site-client-secret').html(data.secret).effect('highlight', {}, 3000);
|
28
|
+
},
|
29
|
+
error: function(jqXHR, textStatus) {
|
30
|
+
SS.Flash.error(textStatus);
|
31
|
+
}
|
32
|
+
});
|
33
|
+
};
|
34
|
+
|
10
35
|
callback.register('index', initNewModal);
|
11
36
|
|
37
|
+
callback.register('show', initRefreshButton);
|
38
|
+
|
12
39
|
return callback.extend({
|
13
40
|
});
|
14
41
|
|
@@ -37,12 +37,14 @@
|
|
37
37
|
padding: 0 2.5%
|
38
38
|
margin-bottom: 30px
|
39
39
|
display: inline-block
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
header
|
41
|
+
margin-top: -37px
|
42
|
+
h4
|
43
|
+
@include clearfix
|
44
|
+
margin-bottom: 4px
|
45
|
+
margin-left: -2.5%
|
46
|
+
a
|
47
|
+
font-size: 13px
|
46
48
|
.soften
|
47
49
|
margin-bottom: 0px
|
48
50
|
.content
|
@@ -1,60 +1,36 @@
|
|
1
1
|
class Site::ClientsController < ApplicationController
|
2
|
-
|
2
|
+
include SocialStream::Controllers::Subjects
|
3
|
+
include SocialStream::Controllers::Authorship
|
3
4
|
|
4
|
-
before_filter :
|
5
|
+
before_filter :authenticate_user!
|
5
6
|
|
6
7
|
load_and_authorize_resource
|
7
8
|
|
8
|
-
def index
|
9
|
-
@clients = current_subject.managed_site_clients
|
10
|
-
end
|
11
|
-
|
12
9
|
def create
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
redirect_to edit_site_client_path(@client, step: 2)
|
19
|
-
}
|
20
|
-
end
|
21
|
-
else
|
22
|
-
respond_to do |format|
|
23
|
-
format.html { render :new }
|
24
|
-
end
|
10
|
+
create! do |success, error|
|
11
|
+
success.html {
|
12
|
+
redirect_to polymorphic_path(resource, action: :edit, step: 2)
|
13
|
+
}
|
14
|
+
error.html { render :new }
|
25
15
|
end
|
26
16
|
end
|
27
17
|
|
28
|
-
|
29
|
-
|
30
|
-
|
18
|
+
# Refresh the site client token
|
19
|
+
def update_secret
|
20
|
+
resource.refresh_secret!
|
31
21
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
if @client.update_attributes params[:client]
|
36
|
-
respond_to do |format|
|
37
|
-
format.html { redirect_to @client }
|
38
|
-
end
|
39
|
-
else
|
40
|
-
respond_to do |format|
|
41
|
-
format.html { render :edit }
|
42
|
-
end
|
22
|
+
respond_to do |format|
|
23
|
+
format.json { render json: { secret: resource.secret } }
|
43
24
|
end
|
44
25
|
end
|
45
26
|
|
46
27
|
def destroy
|
47
|
-
|
48
|
-
|
49
|
-
redirect_to home_path
|
28
|
+
destroy! { :home }
|
50
29
|
end
|
51
30
|
|
52
|
-
|
31
|
+
protected
|
53
32
|
|
54
|
-
def
|
55
|
-
|
56
|
-
params[:site_client][:author_id] = current_subject.actor_id
|
57
|
-
params[:site_client][:user_author_id] = current_user.actor_id
|
58
|
-
params[:site_client][:owner_id] = current_subject.actor_id
|
33
|
+
def collection
|
34
|
+
current_subject.managed_site_clients
|
59
35
|
end
|
60
36
|
end
|