decidim-blogs 0.26.10 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/blogs/admin/create_post.rb +1 -1
  3. data/app/commands/decidim/blogs/admin/update_post.rb +6 -3
  4. data/app/controllers/decidim/blogs/admin/posts_controller.rb +6 -2
  5. data/app/forms/decidim/blogs/admin/post_form.rb +27 -7
  6. data/app/helpers/decidim/blogs/admin/posts_helper.rb +15 -0
  7. data/app/models/decidim/blogs/post.rb +9 -17
  8. data/app/presenters/decidim/blogs/admin_log/post_presenter.rb +36 -0
  9. data/app/presenters/decidim/blogs/official_author_presenter.rb +14 -0
  10. data/app/presenters/decidim/blogs/post_presenter.rb +7 -1
  11. data/app/views/decidim/blogs/admin/posts/_form.html.erb +4 -4
  12. data/app/views/decidim/blogs/admin/posts/edit.html.erb +0 -1
  13. data/app/views/decidim/blogs/admin/posts/index.html.erb +0 -1
  14. data/app/views/decidim/blogs/admin/posts/new.html.erb +0 -1
  15. data/app/views/decidim/blogs/posts/_posts.html.erb +2 -1
  16. data/app/views/decidim/blogs/posts/show.html.erb +4 -3
  17. data/config/locales/am-ET.yml +1 -0
  18. data/config/locales/ar.yml +5 -10
  19. data/config/locales/bg.yml +1 -0
  20. data/config/locales/ca.yml +12 -11
  21. data/config/locales/cs.yml +11 -10
  22. data/config/locales/da.yml +1 -0
  23. data/config/locales/de.yml +5 -10
  24. data/config/locales/el.yml +5 -14
  25. data/config/locales/en.yml +10 -10
  26. data/config/locales/eo.yml +1 -0
  27. data/config/locales/es-MX.yml +11 -10
  28. data/config/locales/es-PY.yml +11 -10
  29. data/config/locales/es.yml +12 -11
  30. data/config/locales/et.yml +1 -0
  31. data/config/locales/eu.yml +29 -34
  32. data/config/locales/fi-plain.yml +11 -10
  33. data/config/locales/fi.yml +11 -10
  34. data/config/locales/fr-CA.yml +5 -10
  35. data/config/locales/fr.yml +5 -10
  36. data/config/locales/ga-IE.yml +4 -0
  37. data/config/locales/gl.yml +5 -1
  38. data/config/locales/hr.yml +1 -0
  39. data/config/locales/hu.yml +4 -18
  40. data/config/locales/id-ID.yml +4 -0
  41. data/config/locales/is-IS.yml +5 -1
  42. data/config/locales/it.yml +5 -1
  43. data/config/locales/ja.yml +9 -9
  44. data/config/locales/ko.yml +1 -0
  45. data/config/locales/lb.yml +5 -1
  46. data/config/locales/lt.yml +1 -92
  47. data/config/locales/lv.yml +4 -0
  48. data/config/locales/mt.yml +1 -0
  49. data/config/locales/nl.yml +9 -5
  50. data/config/locales/no.yml +5 -1
  51. data/config/locales/om-ET.yml +1 -0
  52. data/config/locales/pl.yml +5 -1
  53. data/config/locales/pt-BR.yml +6 -14
  54. data/config/locales/pt.yml +5 -1
  55. data/config/locales/ro-RO.yml +5 -10
  56. data/config/locales/ru.yml +4 -22
  57. data/config/locales/si-LK.yml +1 -0
  58. data/config/locales/sk.yml +4 -0
  59. data/config/locales/sl.yml +1 -0
  60. data/config/locales/so-SO.yml +1 -0
  61. data/config/locales/sr-CS.yml +1 -0
  62. data/config/locales/sv.yml +6 -9
  63. data/config/locales/sw-KE.yml +1 -0
  64. data/config/locales/ti-ER.yml +1 -0
  65. data/config/locales/tr-TR.yml +4 -6
  66. data/config/locales/uk.yml +4 -0
  67. data/config/locales/val-ES.yml +1 -0
  68. data/config/locales/vi.yml +1 -0
  69. data/config/locales/zh-CN.yml +4 -0
  70. data/config/locales/zh-TW.yml +1 -89
  71. data/lib/decidim/blogs/component.rb +9 -3
  72. data/lib/decidim/blogs/version.rb +1 -1
  73. metadata +22 -29
  74. data/config/environment.rb +0 -3
  75. data/config/locales/fa-IR.yml +0 -1
  76. data/config/locales/gn-PY.yml +0 -1
  77. data/config/locales/ka-GE.yml +0 -1
  78. data/config/locales/kaa.yml +0 -23
  79. data/config/locales/lo-LA.yml +0 -1
  80. data/config/locales/oc-FR.yml +0 -1
  81. data/config/locales/sq-AL.yml +0 -1
  82. data/config/locales/th-TH.yml +0 -1
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sl:
2
3
  decidim:
