decidim-blogs 0.26.2 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) 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 -1
  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 +3 -3
  12. data/app/views/decidim/blogs/posts/_posts.html.erb +2 -1
  13. data/app/views/decidim/blogs/posts/show.html.erb +3 -1
  14. data/config/locales/am-ET.yml +1 -0
  15. data/config/locales/ar.yml +2 -1
  16. data/config/locales/bg.yml +1 -0
  17. data/config/locales/ca.yml +8 -1
  18. data/config/locales/cs.yml +8 -1
  19. data/config/locales/da.yml +1 -0
  20. data/config/locales/de.yml +2 -1
  21. data/config/locales/el.yml +2 -1
  22. data/config/locales/en.yml +7 -1
  23. data/config/locales/eo.yml +1 -0
  24. data/config/locales/es-MX.yml +8 -1
  25. data/config/locales/es-PY.yml +8 -1
  26. data/config/locales/es.yml +8 -1
  27. data/config/locales/et.yml +1 -0
  28. data/config/locales/eu.yml +2 -1
  29. data/config/locales/fi-plain.yml +8 -1
  30. data/config/locales/fi.yml +8 -1
  31. data/config/locales/fr-CA.yml +2 -1
  32. data/config/locales/fr.yml +2 -1
  33. data/config/locales/ga-IE.yml +1 -0
  34. data/config/locales/gl.yml +2 -1
  35. data/config/locales/hr.yml +1 -0
  36. data/config/locales/hu.yml +1 -0
  37. data/config/locales/id-ID.yml +1 -0
  38. data/config/locales/is-IS.yml +2 -1
  39. data/config/locales/it.yml +2 -1
  40. data/config/locales/ja.yml +7 -1
  41. data/config/locales/ko.yml +1 -0
  42. data/config/locales/lb.yml +2 -1
  43. data/config/locales/lt.yml +1 -0
  44. data/config/locales/lv.yml +1 -0
  45. data/config/locales/mt.yml +1 -0
  46. data/config/locales/nl.yml +2 -1
  47. data/config/locales/no.yml +2 -1
  48. data/config/locales/om-ET.yml +1 -0
  49. data/config/locales/pl.yml +2 -1
  50. data/config/locales/pt-BR.yml +3 -2
  51. data/config/locales/pt.yml +2 -1
  52. data/config/locales/ro-RO.yml +2 -1
  53. data/config/locales/ru.yml +1 -0
  54. data/config/locales/si-LK.yml +1 -0
  55. data/config/locales/sk.yml +1 -0
  56. data/config/locales/sl.yml +1 -0
  57. data/config/locales/so-SO.yml +1 -0
  58. data/config/locales/sr-CS.yml +1 -0
  59. data/config/locales/sv.yml +3 -1
  60. data/config/locales/sw-KE.yml +1 -0
  61. data/config/locales/ti-ER.yml +1 -0
  62. data/config/locales/tr-TR.yml +1 -0
  63. data/config/locales/uk.yml +1 -0
  64. data/config/locales/val-ES.yml +1 -0
  65. data/config/locales/vi.yml +1 -0
  66. data/config/locales/zh-CN.yml +1 -0
  67. data/config/locales/zh-TW.yml +1 -0
  68. data/lib/decidim/blogs/component.rb +8 -2
  69. data/lib/decidim/blogs/version.rb +1 -1
  70. metadata +22 -20
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fi:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ fi:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Luo artikkeli käyttäjänä
13
15
  confirm_destroy: Haluatko varmasti poistaa tämän artikkelin?
14
16
  destroy: Poista
15
17
  edit: Muokkaa
16
18
  new: Uusi artikkeli
17
19
  title: Toiminnot
18
- user_group_id: Luo artikkeli käyttäjänä
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -39,6 +40,11 @@ fi:
39
40
  update:
40
41
  invalid: Artikkelin tallennus epäonnistui.
41
42
  success: Artikkeli tallennus onnistui
43
+ admin_log:
44
+ post:
45
+ create: "%{user_name} loi blogikirjoituksen %{resource_name} tilassa %{space_name}"
46
+ delete: "%{user_name} poisti blogikirjoituksen %{resource_name} tilasta %{space_name}"
47
+ update: "%{user_name} päivitti blogikirjoitusta %{resource_name} tilassa %{space_name}"
42
48
  last_activity:
