decidim-assemblies 0.9.3 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/assemblies/admin/create_assembly.rb +18 -6
  3. data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +29 -10
  4. data/app/commands/decidim/assemblies/admin/destroy_assembly_admin.rb +53 -0
  5. data/app/commands/decidim/assemblies/admin/publish_assembly.rb +8 -3
  6. data/app/commands/decidim/assemblies/admin/unpublish_assembly.rb +9 -4
  7. data/app/commands/decidim/assemblies/admin/update_assembly.rb +11 -1
  8. data/app/commands/decidim/assemblies/admin/update_assembly_admin.rb +11 -1
  9. data/app/controllers/decidim/assemblies/admin/assembly_attachment_collections_controller.rb +26 -0
  10. data/app/controllers/decidim/assemblies/admin/assembly_publications_controller.rb +2 -2
  11. data/app/controllers/decidim/assemblies/admin/assembly_user_roles_controller.rb +6 -4
  12. data/app/controllers/decidim/assemblies/assemblies_controller.rb +1 -0
  13. data/app/forms/decidim/assemblies/admin/assembly_copy_form.rb +1 -1
  14. data/app/forms/decidim/assemblies/admin/assembly_form.rb +7 -1
  15. data/app/models/decidim/assemblies/abilities/admin/assembly_admin_ability.rb +4 -0
  16. data/app/models/decidim/assemblies/abilities/admin/assembly_role_ability.rb +2 -2
  17. data/app/models/decidim/assemblies/abilities/assembly_role_ability.rb +2 -2
  18. data/app/models/decidim/assembly.rb +11 -3
  19. data/app/models/decidim/assembly_user_role.rb +8 -0
  20. data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +61 -0
  21. data/app/presenters/decidim/assemblies/admin_log/assembly_user_role_presenter.rb +53 -0
  22. data/app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb +22 -0
  23. data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +4 -0
  24. data/app/views/decidim/assemblies/assemblies/show.html.erb +9 -0
  25. data/app/views/layouts/decidim/admin/assembly.html.erb +15 -3
  26. data/config/locales/ca.yml +22 -2
  27. data/config/locales/en.yml +20 -0
  28. data/config/locales/es.yml +20 -0
  29. data/config/locales/eu.yml +20 -0
  30. data/config/locales/fi.yml +20 -0
  31. data/config/locales/fr.yml +32 -12
  32. data/config/locales/gl.yml +20 -0
  33. data/config/locales/it.yml +20 -0
  34. data/config/locales/nl.yml +20 -0
  35. data/config/locales/pl.yml +20 -5
  36. data/config/locales/pt-BR.yml +20 -0
  37. data/config/locales/pt.yml +20 -0
  38. data/config/locales/sv.yml +20 -0
  39. data/config/locales/uk.yml +28 -4
  40. data/db/migrate/20180125104426_add_reference_to_assemblies.rb +7 -0
  41. data/db/migrate/20180216091553_add_area_to_assemblies.rb +7 -0
  42. data/lib/decidim/assemblies/admin_engine.rb +1 -0
  43. data/lib/decidim/assemblies/participatory_space.rb +14 -0
  44. data/lib/decidim/assemblies/version.rb +1 -1
  45. metadata +16 -9
@@ -2,9 +2,12 @@ pt-BR:
2
2
  activemodel:
3
3
  attributes:
4
4
  assembly:
5
+ area_id: Área
5
6
  banner_image: Imagem da bandeira
6
7
  copy_categories: Cópiar categorias
7
8
  copy_features: Recursos de cópia
9
+ decidim_area_id: Área
10
+ decidim_scope_id: Escopo
8
11
  description: Descrição
9
12
  developer_group: Grupo de desenvolvedores
10
13
  domain: Domínio
@@ -15,9 +18,11 @@ pt-BR:
15
18
  participatory_scope: Âmbito participativo
16
19
  participatory_structure: Estrutura participativa
17
20
  promoted: Destacado
21
+ published_at: Publicado em
18
22
  scope_id: Âmbito
19
23
  scopes_enabled: Âmbitos ativados
20
24
  short_description: Pequena descrição
25
+ show_statistics: Mostre estatisticas
21
26
  slug: Slug de URL
22
27
  subtitle: Subtítulo
23
28
  target: Alvo