3
4
  blogs:
@@ -1 +1,2 @@
1
+ ---
1
2
  so:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sr:
2
3
  decidim:
3
4
  blogs:
@@ -1,10 +1,6 @@
1
+ ---
1
2
  sv:
2
3
  activemodel:
3
- attributes:
4
- post:
5
- body: Innehåll
6
- decidim_author_id: Författare
7
- title: Titel
8
4
  models:
9
5
  decidim/blogs/create_post_event: Nytt blogginlägg
10
6
  activerecord:
@@ -15,14 +11,16 @@ sv:
15
11
  decidim:
16
12
  blogs:
17
13
  actions:
14
+ author_id: Skapa inlägg som
18
15
  confirm_destroy: Vill du radera inlägget?
19
16
  destroy: Radera
20
17
  edit: Redigera
21
18
  new: Nytt inlägg
22
19
  title: Åtgärder
23
- user_group_id: Skapa inlägg som
24
20
  admin:
25
21
  models:
22
+ components:
23
+ body: Innehåll
26
24
  post:
27
25
  name: Publicera
28
26
  posts:
@@ -50,7 +48,8 @@ sv:
50
48
  author: Författare
51
49
  body: Innehåll
52
50
  created_at: Skapad
53
- title: Titel
51
+ official_blog_post: Officiellt inlägg
52
+ title: titel
54
53
  posts:
55
54
  show:
56
55
  back: Tillbaka till listan
@@ -63,10 +62,8 @@ sv:
63
62
  components:
64
63
  blogs:
65
64
  actions:
66
- comment: Kommentera
67
65
  create: Skapa
68
66
  destroy: Radera
69
- endorse: Instäm
70
67
  update: Uppdatera
71
68
  name: Blogg
72
69
  settings:
@@ -1 +1,2 @@
1
+ ---
1
2
  sw:
@@ -1 +1,2 @@
1
+ ---
1
2
  ti:
@@ -1,11 +1,6 @@
1
+ ---
1
2
  tr:
2
3
  activemodel:
3
- attributes:
4
- post:
5
- body: Vücut
6
- decidim_author_id: Yazar
7
- published_at: Yayın zamanı
8
- title: Başlik / Unvani
9
4
  models:
10
5
  decidim/blogs/create_post_event: Yeni blog yazısı
11
6
  activerecord:
@@ -23,6 +18,8 @@ tr:
23
18
  title: Eylemler
24
19
  admin:
25
20
  models:
21
+ components:
22
+ body: Vücut
26
23
  post:
27
24
  name: posta
28
25
  posts:
@@ -50,6 +47,7 @@ tr:
50
47
  author: Yazar
51
48
  body: Vücut
52
49
  created_at: Adresinde düzenlendi
50
+ title: Başlık
53
51
  posts:
54
52
  show:
55
53
  back: Listeye geri dön