43
49
  new_post_at_html: "<span>Uusi artikkeli osoitteessa %{link}</span>"
44
50
  models:
@@ -47,6 +53,7 @@ fi:
47
53
  author: Laatija
48
54
  body: Leipäteksti
49
55
  created_at: Luotu
56
+ official_blog_post: Virallinen artikkeli
50
57
  title: otsikko
51
58
  posts:
52
59
  show:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fr-CA:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ fr-CA:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Créer un article comme
13
15
  confirm_destroy: Êtes-vous certain de vouloir supprimer cet article ?
14
16
  destroy: Supprimer
15
17
  edit: Modifier
16
18
  new: Nouvel article
17
19
  title: Actions
18
- user_group_id: Créer un article comme
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fr:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ fr:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Créer un article en tant que
13
15
  confirm_destroy: Êtes-vous certain de vouloir supprimer cet article ?
14
16
  destroy: Supprimer
15
17
  edit: Modifier
16
18
  new: Nouvel article
17
19
  title: Actions
18
- user_group_id: Créer un article en tant que
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ga:
2
3
  activerecord:
3
4
  models:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  gl:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ gl:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Crear publicación como
13
15
  confirm_destroy: Tes a certeza de querer eliminar esta publicación?
14
16
  destroy: Eliminar
15
17
  edit: Editar
16
18
  new: Nova publicación
17
19
  title: Accións
18
- user_group_id: Crear publicación como
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1 +1,2 @@
1
+ ---
1
2
  hr:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  hu:
2
3
  activemodel:
3
4
  models:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  id:
2
3
  activemodel:
3
4
  models:
@@ -1,4 +1,5 @@
1
- is-IS:
1
+ ---
2
+ is:
2
3
  decidim:
3
4
  blogs:
4
5
  actions:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  it:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ it:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Crea post come
13
15
  confirm_destroy: Sei sicuro di voler eliminare questo post?
14
16
  destroy: Elimina
15
17
  edit: Modifica
16
18
  new: Nuovo post
17
19
  title: Azioni
18
- user_group_id: Crea post come
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ja:
2
3
  activemodel:
3
4
  models:
@@ -9,12 +10,12 @@ ja:
9
10
  decidim:
10
11
  blogs:
11
12
  actions:
13
+ author_id: 次のように投稿を作成
12
14
  confirm_destroy: この投稿を削除してもよろしいですか?
13
15
  destroy: 削除
14
16
  edit: 編集
15
17
  new: 新規投稿
16
18
  title: アクション
17
- user_group_id: 次のように投稿を作成
18
19
  admin:
19
20
  models:
20
21
  components:
@@ -38,6 +39,11 @@ ja:
38
39
  update:
39
40
  invalid: 投稿の保存中に問題が発生しました。
40
41
  success: 投稿を保存しました
42
+ admin_log:
43
+ post:
44
+ create: "%{user_name} が %{space_name} でブログ投稿 %{resource_name} を作成しました"
45
+ delete: "%{user_name} がブログ投稿 %{resource_name} を %{space_name} から削除しました"
46
+ update: "%{user_name} が %{space_name} のブログ投稿 %{resource_name} を更新しました"
41
47
  last_activity:
42
48
  new_post_at_html: "<span> %{link}に新しい投稿</span>"
43
49
  models:
@@ -1 +1,2 @@
1
+ ---
1
2
  ko:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lb:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ lb:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Beitrag erstellen als
13
15
  confirm_destroy: Möchten Sie diesen Beitrag wirklich löschen?
14
16
  destroy: Löschen
15
17
  edit: Bearbeiten
16
18
  new: Neuer Beitrag
17
19
  title: Aktionen
18
- user_group_id: Beitrag erstellen als
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1 +1,2 @@
1
+ ---
1
2
  lt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lv:
2
3
  activemodel:
3
4
  models:
@@ -1 +1,2 @@
1
+ ---
1
2
  mt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  nl:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ nl:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Bericht aanmaken als
13
15
  confirm_destroy: Weet je zeker dat je dit bericht wilt verwijderen?
14
16
  destroy: Verwijder
15
17
  edit: Bewerk
16
18
  new: Nieuw bericht
17
19
  title: acties
18
- user_group_id: Bericht aanmaken als
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  "no":
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Opprett innlegg som
13
15
  confirm_destroy: Er du sikker på at du vil slette dette innlegget?
