decidim-comments 0.15.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/decidim/comments/bundle.js +9 -9
- data/app/assets/javascripts/decidim/comments/bundle.js.map +1 -1
- data/app/cells/decidim/comments/comment_activity_cell.rb +1 -1
- data/app/events/decidim/comments/comment_by_followed_user_event.rb +4 -0
- data/app/events/decidim/comments/comment_created_event.rb +4 -0
- data/app/events/decidim/comments/reply_created_event.rb +4 -0
- data/app/events/decidim/comments/user_mentioned_event.rb +4 -0
- data/app/frontend/support/schema.ts +25 -25
- data/app/queries/decidim/comments/metrics/comment_participants_metric_measure.rb +48 -0
- data/app/queries/decidim/comments/metrics/comments_metric_manage.rb +1 -1
- data/app/services/decidim/comments/new_comment_notification_creator.rb +24 -22
- data/config/locales/ca.yml +1 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/es-PY.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/eu.yml +1 -0
- data/config/locales/fi-pl.yml +1 -0
- data/config/locales/fi.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/gl.yml +1 -0
- data/config/locales/hu.yml +1 -0
- data/config/locales/it.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/pl.yml +1 -0
- data/config/locales/pt-BR.yml +1 -0
- data/config/locales/pt.yml +1 -0
- data/config/locales/sv.yml +1 -0
- data/lib/decidim/comments/api/comment_type.rb +7 -2
- data/lib/decidim/comments/engine.rb +14 -6
- data/lib/decidim/comments/version.rb +1 -1
- metadata +10 -9
data/config/locales/ca.yml
CHANGED
@@ -91,6 +91,7 @@ ca:
|
|
91
91
|
notification_title: Has estat esmentat a <a href="%{resource_path}">%{resource_title}</a> per <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Nombre de comentaris generats pels usuaris
|
94
95
|
object: comentaris
|
95
96
|
title: Comentaris
|
96
97
|
errors:
|
data/config/locales/de.yml
CHANGED
@@ -91,6 +91,7 @@ de:
|
|
91
91
|
notification_title: Sie wurden in <a href="%{resource_path}">%{resource_title}</a> von <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Anzahl der von Benutzern generierten Kommentare
|
94
95
|
object: Bemerkungen
|
95
96
|
title: Bemerkungen
|
96
97
|
errors:
|
data/config/locales/en.yml
CHANGED
@@ -91,6 +91,7 @@ en:
|
|
91
91
|
notification_title: You have been mentioned in <a href="%{resource_path}">%{resource_title}</a> by <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Number of Comments generated by users
|
94
95
|
object: comments
|
95
96
|
title: Comments
|
96
97
|
errors:
|
data/config/locales/es-PY.yml
CHANGED
@@ -91,6 +91,7 @@ es-PY:
|
|
91
91
|
notification_title: Has sido mencionado en <a href="%{resource_path}">%{resource_title}</a> por <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Número de comentarios generados por los usuarios.
|
94
95
|
object: comentarios
|
95
96
|
title: Comentarios
|
96
97
|
errors:
|
data/config/locales/es.yml
CHANGED
@@ -91,6 +91,7 @@ es:
|
|
91
91
|
notification_title: Has sido mencionado en <a href="%{resource_path}">%{resource_title}</a> por <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Número de comentarios generados por los usuarios
|
94
95
|
object: comentarios
|
95
96
|
title: Comentarios
|
96
97
|
errors:
|
data/config/locales/eu.yml
CHANGED
@@ -91,6 +91,7 @@ eu:
|
|
91
91
|
notification_title: <a href="%{resource_path}">%{resource_title}</a> <a href="%{author_path}">%{author_name} %{author_nickname}</a> bidez aipatu zaituzte.
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Erabiltzaileek sortutako iruzkin kopurua
|
94
95
|
object: iruzkinak
|
95
96
|
title: Oharrak
|
96
97
|
errors:
|
data/config/locales/fi-pl.yml
CHANGED
@@ -91,6 +91,7 @@ fi-pl:
|
|
91
91
|
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> on maininnut sinut kohdassa <a href="%{resource_path}">%{resource_title}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Käyttäjien kirjoittamien kommenttien määrä
|
94
95
|
object: kommentit
|
95
96
|
title: Kommentit
|
96
97
|
errors:
|
data/config/locales/fi.yml
CHANGED
@@ -91,6 +91,7 @@ fi:
|
|
91
91
|
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> on maininnut sinut kohdassa <a href="%{resource_path}">%{resource_title}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Käyttäjien kirjoittamien kommenttien määrä
|
94
95
|
object: kommentit
|
95
96
|
title: Kommentit
|
96
97
|
errors:
|
data/config/locales/fr.yml
CHANGED
@@ -91,6 +91,7 @@ fr:
|
|
91
91
|
notification_title: Vous avez été mentionné dans <a href="%{resource_path}">%{resource_title}</a> par <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Nombre de commentaires générés par les utilisateurs
|
94
95
|
object: commentaires
|
95
96
|
title: commentaires
|
96
97
|
errors:
|
data/config/locales/gl.yml
CHANGED
@@ -91,6 +91,7 @@ gl:
|
|
91
91
|
notification_title: Foi mencionado en <a href="%{resource_path}">%{resource_title}</a> por <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Número de comentarios xerados polos usuarios
|
94
95
|
object: comentarios
|
95
96
|
title: Comentarios
|
96
97
|
errors:
|
data/config/locales/hu.yml
CHANGED
@@ -91,6 +91,7 @@ hu:
|
|
91
91
|
notification_title: '<a href="%{author_path}">%{author_name} %{author_nickname}</a> megemlített itt: <a href="%{resource_path}">%{resource_title}</a>'
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: A felhasználók által generált megjegyzések száma
|
94
95
|
object: Hozzászólások
|
95
96
|
title: Hozzászólások
|
96
97
|
errors:
|
data/config/locales/it.yml
CHANGED
@@ -91,6 +91,7 @@ it:
|
|
91
91
|
notification_title: Sei stato citato in <a href="%{resource_path}">%{resource_title}</a> di <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Numero di commenti generati dagli utenti
|
94
95
|
object: Commenti
|
95
96
|
title: Commenti
|
96
97
|
errors:
|
data/config/locales/nl.yml
CHANGED
@@ -91,6 +91,7 @@ nl:
|
|
91
91
|
notification_title: Je bent getagd in <a href="%{resource_path}">%{resource_title}</a> door <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Aantal opmerkingen gegenereerd door gebruikers
|
94
95
|
object: opmerkingen
|
95
96
|
title: Comments
|
96
97
|
errors:
|
data/config/locales/pl.yml
CHANGED
@@ -95,6 +95,7 @@ pl:
|
|
95
95
|
notification_title: Wspomniałeś w <a href="%{resource_path}">%{resource_title}</a> przez <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
96
96
|
metrics:
|
97
97
|
comments:
|
98
|
+
description: Liczba komentarzy wygenerowanych przez użytkowników
|
98
99
|
object: komentarze
|
99
100
|
title: Komentarze
|
100
101
|
errors:
|
data/config/locales/pt-BR.yml
CHANGED
@@ -91,6 +91,7 @@ pt-BR:
|
|
91
91
|
notification_title: Você foi mencionado em <a href="%{resource_path}">%{resource_title}</a> por <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Número de comentários gerados pelos usuários
|
94
95
|
object: comentários
|
95
96
|
title: Comentários
|
96
97
|
errors:
|
data/config/locales/pt.yml
CHANGED
@@ -91,6 +91,7 @@ pt:
|
|
91
91
|
notification_title: Você foi mencionado em <a href="%{resource_path}">%{resource_title}</a> por <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Número de comentários gerados pelos usuários
|
94
95
|
object: comentários
|
95
96
|
title: Comentários
|
96
97
|
errors:
|
data/config/locales/sv.yml
CHANGED
@@ -91,6 +91,7 @@ sv:
|
|
91
91
|
notification_title: Du har nämnts i <a href="%{resource_path}">%{resource_title}</a> av <a href="%{author_path}">%{author_name} %{author_nickname}</a>
|
92
92
|
metrics:
|
93
93
|
comments:
|
94
|
+
description: Antal kommentarer som genereras av användare
|
94
95
|
object: kommentarer
|
95
96
|
title: Kommentarer
|
96
97
|
errors:
|
@@ -8,10 +8,15 @@ module Decidim
|
|
8
8
|
description "A comment"
|
9
9
|
|
10
10
|
interfaces [
|
11
|
-
-> { Decidim::Comments::CommentableInterface }
|
12
|
-
-> { Decidim::Core::AuthorableInterface }
|
11
|
+
-> { Decidim::Comments::CommentableInterface }
|
13
12
|
]
|
14
13
|
|
14
|
+
field :author, !Decidim::Core::AuthorInterface, "The resource author" do
|
15
|
+
resolve lambda { |obj, _args, _ctx|
|
16
|
+
obj.author
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
15
20
|
field :id, !types.ID, "The Comment's unique ID"
|
16
21
|
|
17
22
|
field :sgid, !types.String, "The Comment's signed global id" do
|
@@ -44,12 +44,20 @@ module Decidim
|
|
44
44
|
end
|
45
45
|
|
46
46
|
initializer "decidim_comments.register_metrics" do
|
47
|
-
Decidim.metrics_registry.register(
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
Decidim.metrics_registry.register(:comments) do |metric_registry|
|
48
|
+
metric_registry.manager_class = "Decidim::Comments::Metrics::CommentsMetricManage"
|
49
|
+
|
50
|
+
metric_registry.settings do |settings|
|
51
|
+
settings.attribute :highlighted, type: :boolean, default: false
|
52
|
+
settings.attribute :scopes, type: :array, default: %w(home participatory_process)
|
53
|
+
settings.attribute :weight, type: :integer, default: 6
|
54
|
+
settings.attribute :stat_block, type: :string, default: "small"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
Decidim.metrics_operation.register(:participants, :comments) do |metric_operation|
|
59
|
+
metric_operation.manager_class = "Decidim::Comments::Metrics::CommentParticipantsMetricMeasure"
|
60
|
+
end
|
53
61
|
end
|
54
62
|
end
|
55
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-01-
|
13
|
+
date: 2019-01-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.16.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.16.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: jquery-rails
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,28 +46,28 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.16.0
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.16.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-dev
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.16.0
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.16.0
|
71
71
|
description: Pluggable comments system for some components.
|
72
72
|
email:
|
73
73
|
- josepjaume@gmail.com
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- app/models/decidim/comments/comment.rb
|
139
139
|
- app/models/decidim/comments/comment_vote.rb
|
140
140
|
- app/models/decidim/comments/seed.rb
|
141
|
+
- app/queries/decidim/comments/metrics/comment_participants_metric_measure.rb
|
141
142
|
- app/queries/decidim/comments/metrics/comments_metric_manage.rb
|
142
143
|
- app/queries/decidim/comments/sorted_comments.rb
|
143
144
|
- app/resolvers/decidim/comments/vote_comment_resolver.rb
|
@@ -217,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
218
|
version: '0'
|
218
219
|
requirements: []
|
219
220
|
rubyforge_project:
|
220
|
-
rubygems_version: 2.7.
|
221
|
+
rubygems_version: 2.7.6
|
221
222
|
signing_key:
|
222
223
|
specification_version: 4
|
223
224
|
summary: Decidim comments module
|