@@ -1,3 +1,4 @@
1
+ ---
1
2
  uk:
2
3
  activemodel:
3
4
  models:
@@ -19,6 +20,8 @@ uk:
19
20
  title: Дії
20
21
  admin:
21
22
  models:
23
+ components:
24
+ body: Основний текст
22
25
  post:
23
26
  name: Допис
24
27
  posts:
@@ -43,6 +46,7 @@ uk:
43
46
  author: Автор
44
47
  body: Основний текст
45
48
  created_at: 'Створено:'
49
+ title: заголовок
46
50
  posts:
47
51
  show:
48
52
  view: Переглянути
@@ -1 +1,2 @@
1
+ ---
1
2
  val:
@@ -1 +1,2 @@
1
+ ---
1
2
  vi:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  zh-CN:
2
3
  activemodel:
3
4
  models:
@@ -16,6 +17,8 @@ zh-CN:
16
17
  title: 行动
17
18
  admin:
18
19
  models:
20
+ components:
21
+ body: 正文内容
19
22
  post:
20
23
  name: 帖子
21
24
  posts:
@@ -42,6 +45,7 @@ zh-CN:
42
45
  author: 作者
43
46
  body: 正文内容
44
47
  created_at: 创建于
48
+ title: 标题
45
49
  posts:
46
50
  show:
47
51
  back: 返回列表
@@ -1,90 +1,2 @@
1
+ ---
1
2
  zh-TW:
2
- activemodel:
3
- attributes:
4
- post:
5
- body: 正文
6
- decidim_author_id: 作者
7
- published_at: 發布時間
8
- title: 標題
9
- models:
10
- decidim/blogs/create_post_event: 新增部落格文章
11
- activerecord:
12
- models:
13
- decidim/blogs/post:
14
- other: 文章
15
- decidim:
16
- blogs:
17
- actions:
18
- confirm_destroy: 您確定要刪除此文章嗎?
19
- destroy: 刪除
20
- edit: 編輯
21
- new: 新貼文
22
- title: 操作
23
- user_group_id: 發佈文章
24
- admin:
25
- models:
26
- post:
27
- name: 文章
28
- posts:
29
- create:
30
- invalid: 建立此文章時出現問題
31
- success: 文章已成功建立
32
- destroy:
33
- success: 文章已成功刪除
34
- edit:
35
- save: 更新
36
- title: 编辑文章
37
- index:
38
- title: 貼文
39
- new:
40
- create: 建立
41
- title: 建立文章
42
- update:
43
- invalid: 儲存文章時發生問題
44
- success: 文章已成功儲存
45
- last_activity:
46
- new_post_at_html: "<span>在 %{link} 上有新貼文</span>"
47
- models:
48
- post:
49
- fields:
50
- author: 作者
51
- body: 正文
52
- created_at: 建立於
53
- title: 標題
54
- posts:
55
- show:
56
- back: 返回列表
57
- comments: 評論
58
- view: 檢視
59
- sidebar_blog:
60
- comments: 評論
61
- most_commented_posts: 最多留言的帖子
62
- read_more: 閱讀變多
63
- components:
64
- blogs:
65
- actions:
66
- comment: 評論
67
- create: 建立
68
- destroy: 刪除
69
- endorse: 支持
70
- update: 更新
71
- name: 部落格
72
- settings:
73
- global:
74
- announcement: 公告
75
- comments_enabled: 啟用評論功能
76
- comments_max_length: 評論字數最大長度(若要使用預設值請輸入0)
77
- step:
78
- announcement: 公告
79
- comments_blocked: 留言已封鎖
80
- endorsements_blocked: 背書已封鎖
81
- endorsements_enabled: 背書已啟用
82
- events:
83
- blogs:
84
- post_created:
85
- email_intro: 您追蹤的參與空間 "%{participatory_space_title}" 中有新文章發佈了,標題為 "%{resource_title}"。
86
- email_outro: 您收到了此通知,是因為您正在關注 "%{participatory_space_title}"。您可以通過前面的鏈接取消關注它。
87
- email_subject: 在 %{participatory_space_title} 中發布了新的文章
88
- notification_title: <a href="%{resource_path}">%{resource_title}</a> 的帖子已經在 %{participatory_space_title} 發布。
89
- statistics:
90
- posts_count: 文章
@@ -36,7 +36,7 @@ Decidim.register_component(:blogs) do |component|
36
36
  component.register_resource(:blogpost) do |resource|