14
16
  destroy: Slett
15
17
  edit: Editar
16
18
  new: Nytt innlegg
17
19
  title: Handlinger
18
- user_group_id: Opprett innlegg som
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1 +1,2 @@
1
+ ---
1
2
  om:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pl:
2
3
  activemodel:
3
4
  models:
@@ -12,12 +13,12 @@ pl:
12
13
  decidim:
13
14
  blogs:
14
15
  actions:
16
+ author_id: Utwórz wpis jako
15
17
  confirm_destroy: Czy na pewno chcesz usunąć ten wpis?
16
18
  destroy: Usuń
17
19
  edit: Edytuj
18
20
  new: Nowy wpis
19
21
  title: Działania
20
- user_group_id: Utwórz wpis jako
21
22
  admin:
22
23
  models:
23
24
  components:
@@ -1,4 +1,5 @@
1
- pt-BR:
1
+ ---
2
+ pt:
2
3
  activemodel:
3
4
  models:
4
5
  decidim/blogs/create_post_event: Nova postagem no blog
@@ -10,12 +11,12 @@ pt-BR:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Criar publicação como
13
15
  confirm_destroy: Deseja mesmo excluir este post?
14
16
  destroy: Excluir
15
17
  edit: Editar
16
18
  new: Nova postagem
17
19
  title: Ações
18
- user_group_id: Criar publicação como
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pt:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ pt:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Criar publicação como
13
15
  confirm_destroy: Tem a certeza de que deseja eliminar esta publicação?
14
16
  destroy: Eliminar
15
17
  edit: Editar
16
18
  new: Nova publicação
17
19
  title: Ações
18
- user_group_id: Criar publicação como
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ro:
2
3
  activemodel:
3
4
  models:
@@ -11,12 +12,12 @@ ro:
11
12
  decidim:
12
13
  blogs:
13
14
  actions:
15
+ author_id: Creează postare ca
14
16
  confirm_destroy: Sigur dorești să ştergi această postare?
15
17
  destroy: Șterge
16
18
  edit: Editează
17
19
  new: Postare nouă
18
20
  title: Acțiuni
19
- user_group_id: Creează postare ca
20
21
  admin:
21
22
  models:
22
23
  components:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ru:
2
3
  activemodel:
3
4
  models:
@@ -1 +1,2 @@
1
+ ---
1
2
  si:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sk:
2
3
  activemodel:
3
4
  models:
@@ -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,3 +1,4 @@
1
+ ---
1
2
  sv:
2
3
  activemodel:
3
4
  models:
@@ -10,12 +11,12 @@ sv:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Skapa inlägg som
13
15
  confirm_destroy: Vill du radera inlägget?
14
16
  destroy: Radera
15
17
  edit: Redigera
16
18
  new: Nytt inlägg
17
19
  title: Åtgärder
18
- user_group_id: Skapa inlägg som
19
20
  admin:
20
21
  models:
21
22
  components:
@@ -47,6 +48,7 @@ sv:
47
48
  author: Författare
48
49
  body: Innehåll
49
50
  created_at: Skapad
51
+ official_blog_post: Officiellt inlägg
50
52
  title: titel
51
53
  posts:
52
54
  show:
@@ -1 +1,2 @@
1
+ ---
1
2
  sw:
@@ -1 +1,2 @@
1
+ ---
1
2
  ti:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  tr:
2
3
  activemodel:
3
4
  models:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  uk:
2
3
  activemodel:
3
4
  models:
@@ -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:
@@ -1 +1,2 @@
1
+ ---
1
2
  zh-TW:
@@ -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.2"
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.2
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: 2022-06-14 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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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
@@ -253,14 +255,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
255
  requirements:
254
256
  - - ">="
255
257
  - !ruby/object:Gem::Version
256
- version: '2.7'
258
+ version: '3.0'
257
259
  required_rubygems_version: !ruby/object:Gem::Requirement
258
260
  requirements:
259
- - - ">="
261
+ - - ">"
260
262
  - !ruby/object:Gem::Version
261
- version: '0'
263
+ version: 1.3.1
262
264
  requirements: []
263
- rubygems_version: 3.1.6
265
+ rubygems_version: 3.2.22
264
266
  signing_key:
265
267
  specification_version: 4
266
268
  summary: Decidim blogs module