social_stream-base 2.0.4 → 2.1.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/README.rdoc +2 -0
- data/app/assets/javascripts/social_stream/relation_customs.js +8 -3
- data/app/assets/javascripts/social_stream/timeline.js +1 -2
- data/app/assets/javascripts/social_stream/wall.js +11 -0
- data/app/assets/stylesheets/social_stream/base/contacts/_contacts.css.sass +1 -0
- data/app/assets/stylesheets/social_stream/base/contacts/layouts/_contacts.css.sass +1 -42
- data/app/assets/stylesheets/social_stream/base/footer/layout/_footer.css.sass +3 -2
- data/app/assets/stylesheets/social_stream/base/layouts/_layout.css.sass +4 -1
- data/app/assets/stylesheets/social_stream/base/mixins/_layout.css.sass +48 -0
- data/app/assets/stylesheets/social_stream/base/profile/_profile.css.sass +21 -25
- data/app/assets/stylesheets/social_stream/base/sidebar/_sidebar.css.sass +1 -27
- data/app/assets/stylesheets/social_stream/base/sidebar/layout/_sidebar.css.sass +1 -24
- data/app/assets/stylesheets/social_stream/base/toolbar/_toolbar.css.sass +2 -11
- data/app/assets/stylesheets/social_stream/base/toolbar/layout/_toolbar.css.sass +18 -5
- data/app/controllers/contacts_controller.rb +17 -22
- data/app/controllers/permissions_controller.rb +3 -1
- data/app/helpers/contacts_helper.rb +9 -14
- data/app/models/actor.rb +28 -2
- data/app/models/contact.rb +18 -1
- data/app/models/permission.rb +21 -1
- data/app/models/relation.rb +14 -15
- data/app/models/relation/custom.rb +27 -24
- data/app/views/activities/_new.html.erb +1 -1
- data/app/views/contacts/{_link_custom.html.erb → _button.html.erb} +0 -0
- data/app/views/contacts/_contact.html.erb +1 -1
- data/app/views/contacts/index.html.erb +1 -1
- data/app/views/devise/passwords/new.html.erb +6 -8
- data/app/views/devise/registrations/new.html.erb +5 -7
- data/app/views/layouts/application.html.erb +7 -8
- data/app/views/permissions/_index.html.erb +12 -12
- data/app/views/permissions/_list.html.erb +10 -0
- data/app/views/permissions/index.js.erb +1 -15
- data/app/views/posts/create.js.erb +5 -4
- data/app/views/profiles/_personal.html.erb +2 -2
- data/app/views/relation/customs/_custom.html.erb +2 -27
- data/app/views/relation/customs/_form.html.erb +1 -1
- data/app/views/relation/customs/_index.html.erb +1 -1
- data/app/views/relation/customs/_list.html.erb +5 -4
- data/app/views/relation/customs/index.html.erb +1 -1
- data/app/views/relations/_relation.html.erb +33 -0
- data/config/locales/en.yml +10 -5
- data/config/locales/es.yml +20 -40
- data/config/locales/pt.yml +5 -1
- data/config/locales/zh.yml +17 -9
- data/lib/generators/social_stream/base/install_generator.rb +0 -4
- data/lib/generators/social_stream/base/templates/initializer.rb +24 -0
- data/lib/social_stream/base.rb +70 -0
- data/lib/social_stream/base/ability.rb +13 -1
- data/lib/social_stream/base/version.rb +1 -1
- data/lib/social_stream/test_helpers/controllers.rb +12 -6
- data/social_stream-base.gemspec +1 -1
- data/spec/controllers/permissions_controller_spec.rb +2 -6
- metadata +7 -7
- data/app/helpers/permissions_helper.rb +0 -21
- data/lib/generators/social_stream/base/templates/relations.yml +0 -39
@@ -0,0 +1,10 @@
|
|
1
|
+
<ul>
|
2
|
+
<% relation.available_permissions.each do |p| %>
|
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 }" %>
|
5
|
+
<%= label_tag "checkbox_relation_#{ relation.id }_permission_#{ p.id }",
|
6
|
+
p.title(subject: current_subject),
|
7
|
+
title: p.description(subject: current_subject, state: (relation.permission_ids.include?(p.id) ? 'positive' : 'negative'), relation: relation.name) %>
|
8
|
+
</li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
@@ -1,15 +1 @@
|
|
1
|
-
$('#permissions').html("<%= escape_javascript render(:
|
2
|
-
|
3
|
-
<% default_permissions.each do |p| %>
|
4
|
-
<% if @relation.permission_ids.include? p.id %>
|
5
|
-
$('#<%= dom_id p %>').attr('checked', 'checked');
|
6
|
-
<% else %>
|
7
|
-
$('label[for="relation_custom_permission_ids_' + <%= p.id %> + '"]').parent().hide();
|
8
|
-
<% end %>
|
9
|
-
<% end %>
|
10
|
-
|
11
|
-
$('#permissions_list input.permission').change(function(){
|
12
|
-
selectPermission(this);
|
13
|
-
});
|
14
|
-
|
15
|
-
$('#permissions').show();
|
1
|
+
$('#permissions').html("<%= escape_javascript render(partial: 'index') %>");
|
@@ -1,9 +1,10 @@
|
|
1
1
|
<% if @post.valid? %>
|
2
2
|
//Display the new post
|
3
|
-
$(".timeline").prepend("<%= escape_javascript(
|
3
|
+
$(".timeline").prepend("<%= escape_javascript render(@post.post_activity) %>");
|
4
4
|
|
5
|
-
SocialStream.Timeline.
|
5
|
+
SocialStream.Timeline.update("<%= escape_javascript dom_id(@post.post_activity) %>");
|
6
|
+
SocialStream.Wall.new_();
|
6
7
|
<% else %>
|
7
|
-
SocialStream.
|
8
|
-
|
8
|
+
SocialStream.Flash.error('<%= j @post.errors.full_messages.to_sentence %>');
|
9
|
+
SocialStream.Wall.new_();
|
9
10
|
<% end %>
|
@@ -71,7 +71,7 @@
|
|
71
71
|
<%= form_for(@profile, :url => [current_subject, :profile]) do |f| %>
|
72
72
|
<h6>
|
73
73
|
<span class="required">*</span>
|
74
|
-
<%= f.label t('
|
74
|
+
<%= f.label t('actor.name') %>
|
75
75
|
</h6>
|
76
76
|
|
77
77
|
<%= f.text_field :name, :class => "required" %>
|
@@ -105,7 +105,7 @@
|
|
105
105
|
<p>
|
106
106
|
<%= t('required') %>
|
107
107
|
</p>
|
108
|
-
<%= f.submit
|
108
|
+
<%= f.submit %>
|
109
109
|
<% end %>
|
110
110
|
<% end %>
|
111
111
|
</div>
|
@@ -1,27 +1,2 @@
|
|
1
|
-
<%=
|
2
|
-
|
3
|
-
custom.id,
|
4
|
-
false,
|
5
|
-
:id => "input_#{ dom_id custom }" %>
|
6
|
-
<%= label_tag "input_#{ dom_id custom }", custom.name %>
|
7
|
-
|
8
|
-
<div class="actions">
|
9
|
-
<%= link_to '#', class: "edit" do %>
|
10
|
-
<i class="icon_tool16-edit"></i>
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
<%= link_to custom, class: "delete", method: :delete, confirm: t('relation_custom.confirm_delete'), remote: true do %>
|
14
|
-
<i class="icon_tool16-trash"></i>
|
15
|
-
<% end %>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<div class="edit_name">
|
19
|
-
<%= form_for custom, url: polymorphic_path(custom, section: 'name'), :remote => true do |f| %>
|
20
|
-
<%= f.text_field :name %>
|
21
|
-
|
22
|
-
<%= link_to '#', class: "submit" do %>
|
23
|
-
<i class="icon_tool16-ok"></i>
|
24
|
-
<% end %>
|
25
|
-
<% end %>
|
26
|
-
</div>
|
27
|
-
<% end %>
|
1
|
+
<%= render partial: 'relations/relation',
|
2
|
+
object: custom %>
|
@@ -3,12 +3,13 @@
|
|
3
3
|
<%= t 'relation_custom.list.title' %>
|
4
4
|
</h4>
|
5
5
|
|
6
|
-
<%= render partial: 'relation
|
7
|
-
collection:
|
6
|
+
<%= render partial: 'relations/relation',
|
7
|
+
collection: subject.relations_list %>
|
8
8
|
|
9
9
|
<div id="new_relation">
|
10
|
-
<%= link_to t('relation_custom.new'), '
|
10
|
+
<%= link_to t('relation_custom.new'), 'javascript:void(0);', class: 'new' %>
|
11
11
|
|
12
|
-
<%= render :
|
12
|
+
<%= render partial: 'relation/customs/form',
|
13
|
+
locals: { subject: subject }%>
|
13
14
|
</div>
|
14
15
|
</section>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%= div_for relation do %>
|
2
|
+
<%= radio_button_tag :relation,
|
3
|
+
relation.id,
|
4
|
+
false,
|
5
|
+
:id => "input_#{ dom_id relation }" %>
|
6
|
+
<%= label_tag "input_#{ dom_id relation }", relation.name %>
|
7
|
+
|
8
|
+
<div class="actions">
|
9
|
+
<% if can? :edit, relation %>
|
10
|
+
<%= link_to 'javascript:void(0);', class: "edit" do %>
|
11
|
+
<i class="icon_tool16-edit"></i>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% if can? :delete, relation %>
|
16
|
+
<%= link_to relation, class: "delete", method: :delete, confirm: t('relation_custom.confirm_delete'), remote: true do %>
|
17
|
+
<i class="icon_tool16-trash"></i>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<% if can? :edit, relation %>
|
23
|
+
<div class="edit_name">
|
24
|
+
<%= form_for relation, url: polymorphic_path(relation, section: 'name'), :remote => true do |f| %>
|
25
|
+
<%= f.text_field :name %>
|
26
|
+
|
27
|
+
<%= link_to '#', class: "submit" do %>
|
28
|
+
<i class="icon_tool16-ok"></i>
|
29
|
+
<% end %>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
data/config/locales/en.yml
CHANGED
@@ -65,6 +65,7 @@ en:
|
|
65
65
|
other: '%{count} groups'
|
66
66
|
sending: Sending
|
67
67
|
share: Share
|
68
|
+
share_loading: Sharing...
|
68
69
|
stream:
|
69
70
|
atom_title: Activity Stream from %{subject}
|
70
71
|
title:
|
@@ -175,7 +176,7 @@ en:
|
|
175
176
|
zero: Add
|
176
177
|
one: '%{count} role'
|
177
178
|
other: '%{count} roles'
|
178
|
-
link:
|
179
|
+
link: Add contact
|
179
180
|
title: Add %{name} to your contacts
|
180
181
|
menu: Add contact
|
181
182
|
submit: Add Contact
|
@@ -224,7 +225,8 @@ en:
|
|
224
225
|
passwords:
|
225
226
|
confirm: Confirm password
|
226
227
|
forgot: Forgot your password?
|
227
|
-
instructions: 'Enter your email address and we will send you instructions to
|
228
|
+
instructions: 'Enter your email address and we will send you instructions to
|
229
|
+
change it:'
|
228
230
|
update: Change your password
|
229
231
|
dropdown:
|
230
232
|
notifications: Notifications
|
@@ -266,7 +268,8 @@ en:
|
|
266
268
|
other: '%{count} followers'
|
267
269
|
forgot_password: Forgot you password?
|
268
270
|
frontpage:
|
269
|
-
main_title: Social Stream, a framework for building distributed social network
|
271
|
+
main_title: Social Stream, a framework for building distributed social network
|
272
|
+
websites.
|
270
273
|
presentation:
|
271
274
|
modular:
|
272
275
|
header: Modular
|
@@ -507,8 +510,8 @@ en:
|
|
507
510
|
nil:
|
508
511
|
positive: Activities of the contacts at %{relation} WILL APPEAR in your
|
509
512
|
home wall
|
510
|
-
negative: Activities of the contacts at %{relation} WILL APPEAR
|
511
|
-
home wall
|
513
|
+
negative: Activities of the contacts at %{relation} WILL NOT APPEAR
|
514
|
+
in your home wall
|
512
515
|
read:
|
513
516
|
activity:
|
514
517
|
positive: They WILL BE ABLE to read posts in your wall, except those
|
@@ -540,6 +543,8 @@ en:
|
|
540
543
|
title: Roles
|
541
544
|
new: + New role
|
542
545
|
title: Privacy
|
546
|
+
relation_manager:
|
547
|
+
name: Manager
|
543
548
|
relation_public:
|
544
549
|
name: Public
|
545
550
|
repository:
|
data/config/locales/es.yml
CHANGED
@@ -65,6 +65,7 @@ es:
|
|
65
65
|
other: '%{count} grupos'
|
66
66
|
sending: Enviando
|
67
67
|
share: Compartir
|
68
|
+
share_loading: Compartiendo...
|
68
69
|
stream:
|
69
70
|
atom_title: Actividades de %{subject}
|
70
71
|
title:
|
@@ -286,6 +287,8 @@ es:
|
|
286
287
|
si te encuentras con problemas. <a href="https://github.com/ging/social_stream/issues/new">Abre
|
287
288
|
un reporte</a> si encutras algún fallo. ¡Los pull request son muy bienvenidos!
|
288
289
|
stats: '%{users} personas and %{groups} grupos registrados'
|
290
|
+
main_title: Social Stream, a framework for building distributed social network
|
291
|
+
websites.
|
289
292
|
group:
|
290
293
|
one: grupo
|
291
294
|
other: grupos
|
@@ -502,8 +505,10 @@ es:
|
|
502
505
|
detailed:
|
503
506
|
create:
|
504
507
|
activity:
|
505
|
-
positive: Los contactos en %{relation} PODRÁN publicar actividades en
|
506
|
-
|
508
|
+
positive: Los contactos en %{relation} PODRÁN publicar actividades en
|
509
|
+
vuestro muro
|
510
|
+
negative: Los contactos en %{relation} NO PODRÁN publicar actividades
|
511
|
+
en vuestro muro
|
507
512
|
follow:
|
508
513
|
nil:
|
509
514
|
positive: Las actividades de los contactos en %{relation} APARECERÁN
|
@@ -512,49 +517,21 @@ es:
|
|
512
517
|
en vuestra página de inicio
|
513
518
|
read:
|
514
519
|
activity:
|
515
|
-
positive: Los contactos en %{relation} PODRÁN leer las publicaciones
|
516
|
-
salvo las que compartáis solo con otros
|
517
|
-
|
518
|
-
|
520
|
+
positive: Los contactos en %{relation} PODRÁN leer las publicaciones
|
521
|
+
que aparezcan en vuestro muro, salvo las que compartáis solo con otros
|
522
|
+
roles
|
523
|
+
negative: Los contactos en %{relation} NO PODRÁN leer las publicaciones
|
524
|
+
que aparezcan en vuestro muro, salvo las que marques como públicas
|
519
525
|
represent:
|
520
526
|
nil:
|
521
|
-
positive: Los contactos en %{relation} PODRÁN cambiar sesión para actuar
|
522
|
-
|
527
|
+
positive: Los contactos en %{relation} PODRÁN cambiar sesión para actuar
|
528
|
+
en nombre de %{name}
|
529
|
+
negative: Los contactos en %{relation} NO PODRÁN cambiar sesión para
|
530
|
+
actuar en nombre de %{name}
|
523
531
|
notify:
|
524
532
|
nil:
|
525
533
|
positive: Las actividades SE NOTIFICARÁN a los contactos en %{relation}
|
526
534
|
negative: Las actividades NO SE NOTIFICARÁN a los contactos en %{relation}
|
527
|
-
user:
|
528
|
-
brief:
|
529
|
-
create:
|
530
|
-
activity: Publicar en tu muro
|
531
|
-
read:
|
532
|
-
activity: Leer tu muro
|
533
|
-
represent:
|
534
|
-
nil: Administrarte
|
535
|
-
notify:
|
536
|
-
nil: Notificarles
|
537
|
-
detailed:
|
538
|
-
create:
|
539
|
-
activity:
|
540
|
-
positive: Los contactos en %{relation} PODRÁN publicar actividades en tu muro
|
541
|
-
negative: Los contactos en %{relation} NO PODRÁN publicar actividades en tu muro
|
542
|
-
follow:
|
543
|
-
nil:
|
544
|
-
positive: Las actividades de los contactos en %{relation} APARECERÁN
|
545
|
-
en tu página de inicio
|
546
|
-
negative: Las actividades de los contactos en %{relation} NO APARECERÁN
|
547
|
-
en tu página de inicio
|
548
|
-
read:
|
549
|
-
activity:
|
550
|
-
positive: Los contactos en %{relation} PODRÁN leer las publicaciones que aparezcan en tu muro,
|
551
|
-
salvo las que compartáis solo con otros roles
|
552
|
-
negative: Los contactos en %{relation} NO PODRÁN leer las publicaciones que aparezcan en tu
|
553
|
-
muro, salvo las que marques como públicas
|
554
|
-
represent:
|
555
|
-
nil:
|
556
|
-
positive: Los contactos en %{relation} PODRÁN cambiar sesión para actuar en tu nombre
|
557
|
-
negative: Los contactos en %{relation} NO PODRÁN cambiar sesión para actuar en tu nombre
|
558
535
|
of_relation:
|
559
536
|
choose: Permisos para <strong>%{name}</strong>
|
560
537
|
postit: Gestiona los permisos de tus contactos y crea nuevos roles
|
@@ -572,6 +549,8 @@ es:
|
|
572
549
|
title: Roles
|
573
550
|
new: + Nuevo rol
|
574
551
|
title: Privacidad
|
552
|
+
relation_manager:
|
553
|
+
name: Admin
|
575
554
|
relation_public:
|
576
555
|
name: Público
|
577
556
|
repository:
|
@@ -643,7 +622,8 @@ es:
|
|
643
622
|
sign_up: Registrarse
|
644
623
|
site:
|
645
624
|
current:
|
646
|
-
description: Un marco para construir para construir webs con características
|
625
|
+
description: Un marco para construir para construir webs con características
|
626
|
+
de red social distribuída
|
647
627
|
keywords: social stream,social software,framework,ruby on rails
|
648
628
|
title: Social Stream
|
649
629
|
name: Social Stream
|
data/config/locales/pt.yml
CHANGED
@@ -103,6 +103,7 @@ pt:
|
|
103
103
|
make-friend: '%{author} also added %{activity_object} as contact'
|
104
104
|
post: '%{author} posted %{activity_object}'
|
105
105
|
updated: '%{author} posted %{activity_object}'
|
106
|
+
share_loading: Sharing...
|
106
107
|
browse: Browse
|
107
108
|
button:
|
108
109
|
cancel: Cancelar
|
@@ -237,6 +238,8 @@ pt:
|
|
237
238
|
Stream's Google group</a> or <a href="http://stackoverflow.com/questions/tagged/social-stream">StackOverflow</a>
|
238
239
|
if you have problems. <a href="https://github.com/ging/social_stream/issues/new">Open
|
239
240
|
an issue</a> if you find a defect. Pull request are very welcomed!
|
241
|
+
main_title: Social Stream, a framework for building distributed social network
|
242
|
+
websites.
|
240
243
|
group:
|
241
244
|
one: Grupo
|
242
245
|
other: Grupos
|
@@ -634,4 +637,5 @@ pt:
|
|
634
637
|
keywords: social stream,social software,framework,ruby on rails
|
635
638
|
title: Social Stream
|
636
639
|
name: Social Stream
|
637
|
-
|
640
|
+
relation_manager:
|
641
|
+
name: Manager
|
data/config/locales/zh.yml
CHANGED
@@ -57,8 +57,8 @@ zh:
|
|
57
57
|
group: 所有成员All members
|
58
58
|
user: 您的联系人Your contacts
|
59
59
|
outside:
|
60
|
-
group: 来自%{receiver}的成员Members of
|
61
|
-
user: 来自%{receiver}的联系人Contacts of
|
60
|
+
group: 来自%{receiver}的成员Members of
|
61
|
+
user: 来自%{receiver}的联系人Contacts of
|
62
62
|
relation:
|
63
63
|
one: '%{count} 小组group'
|
64
64
|
other: '%{count} 多个小组groups'
|
@@ -102,6 +102,7 @@ zh:
|
|
102
102
|
join:
|
103
103
|
one: '%{sender} 加入了joined the %{title} %{thing}.'
|
104
104
|
share: 分享Share
|
105
|
+
share_loading: Sharing...
|
105
106
|
activity_action:
|
106
107
|
follow: 关注
|
107
108
|
sentence:
|
@@ -229,19 +230,23 @@ zh:
|
|
229
230
|
presentation:
|
230
231
|
modular:
|
231
232
|
header: 模块Modular
|
232
|
-
p: 可用的Available <a href="https://github.com/ging/social_stream#social-stream-components">Social
|
233
|
-
Stream components</a> 只为您提供您社交网络所需要的功能。只需添加您喜欢的Gems到您的Gemfile.provide
|
234
|
-
|
233
|
+
p: 可用的Available <a href="https://github.com/ging/social_stream#social-stream-components">Social
|
234
|
+
Stream配件Social Stream components</a> 只为您提供您社交网络所需要的功能。只需添加您喜欢的Gems到您的Gemfile.provide
|
235
|
+
your application only with the features you need in your social network.
|
236
|
+
Just add your desired gems to your Gemfile
|
235
237
|
flexible:
|
236
238
|
header: 灵活灵便Flexible
|
237
|
-
p: 完全地个性化定制您的社交网络Completely customize your social network <a href="https://github.com/ging/social_stream/wiki/How-to-change-controllers%2C-models%2C-views%2C-assets-and-locales">更改任何一个Scial
|
238
|
-
any Social Stream component</a>, <a href="https://github.com/ging/social_stream/wiki/How-to-add-new-activity-objects">添加新的活动对象adding
|
239
|
+
p: 完全地个性化定制您的社交网络Completely customize your social network <a href="https://github.com/ging/social_stream/wiki/How-to-change-controllers%2C-models%2C-views%2C-assets-and-locales">更改任何一个Scial
|
240
|
+
Stream组建changing any Social Stream component</a>, <a href="https://github.com/ging/social_stream/wiki/How-to-add-new-activity-objects">添加新的活动对象adding
|
239
241
|
new activity objects</a> 或者使用CSS更改Sass.or changing the CSS using <a href="http://sass-lang.com/">Sass</a>
|
240
242
|
community:
|
241
243
|
header: 社区Community
|
242
244
|
p: Social Stream的开发者社区正在茁壮成长。如果您有什么问题,可以在<a href="http://groups.google.com/group/social-stream">Social
|
243
245
|
Stream's Google group</a> 或者 <a href="http://stackoverflow.com/questions/tagged/social-stream">StackOverflow</a>给我们留言。
|
244
|
-
如果您发现有缺陷<a href="https://github.com/ging/social_stream/issues/new">提交一个问题</a>.
|
246
|
+
如果您发现有缺陷<a href="https://github.com/ging/social_stream/issues/new">提交一个问题</a>.
|
247
|
+
随时欢迎各种请求Pull request are very welcomed!
|
248
|
+
main_title: Social Stream, a framework for building distributed social network
|
249
|
+
websites.
|
245
250
|
group:
|
246
251
|
one: 群组
|
247
252
|
other: 群组
|
@@ -468,7 +473,8 @@ zh:
|
|
468
473
|
negative: 活动将不会通知 %{name} 的联系
|
469
474
|
of_relation:
|
470
475
|
choose: 2. <strong>%{name}</strong>圈內的权限
|
471
|
-
postit: 管理您联系人的权限和创建新的关系Manage the permissions of your contacts and create new
|
476
|
+
postit: 管理您联系人的权限和创建新的关系Manage the permissions of your contacts and create new
|
477
|
+
roles
|
472
478
|
privacy:
|
473
479
|
intro: '拥有 <strong>%{relation}</strong>级别的联系只容许作出以下行为:'
|
474
480
|
rule:
|
@@ -623,3 +629,5 @@ zh:
|
|
623
629
|
by: 排序Order by
|
624
630
|
last_modified: 最近更新Last modified
|
625
631
|
most_popular: 最流行Most popular
|
632
|
+
relation_manager:
|
633
|
+
name: Manager
|
@@ -23,10 +23,6 @@ class SocialStream::Base::InstallGenerator < Rails::Generators::Base #:nodoc:
|
|
23
23
|
copy_file 'initializer.rb', 'config/initializers/social_stream.rb'
|
24
24
|
end
|
25
25
|
|
26
|
-
def create_config_relations_file
|
27
|
-
copy_file 'relations.yml', 'config/relations.yml'
|
28
|
-
end
|
29
|
-
|
30
26
|
def create_config_sphinx_file
|
31
27
|
copy_file 'sphinx.yml', 'config/sphinx.yml'
|
32
28
|
end
|
@@ -20,6 +20,30 @@ SocialStream.setup do |config|
|
|
20
20
|
#
|
21
21
|
# config.relation_model = :custom
|
22
22
|
|
23
|
+
# Config the default relations that will be created and customized by actors
|
24
|
+
# config.custom_relations = {
|
25
|
+
# user: {
|
26
|
+
# friend: {
|
27
|
+
# name: "friend",
|
28
|
+
# permissions: [
|
29
|
+
# [ 'follow' ],
|
30
|
+
# [ 'create', 'activity' ],
|
31
|
+
# [ 'read', 'activity' ]
|
32
|
+
# ]
|
33
|
+
# },
|
34
|
+
# group: {
|
35
|
+
# member: {
|
36
|
+
# name: "member",
|
37
|
+
# permissions: [
|
38
|
+
# [ 'represent' ],
|
39
|
+
# [ 'create', 'activity' ],
|
40
|
+
# [ 'read', 'activity' ],
|
41
|
+
# [ 'read', 'tie' ]
|
42
|
+
# ]
|
43
|
+
# },
|
44
|
+
# 'site/current' => {}
|
45
|
+
# }
|
46
|
+
|
23
47
|
# Configure the type of actors that are suggested in the sidebar
|
24
48
|
#
|
25
49
|
# config.suggested_models = [ :user, :group ]
|