@@ -80,6 +85,8 @@ pt-BR:
80
85
  assemblies: Assembléias
81
86
  assemblies_submenu:
82
87
  assembly_admins: Usuários da assembléia
88
+ attachment_collections: Coleções
89
+ attachment_files: arquivos
83
90
  attachments: Anexos
84
91
  categories: Categorias
85
92
  features: Características
@@ -105,10 +112,21 @@ pt-BR:
105
112
  moderator: Moderador
106
113
  titles:
107
114
  assemblies: Assembléias
115
+ admin_log:
116
+ assembly:
117
+ create: "%{user_name} criou o conjunto %{resource_name}"
118
+ publish: "%{user_name} publicou o conjunto %{resource_name}"
119
+ unpublish: "%{user_name} não publicado o conjunto %{resource_name}"
120
+ update: "%{user_name} atualizou a montagem %{resource_name}"
121
+ assembly_user_role:
122
+ create: "%{user_name} convidou %{resource_name} para o assembly %{space_name}"
123
+ delete: "%{user_name} removeu o usuário %{resource_name} do conjunto %{space_name}"
124
+ update: "%{user_name} alterou a função de %{resource_name} na montagem %{space_name}"
108
125
  assemblies:
109
126
  admin:
110
127
  assemblies:
111
128
  form:
129
+ select_an_area: Selecione uma Área
112
130
  slug_help: 'Os slugs de URL são usados ​​para gerar os URLs que apontam para essa assembléia. Apenas aceita letras, números e traços, e deve começar com uma carta. Exemplo: %{url}'
113
131
  assembly_copies:
114
132
  form:
@@ -121,6 +139,7 @@ pt-BR:
121
139
  active_assemblies: Conjuntos ativos
122
140
  see_all_assemblies: Veja todas as assembléias
123
141
  show:
142
+ area: Área
124
143
  developer_group: Grupo de desenvolvedores
125
144
  local_area: Área Local
126
145
  participatory_scope: Âmbito participativo
@@ -131,6 +150,7 @@ pt-BR:
131
150
  answers_count: Respostas
132
151
  assemblies_count: Assembléias
133
152
  comments_count: Comentários
153
+ endorsements_count: Endossos
134
154
  headline: Atividade
135
155
  meetings_count: Reuniões
136
156
  orders_count: Votos
@@ -2,9 +2,12 @@ pt:
2
2
  activemodel:
3
3
  attributes:
4
4
  assembly:
5
+ area_id: Área
5
6
  banner_image: Imagem da bandeira
6
7
  copy_categories: Cópiar categorias
7
8
  copy_features: Recursos de cópia
9
+ decidim_area_id: Área
10
+ decidim_scope_id: Escopo
8
11
  description: Descrição
9
12
  developer_group: Grupo de desenvolvedores
10
13
  domain: Domínio
@@ -15,9 +18,11 @@ pt:
15
18
  participatory_scope: Âmbito participativo
16
19
  participatory_structure: Estrutura participativa
17
20
  promoted: Destacado
21
+ published_at: Publicado em
18
22
  scope_id: Âmbito
19
23
  scopes_enabled: Âmbitos ativados
20
24
  short_description: Pequena descrição
25
+ show_statistics: Mostre estatisticas
21
26
  slug: Slug de URL
22
27
  subtitle: Subtítulo
23
28
  target: Alvo
@@ -80,6 +85,8 @@ pt:
80
85
  assemblies: Assembléias
81
86
  assemblies_submenu:
82
87
  assembly_admins: Usuários da assembléia
88
+ attachment_collections: Coleções
89
+ attachment_files: arquivos
83
90
  attachments: Anexos
84
91
  categories: Categorias
85
92
  features: Características
@@ -105,10 +112,21 @@ pt:
105
112
  moderator: Moderador
106
113
  titles:
107
114
  assemblies: Assembléias
115
+ admin_log:
116
+ assembly:
117
+ create: "%{user_name} criou o conjunto %{resource_name}"
118
+ publish: "%{user_name} publicou o conjunto %{resource_name}"
119
+ unpublish: "%{user_name} não publicado o conjunto %{resource_name}"
120
+ update: "%{user_name} atualizou a montagem %{resource_name}"
121
+ assembly_user_role:
122
+ create: "%{user_name} convidou %{resource_name} para o assembly %{space_name}"
123
+ delete: "%{user_name} removeu o usuário %{resource_name} do conjunto %{space_name}"
124
+ update: "%{user_name} alterou a função de %{resource_name} na montagem %{space_name}"
108
125
  assemblies:
