decidim-assemblies 0.28.3 → 0.29.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/assemblies/assembly_g_cell.rb +2 -2
- data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_cell.rb +0 -4
- data/app/cells/decidim/assemblies/content_blocks/stats_cell.rb +1 -1
- data/app/commands/decidim/assemblies/admin/create_assemblies_type.rb +3 -31
- data/app/commands/decidim/assemblies/admin/create_assembly.rb +30 -89
- data/app/commands/decidim/assemblies/admin/create_assembly_member.rb +14 -66
- data/app/commands/decidim/assemblies/admin/destroy_assembly_member.rb +5 -37
- data/app/commands/decidim/assemblies/admin/import_assembly.rb +1 -1
- data/app/commands/decidim/assemblies/admin/update_assemblies_type.rb +2 -35
- data/app/commands/decidim/assemblies/admin/update_assembly.rb +22 -99
- data/app/commands/decidim/assemblies/admin/update_assembly_member.rb +8 -69
- data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +1 -1
- data/app/controllers/decidim/assemblies/admin/assemblies_types_controller.rb +4 -4
- data/app/controllers/decidim/assemblies/admin/assembly_members_controller.rb +1 -1
- data/app/controllers/decidim/assemblies/admin/participatory_space_private_users_controller.rb +1 -1
- data/app/controllers/decidim/assemblies/admin/participatory_space_private_users_csv_imports_controller.rb +1 -1
- data/app/controllers/decidim/assemblies/application_controller.rb +4 -1
- data/app/controllers/decidim/assemblies/assemblies_controller.rb +0 -3
- data/app/controllers/decidim/assemblies/assembly_members_controller.rb +0 -2
- data/app/forms/decidim/assemblies/admin/assembly_form.rb +0 -1
- data/app/helpers/decidim/assemblies/assemblies_helper.rb +0 -26
- data/app/permissions/decidim/assemblies/permissions.rb +1 -1
- data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +0 -1
- data/app/serializers/decidim/assemblies/assembly_importer.rb +0 -1
- data/app/serializers/decidim/assemblies/assembly_serializer.rb +1 -2
- data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +5 -9
- data/app/views/decidim/assemblies/admin/assembly_members/index.html.erb +1 -1
- data/app/views/decidim/assemblies/admin/assembly_user_roles/index.html.erb +1 -1
- data/app/views/decidim/assemblies/assemblies/show.html.erb +22 -18
- data/app/views/decidim/assemblies/assembly_members/index.html.erb +2 -1
- data/config/locales/ar.yml +0 -6
- data/config/locales/bg.yml +2 -7
- data/config/locales/ca.yml +3 -8
- data/config/locales/cs.yml +1 -6
- data/config/locales/de.yml +3 -8
- data/config/locales/el.yml +0 -6
- data/config/locales/en.yml +2 -7
- data/config/locales/es-MX.yml +2 -7
- data/config/locales/es-PY.yml +1 -6
- data/config/locales/es.yml +4 -9
- data/config/locales/eu.yml +2 -7
- data/config/locales/fi-plain.yml +1 -6
- data/config/locales/fi.yml +1 -6
- data/config/locales/fr-CA.yml +2 -7
- data/config/locales/fr.yml +2 -7
- data/config/locales/ga-IE.yml +0 -3
- data/config/locales/gl.yml +0 -6
- data/config/locales/he-IL.yml +0 -4
- data/config/locales/hu.yml +1 -7
- data/config/locales/id-ID.yml +0 -5
- data/config/locales/is-IS.yml +0 -4
- data/config/locales/it.yml +0 -6
- data/config/locales/ja.yml +2 -7
- data/config/locales/lb.yml +0 -5
- data/config/locales/lt.yml +0 -6
- data/config/locales/lv.yml +0 -5
- data/config/locales/nl.yml +0 -6
- data/config/locales/no.yml +0 -6
- data/config/locales/pl.yml +1 -12
- data/config/locales/pt-BR.yml +0 -6
- data/config/locales/pt.yml +0 -6
- data/config/locales/ro-RO.yml +0 -6
- data/config/locales/ru.yml +0 -5
- data/config/locales/sk.yml +0 -3
- data/config/locales/sl.yml +0 -2
- data/config/locales/sq-AL.yml +2 -3
- data/config/locales/sv.yml +123 -189
- data/config/locales/tr-TR.yml +0 -5
- data/config/locales/uk.yml +0 -5
- data/config/locales/zh-CN.yml +0 -5
- data/config/locales/zh-TW.yml +0 -6
- data/db/migrate/20240712061153_change_show_statistics_from_decidim_assemblies.rb +11 -0
- data/decidim-assemblies.gemspec +1 -1
- data/lib/decidim/api/assembly_type.rb +5 -6
- data/lib/decidim/assemblies/content_blocks/registry_manager.rb +1 -1
- data/lib/decidim/assemblies/engine.rb +1 -0
- data/lib/decidim/assemblies/menu.rb +11 -0
- data/lib/decidim/assemblies/seeds.rb +1 -11
- data/lib/decidim/assemblies/test/factories.rb +0 -1
- data/lib/decidim/assemblies/version.rb +1 -1
- metadata +17 -18
- data/app/commands/decidim/assemblies/admin/destroy_assemblies_type.rb +0 -45
- data/app/views/layouts/decidim/assembly.html.erb +0 -18
@@ -31,7 +31,6 @@ module Decidim
|
|
31
31
|
field :target, Decidim::Core::TranslatedFieldType, "Who participates in this assembly", null: true
|
32
32
|
field :participatory_scope, Decidim::Core::TranslatedFieldType, "What is decided on this assembly", null: true
|
33
33
|
field :participatory_structure, Decidim::Core::TranslatedFieldType, "How it is decided on this assembly", null: true
|
34
|
-
field :show_statistics, Boolean, "If this assembly should show statistics", null: true
|
35
34
|
field :scopes_enabled, Boolean, "If this assembly has scopes enabled", null: true
|
36
35
|
field :private_space, Boolean, "If this assembly is a private space", null: true
|
37
36
|
field :area, Decidim::Core::AreaApiType, "Area of this assembly", null: true
|
@@ -54,19 +53,19 @@ module Decidim
|
|
54
53
|
field :twitter_handler, String, "Twitter handler", null: true
|
55
54
|
field :instagram_handler, String, "Instagram handler", null: true
|
56
55
|
field :facebook_handler, String, "Facebook handler", null: true
|
57
|
-
field :youtube_handler, String, "
|
58
|
-
field :github_handler, String, "
|
56
|
+
field :youtube_handler, String, "YouTube handler", null: true
|
57
|
+
field :github_handler, String, "GitHub handler", null: true
|
59
58
|
field :announcement, Decidim::Core::TranslatedFieldType, "Highlighted announcement for this assembly", null: true
|
60
59
|
|
61
60
|
field :members, [Decidim::Assemblies::AssemblyMemberType, { null: true }], "Members of this assembly", null: false
|
62
|
-
field :children, [Decidim::Assemblies::AssemblyType, { null: true }], "
|
61
|
+
field :children, [Decidim::Assemblies::AssemblyType, { null: true }], "Children of this assembly", null: false
|
63
62
|
|
64
63
|
def hero_image
|
65
|
-
object.attached_uploader(:hero_image).
|
64
|
+
object.attached_uploader(:hero_image).path
|
66
65
|
end
|
67
66
|
|
68
67
|
def banner_image
|
69
|
-
object.attached_uploader(:banner_image).
|
68
|
+
object.attached_uploader(:banner_image).path
|
70
69
|
end
|
71
70
|
end
|
72
71
|
end
|
@@ -82,7 +82,7 @@ module Decidim
|
|
82
82
|
content_block.public_name_key = "decidim.content_blocks.last_activity.name"
|
83
83
|
content_block.settings_form_cell = "decidim/content_blocks/last_activity_settings_form"
|
84
84
|
content_block.settings do |settings|
|
85
|
-
settings.attribute :max_last_activity_users, type: :integer, default: Decidim
|
85
|
+
settings.attribute :max_last_activity_users, type: :integer, default: Decidim.default_max_last_activity_users
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -14,6 +14,17 @@ module Decidim
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.register_mobile_menu!
|
18
|
+
Decidim.menu :mobile_menu do |menu|
|
19
|
+
menu.add_item :assemblies,
|
20
|
+
I18n.t("menu.assemblies", scope: "decidim"),
|
21
|
+
decidim_assemblies.assemblies_path,
|
22
|
+
position: 2.2,
|
23
|
+
if: OrganizationPublishedAssemblies.new(current_organization, current_user).any?,
|
24
|
+
active: :inclusive
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
17
28
|
def self.register_home_content_block_menu!
|
18
29
|
Decidim.menu :home_content_block_menu do |menu|
|
19
30
|
menu.add_item :assemblies,
|
@@ -111,17 +111,7 @@ module Decidim
|
|
111
111
|
# Create users with specific roles
|
112
112
|
Decidim::AssemblyUserRole::ROLES.each do |role|
|
113
113
|
email = "assembly_#{assembly.id}_#{role}@example.org"
|
114
|
-
|
115
|
-
user = Decidim::User.find_or_initialize_by(email:)
|
116
|
-
user.update!(
|
117
|
-
name: ::Faker::Name.name,
|
118
|
-
nickname: ::Faker::Twitter.unique.screen_name,
|
119
|
-
password: "decidim123456789",
|
120
|
-
organization:,
|
121
|
-
confirmed_at: Time.current,
|
122
|
-
locale: I18n.default_locale,
|
123
|
-
tos_agreement: true
|
124
|
-
)
|
114
|
+
user = find_or_initialize_user_by(email:)
|
125
115
|
|
126
116
|
Decidim::AssemblyUserRole.find_or_create_by!(
|
127
117
|
user:,
|
@@ -35,7 +35,6 @@ FactoryBot.define do
|
|
35
35
|
target { generate_localized_title(:assembly_target, skip_injection:) }
|
36
36
|
participatory_scope { generate_localized_title(:assembly_participatory_scope, skip_injection:) }
|
37
37
|
participatory_structure { generate_localized_title(:assembly_participatory_structure, skip_injection:) }
|
38
|
-
show_statistics { true }
|
39
38
|
private_space { false }
|
40
39
|
purpose_of_action { generate_localized_description(:assembly_purpose_of_action, skip_injection:) }
|
41
40
|
composition { generate_localized_description(:assembly_composition, skip_injection:) }
|
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.
|
4
|
+
version: 0.29.0.rc1
|
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: 2024-
|
13
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,70 +18,70 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.29.0.rc1
|
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.29.0.rc1
|
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.
|
35
|
+
version: 0.29.0.rc1
|
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.
|
42
|
+
version: 0.29.0.rc1
|
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.
|
49
|
+
version: 0.29.0.rc1
|
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.29.0.rc1
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-meetings
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.29.0.rc1
|
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.29.0.rc1
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: decidim-proposals
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.29.0.rc1
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
84
|
+
version: 0.29.0.rc1
|
85
85
|
description: Assemblies component for decidim.
|
86
86
|
email:
|
87
87
|
- josepjaume@gmail.com
|
@@ -121,7 +121,6 @@ files:
|
|
121
121
|
- app/commands/decidim/assemblies/admin/create_assemblies_type.rb
|
122
122
|
- app/commands/decidim/assemblies/admin/create_assembly.rb
|
123
123
|
- app/commands/decidim/assemblies/admin/create_assembly_member.rb
|
124
|
-
- app/commands/decidim/assemblies/admin/destroy_assemblies_type.rb
|
125
124
|
- app/commands/decidim/assemblies/admin/destroy_assembly_member.rb
|
126
125
|
- app/commands/decidim/assemblies/admin/import_assembly.rb
|
127
126
|
- app/commands/decidim/assemblies/admin/update_assemblies_type.rb
|
@@ -248,7 +247,6 @@ files:
|
|
248
247
|
- app/views/layouts/decidim/admin/assemblies_imports.html.erb
|
249
248
|
- app/views/layouts/decidim/admin/assemblies_types.html.erb
|
250
249
|
- app/views/layouts/decidim/admin/assembly.html.erb
|
251
|
-
- app/views/layouts/decidim/assembly.html.erb
|
252
250
|
- config/assets.rb
|
253
251
|
- config/locales/am-ET.yml
|
254
252
|
- config/locales/ar-SA.yml
|
@@ -352,6 +350,7 @@ files:
|
|
352
350
|
- db/migrate/20210310120444_add_followable_counter_cache_to_assemblies.rb
|
353
351
|
- db/migrate/20210507063604_add_announcement_to_assemblies.rb
|
354
352
|
- db/migrate/20210907120249_remove_designation_mode_from_assembly_members.rb
|
353
|
+
- db/migrate/20240712061153_change_show_statistics_from_decidim_assemblies.rb
|
355
354
|
- decidim-assemblies.gemspec
|
356
355
|
- lib/decidim/api/assemblies_type_type.rb
|
357
356
|
- lib/decidim/api/assembly_member_type.rb
|
@@ -385,14 +384,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
385
384
|
requirements:
|
386
385
|
- - "~>"
|
387
386
|
- !ruby/object:Gem::Version
|
388
|
-
version: 3.
|
387
|
+
version: 3.2.0
|
389
388
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
390
389
|
requirements:
|
391
|
-
- - "
|
390
|
+
- - ">"
|
392
391
|
- !ruby/object:Gem::Version
|
393
|
-
version:
|
392
|
+
version: 1.3.1
|
394
393
|
requirements: []
|
395
|
-
rubygems_version: 3.
|
394
|
+
rubygems_version: 3.4.10
|
396
395
|
signing_key:
|
397
396
|
specification_version: 4
|
398
397
|
summary: Decidim assemblies module
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Assemblies
|
5
|
-
module Admin
|
6
|
-
# A command with all the business logic when destroying an assembly
|
7
|
-
# type in the system.
|
8
|
-
class DestroyAssembliesType < Decidim::Command
|
9
|
-
# Public: Initializes the command.
|
10
|
-
#
|
11
|
-
# assemblies_type - the AssemblyMember to destroy
|
12
|
-
# current_user - the user performing the action
|
13
|
-
def initialize(assemblies_type, current_user)
|
14
|
-
@assemblies_type = assemblies_type
|
15
|
-
@current_user = current_user
|
16
|
-
end
|
17
|
-
|
18
|
-
# Executes the command. Broadcasts these events:
|
19
|
-
#
|
20
|
-
# - :ok when everything is valid.
|
21
|
-
# - :invalid if the form was not valid and we could not proceed.
|
22
|
-
#
|
23
|
-
# Returns nothing.
|
24
|
-
def call
|
25
|
-
destroy_assembly_type!
|
26
|
-
broadcast(:ok)
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
attr_reader :current_user
|
32
|
-
|
33
|
-
def destroy_assembly_type!
|
34
|
-
Decidim.traceability.perform_action!(
|
35
|
-
"delete",
|
36
|
-
@assemblies_type,
|
37
|
-
current_user
|
38
|
-
) do
|
39
|
-
@assemblies_type.destroy!
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<% add_decidim_page_title(translated_attribute(current_component.name)) if try(:current_component) %>
|
2
|
-
<% add_decidim_page_title(translated_attribute(current_participatory_space.title)) %>
|
3
|
-
<% add_decidim_meta_tags(
|
4
|
-
image_url: current_participatory_space.attached_uploader(:banner_image).path,
|
5
|
-
description: translated_attribute(current_participatory_space.short_description)
|
6
|
-
) %>
|
7
|
-
|
8
|
-
<%= append_javascript_pack_tag "decidim_assemblies" %>
|
9
|
-
|
10
|
-
<%= render partial: "layouts/decidim/header/follow_space_menu_bar_button", locals: { participatory_space: current_participatory_space } %>
|
11
|
-
|
12
|
-
<%= render "layouts/decidim/application" do %>
|
13
|
-
<main>
|
14
|
-
<%= yield %>
|
15
|
-
</main>
|
16
|
-
<% end %>
|
17
|
-
|
18
|
-
<% provide :meta_image_url, current_participatory_space.attached_uploader(:banner_image).path %>
|