decidim-blogs 0.19.0 → 0.22.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/images/decidim/blogs/icon.svg +1 -3
- data/app/cells/decidim/blogs/post_m/footer.erb +1 -1
- data/app/cells/decidim/blogs/post_m_cell.rb +6 -0
- data/app/helpers/decidim/blogs/application_helper.rb +2 -0
- data/app/models/decidim/blogs/post.rb +14 -0
- data/app/types/decidim/blogs/blogs_type.rb +30 -0
- data/app/types/decidim/blogs/post_input_filter.rb +29 -0
- data/app/types/decidim/blogs/post_input_sort.rb +15 -0
- data/app/types/decidim/blogs/post_type.rb +24 -0
- data/app/views/decidim/blogs/posts/_posts.html.erb +4 -4
- data/app/views/decidim/blogs/posts/_sidebar_blog.html.erb +1 -1
- data/app/views/decidim/blogs/posts/show.html.erb +34 -9
- data/config/locales/bg-BG.yml +13 -0
- data/config/locales/ca.yml +4 -0
- data/config/locales/cs.yml +16 -12
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/de.yml +4 -0
- data/config/locales/el-GR.yml +1 -0
- data/config/locales/el.yml +83 -0
- data/config/locales/en.yml +4 -0
- data/config/locales/es-MX.yml +4 -0
- data/config/locales/es-PY.yml +4 -0
- data/config/locales/es.yml +4 -0
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/fi-plain.yml +4 -0
- data/config/locales/fi.yml +8 -4
- data/config/locales/fr-CA.yml +83 -0
- data/config/locales/fr.yml +4 -0
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hu.yml +4 -0
- data/config/locales/is-IS.yml +56 -0
- data/config/locales/it.yml +4 -0
- data/config/locales/ja-JP.yml +82 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lv-LV.yml +84 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/nl.yml +4 -0
- data/config/locales/no.yml +78 -0
- data/config/locales/pl.yml +32 -28
- data/config/locales/pt-BR.yml +1 -1
- data/config/locales/pt.yml +28 -24
- data/config/locales/ro-RO.yml +84 -0
- data/config/locales/ru.yml +2 -0
- data/config/locales/sk-SK.yml +85 -0
- data/config/locales/sk.yml +85 -0
- data/config/locales/sl.yml +5 -0
- data/config/locales/sr-CS.yml +13 -0
- data/config/locales/sv.yml +4 -0
- data/db/migrate/20191212162606_add_user_group_author_to_blogs.rb +7 -0
- data/db/migrate/20200128094730_add_endorsements_counter_cache_to_blogs.rb +7 -0
- data/db/migrate/20200320105910_index_foreign_keys_in_decidim_blogs_posts.rb +7 -0
- data/lib/decidim/blogs/component.rb +8 -0
- data/lib/decidim/blogs/test/factories.rb +8 -0
- data/lib/decidim/blogs/version.rb +1 -1
- metadata +50 -19
@@ -0,0 +1,85 @@
|
|
1
|
+
sk:
|
2
|
+
activemodel:
|
3
|
+
models:
|
4
|
+
decidim/blogs/create_post_event: Nový príspevok na blogu
|
5
|
+
activerecord:
|
6
|
+
models:
|
7
|
+
decidim/blogs/post:
|
8
|
+
one: Príspevok
|
9
|
+
few: Príspevky
|
10
|
+
many: Príspevky
|
11
|
+
other: Príspevky
|
12
|
+
decidim:
|
13
|
+
blogs:
|
14
|
+
actions:
|
15
|
+
confirm_destroy: Naozaj chcete odstrániť tento príspevok?
|
16
|
+
destroy: Odstrániť
|
17
|
+
edit: Upraviť
|
18
|
+
new: Nový príspevok
|
19
|
+
title: Akcie
|
20
|
+
admin:
|
21
|
+
models:
|
22
|
+
components:
|
23
|
+
body: Telo textu
|
24
|
+
post:
|
25
|
+
name: Príspevok
|
26
|
+
posts:
|
27
|
+
create:
|
28
|
+
invalid: Vyskytol sa problém s vytváraním príspevku
|
29
|
+
success: Príspevok úspešne vytvorený
|
30
|
+
destroy:
|
31
|
+
success: Príspevok úspešne odstránený
|
32
|
+
edit:
|
33
|
+
save: Aktualizovať
|
34
|
+
index:
|
35
|
+
title: Príspevky
|
36
|
+
new:
|
37
|
+
create: Vytvoriť
|
38
|
+
title: Vytvort príspevok
|
39
|
+
update:
|
40
|
+
invalid: Vyskytol sa problém s ukladaním príspevku.
|
41
|
+
success: Príspevok úspešne uložený
|
42
|
+
last_activity:
|
43
|
+
new_post_at_html: "<span>Nový príspevok na %{link}</span>"
|
44
|
+
models:
|
45
|
+
post:
|
46
|
+
fields:
|
47
|
+
author: Autor
|
48
|
+
body: Telo textu
|
49
|
+
created_at: Vytvorené
|
50
|
+
title: názov
|
51
|
+
posts:
|
52
|
+
show:
|
53
|
+
back: Späť na zoznam
|
54
|
+
comments: Komentáre
|
55
|
+
view: Zobraziť
|
56
|
+
sidebar_blog:
|
57
|
+
comments: komentáre
|
58
|
+
most_commented_posts: Najviac komentované príspevky
|
59
|
+
read_more: Čítať ďalej
|
60
|
+
components:
|
61
|
+
blogs:
|
62
|
+
name: Blog
|
63
|
+
settings:
|
64
|
+
global:
|
65
|
+
announcement: Oznámenie
|
66
|
+
comments_enabled: Komentáre povolené
|
67
|
+
step:
|
68
|
+
announcement: Oznámenie
|
69
|
+
comments_blocked: Zablokované komentáre
|
70
|
+
endorsements_blocked: Zablokované schválenia
|
71
|
+
endorsements_enabled: Povolené schválenia
|
72
|
+
events:
|
73
|
+
blogs:
|
74
|
+
post_created:
|
75
|
+
email_intro: Príspevok "%{resource_title}" bol publikovaný v priestore "%{participatory_space_title}", ktorý sledujete.
|
76
|
+
email_outro: Túto notifikáciu ste dostali, pretože sledujete priestor "%{participatory_space_title}". Notifikácie môžete zrušiť po kliknutí na predchádzajúci odkaz.
|
77
|
+
email_subject: Nový príspevok publikovaný v %{participatory_space_title}
|
78
|
+
notification_title: Príspevok <a href="%{resource_path}">%{resource_title}</a> bol publikovaný v %{participatory_space_title}
|
79
|
+
pages:
|
80
|
+
home:
|
81
|
+
statistics:
|
82
|
+
posts_count: Príspevky
|
83
|
+
participatory_processes:
|
84
|
+
statistics:
|
85
|
+
posts_count: Príspevky
|
data/config/locales/sv.yml
CHANGED
@@ -48,6 +48,8 @@ sv:
|
|
48
48
|
title: titel
|
49
49
|
posts:
|
50
50
|
show:
|
51
|
+
back: Tillbaka till listan
|
52
|
+
comments: Kommentarer
|
51
53
|
view: Visa
|
52
54
|
sidebar_blog:
|
53
55
|
comments: kommentarer
|
@@ -63,6 +65,8 @@ sv:
|
|
63
65
|
step:
|
64
66
|
announcement: Meddelande
|
65
67
|
comments_blocked: Kommentarer blockerade
|
68
|
+
endorsements_blocked: Instämmanden är blockerade
|
69
|
+
endorsements_enabled: Instämmanden tillåtna
|
66
70
|
events:
|
67
71
|
blogs:
|
68
72
|
post_created:
|
@@ -8,6 +8,8 @@ Decidim.register_component(:blogs) do |component|
|
|
8
8
|
component.icon = "decidim/blogs/icon.svg"
|
9
9
|
component.permissions_class_name = "Decidim::Blog::Permissions"
|
10
10
|
|
11
|
+
component.query_type = "Decidim::Blogs::BlogsType"
|
12
|
+
|
11
13
|
component.on(:before_destroy) do |instance|
|
12
14
|
raise StandardError, "Can't remove this component" if Decidim::Blogs::Post.where(component: instance).any?
|
13
15
|
end
|
@@ -16,6 +18,8 @@ Decidim.register_component(:blogs) do |component|
|
|
16
18
|
Decidim::Blogs::Post.where(component: components).count
|
17
19
|
end
|
18
20
|
|
21
|
+
component.actions = %w(endorse vote create withdraw amend)
|
22
|
+
|
19
23
|
component.settings(:global) do |settings|
|
20
24
|
settings.attribute :announcement, type: :text, translated: true, editor: true
|
21
25
|
settings.attribute :comments_enabled, type: :boolean, default: true
|
@@ -24,11 +28,15 @@ Decidim.register_component(:blogs) do |component|
|
|
24
28
|
component.settings(:step) do |settings|
|
25
29
|
settings.attribute :announcement, type: :text, translated: true, editor: true
|
26
30
|
settings.attribute :comments_blocked, type: :boolean, default: false
|
31
|
+
settings.attribute :endorsements_enabled, type: :boolean, default: true
|
32
|
+
settings.attribute :endorsements_blocked, type: :boolean
|
27
33
|
end
|
28
34
|
|
29
35
|
component.register_resource(:blogpost) do |resource|
|
30
36
|
resource.model_class_name = "Decidim::Blogs::Post"
|
31
37
|
resource.card = "decidim/blogs/post"
|
38
|
+
resource.actions = %w(endorse vote amend)
|
39
|
+
resource.searchable = true
|
32
40
|
end
|
33
41
|
|
34
42
|
component.seeds do |participatory_space|
|
@@ -16,5 +16,13 @@ FactoryBot.define do
|
|
16
16
|
body { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
|
17
17
|
component { build(:component, manifest_name: "blogs") }
|
18
18
|
author { build(:user, :confirmed, organization: component.organization) }
|
19
|
+
|
20
|
+
trait :with_endorsements do
|
21
|
+
after :create do |post|
|
22
|
+
5.times.collect do
|
23
|
+
create(:endorsement, resource: post, author: build(:user, organization: post.participatory_space.organization))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
19
27
|
end
|
20
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-blogs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Massot Gil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-admin
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.22.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.22.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-comments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.22.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.22.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.22.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.22.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: httparty
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,70 +86,76 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.2'
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 1.2.1
|
90
93
|
type: :runtime
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
97
|
- - "~>"
|
95
98
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
99
|
+
version: '1.2'
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.2.1
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: decidim-admin
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
107
|
- - '='
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
109
|
+
version: 0.22.0
|
104
110
|
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
114
|
- - '='
|
109
115
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
116
|
+
version: 0.22.0
|
111
117
|
- !ruby/object:Gem::Dependency
|
112
118
|
name: decidim-assemblies
|
113
119
|
requirement: !ruby/object:Gem::Requirement
|
114
120
|
requirements:
|
115
121
|
- - '='
|
116
122
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
123
|
+
version: 0.22.0
|
118
124
|
type: :development
|
119
125
|
prerelease: false
|
120
126
|
version_requirements: !ruby/object:Gem::Requirement
|
121
127
|
requirements:
|
122
128
|
- - '='
|
123
129
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
130
|
+
version: 0.22.0
|
125
131
|
- !ruby/object:Gem::Dependency
|
126
132
|
name: decidim-dev
|
127
133
|
requirement: !ruby/object:Gem::Requirement
|
128
134
|
requirements:
|
129
135
|
- - '='
|
130
136
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
137
|
+
version: 0.22.0
|
132
138
|
type: :development
|
133
139
|
prerelease: false
|
134
140
|
version_requirements: !ruby/object:Gem::Requirement
|
135
141
|
requirements:
|
136
142
|
- - '='
|
137
143
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
144
|
+
version: 0.22.0
|
139
145
|
- !ruby/object:Gem::Dependency
|
140
146
|
name: decidim-participatory_processes
|
141
147
|
requirement: !ruby/object:Gem::Requirement
|
142
148
|
requirements:
|
143
149
|
- - '='
|
144
150
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
151
|
+
version: 0.22.0
|
146
152
|
type: :development
|
147
153
|
prerelease: false
|
148
154
|
version_requirements: !ruby/object:Gem::Requirement
|
149
155
|
requirements:
|
150
156
|
- - '='
|
151
157
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
158
|
+
version: 0.22.0
|
153
159
|
description: A Blog component for decidim's participatory spaces.
|
154
160
|
email:
|
155
161
|
- isaac.mg@coditramuntana.com
|
@@ -181,6 +187,10 @@ files:
|
|
181
187
|
- app/models/decidim/blogs/post.rb
|
182
188
|
- app/permissions/decidim/blog/permissions.rb
|
183
189
|
- app/presenters/decidim/blogs/post_presenter.rb
|
190
|
+
- app/types/decidim/blogs/blogs_type.rb
|
191
|
+
- app/types/decidim/blogs/post_input_filter.rb
|
192
|
+
- app/types/decidim/blogs/post_input_sort.rb
|
193
|
+
- app/types/decidim/blogs/post_type.rb
|
184
194
|
- app/views/decidim/blogs/admin/posts/_form.html.erb
|
185
195
|
- app/views/decidim/blogs/admin/posts/edit.html.erb
|
186
196
|
- app/views/decidim/blogs/admin/posts/index.html.erb
|
@@ -192,36 +202,57 @@ files:
|
|
192
202
|
- app/views/decidim/blogs/posts/show.html.erb
|
193
203
|
- config/locales/ar-SA.yml
|
194
204
|
- config/locales/ar.yml
|
205
|
+
- config/locales/bg-BG.yml
|
195
206
|
- config/locales/ca.yml
|
196
207
|
- config/locales/cs-CZ.yml
|
197
208
|
- config/locales/cs.yml
|
209
|
+
- config/locales/da-DK.yml
|
198
210
|
- config/locales/de.yml
|
211
|
+
- config/locales/el-GR.yml
|
212
|
+
- config/locales/el.yml
|
199
213
|
- config/locales/en.yml
|
200
214
|
- config/locales/eo-UY.yml
|
201
215
|
- config/locales/es-MX.yml
|
202
216
|
- config/locales/es-PY.yml
|
203
217
|
- config/locales/es.yml
|
218
|
+
- config/locales/et-EE.yml
|
204
219
|
- config/locales/eu.yml
|
205
220
|
- config/locales/fi-pl.yml
|
206
221
|
- config/locales/fi-plain.yml
|
207
222
|
- config/locales/fi.yml
|
223
|
+
- config/locales/fr-CA.yml
|
208
224
|
- config/locales/fr.yml
|
225
|
+
- config/locales/ga-IE.yml
|
209
226
|
- config/locales/gl.yml
|
227
|
+
- config/locales/hr-HR.yml
|
210
228
|
- config/locales/hu.yml
|
211
229
|
- config/locales/id-ID.yml
|
230
|
+
- config/locales/is-IS.yml
|
212
231
|
- config/locales/it.yml
|
232
|
+
- config/locales/ja-JP.yml
|
233
|
+
- config/locales/lt-LT.yml
|
234
|
+
- config/locales/lv-LV.yml
|
235
|
+
- config/locales/mt-MT.yml
|
213
236
|
- config/locales/nl.yml
|
214
237
|
- config/locales/no.yml
|
215
238
|
- config/locales/pl.yml
|
216
239
|
- config/locales/pt-BR.yml
|
217
240
|
- config/locales/pt.yml
|
241
|
+
- config/locales/ro-RO.yml
|
218
242
|
- config/locales/ru.yml
|
243
|
+
- config/locales/sk-SK.yml
|
244
|
+
- config/locales/sk.yml
|
245
|
+
- config/locales/sl.yml
|
246
|
+
- config/locales/sr-CS.yml
|
219
247
|
- config/locales/sv.yml
|
220
248
|
- config/locales/tr-TR.yml
|
221
249
|
- config/locales/uk.yml
|
222
250
|
- db/migrate/20171129131353_create_decidim_blogs_posts.rb
|
223
251
|
- db/migrate/20171211084630_add_author_to_decidim_blogs_posts.rb
|
224
252
|
- db/migrate/20181017084519_make_blogposts_authors_polymorphics.rb
|
253
|
+
- db/migrate/20191212162606_add_user_group_author_to_blogs.rb
|
254
|
+
- db/migrate/20200128094730_add_endorsements_counter_cache_to_blogs.rb
|
255
|
+
- db/migrate/20200320105910_index_foreign_keys_in_decidim_blogs_posts.rb
|
225
256
|
- lib/decidim/blogs.rb
|
226
257
|
- lib/decidim/blogs/admin.rb
|
227
258
|
- lib/decidim/blogs/admin_engine.rb
|
@@ -248,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
279
|
- !ruby/object:Gem::Version
|
249
280
|
version: '0'
|
250
281
|
requirements: []
|
251
|
-
rubygems_version: 3.
|
282
|
+
rubygems_version: 3.1.2
|
252
283
|
signing_key:
|
253
284
|
specification_version: 4
|
254
285
|
summary: Decidim blogs module
|