109
126
  admin:
110
127
  assemblies:
111
128
  form:
129
+ select_an_area: Selecione uma Área
112
130
  slug_help: 'Os slugs de URL são usados ​​para gerar os URLs que apontam para essa assembléia. Apenas aceita letras, números e traços, e deve começar com uma carta. Exemplo: %{url}'
113
131
  assembly_copies:
114
132
  form:
@@ -121,6 +139,7 @@ pt:
121
139
  active_assemblies: Conjuntos ativos
122
140
  see_all_assemblies: Veja todas as assembléias
123
141
  show:
142
+ area: Área
124
143
  developer_group: Grupo de desenvolvedores
125
144
  local_area: Área Local
126
145
  participatory_scope: Âmbito participativo
@@ -131,6 +150,7 @@ pt:
131
150
  answers_count: Respostas
132
151
  assemblies_count: Assembléias
133
152
  comments_count: Comentários
153
+ endorsements_count: Endossos
134
154
  headline: Atividade
135
155
  meetings_count: Reuniões
136
156
  orders_count: Votos
@@ -2,9 +2,12 @@ sv:
2
2
  activemodel:
3
3
  attributes:
4
4
  assembly:
5
+ area_id: Område
5
6
  banner_image: Banner image
6
7
  copy_categories: Kopiera kategorier
7
8
  copy_features: Kopiera funktioner
9
+ decidim_area_id: Område
10
+ decidim_scope_id: Omfattning
8
11
  description: Beskrivning
9
12
  developer_group: Utvecklargrupp
10
13
  domain: Domän
@@ -15,9 +18,11 @@ sv:
15
18
  participatory_scope: Deltagande räckvidd
16
19
  participatory_structure: Deltagande struktur
17
20
  promoted: främjas
21
+ published_at: Publicerad på
18
22
  scope_id: Omfattning
19
23
  scopes_enabled: Scopes aktiverade
20
24
  short_description: Kort beskrivning
25
+ show_statistics: Visa statistik
21
26
  slug: URL slug
22
27
  subtitle: Texta
23
28
  target: Mål
@@ -80,6 +85,8 @@ sv:
80
85
  assemblies: Assemblies
81
86
  assemblies_submenu:
82
87
  assembly_admins: Monteringsanvändare
88
+ attachment_collections: samlingar
89
+ attachment_files: filer
83
90
  attachments: bilagor
84
91
  categories: kategorier
85
92
  features: Funktioner
@@ -105,10 +112,21 @@ sv:
105
112
  moderator: moderator
106
113
  titles:
107
114
  assemblies: Assemblies
115
+ admin_log:
116
+ assembly:
117
+ create: "%{user_name} skapade %{resource_name} -enheten"
118
+ publish: "%{user_name} publicerade %{resource_name} -enheten"
119
+ unpublish: "%{user_name} upublicerade %{resource_name} -enheten"
120
+ update: "%{user_name} uppdaterade %{resource_name} -enheten"
121
+ assembly_user_role:
122
+ create: "%{user_name} inbjudna %{resource_name} till sammansättningen %{space_name}"
123
+ delete: "%{user_name} tog bort användaren %{resource_name} från enheten %{space_name}"
124
+ update: "%{user_name} ändrade rollen som %{resource_name} i sammansättningen %{space_name}"
108
125
  assemblies:
109
126
  admin:
110
127
  assemblies:
111
128
  form:
129
+ select_an_area: Välj ett område
112
130
  slug_help: 'URL-slitsar används för att generera de webbadresser som pekar på den här enheten. Accepterar bara bokstäver, siffror och bindestreck, och måste börja med ett brev. Exempel: %{url}'
113
131
  assembly_copies:
114
132
  form:
@@ -121,6 +139,7 @@ sv:
121
139
  active_assemblies: Aktiva aggregat
122
140
  see_all_assemblies: Se alla församlingar
123
141
  show:
142
+ area: Område
124
143
  developer_group: Utvecklargrupp
125
144
  local_area: Lokalt område