37
37
  resource.model_class_name = "Decidim::Blogs::Post"
38
38
  resource.card = "decidim/blogs/post"
39
- resource.actions = %w(endorse comment)
39
+ resource.actions = %w(endorse vote amend comment)
40
40
  resource.searchable = true
41
41
  end
42
42
 
@@ -72,8 +72,14 @@ Decidim.register_component(:blogs) do |component|
72
72
  Decidim::Component.create!(params)
73
73
  end
74
74
 
75
- 5.times do
76
- author = Decidim::User.where(organization: component.organization).all.first
75
+ 6.times do |n|
76
+ author = if n >= 3
77
+ Decidim::User.where(organization: component.organization).order(Arel.sql("RANDOM()")).first
78
+ elsif n <= 1
79
+ Decidim::UserGroup.where(organization: component.organization).order(Arel.sql("RANDOM()")).first
80
+ else
81
+ component.organization
82
+ end
77
83
 
78
84
  params = {
79
85
  component: component,
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-pages version.
5
5
  module Blogs
6
6
  def self.version
7
- "0.26.10"
7
+ "0.27.0.rc1"
8
8
  end
9
9
  end
10
10
  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.26.10
4
+ version: 0.27.0.rc1
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: 2024-04-30 00:00:00.000000000 Z
11
+ date: 2022-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,98 +16,98 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.26.10
19
+ version: 0.27.0.rc1
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.10
26
+ version: 0.27.0.rc1
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.26.10
33
+ version: 0.27.0.rc1
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.26.10
40
+ version: 0.27.0.rc1
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.26.10
47
+ version: 0.27.0.rc1
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.26.10
54
+ version: 0.27.0.rc1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-admin
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.26.10
61
+ version: 0.27.0.rc1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.26.10
68
+ version: 0.27.0.rc1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: decidim-assemblies
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.26.10
75
+ version: 0.27.0.rc1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.26.10
82
+ version: 0.27.0.rc1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: decidim-dev
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.26.10
89
+ version: 0.27.0.rc1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.26.10
96
+ version: 0.27.0.rc1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: decidim-participatory_processes
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.26.10
103
+ version: 0.27.0.rc1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.26.10
110
+ version: 0.27.0.rc1
111
111
  description: A Blog component for decidim's participatory spaces.
112
112
  email:
113
113
  - isaac.mg@coditramuntana.com
@@ -139,6 +139,8 @@ files:
139
139
  - app/packs/entrypoints/decidim_blogs.js
140
140
  - app/packs/images/decidim/blogs/decidim_blogs.svg
141
141
  - app/permissions/decidim/blog/permissions.rb
142
+ - app/presenters/decidim/blogs/admin_log/post_presenter.rb
143
+ - app/presenters/decidim/blogs/official_author_presenter.rb
142
144
  - app/presenters/decidim/blogs/post_presenter.rb
143
145
  - app/views/decidim/blogs/admin/posts/_form.html.erb
144
146
  - app/views/decidim/blogs/admin/posts/edit.html.erb
@@ -150,7 +152,6 @@ files:
150
152
  - app/views/decidim/blogs/posts/index.html.erb
151
153
  - app/views/decidim/blogs/posts/show.html.erb
152
154
  - config/assets.rb
153
- - config/environment.rb
154
155
  - config/locales/am-ET.yml
155
156
  - config/locales/ar-SA.yml
156
157
  - config/locales/ar.yml
@@ -173,7 +174,6 @@ files:
173
174
  - config/locales/et-EE.yml
174
175
  - config/locales/et.yml
175
176
  - config/locales/eu.yml
176
- - config/locales/fa-IR.yml
177
177
  - config/locales/fi-pl.yml
178
178
  - config/locales/fi-plain.yml
179
179
  - config/locales/fi.yml
@@ -182,7 +182,6 @@ files:
182
182
  - config/locales/fr.yml
183
183
  - config/locales/ga-IE.yml
184
184
  - config/locales/gl.yml
185
- - config/locales/gn-PY.yml
186
185
  - config/locales/hr-HR.yml
187
186
  - config/locales/hr.yml
188
187
  - config/locales/hu.yml
@@ -191,13 +190,10 @@ files:
191
190
  - config/locales/is.yml
192
191
  - config/locales/it.yml
193
192
  - config/locales/ja.yml
194
- - config/locales/ka-GE.yml
195
- - config/locales/kaa.yml
196
193
  - config/locales/ko-KR.yml
197
194
  - config/locales/ko.yml
198
195
  - config/locales/lb-LU.yml
199
196
  - config/locales/lb.yml
200
- - config/locales/lo-LA.yml
201
197
  - config/locales/lt-LT.yml
202
198
  - config/locales/lt.yml
203
199
  - config/locales/lv.yml
@@ -205,7 +201,6 @@ files:
205
201
  - config/locales/mt.yml
206
202
  - config/locales/nl.yml
207
203
  - config/locales/no.yml
208
- - config/locales/oc-FR.yml
209
204
  - config/locales/om-ET.yml
210
205
  - config/locales/pl.yml
211
206
  - config/locales/pt-BR.yml
@@ -217,11 +212,9 @@ files:
217
212
  - config/locales/sk.yml
218
213
  - config/locales/sl.yml
219
214
  - config/locales/so-SO.yml
220
- - config/locales/sq-AL.yml
221
215
  - config/locales/sr-CS.yml
222
216
  - config/locales/sv.yml
223
217
  - config/locales/sw-KE.yml
224
- - config/locales/th-TH.yml
225
218
  - config/locales/ti-ER.yml
226
219
  - config/locales/tr-TR.yml
227
220
  - config/locales/uk.yml
@@ -262,14 +255,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
262
255
  requirements:
263
256
  - - ">="
264
257
  - !ruby/object:Gem::Version
265
- version: '2.7'
258
+ version: '3.0'
266
259
  required_rubygems_version: !ruby/object:Gem::Requirement
267
260
  requirements:
268
- - - ">="
261
+ - - ">"
269
262
  - !ruby/object:Gem::Version
270
- version: '0'
263
+ version: 1.3.1
271
264
  requirements: []
272
- rubygems_version: 3.1.6
265
+ rubygems_version: 3.2.22
273
266
  signing_key:
274
267
  specification_version: 4
275
268
  summary: Decidim blogs module
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Empty line for playing nice with tpope/vim-rails
@@ -1 +0,0 @@
1
- fa:
@@ -1 +0,0 @@
1
- gn:
@@ -1 +0,0 @@
1
- ka:
@@ -1,23 +0,0 @@
1
- kaa:
2
- decidim:
3
- blogs:
4
- actions:
5
- destroy: Óshiriw
6
- edit: Ózgeris kirgiziw
7
- title: Háreketler
8
- admin:
9
- posts:
10
- edit:
11
- save: Jańalaw
12
- new:
13
- create: Jaratıw
14
- models:
15
- post:
16
- fields:
17
- author: Avtor
18
- components:
19
- blogs:
20
- actions:
21
- create: Jaratıw
22
- destroy: Óshiriw
23
- update: Jańalaw
@@ -1 +0,0 @@
1
- lo:
@@ -1 +0,0 @@
1
- oc:
@@ -1 +0,0 @@
1
- sq:
@@ -1 +0,0 @@
1
- th: