decidim-initiatives 0.23.5 → 0.24.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheet/decidim/initiatives/initiatives.scss +6 -0
- data/app/assets/stylesheet/decidim/initiatives/print-initiative.css.scss +22 -0
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +4 -8
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +5 -1
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form/show.erb +2 -1
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb +12 -1
- data/app/cells/decidim/initiatives/initiative_m/tags.erb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +3 -3
- data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +3 -3
- data/app/commands/decidim/initiatives/approve_membership_request.rb +40 -0
- data/app/commands/decidim/initiatives/create_initiative.rb +5 -4
- data/app/commands/decidim/initiatives/revoke_membership_request.rb +40 -0
- data/app/commands/decidim/initiatives/send_initiative_to_technical_validation.rb +57 -0
- data/app/commands/decidim/initiatives/spawn_committee_request.rb +18 -0
- data/app/commands/decidim/initiatives/update_initiative.rb +74 -0
- data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +15 -4
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/moderations/reports_controller.rb +18 -0
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +32 -0
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +58 -1
- data/app/events/decidim/initiatives/approve_membership_request_event.rb +61 -0
- data/app/events/decidim/initiatives/initiative_sent_to_technical_validation_event.rb +19 -0
- data/app/events/decidim/initiatives/revoke_membership_request_event.rb +61 -0
- data/app/events/decidim/initiatives/spawn_committee_request_event.rb +61 -0
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +8 -4
- data/app/forms/decidim/initiatives/admin/initiative_type_form.rb +3 -0
- data/app/forms/decidim/initiatives/initiative_form.rb +25 -2
- data/app/forms/decidim/initiatives/vote_form.rb +1 -1
- data/app/helpers/decidim/initiatives/admin/initiative_admin_menu_helper.rb +15 -0
- data/app/helpers/decidim/initiatives/create_initiative_helper.rb +3 -2
- data/app/models/concerns/decidim/initiatives/has_area.rb +1 -1
- data/app/models/decidim/initiative.rb +0 -1
- data/app/permissions/decidim/initiatives/admin/permissions.rb +5 -4
- data/app/permissions/decidim/initiatives/permissions.rb +63 -30
- data/app/queries/decidim/initiatives/initiatives_promoted.rb +1 -1
- data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +13 -2
- data/app/serializers/decidim/initiatives/initiative_serializer.rb +3 -0
- data/app/services/decidim/initiatives/dummy_timestamp.rb +1 -1
- data/app/services/decidim/initiatives/initiative_search.rb +15 -13
- data/app/services/decidim/initiatives/pdf_signature_example.rb +27 -27
- data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +1 -1
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +6 -0
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +24 -17
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +17 -11
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +1 -1
- data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +2 -7
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +4 -17
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +11 -11
- data/app/views/decidim/initiatives/initiatives/_committee_members.html.erb +73 -0
- data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_form.html.erb +112 -0
- data/app/views/decidim/initiatives/initiatives/_result.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_send_to_technical_validation.html.erb +8 -0
- data/app/views/decidim/initiatives/initiatives/edit.html.erb +78 -0
- data/app/views/decidim/initiatives/initiatives/print.html.erb +156 -0
- data/app/views/decidim/initiatives/initiatives/show.html.erb +19 -7
- data/app/views/layouts/decidim/admin/initiative.html.erb +0 -1
- data/app/views/layouts/decidim/admin/initiatives.html.erb +2 -15
- data/config/locales/ar.yml +2 -28
- data/config/locales/ca.yml +90 -30
- data/config/locales/cs.yml +98 -38
- data/config/locales/de.yml +90 -30
- data/config/locales/el.yml +2 -34
- data/config/locales/en.yml +94 -34
- data/config/locales/es-MX.yml +93 -33
- data/config/locales/es-PY.yml +93 -33
- data/config/locales/es.yml +91 -31
- data/config/locales/eu.yml +2 -28
- data/config/locales/fi-plain.yml +94 -34
- data/config/locales/fi.yml +94 -34
- data/config/locales/fr-CA.yml +94 -34
- data/config/locales/fr.yml +94 -34
- data/config/locales/gl.yml +2 -36
- data/config/locales/hu.yml +2 -31
- data/config/locales/id-ID.yml +2 -28
- data/config/locales/is-IS.yml +2 -13
- data/config/locales/it.yml +2 -34
- data/config/locales/ja.yml +2 -35
- data/config/locales/lv.yml +2 -32
- data/config/locales/nl.yml +31 -34
- data/config/locales/no.yml +2 -32
- data/config/locales/pl.yml +93 -33
- data/config/locales/pt-BR.yml +2 -28
- data/config/locales/pt.yml +2 -34
- data/config/locales/ro-RO.yml +2 -35
- data/config/locales/ru.yml +2 -21
- data/config/locales/sk.yml +2 -30
- data/config/locales/sr-CS.yml +0 -7
- data/config/locales/sv.yml +52 -34
- data/config/locales/tr-TR.yml +68 -34
- data/config/locales/uk.yml +2 -21
- data/config/locales/zh-CN.yml +2 -35
- data/db/migrate/20171017095143_update_initiative_scoped_type.rb +0 -1
- data/db/migrate/20191107134847_add_scopes_to_initiatives_votes.rb +1 -1
- data/db/migrate/20191118105634_allow_multiple_offline_votes.rb +1 -1
- data/db/migrate/20210310120720_add_followable_counter_cache_to_initiatives.rb +16 -0
- data/lib/decidim/api/initiative_api_type.rb +26 -0
- data/lib/decidim/api/initiative_committee_member_type.rb +18 -0
- data/lib/decidim/api/initiative_type.rb +49 -0
- data/lib/decidim/api/initiative_type_interface.rb +8 -3
- data/lib/decidim/initiatives.rb +1 -0
- data/lib/decidim/initiatives/admin_engine.rb +23 -1
- data/lib/decidim/initiatives/api.rb +3 -0
- data/lib/decidim/initiatives/engine.rb +14 -9
- data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +19 -12
- data/lib/decidim/initiatives/participatory_space.rb +6 -6
- data/lib/decidim/initiatives/query_extensions.rb +42 -19
- data/lib/decidim/initiatives/test/factories.rb +36 -0
- data/lib/decidim/initiatives/version.rb +1 -1
- metadata +33 -17
- data/app/types/decidim/initiatives/initiative_api_type.rb +0 -26
- data/app/types/decidim/initiatives/initiative_committee_member_type.rb +0 -18
- data/app/types/decidim/initiatives/initiative_type.rb +0 -42
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Initiatives
|
5
|
-
InitiativeApiType = GraphQL::ObjectType.define do
|
6
|
-
name "InitiativeType"
|
7
|
-
description "An initiative type"
|
8
|
-
|
9
|
-
field :id, !types.ID, "The internal ID for this initiative type"
|
10
|
-
field :title, Decidim::Core::TranslatedFieldType, "Initiative type name"
|
11
|
-
field :description, Decidim::Core::TranslatedFieldType, "This is the initiative type description"
|
12
|
-
field :createdAt, Decidim::Core::DateTimeType, "The date this initiative type was created", property: :created_at
|
13
|
-
field :updatedAt, Decidim::Core::DateTimeType, "The date this initiative type was updated", property: :updated_at
|
14
|
-
field :bannerImage, types.String, "Banner image", property: :banner_image
|
15
|
-
field :collectUserExtraFields, types.Boolean, "Collect participant personal data on signature", property: :collect_user_extra_fields
|
16
|
-
field :extraFieldsLegalInformation, types.String, "Legal information about the collection of personal data", property: :extra_fields_legal_information
|
17
|
-
field :minimumCommitteeMembers, types.Int, "Minimum of committee members", property: :minimum_committee_members
|
18
|
-
field :validateSmsCodeOnVotes, types.Boolean, "Add SMS code validation step to signature process", property: :validate_sms_code_on_votes
|
19
|
-
field :undoOnlineSignaturesEnabled, types.Boolean, "Enable participants to undo their online signatures", property: :undo_online_signatures_enabled
|
20
|
-
field :promotingComitteeEnabled, types.Boolean, "If promoting committee is enabled", property: :promoting_committee_enabled
|
21
|
-
field :signatureType, types.String, "Signature type of the initiative", property: :signature_type
|
22
|
-
|
23
|
-
field :initiatives, !types[Decidim::Initiatives::InitiativeType], "The initiatives that have this type"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Initiatives
|
5
|
-
# This type represents a initiative committee member.
|
6
|
-
InitiativeCommitteeMemberType = GraphQL::ObjectType.define do
|
7
|
-
name "InitiativeCommitteeMemberType"
|
8
|
-
description "A initiative committee member"
|
9
|
-
|
10
|
-
field :id, !types.ID, "Internal ID for this member of the committee"
|
11
|
-
field :user, Decidim::Core::UserType, "The decidim user for this initiative committee member"
|
12
|
-
|
13
|
-
field :state, types.Int, "Type of the committee member"
|
14
|
-
field :createdAt, Decidim::Core::DateTimeType, "The date this initiative committee member was created", property: :created_at
|
15
|
-
field :updatedAt, Decidim::Core::DateTimeType, "The date this initiative committee member was updated", property: :updated_at
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Initiatives
|
5
|
-
# This type represents a Initiative.
|
6
|
-
InitiativeType = GraphQL::ObjectType.define do
|
7
|
-
interfaces [
|
8
|
-
-> { Decidim::Core::ParticipatorySpaceInterface },
|
9
|
-
-> { Decidim::Core::ScopableInterface },
|
10
|
-
-> { Decidim::Core::AttachableInterface },
|
11
|
-
-> { Decidim::Core::AuthorInterface },
|
12
|
-
-> { Decidim::Initiatives::InitiativeTypeInterface }
|
13
|
-
]
|
14
|
-
|
15
|
-
name "Initiative"
|
16
|
-
description "A initiative"
|
17
|
-
|
18
|
-
field :description, Decidim::Core::TranslatedFieldType, "The description of this initiative."
|
19
|
-
field :slug, !types.String
|
20
|
-
field :hashtag, types.String, "The hashtag for this initiative"
|
21
|
-
field :createdAt, !Decidim::Core::DateTimeType, "The time this initiative was created", property: :created_at
|
22
|
-
field :updatedAt, !Decidim::Core::DateTimeType, "The time this initiative was updated", property: :updated_at
|
23
|
-
field :publishedAt, !Decidim::Core::DateTimeType, "The time this initiative was published", property: :published_at
|
24
|
-
field :reference, !types.String, "Reference prefix for this initiative"
|
25
|
-
field :state, types.String, "Current status of the initiative"
|
26
|
-
field :signatureType, types.String, "Signature type of the initiative", property: :signature_type
|
27
|
-
field :signatureStartDate, !Decidim::Core::DateType, "The signature start date", property: :signature_start_date
|
28
|
-
field :signatureEndDate, !Decidim::Core::DateType, "The signature end date", property: :signature_end_date
|
29
|
-
field :offlineVotes, types.Int, "The number of offline votes in this initiative", property: :offline_votes
|
30
|
-
field :initiativeVotesCount, types.Int, "The number of votes in this initiative", property: :initiative_votes_count
|
31
|
-
field :initiativeSupportsCount, types.Int, "The number of supports in this initiative", property: :initiative_supports_count
|
32
|
-
|
33
|
-
field :author, !Decidim::Core::AuthorInterface, "The initiative author" do
|
34
|
-
resolve lambda { |obj, _args, _ctx|
|
35
|
-
obj.user_group || obj.author
|
36
|
-
}
|
37
|
-
end
|
38
|
-
|
39
|
-
field :committeeMembers, types[Decidim::Initiatives::InitiativeCommitteeMemberType], property: :committee_members
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|