126
145
  participatory_scope: Deltagande räckvidd
@@ -131,6 +150,7 @@ sv:
131
150
  answers_count: svar
132
151
  assemblies_count: Assemblies
133
152
  comments_count: kommentarer
153
+ endorsements_count: påskrifter
134
154
  headline: Aktivitet
135
155
  meetings_count: möten
136
156
  orders_count: röster
@@ -10,7 +10,7 @@ uk:
10
10
  domain: Домен
11
11
  hashtag: Хештег
12
12
  hero_image: Зображення головної сторінки
13
- local_area: Місцевість
13
+ local_area: Терен
14
14
  meta_scope: Метадані терену
15
15
  participatory_scope: Терен співучасті
16
16
  participatory_structure: Структура співучасті
@@ -21,7 +21,7 @@ uk:
21
21
  slug: Скорочена URL-адреса
22
22
  subtitle: Підзаголовок
23
23
  target: Мета
24
- title: Назва
24
+ title: Заголовок
25
25
  decidim:
26
26
  admin:
27
27
  assemblies:
@@ -59,9 +59,21 @@ uk:
59
59
  destroy:
60
60
  error: При скасуванні публікації цих зборів сталася помилка.
61
61
  success: Публікацію зборів успішно скасовано.
62
+ assembly_user_roles:
63
+ edit:
64
+ title: Оновити учасника зборів.
65
+ update: Оновити
66
+ index:
67
+ assembly_admins_title: Учасники зборів
68
+ new:
69
+ create: Створити
70
+ title: Новий учасник зборів.
62
71
  menu:
63
72
  assemblies: Збори
64
73
  assemblies_submenu:
74
+ assembly_admins: Учасники зборів
75
+ attachment_collections: Збірки
76
+ attachment_files: Файли
65
77
  attachments: Вкладені файли
66
78
  categories: Розділи
67
79
  features: Складові
@@ -73,14 +85,25 @@ uk:
73
85
  created_at: 'Додано:'
74
86
  promoted: Висвітлено
75
87
  published: Опубліковано
76
- title: Назва
88
+ title: Заголовок
77
89
  name: Збори
90
+ assembly_user_role:
91
+ fields:
92
+ email: Адреса електронної пошти
93
+ name: Ім'я
94
+ role: Роль
95
+ name: Учасник зборів
96
+ roles:
97
+ admin: Адміністратор
98
+ collaborator: Співавтор
99
+ moderator: Модератор
78
100
  titles:
79
101
  assemblies: Збори
80
102
  assemblies:
81
103
  admin:
82
104
  assemblies:
83
105
  form:
106
+ select_an_area: Оберіть терен
84
107
  slug_help: 'Cкорочені URL-адреси використовуються для створення посилань на ці збори. В них припустимі лише букви, цифри та тире, і вони мають починатися з букви. Приклад: %{url}'
85
108
  assembly_copies:
86
109
  form:
@@ -93,8 +116,9 @@ uk:
93
116
  active_assemblies: Започаті збори
94
117
  see_all_assemblies: Переглянути всі збори
95
118
  show:
119
+ area: Терен
96
120
  developer_group: Група зачинальників
97
- local_area: Місцевість
121
+ local_area: Терен
98
122
  participatory_scope: Терен співучасті
99
123
  participatory_structure: Структура співучасті
100
124
  scope: Терен
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddReferenceToAssemblies < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_column :decidim_assemblies, :reference, :string
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddAreaToAssemblies < ActiveRecord::Migration[5.1]
4
+ def change
5
+ add_reference :decidim_assemblies, :decidim_area, index: true
6
+ end
7
+ end
@@ -24,6 +24,7 @@ module Decidim
24
24
  end
25
25
  end
26
26
 
27
+ resources :attachment_collections, controller: "assembly_attachment_collections"
27
28
  resources :attachments, controller: "assembly_attachments"
28
29
  end
29
30
 
@@ -48,6 +48,20 @@ Decidim.register_participatory_space(:assemblies) do |participatory_space|
48
48
  scope: n.positive? ? Decidim::Scope.reorder("RANDOM()").first : nil
49
49
  )
50
50
 
