decidim 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile.lock +49 -55
- data/README.md +2 -1
- data/Rakefile +4 -4
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_label-required.scss +3 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_title_bar.scss +57 -1
- data/decidim-admin/app/commands/decidim/admin/create_participatory_process_admin.rb +28 -7
- data/decidim-admin/app/commands/decidim/admin/create_participatory_process_step.rb +2 -1
- data/decidim-admin/app/commands/decidim/admin/destroy_participatory_process_step.rb +5 -2
- data/decidim-admin/app/commands/decidim/admin/update_feature.rb +1 -0
- data/decidim-admin/app/commands/decidim/admin/update_organization.rb +10 -5
- data/decidim-admin/app/commands/decidim/admin/update_participatory_process.rb +4 -2
- data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +2 -0
- data/decidim-admin/app/controllers/decidim/admin/concerns/has_attachments.rb +10 -1
- data/decidim-admin/app/controllers/decidim/admin/concerns/participatory_process_admin.rb +0 -5
- data/decidim-admin/app/controllers/decidim/admin/features/base_controller.rb +0 -1
- data/decidim-admin/app/controllers/decidim/admin/moderations_controller.rb +7 -4
- data/decidim-admin/app/controllers/decidim/admin/organization_controller.rb +9 -3
- data/decidim-admin/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +17 -0
- data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +11 -3
- data/decidim-admin/app/forms/decidim/admin/feature_form.rb +6 -0
- data/decidim-admin/app/forms/decidim/admin/organization_form.rb +5 -0
- data/decidim-admin/app/forms/decidim/admin/participatory_process_copy_form.rb +2 -3
- data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +2 -0
- data/decidim-admin/app/forms/decidim/admin/static_page_form.rb +6 -0
- data/decidim-admin/app/helpers/decidim/admin/menu_helper.rb +1 -1
- data/decidim-admin/app/jobs/decidim/admin/newsletter_job.rb +9 -5
- data/decidim-admin/app/views/decidim/admin/attachments/_form.html.erb +1 -12
- data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/features/_form.html.erb +18 -0
- data/decidim-admin/app/views/decidim/admin/moderations/_report.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/organization/_form.html.erb +5 -35
- data/decidim-admin/app/views/decidim/admin/participatory_process_groups/_form.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +16 -0
- data/decidim-admin/app/views/decidim/admin/participatory_processes/_form.html.erb +2 -14
- data/decidim-admin/app/views/layouts/decidim/admin/_title_bar.html.erb +26 -19
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +2 -2
- data/decidim-admin/bin/rails +2 -2
- data/decidim-admin/config/i18n-tasks.yml +2 -0
- data/decidim-admin/config/locales/ca.yml +9 -5
- data/decidim-admin/config/locales/en.yml +9 -5
- data/decidim-admin/config/locales/es.yml +11 -5
- data/decidim-admin/config/locales/eu.yml +0 -5
- data/decidim-admin/config/locales/fr.yml +18 -23
- data/decidim-admin/config/locales/it.yml +0 -5
- data/decidim-admin/config/routes.rb +5 -3
- data/decidim-admin/decidim-admin.gemspec +2 -2
- data/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb +1 -2
- data/decidim-admin/spec/commands/create_participatory_process_admin_spec.rb +42 -26
- data/decidim-admin/spec/commands/create_participatory_process_spec.rb +2 -1
- data/decidim-admin/spec/commands/create_participatory_process_step_spec.rb +56 -0
- data/decidim-admin/spec/commands/destroy_participatory_process_step_spec.rb +2 -2
- data/decidim-admin/spec/commands/update_feature_spec.rb +6 -0
- data/decidim-admin/spec/controllers/participatory_processes_controller_spec.rb +3 -6
- data/decidim-admin/spec/features/admin_copy_participatory_process_spec.rb +9 -9
- data/decidim-admin/spec/features/admin_manages_features_spec.rb +32 -0
- data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +3 -4
- data/decidim-admin/spec/forms/static_page_form_spec.rb +12 -0
- data/decidim-admin/spec/jobs/newsletter_job_spec.rb +3 -0
- data/decidim-admin/spec/shared/manage_process_admins_examples.rb +22 -0
- data/decidim-admin/spec/shared/manage_processes_examples.rb +6 -0
- data/decidim-admin/spec/spec_helper.rb +4 -0
- data/decidim-api/bin/rails +2 -2
- data/decidim-api/decidim-api.gemspec +3 -3
- data/decidim-api/spec/spec_helper.rb +4 -0
- data/decidim-api/spec/types/query_type_spec.rb +2 -2
- data/decidim-budgets/app/models/decidim/budgets/project.rb +5 -0
- data/decidim-budgets/bin/rails +2 -2
- data/decidim-budgets/config/locales/fr.yml +2 -2
- data/decidim-budgets/decidim-budgets.gemspec +2 -2
- data/decidim-budgets/lib/decidim/budgets/feature.rb +1 -1
- data/decidim-budgets/spec/spec_helper.rb +4 -0
- data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
- data/decidim-comments/app/commands/decidim/comments/create_comment.rb +10 -14
- data/decidim-comments/app/frontend/application/application.component.tsx +1 -1
- data/decidim-comments/app/frontend/comments/add_comment_form.component.test.tsx +33 -26
- data/decidim-comments/app/frontend/comments/add_comment_form.component.tsx +109 -83
- data/decidim-comments/app/frontend/comments/comment.component.test.tsx +29 -24
- data/decidim-comments/app/frontend/comments/comment.component.tsx +12 -5
- data/decidim-comments/app/frontend/comments/comment_thread.component.test.tsx +12 -7
- data/decidim-comments/app/frontend/comments/comment_thread.component.tsx +7 -2
- data/decidim-comments/app/frontend/comments/comments.component.tsx +26 -15
- data/decidim-comments/app/frontend/comments/down_vote_button.component.test.tsx +9 -4
- data/decidim-comments/app/frontend/comments/down_vote_button.component.tsx +56 -37
- data/decidim-comments/app/frontend/comments/up_vote_button.component.test.tsx +9 -4
- data/decidim-comments/app/frontend/comments/up_vote_button.component.tsx +31 -16
- data/decidim-comments/app/frontend/comments/vote_button.component.tsx +3 -0
- data/decidim-comments/app/mailers/decidim/comments/comment_notification_mailer.rb +8 -6
- data/decidim-comments/app/models/decidim/comments/comment.rb +13 -1
- data/decidim-comments/app/views/decidim/comments/comment_notification_mailer/comment_created.html.erb +1 -1
- data/decidim-comments/app/views/decidim/comments/comment_notification_mailer/reply_created.html.erb +1 -1
- data/decidim-comments/bin/rails +2 -2
- data/decidim-comments/config/locales/ca.yml +2 -0
- data/decidim-comments/config/locales/en.yml +2 -0
- data/decidim-comments/config/locales/es.yml +2 -0
- data/decidim-comments/config/locales/fr.yml +2 -2
- data/decidim-comments/decidim-comments.gemspec +3 -3
- data/decidim-comments/lib/decidim/comments/commentable.rb +1 -0
- data/decidim-comments/spec/commands/create_comment_spec.rb +22 -54
- data/decidim-comments/spec/features/notifications_spec.rb +2 -6
- data/decidim-comments/spec/mailers/comment_notification_mailer_spec.rb +5 -4
- data/decidim-comments/spec/models/comment_spec.rb +32 -2
- data/decidim-comments/spec/shared/author_localised_email.rb +2 -3
- data/decidim-comments/spec/spec_helper.rb +4 -0
- data/decidim-dev/decidim-dev.gemspec +3 -4
- data/decidim-dev/lib/decidim/dev.rb +23 -1
- data/decidim-dev/lib/decidim/dev/common_rake.rb +3 -0
- data/decidim-dev/lib/decidim/dev/railtie.rb +3 -3
- data/decidim-dev/lib/decidim/dev/test/base_spec_helper.rb +4 -3
- data/decidim-dev/lib/decidim/dev/test/rspec_support/capybara.rb +3 -0
- data/decidim-dev/lib/decidim/dev/test/rspec_support/feature.rb +8 -0
- data/decidim-dev/lib/decidim/dev/test/rspec_support/feature_context.rb +4 -2
- data/decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb +7 -2
- data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/phantomjs-getOwnPropertyNames.js +16 -0
- data/decidim-dev/lib/decidim/dev/test/rspec_support/warden.rb +17 -1
- data/decidim-meetings/app/helpers/decidim/meetings/application_helper.rb +1 -0
- data/decidim-meetings/app/helpers/decidim/meetings/meetings_helper.rb +24 -0
- data/decidim-meetings/app/views/decidim/meetings/meetings/_meetings.html.erb +1 -1
- data/decidim-meetings/bin/rails +2 -2
- data/decidim-meetings/config/locales/ca.yml +1 -0
- data/decidim-meetings/config/locales/en.yml +2 -1
- data/decidim-meetings/config/locales/es.yml +1 -0
- data/decidim-meetings/config/locales/fr.yml +5 -5
- data/decidim-meetings/decidim-meetings.gemspec +2 -2
- data/decidim-meetings/lib/decidim/meetings/feature.rb +1 -1
- data/decidim-meetings/spec/features/admin_manages_meetings_attachments_spec.rb +1 -1
- data/decidim-meetings/spec/features/admin_manages_meetings_spec.rb +1 -1
- data/decidim-meetings/spec/features/explore_meetings_spec.rb +1 -1
- data/decidim-meetings/spec/features/process_admin_manages_meetings_attachments_spec.rb +1 -1
- data/decidim-meetings/spec/features/process_admin_manages_meetings_spec.rb +1 -1
- data/decidim-meetings/spec/helpers/meetings_helper_spec.rb +16 -0
- data/decidim-meetings/spec/spec_helper.rb +4 -0
- data/decidim-pages/app/models/decidim/pages/page.rb +5 -0
- data/decidim-pages/bin/rails +2 -2
- data/decidim-pages/decidim-pages.gemspec +2 -2
- data/decidim-pages/lib/decidim/pages/feature.rb +1 -1
- data/decidim-pages/spec/commands/destroy_page_spec.rb +1 -1
- data/decidim-pages/spec/spec_helper.rb +4 -0
- data/decidim-proposals/app/assets/config/decidim_proposals_manifest.js +1 -0
- data/decidim-proposals/app/assets/javascripts/decidim/proposals/add_proposal.js.es6 +23 -0
- data/decidim-proposals/app/forms/decidim/proposals/proposal_form.rb +7 -1
- data/decidim-proposals/app/models/decidim/proposals/proposal.rb +14 -2
- data/decidim-proposals/app/views/decidim/proposals/proposals/_proposal.html.erb +1 -0
- data/decidim-proposals/app/views/decidim/proposals/proposals/new.html.erb +5 -0
- data/decidim-proposals/bin/rails +2 -2
- data/decidim-proposals/config/locales/fr.yml +11 -11
- data/decidim-proposals/db/migrate/20170307085300_migrate_proposal_reports_data_to_reports.rb +1 -1
- data/decidim-proposals/decidim-proposals.gemspec +2 -2
- data/decidim-proposals/lib/decidim/proposals/feature.rb +1 -1
- data/decidim-proposals/spec/features/proposals_spec.rb +8 -2
- data/decidim-proposals/spec/models/decidim/proposals/proposal_spec.rb +35 -0
- data/decidim-proposals/spec/shared/create_proposal_examples.rb +20 -14
- data/decidim-proposals/spec/shared/manage_proposals_examples.rb +13 -16
- data/decidim-proposals/spec/shared/proposal_form_examples.rb +22 -16
- data/decidim-proposals/spec/spec_helper.rb +4 -0
- data/decidim-results/app/models/decidim/results/result.rb +10 -0
- data/decidim-results/bin/rails +2 -2
- data/decidim-results/config/locales/fr.yml +2 -2
- data/decidim-results/decidim-results.gemspec +2 -2
- data/decidim-results/lib/decidim/results/feature.rb +1 -1
- data/decidim-results/spec/features/comments_spec.rb +10 -0
- data/decidim-results/spec/spec_helper.rb +4 -0
- data/decidim-surveys/app/models/decidim/surveys/survey_question.rb +2 -0
- data/decidim-surveys/bin/rails +2 -2
- data/decidim-surveys/decidim-surveys.gemspec +2 -2
- data/decidim-surveys/lib/decidim/surveys/feature.rb +3 -2
- data/decidim-surveys/spec/forms/decidim/surveys/admin/survey_question_form_spec.rb +1 -1
- data/decidim-surveys/spec/models/decidim/surveys/survey_question_spec.rb +7 -1
- data/decidim-surveys/spec/spec_helper.rb +5 -0
- data/decidim-system/app/controllers/decidim/system/application_controller.rb +1 -1
- data/decidim-system/app/controllers/decidim/system/devise/sessions_controller.rb +1 -0
- data/decidim-system/app/helpers/decidim/system/menu_helper.rb +1 -1
- data/decidim-system/app/views/decidim/system/shared/_notices.html.erb +11 -0
- data/decidim-system/app/views/layouts/decidim/system/application.html.erb +1 -1
- data/decidim-system/app/views/layouts/decidim/system/login.html.erb +1 -1
- data/decidim-system/bin/rails +2 -2
- data/decidim-system/config/locales/ca.yml +4 -0
- data/decidim-system/config/locales/en.yml +4 -0
- data/decidim-system/config/locales/es.yml +4 -0
- data/decidim-system/db/migrate/20160919105637_devise_create_decidim_admins.rb +5 -5
- data/decidim-system/db/seeds.rb +1 -1
- data/decidim-system/decidim-system.gemspec +2 -2
- data/decidim-system/spec/factories.rb +2 -2
- data/decidim-system/spec/features/manage_admins_spec.rb +3 -3
- data/decidim-system/spec/spec_helper.rb +4 -0
- data/decidim.gemspec +6 -6
- data/docs/how_to_create_a_plugin.md +2 -2
- data/lib/generators/decidim/app_generator.rb +1 -1
- data/lib/generators/decidim/install_generator.rb +35 -27
- data/lib/generators/decidim/templates/Gemfile.erb +1 -0
- data/lib/generators/decidim/templates/initializer.rb +7 -1
- data/logo.svg +62 -0
- data/package.json +37 -35
- data/tsconfig.json +3 -0
- data/yarn.lock +1017 -486
- metadata +32 -25
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_language-chooser.scss +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42a867ce6d753e443dc7c9b505f48a73425bbd61
|
4
|
+
data.tar.gz: 9635831b53baec09202193ed335618068d3d3096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67b511a1d9b77510752fcd91f9f1c4862360264e4b77597b08901ab2c897368530048a84cd722e736ba179e259e4634cb88c1be4a2c50c9a59b130dd1a547193
|
7
|
+
data.tar.gz: 2a69a4ea0c0a9570970a0ba5b3b6b3d6c55c59b9a28352a58c99ede1c2391d65c4c165ac8b58d464549bae5a69cce03ed827acab2eac02d266d61a7fb4801f50
|
data/.rubocop.yml
CHANGED
@@ -435,7 +435,7 @@ Style/ExtraSpacing:
|
|
435
435
|
# When true, allows most uses of extra spacing if the intent is to align
|
436
436
|
# things with the previous or next line, not counting empty lines or comment
|
437
437
|
# lines.
|
438
|
-
AllowForAlignment:
|
438
|
+
AllowForAlignment: false
|
439
439
|
# When true, forces the alignment of = in assignments on consecutive lines.
|
440
440
|
ForceEqualSignAlignment: false
|
441
441
|
|
data/Gemfile.lock
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
decidim (0.
|
5
|
-
decidim-admin (= 0.
|
6
|
-
decidim-api (= 0.
|
7
|
-
decidim-budgets (= 0.
|
8
|
-
decidim-comments (= 0.
|
9
|
-
decidim-core (= 0.
|
10
|
-
decidim-meetings (= 0.
|
11
|
-
decidim-pages (= 0.
|
12
|
-
decidim-proposals (= 0.
|
13
|
-
decidim-results (= 0.
|
14
|
-
decidim-surveys (= 0.
|
15
|
-
decidim-system (= 0.
|
16
|
-
decidim-admin (0.
|
4
|
+
decidim (0.4.0)
|
5
|
+
decidim-admin (= 0.4.0)
|
6
|
+
decidim-api (= 0.4.0)
|
7
|
+
decidim-budgets (= 0.4.0)
|
8
|
+
decidim-comments (= 0.4.0)
|
9
|
+
decidim-core (= 0.4.0)
|
10
|
+
decidim-meetings (= 0.4.0)
|
11
|
+
decidim-pages (= 0.4.0)
|
12
|
+
decidim-proposals (= 0.4.0)
|
13
|
+
decidim-results (= 0.4.0)
|
14
|
+
decidim-surveys (= 0.4.0)
|
15
|
+
decidim-system (= 0.4.0)
|
16
|
+
decidim-admin (0.4.0)
|
17
17
|
active_link_to (~> 1.0.0)
|
18
|
-
decidim-core (= 0.
|
18
|
+
decidim-core (= 0.4.0)
|
19
19
|
devise (~> 4.2)
|
20
20
|
devise-i18n (~> 1.1.0)
|
21
21
|
devise_invitable (~> 1.7.0)
|
@@ -24,29 +24,29 @@ PATH
|
|
24
24
|
rails (~> 5.1.1)
|
25
25
|
rectify (~> 0.9.1)
|
26
26
|
sassc-rails (~> 1.3.0)
|
27
|
-
decidim-api (0.
|
28
|
-
graphiql-rails (~> 1.4.
|
27
|
+
decidim-api (0.4.0)
|
28
|
+
graphiql-rails (~> 1.4.2)
|
29
29
|
graphql (~> 1.6.0)
|
30
30
|
rack-cors (~> 0.4.0)
|
31
31
|
rails (~> 5.1.1)
|
32
32
|
sprockets-es6 (~> 0.9.2)
|
33
|
-
decidim-budgets (0.
|
34
|
-
decidim-comments (= 0.
|
35
|
-
decidim-core (= 0.
|
33
|
+
decidim-budgets (0.4.0)
|
34
|
+
decidim-comments (= 0.4.0)
|
35
|
+
decidim-core (= 0.4.0)
|
36
36
|
kaminari (~> 1.0.1)
|
37
37
|
rectify (~> 0.9.1)
|
38
38
|
searchlight (~> 4.1.0)
|
39
|
-
decidim-comments (0.
|
40
|
-
decidim-core (= 0.
|
39
|
+
decidim-comments (0.4.0)
|
40
|
+
decidim-core (= 0.4.0)
|
41
41
|
jquery-rails (~> 4.0)
|
42
42
|
rails (~> 5.1.1)
|
43
|
-
decidim-core (0.
|
43
|
+
decidim-core (0.4.0)
|
44
44
|
active_link_to (~> 1.0.4)
|
45
45
|
autoprefixer-rails (~> 7.1.1)
|
46
46
|
cancancan (~> 2.0.0)
|
47
47
|
carrierwave (~> 1.1.0)
|
48
48
|
date_validator (~> 0.9.0)
|
49
|
-
decidim-api (= 0.
|
49
|
+
decidim-api (= 0.4.0)
|
50
50
|
devise (~> 4.3)
|
51
51
|
devise-i18n (~> 1.1.0)
|
52
52
|
file_validators (~> 2.1.0)
|
@@ -62,47 +62,48 @@ PATH
|
|
62
62
|
omniauth-facebook (~> 4.0.0)
|
63
63
|
omniauth-google-oauth2 (~> 0.5.0)
|
64
64
|
omniauth-twitter (~> 1.4.0)
|
65
|
-
pg (~> 0.
|
65
|
+
pg (~> 0.21.0)
|
66
66
|
premailer-rails (~> 1.9.5)
|
67
67
|
rails (~> 5.1.1)
|
68
68
|
rails-i18n
|
69
69
|
rectify (~> 0.9.1)
|
70
70
|
redis (~> 3.3.3)
|
71
71
|
rubyzip (= 1.2.1)
|
72
|
+
sass (= 3.4.24)
|
72
73
|
sassc-rails (~> 1.3.0)
|
73
74
|
sprockets-es6 (~> 0.9.2)
|
74
75
|
truncato (~> 0.7.9)
|
75
76
|
wisper (~> 2.0.0)
|
76
|
-
decidim-meetings (0.
|
77
|
+
decidim-meetings (0.4.0)
|
77
78
|
date_validator (~> 0.9)
|
78
|
-
decidim-core (= 0.
|
79
|
+
decidim-core (= 0.4.0)
|
79
80
|
httparty (~> 0.15.0)
|
80
81
|
jquery-tmpl-rails (~> 1.1.0)
|
81
82
|
kaminari (~> 1.0.1)
|
82
83
|
rectify (~> 0.8)
|
83
84
|
searchlight (~> 4.1.0)
|
84
|
-
decidim-pages (0.
|
85
|
-
decidim-comments (= 0.
|
86
|
-
decidim-core (= 0.
|
85
|
+
decidim-pages (0.4.0)
|
86
|
+
decidim-comments (= 0.4.0)
|
87
|
+
decidim-core (= 0.4.0)
|
87
88
|
rectify (~> 0.9.1)
|
88
|
-
decidim-proposals (0.
|
89
|
-
decidim-comments (= 0.
|
90
|
-
decidim-core (= 0.
|
89
|
+
decidim-proposals (0.4.0)
|
90
|
+
decidim-comments (= 0.4.0)
|
91
|
+
decidim-core (= 0.4.0)
|
91
92
|
kaminari (~> 1.0.1)
|
92
93
|
rectify (~> 0.9.1)
|
93
94
|
social-share-button (~> 0.10.0)
|
94
|
-
decidim-results (0.
|
95
|
-
decidim-comments (= 0.
|
96
|
-
decidim-core (= 0.
|
95
|
+
decidim-results (0.4.0)
|
96
|
+
decidim-comments (= 0.4.0)
|
97
|
+
decidim-core (= 0.4.0)
|
97
98
|
kaminari (~> 1.0.1)
|
98
99
|
rectify (~> 0.9.1)
|
99
100
|
searchlight (~> 4.1.0)
|
100
|
-
decidim-surveys (0.
|
101
|
-
decidim-core (= 0.
|
101
|
+
decidim-surveys (0.4.0)
|
102
|
+
decidim-core (= 0.4.0)
|
102
103
|
jquery-tmpl-rails (~> 1.1.0)
|
103
|
-
decidim-system (0.
|
104
|
+
decidim-system (0.4.0)
|
104
105
|
active_link_to (~> 1.0.0)
|
105
|
-
decidim-core (= 0.
|
106
|
+
decidim-core (= 0.4.0)
|
106
107
|
devise (~> 4.2)
|
107
108
|
devise-i18n (~> 1.1.0)
|
108
109
|
devise_invitable (~> 1.7.1)
|
@@ -115,22 +116,21 @@ PATH
|
|
115
116
|
PATH
|
116
117
|
remote: decidim-dev
|
117
118
|
specs:
|
118
|
-
decidim-dev (0.
|
119
|
+
decidim-dev (0.4.0)
|
119
120
|
byebug
|
120
121
|
capybara (~> 2.14.0)
|
121
122
|
capybara-screenshot (~> 1.0.14)
|
122
123
|
codecov (~> 0.1.9)
|
123
124
|
database_cleaner (~> 1.6.0)
|
124
125
|
db-query-matchers (~> 0.9.0)
|
125
|
-
decidim (= 0.
|
126
|
+
decidim (= 0.4.0)
|
126
127
|
factory_girl_rails
|
127
128
|
faker (~> 1.7.3)
|
128
129
|
i18n-tasks (= 0.9.15)
|
129
130
|
launchy
|
130
|
-
letter_opener_web (~> 1.3.0)
|
131
131
|
listen (~> 3.1.0)
|
132
132
|
poltergeist (~> 1.15.0)
|
133
|
-
puma (~> 3.
|
133
|
+
puma (~> 3.9.1)
|
134
134
|
rails-controller-testing (~> 1.0.1)
|
135
135
|
rspec-html-matchers (~> 0.9.1)
|
136
136
|
rspec-rails (~> 3.5, < 3.6)
|
@@ -291,7 +291,7 @@ GEM
|
|
291
291
|
activesupport (>= 4.2.0)
|
292
292
|
graphiql-rails (1.4.2)
|
293
293
|
rails
|
294
|
-
graphql (1.6.
|
294
|
+
graphql (1.6.4)
|
295
295
|
hashdiff (0.3.4)
|
296
296
|
hashie (3.5.5)
|
297
297
|
high_voltage (3.0.0)
|
@@ -335,12 +335,6 @@ GEM
|
|
335
335
|
kaminari-core (1.0.1)
|
336
336
|
launchy (2.4.3)
|
337
337
|
addressable (~> 2.3)
|
338
|
-
letter_opener (1.4.1)
|
339
|
-
launchy (~> 2.2)
|
340
|
-
letter_opener_web (1.3.1)
|
341
|
-
actionmailer (>= 3.2)
|
342
|
-
letter_opener (~> 1.0)
|
343
|
-
railties (>= 3.2)
|
344
338
|
listen (3.1.5)
|
345
339
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
346
340
|
rb-inotify (~> 0.9, >= 0.9.7)
|
@@ -353,7 +347,7 @@ GEM
|
|
353
347
|
mime-types (3.1)
|
354
348
|
mime-types-data (~> 3.2015)
|
355
349
|
mime-types-data (3.2016.0521)
|
356
|
-
mini_magick (4.7.
|
350
|
+
mini_magick (4.7.2)
|
357
351
|
mini_portile2 (2.1.0)
|
358
352
|
minitest (5.10.2)
|
359
353
|
multi_json (1.12.1)
|
@@ -391,7 +385,7 @@ GEM
|
|
391
385
|
orm_adapter (0.5.0)
|
392
386
|
parser (2.4.0.0)
|
393
387
|
ast (~> 2.2)
|
394
|
-
pg (0.
|
388
|
+
pg (0.21.0)
|
395
389
|
poltergeist (1.15.0)
|
396
390
|
capybara (~> 2.1)
|
397
391
|
cliver (~> 0.3.1)
|
@@ -401,11 +395,11 @@ GEM
|
|
401
395
|
addressable
|
402
396
|
css_parser (>= 1.4.10)
|
403
397
|
htmlentities (>= 4.0.0)
|
404
|
-
premailer-rails (1.9.
|
398
|
+
premailer-rails (1.9.7)
|
405
399
|
actionmailer (>= 3, < 6)
|
406
400
|
premailer (~> 1.7, >= 1.7.9)
|
407
401
|
public_suffix (2.0.5)
|
408
|
-
puma (3.
|
402
|
+
puma (3.9.1)
|
409
403
|
rack (2.0.3)
|
410
404
|
rack-cors (0.4.1)
|
411
405
|
rack-test (0.6.3)
|
@@ -534,7 +528,7 @@ GEM
|
|
534
528
|
nokogiri (~> 1.7.0)
|
535
529
|
tzinfo (1.2.3)
|
536
530
|
thread_safe (~> 0.1)
|
537
|
-
unicode-display_width (1.
|
531
|
+
unicode-display_width (1.3.0)
|
538
532
|
url (0.3.2)
|
539
533
|
virtus (1.0.5)
|
540
534
|
axiom-types (~> 0.1)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<img src="https://
|
1
|
+
<img src="https://cdn.rawgit.com/decidim/decidim/master/logo.svg" alt="Decidim Logo" width="400">
|
2
2
|
|
3
3
|
The participatory democracy framework.
|
4
4
|
|
@@ -116,6 +116,7 @@ After you create a development app (`bundle exec rake development_app`):
|
|
116
116
|
| [Pages](https://github.com/decidim/decidim/tree/master/decidim-pages) | The Pages module adds static page capabilities to any participatory process. It basically provides an interface to include arbitrary HTML content to any step. |
|
117
117
|
| [Proposals](https://github.com/decidim/decidim/tree/master/decidim-proposals) | The Proposals module adds one of the main features of Decidim: allows users to contribute to a participatory process by creating proposals. |
|
118
118
|
| [Results](https://github.com/decidim/decidim/tree/master/decidim-results) | Adds a results section to any participatory process so users can follow along the state of the accepted proposals. |
|
119
|
+
| [Surveys](https://github.com/decidim/decidim/tree/master/decidim-surveys) | Adds the ability for admins to create arbitrary surveys. |
|
119
120
|
| [System](https://github.com/decidim/decidim/tree/master/decidim-system) | Multitenant Admin to manage multiple organizations in a single installation |
|
120
121
|
|
121
122
|
## Technical tradeoffs
|
data/Rakefile
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rspec/core/rake_task"
|
5
|
-
|
6
|
-
|
5
|
+
require "generators/decidim/app_generator"
|
6
|
+
require "generators/decidim/docker_generator"
|
7
|
+
require "decidim/dev"
|
7
8
|
|
8
|
-
load "decidim-core/lib/tasks/decidim_tasks.rake"
|
9
9
|
load "decidim-dev/lib/tasks/test_app.rake"
|
10
10
|
|
11
11
|
DECIDIM_GEMS = %w(core system admin api pages meetings proposals comments results budgets surveys dev).freeze
|
@@ -15,7 +15,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
15
15
|
task default: :spec
|
16
16
|
|
17
17
|
desc "Runs all tests in all Decidim engines"
|
18
|
-
task test_all
|
18
|
+
task :test_all do
|
19
19
|
DECIDIM_GEMS.each do |gem_name|
|
20
20
|
next if gem_name == "dev"
|
21
21
|
|
@@ -2,4 +2,60 @@
|
|
2
2
|
a.logo {
|
3
3
|
color: #fff;
|
4
4
|
}
|
5
|
-
|
5
|
+
@include breakpoint(smallmedium down){
|
6
|
+
border-top: 2.125rem solid darken($dark-gray, 15%);
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
.tool-bar{
|
11
|
+
text-align: right;
|
12
|
+
position: absolute;
|
13
|
+
right: 2rem;
|
14
|
+
vertical-align: middle;
|
15
|
+
@include breakpoint(smallmedium down){
|
16
|
+
position: initial;
|
17
|
+
}
|
18
|
+
.user-login{
|
19
|
+
vertical-align: middle;
|
20
|
+
position: initial;
|
21
|
+
text-align: left;
|
22
|
+
display: inline-block;
|
23
|
+
margin-top: 0px;
|
24
|
+
@include breakpoint(smallmedium down){
|
25
|
+
position: absolute;
|
26
|
+
right: 2rem;
|
27
|
+
margin-top: -1.2rem;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
.language-choose{
|
31
|
+
position: initial;
|
32
|
+
vertical-align: middle;
|
33
|
+
text-align: left;
|
34
|
+
display: inline-block;
|
35
|
+
vertical-align: middle;
|
36
|
+
.is-dropdown-submenu-parent a{
|
37
|
+
color: #fff;
|
38
|
+
&:after{
|
39
|
+
border-color: #fff transparent transparent !important;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
.is-dropdown-submenu li > a {
|
43
|
+
color: $dark-gray;
|
44
|
+
&:hover{
|
45
|
+
background-color: lighten($medium-gray, 30%)
|
46
|
+
}
|
47
|
+
}
|
48
|
+
@include breakpoint(smallmedium down){
|
49
|
+
font-size: .8rem;
|
50
|
+
position: absolute;
|
51
|
+
top: -2.2rem;
|
52
|
+
left: .5rem;
|
53
|
+
margin-left: 0;
|
54
|
+
.dropdown.menu > li.is-dropdown-submenu-parent > a::after{
|
55
|
+
border-width: 3px;
|
56
|
+
right: 10px;
|
57
|
+
margin-top: 0;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
@@ -24,9 +24,12 @@ module Decidim
|
|
24
24
|
# Returns nothing.
|
25
25
|
def call
|
26
26
|
return broadcast(:invalid) if form.invalid?
|
27
|
-
return broadcast(:invalid) unless user
|
28
27
|
|
29
|
-
|
28
|
+
ActiveRecord::Base.transaction do
|
29
|
+
create_or_invite_user
|
30
|
+
create_role
|
31
|
+
end
|
32
|
+
|
30
33
|
broadcast(:ok)
|
31
34
|
rescue ActiveRecord::RecordInvalid
|
32
35
|
form.errors.add(:email, :taken)
|
@@ -35,21 +38,39 @@ module Decidim
|
|
35
38
|
|
36
39
|
private
|
37
40
|
|
38
|
-
attr_reader :form, :participatory_process, :current_user
|
41
|
+
attr_reader :form, :participatory_process, :current_user, :user
|
39
42
|
|
40
43
|
def create_role
|
41
|
-
ParticipatoryProcessUserRole.
|
44
|
+
ParticipatoryProcessUserRole.find_or_create_by!(
|
42
45
|
role: form.role.to_sym,
|
43
46
|
user: user,
|
44
47
|
participatory_process: @participatory_process
|
45
48
|
)
|
46
49
|
end
|
47
50
|
|
48
|
-
def
|
49
|
-
@user ||=
|
51
|
+
def create_or_invite_user
|
52
|
+
@user ||= existing_user || new_user
|
53
|
+
end
|
54
|
+
|
55
|
+
def existing_user
|
56
|
+
return @existing_user if defined?(@existing_user)
|
57
|
+
|
58
|
+
@existing_user = User.where(
|
50
59
|
email: form.email,
|
51
60
|
organization: participatory_process.organization
|
52
|
-
).first
|
61
|
+
).first
|
62
|
+
|
63
|
+
if @existing_user && !@existing_user.invitation_accepted?
|
64
|
+
InviteUserAgain.call(@existing_user, invitation_instructions)
|
65
|
+
end
|
66
|
+
|
67
|
+
@existing_user
|
68
|
+
end
|
69
|
+
|
70
|
+
def new_user
|
71
|
+
new_user_form = user_form.dup
|
72
|
+
new_user_form.roles = []
|
73
|
+
@new_user ||= InviteUser.call(new_user_form) do
|
53
74
|
on(:ok) do |user|
|
54
75
|
return user
|
55
76
|
end
|
@@ -38,7 +38,8 @@ module Decidim
|
|
38
38
|
description: form.description,
|
39
39
|
start_date: form.start_date,
|
40
40
|
end_date: form.end_date,
|
41
|
-
participatory_process: @participatory_process
|
41
|
+
participatory_process: @participatory_process,
|
42
|
+
active: @participatory_process.steps.empty?
|
42
43
|
)
|
43
44
|
end
|
44
45
|
end
|
@@ -19,8 +19,7 @@ module Decidim
|
|
19
19
|
#
|
20
20
|
# Returns nothing.
|
21
21
|
def call
|
22
|
-
return broadcast(:invalid, :
|
23
|
-
return broadcast(:invalid, :active_step) if @step.active?
|
22
|
+
return broadcast(:invalid, :active_step) if active_step?
|
24
23
|
|
25
24
|
@step.destroy!
|
26
25
|
reorder_steps
|
@@ -29,6 +28,10 @@ module Decidim
|
|
29
28
|
|
30
29
|
private
|
31
30
|
|
31
|
+
def active_step?
|
32
|
+
@participatory_process.steps.count > 1 && @step.active?
|
33
|
+
end
|
34
|
+
|
32
35
|
def reorder_steps
|
33
36
|
steps = @participatory_process.steps.reload
|
34
37
|
|