51
+ attachment_collection = Decidim::AttachmentCollection.create!(
52
+ name: Decidim::Faker::Localized.word,
53
+ description: Decidim::Faker::Localized.sentence(5),
54
+ collection_for: assembly
55
+ )
56
+
57
+ Decidim::Attachment.create!(
58
+ title: Decidim::Faker::Localized.sentence(2),
59
+ description: Decidim::Faker::Localized.sentence(5),
60
+ file: File.new(File.join(seeds_root, "Exampledocument.pdf")),
61
+ attachment_collection: attachment_collection,
62
+ attached_to: assembly
63
+ )
64
+
51
65
  Decidim::Attachment.create!(
52
66
  title: Decidim::Faker::Localized.sentence(2),
53
67
  description: Decidim::Faker::Localized.sentence(5),
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-assemblies version.
5
5
  module Assemblies
6
6
  def self.version
7
- "0.9.3"
7
+ "0.10.0"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-assemblies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.10.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: 2018-02-27 00:00:00.000000000 Z
13
+ date: 2018-03-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,42 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.9.3
21
+ version: 0.10.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.9.3
28
+ version: 0.10.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-admin
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.9.3
35
+ version: 0.10.0
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.9.3
42
+ version: 0.10.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-dev
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.9.3
49
+ version: 0.10.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.9.3
56
+ version: 0.10.0
57
57
  description: Assemblies component for decidim.
58
58
  email:
59
59
  - josepjaume@gmail.com
@@ -72,6 +72,7 @@ files:
72
72
  - app/commands/decidim/assemblies/admin/copy_assembly.rb
73
73
  - app/commands/decidim/assemblies/admin/create_assembly.rb
74
74
  - app/commands/decidim/assemblies/admin/create_assembly_admin.rb
75
+ - app/commands/decidim/assemblies/admin/destroy_assembly_admin.rb
75
76
  - app/commands/decidim/assemblies/admin/publish_assembly.rb
76
77
  - app/commands/decidim/assemblies/admin/unpublish_assembly.rb
77
78
  - app/commands/decidim/assemblies/admin/update_assembly.rb
@@ -81,6 +82,7 @@ files:
81
82
  - app/controllers/concerns/decidim/assemblies/admin/assembly_context.rb
82
83
  - app/controllers/decidim/assemblies/admin/application_controller.rb
83
84
  - app/controllers/decidim/assemblies/admin/assemblies_controller.rb
85
+ - app/controllers/decidim/assemblies/admin/assembly_attachment_collections_controller.rb
84
86
  - app/controllers/decidim/assemblies/admin/assembly_attachments_controller.rb
85
87
  - app/controllers/decidim/assemblies/admin/assembly_copies_controller.rb
86
88
  - app/controllers/decidim/assemblies/admin/assembly_publications_controller.rb
@@ -110,6 +112,9 @@ files:
110
112
  - app/models/decidim/assemblies/abilities/everyone_ability.rb
111
113
  - app/models/decidim/assembly.rb
112
114
  - app/models/decidim/assembly_user_role.rb
115
+ - app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb
116
+ - app/presenters/decidim/assemblies/admin_log/assembly_user_role_presenter.rb
117
+ - app/presenters/decidim/assemblies/admin_log/value_types/role_presenter.rb
113
118
  - app/presenters/decidim/assemblies/assembly_stats_presenter.rb
114
119
  - app/queries/decidim/assemblies/admin/admin_users.rb
115
120
  - app/queries/decidim/assemblies/assemblies_with_user_role.rb
@@ -159,6 +164,8 @@ files:
159
164
  - db/migrate/20170727190859_add_assemblies.rb
160
165
  - db/migrate/20170822153055_add_scopes_enabled_to_assemblies.rb
161
166
  - db/migrate/20180109105917_add_assembly_user_roles.rb
167
+ - db/migrate/20180125104426_add_reference_to_assemblies.rb
168
+ - db/migrate/20180216091553_add_area_to_assemblies.rb
162
169
  - db/seeds/Exampledocument.pdf
163
170
  - db/seeds/city.jpeg
164
171
  - db/seeds/city2.jpeg
@@ -190,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
197
  version: '0'
191
198
  requirements: []
192
199
  rubyforge_project:
193
- rubygems_version: 2.7.3
200
+ rubygems_version: 2.7.6
194
201
  signing_key:
195
202
  specification_version: 4
196
203
  summary: Decidim assemblies module