decidim 0.0.8.1 → 0.1.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/.circleci/config.yml +21 -21
- data/.codeclimate.yml +10 -6
- data/.eslintignore +1 -0
- data/.gitignore +1 -1
- data/.rubocop.yml +38 -20
- data/.travis.yml +0 -1
- data/Gemfile +6 -9
- data/Gemfile.lock +165 -205
- data/Rakefile +1 -1
- data/codecov.yml +5 -71
- data/crowdin.yaml +1 -1
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_decidim.scss +9 -2
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_action-icon.scss +7 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_cards.scss +6 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_editor.scss +1 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/{_sidebar.scss → extra/_sidebar.scss} +0 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +23 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_cards.scss +0 -7
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_icons.scss +4 -2
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_modules.scss +0 -1
- data/decidim-admin/app/assets/stylesheets/decidim/admin/{modules/_datepicker.scss → plugins/_foundation-datepicker.scss} +1 -1
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/_constants.scss +5 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/_math.scss +45 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_acos.scss +12 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_asin.scss +12 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan.scss +28 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan2.scss +37 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cos.scss +13 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cot.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_csc.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_exp.scss +12 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_fact.scss +18 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss +21 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss +17 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_log.scss +34 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_pow.scss +28 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sec.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sin.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sqrt.scss +16 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_tan.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_deg-to-rad.scss +4 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_rad-to-deg.scss +4 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_strip-unit.scss +8 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss +13 -0
- data/decidim-admin/app/commands/decidim/admin/create_participatory_process.rb +23 -17
- data/decidim-admin/app/commands/decidim/admin/create_participatory_process_group.rb +1 -1
- data/decidim-admin/app/controllers/decidim/admin/moderations_controller.rb +4 -4
- data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +1 -1
- data/decidim-admin/app/forms/decidim/admin/organization_form.rb +6 -2
- data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +5 -0
- data/decidim-admin/app/helpers/decidim/admin/application_helper.rb +1 -1
- data/decidim-admin/app/helpers/decidim/admin/attributes_display_helper.rb +1 -1
- data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +5 -1
- data/decidim-admin/app/views/decidim/admin/moderations/_report.html.erb +11 -0
- data/decidim-admin/app/views/decidim/admin/moderations/index.html.erb +22 -24
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +3 -0
- data/decidim-admin/config/i18n-tasks.yml +1 -0
- data/decidim-admin/config/locales/ca.yml +7 -3
- data/decidim-admin/config/locales/en.yml +6 -2
- data/decidim-admin/config/locales/es.yml +7 -3
- data/decidim-admin/config/locales/eu.yml +4 -3
- data/decidim-admin/config/locales/fi.yml +4 -3
- data/decidim-admin/config/locales/fr.yml +389 -2
- data/decidim-admin/config/locales/nl.yml +4 -1
- data/decidim-admin/decidim-admin.gemspec +3 -3
- data/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb +2 -2
- data/decidim-admin/spec/commands/activate_participatory_process_step_spec.rb +1 -0
- data/decidim-admin/spec/commands/create_category_spec.rb +1 -1
- data/decidim-admin/spec/commands/create_feature_spec.rb +7 -5
- data/decidim-admin/spec/commands/create_participatory_process_admin_spec.rb +2 -1
- data/decidim-admin/spec/commands/create_participatory_process_spec.rb +14 -6
- data/decidim-admin/spec/commands/create_scope_spec.rb +3 -2
- data/decidim-admin/spec/commands/deactivate_participatory_process_step_spec.rb +1 -0
- data/decidim-admin/spec/commands/destroy_feature_spec.rb +1 -0
- data/decidim-admin/spec/commands/destroy_participatory_process_step_spec.rb +1 -0
- data/decidim-admin/spec/commands/publish_participatory_process_spec.rb +1 -0
- data/decidim-admin/spec/commands/reorder_participatory_process_steps_spec.rb +1 -0
- data/decidim-admin/spec/commands/unpublish_participatory_process_spec.rb +1 -0
- data/decidim-admin/spec/commands/update_feature_spec.rb +7 -5
- data/decidim-admin/spec/commands/update_participatory_process_spec.rb +5 -5
- data/decidim-admin/spec/commands/update_scope_spec.rb +3 -2
- data/decidim-admin/spec/factories.rb +1 -0
- data/decidim-admin/spec/features/admin_invite_spec.rb +5 -5
- data/decidim-admin/spec/features/admin_manages_newsletters_spec.rb +5 -5
- data/decidim-admin/spec/features/admin_manages_organization_admins_spec.rb +2 -2
- data/decidim-admin/spec/features/admin_manages_organization_scopes_spec.rb +3 -3
- data/decidim-admin/spec/features/admin_manages_organization_spec.rb +7 -11
- data/decidim-admin/spec/features/admin_manages_participatory_process_groups_spec.rb +2 -2
- data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +3 -3
- data/decidim-admin/spec/features/static_pages_spec.rb +8 -7
- data/decidim-admin/spec/forms/newsletter_form_spec.rb +2 -2
- data/decidim-admin/spec/forms/organization_form_spec.rb +3 -3
- data/decidim-admin/spec/forms/participatory_process_form_spec.rb +4 -4
- data/decidim-admin/spec/forms/participatory_process_step_form_spec.rb +1 -1
- data/decidim-admin/spec/forms/participatory_process_user_role_form_spec.rb +1 -1
- data/decidim-admin/spec/forms/scope_form_spec.rb +1 -1
- data/decidim-admin/spec/helpers/aria_selected_link_to_helper_spec.rb +1 -0
- data/decidim-admin/spec/helpers/feature_settings_helper_spec.rb +1 -0
- data/decidim-admin/spec/jobs/newsletter_delivery_job_spec.rb +2 -2
- data/decidim-admin/spec/queries/process_admins_spec.rb +1 -1
- data/decidim-admin/spec/shared/manage_process_admins_examples.rb +2 -2
- data/decidim-admin/spec/shared/manage_process_categories_examples.rb +3 -3
- data/decidim-admin/spec/shared/manage_process_steps_examples.rb +5 -5
- data/decidim-admin/spec/shared/manage_processes_examples.rb +4 -4
- data/decidim-admin/spec/shared/participatory_admin_shared_context.rb +1 -0
- data/decidim-admin/spec/spec_helper.rb +1 -0
- data/decidim-admin/spec/views/decidim/static_pages/_form.html.erb_spec.rb +1 -0
- data/decidim-api/app/controllers/decidim/api/application_controller.rb +1 -1
- data/decidim-api/decidim-api.gemspec +1 -1
- data/decidim-api/spec/factories.rb +1 -0
- data/decidim-api/spec/spec_helper.rb +1 -0
- data/decidim-budgets/app/queries/decidim/budgets/filtered_projects.rb +36 -0
- data/decidim-budgets/config/locales/ca.yml +1 -0
- data/decidim-budgets/config/locales/en.yml +1 -0
- data/decidim-budgets/config/locales/es.yml +1 -0
- data/decidim-budgets/config/locales/fr.yml +35 -3
- data/decidim-budgets/decidim-budgets.gemspec +2 -2
- data/decidim-budgets/lib/decidim/budgets/feature.rb +9 -0
- data/decidim-budgets/spec/commands/add_line_item_spec.rb +6 -9
- data/decidim-budgets/spec/commands/cancel_order_spec.rb +3 -1
- data/decidim-budgets/spec/commands/checkout_spec.rb +3 -1
- data/decidim-budgets/spec/commands/create_project_spec.rb +4 -3
- data/decidim-budgets/spec/commands/remove_line_item_spec.rb +2 -1
- data/decidim-budgets/spec/commands/update_project_spec.rb +4 -3
- data/decidim-budgets/spec/factories.rb +1 -0
- data/decidim-budgets/spec/features/orders_spec.rb +24 -24
- data/decidim-budgets/spec/forms/project_form_spec.rb +1 -0
- data/decidim-budgets/spec/models/project_spec.rb +1 -1
- data/decidim-budgets/spec/queries/decidim/budgets/filtered_projects_spec.rb +21 -0
- data/decidim-budgets/spec/services/project_search_spec.rb +4 -3
- data/decidim-budgets/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-budgets/spec/shared/manage_attachments_examples.rb +1 -0
- data/decidim-budgets/spec/spec_helper.rb +1 -0
- data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
- data/decidim-comments/app/commands/decidim/comments/create_comment.rb +8 -2
- data/decidim-comments/app/frontend/application/application.component.tsx +3 -3
- data/decidim-comments/app/frontend/application/icon.component.tsx +1 -1
- data/decidim-comments/app/frontend/comments/add_comment_form.component.tsx +7 -7
- data/decidim-comments/app/frontend/comments/comment.component.test.tsx +7 -7
- data/decidim-comments/app/frontend/comments/comment.component.tsx +6 -6
- data/decidim-comments/app/frontend/comments/comment_thread.component.tsx +2 -2
- data/decidim-comments/app/frontend/comments/comments.component.test.tsx +5 -5
- data/decidim-comments/app/frontend/comments/comments.component.tsx +6 -6
- data/decidim-comments/app/frontend/comments/down_vote_button.component.test.tsx +4 -4
- data/decidim-comments/app/frontend/comments/down_vote_button.component.tsx +3 -3
- data/decidim-comments/app/frontend/comments/up_vote_button.component.test.tsx +4 -4
- data/decidim-comments/app/frontend/comments/up_vote_button.component.tsx +3 -3
- data/decidim-comments/app/frontend/comments/vote_button.component.tsx +1 -1
- data/decidim-comments/app/frontend/comments/vote_button_component.test.tsx +2 -2
- data/decidim-comments/app/frontend/entry.ts +2 -2
- data/decidim-comments/app/frontend/support/generate_comments_data.ts +2 -2
- data/decidim-comments/app/frontend/support/load_translations.ts +2 -2
- data/decidim-comments/app/frontend/support/resolve_graphql_query.ts +1 -1
- data/decidim-comments/app/mailers/decidim/comments/comment_notification_mailer.rb +1 -1
- data/decidim-comments/app/models/decidim/comments/comment.rb +3 -8
- data/decidim-comments/app/models/decidim/comments/seed.rb +1 -0
- data/decidim-comments/config/locales/fr.yml +62 -1
- data/decidim-comments/db/migrate/20170504085413_add_root_commentable_to_comments.rb +7 -0
- data/decidim-comments/db/migrate/20170510091348_update_root_commentable_for_comments.rb +22 -0
- data/decidim-comments/db/migrate/20170510091409_set_root_commentable_null_constraints.rb +6 -0
- data/decidim-comments/db/seeds.rb +4 -2
- data/decidim-comments/lib/decidim/comments/engine.rb +8 -0
- data/decidim-comments/lib/decidim/comments/test/factories.rb +1 -0
- data/decidim-comments/spec/commands/create_comment_spec.rb +13 -6
- data/decidim-comments/spec/commands/vote_comment_spec.rb +2 -6
- data/decidim-comments/spec/factories.rb +1 -0
- data/decidim-comments/spec/features/notifications_spec.rb +4 -4
- data/decidim-comments/spec/features/process_admin_manages_comments_spec.rb +1 -1
- data/decidim-comments/spec/features/report_comment_spec.rb +4 -2
- data/decidim-comments/spec/helpers/comments_helper_spec.rb +3 -3
- data/decidim-comments/spec/mailers/comment_notification_mailer_spec.rb +2 -1
- data/decidim-comments/spec/models/comment_spec.rb +5 -9
- data/decidim-comments/spec/models/comment_vote_spec.rb +3 -3
- data/decidim-comments/spec/models/seed_spec.rb +1 -1
- data/decidim-comments/spec/queries/sorted_comments_spec.rb +5 -5
- data/decidim-comments/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-comments/spec/spec_helper.rb +1 -0
- data/decidim-comments/spec/types/comment_mutation_type_spec.rb +4 -12
- data/decidim-comments/spec/types/comment_type_spec.rb +4 -5
- data/decidim-comments/spec/types/commentable_mutation_type_spec.rb +2 -2
- data/decidim-comments/spec/types/mutation_type_spec.rb +4 -6
- data/decidim-comments/spec/types/query_type_spec.rb +1 -1
- data/decidim-dev/decidim-dev.gemspec +6 -6
- data/decidim-dev/lib/decidim/dev/common_rake.rb +5 -1
- data/decidim-dev/lib/decidim/dev/railtie.rb +1 -0
- data/decidim-dev/lib/decidim/dev/test/base_spec_helper.rb +0 -2
- data/decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb +4 -3
- data/decidim-dev/lib/decidim/dev/test/rspec_support/i18n.rb +2 -2
- data/decidim-dev/lib/decidim/dev/test/rspec_support/webmock.rb +1 -0
- data/decidim-dev/lib/generators/decidim/dummy_generator.rb +1 -1
- data/decidim-dev/lib/generators/decidim/templates/autoprefixer_initializer.rb +4 -3
- data/decidim-dev/lib/tasks/test_app.rake +1 -0
- data/decidim-meetings/app/controllers/decidim/meetings/meeting_widgets_controller.rb +1 -0
- data/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb +8 -8
- data/decidim-meetings/app/helpers/decidim/meetings/map_helper.rb +9 -9
- data/decidim-meetings/app/models/decidim/meetings/meeting.rb +1 -1
- data/decidim-meetings/app/views/decidim/meetings/meeting_widgets/show.html.erb +8 -17
- data/decidim-meetings/config/locales/fr.yml +95 -1
- data/decidim-meetings/lib/decidim/meetings/feature.rb +7 -0
- data/decidim-meetings/spec/commands/close_meeting_spec.rb +2 -1
- data/decidim-meetings/spec/commands/create_meeting_spec.rb +6 -5
- data/decidim-meetings/spec/commands/update_meeting_spec.rb +6 -5
- data/decidim-meetings/spec/factories.rb +1 -0
- data/decidim-meetings/spec/features/explore_meetings_spec.rb +2 -1
- data/decidim-meetings/spec/forms/close_meeting_form_spec.rb +1 -0
- data/decidim-meetings/spec/forms/meeting_form_spec.rb +5 -3
- data/decidim-meetings/spec/services/meeting_search_spec.rb +3 -2
- data/decidim-meetings/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-meetings/spec/shared/manage_attachments_examples.rb +1 -1
- data/decidim-meetings/spec/shared/manage_meetings_examples.rb +21 -20
- data/decidim-meetings/spec/spec_helper.rb +1 -0
- data/decidim-pages/config/locales/fr.yml +18 -1
- data/decidim-pages/decidim-pages.gemspec +1 -1
- data/decidim-pages/lib/decidim/pages/feature.rb +7 -0
- data/decidim-pages/spec/commands/create_page_spec.rb +1 -3
- data/decidim-pages/spec/factories.rb +1 -0
- data/decidim-pages/spec/spec_helper.rb +1 -0
- data/decidim-proposals/app/commands/decidim/proposals/create_proposal_export.rb +36 -0
- data/decidim-proposals/app/controllers/decidim/proposals/admin/exports_controller.rb +24 -0
- data/decidim-proposals/app/controllers/decidim/proposals/proposal_votes_controller.rb +3 -1
- data/decidim-proposals/app/controllers/decidim/proposals/proposal_widgets_controller.rb +0 -5
- data/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb +0 -1
- data/decidim-proposals/app/jobs/decidim/proposals/export_job.rb +21 -0
- data/decidim-proposals/app/models/decidim/proposals/proposal.rb +1 -1
- data/decidim-proposals/app/queries/decidim/proposals/filtered_proposals.rb +36 -0
- data/decidim-proposals/app/services/decidim/proposals/proposal_serializer.rb +72 -0
- data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +15 -3
- data/decidim-proposals/app/views/decidim/proposals/proposal_widgets/show.html.erb +4 -25
- data/decidim-proposals/config/locales/ca.yml +4 -0
- data/decidim-proposals/config/locales/en.yml +6 -1
- data/decidim-proposals/config/locales/es.yml +4 -0
- data/decidim-proposals/config/locales/fr.yml +146 -1
- data/decidim-proposals/decidim-proposals.gemspec +2 -2
- data/decidim-proposals/lib/decidim/proposals/admin_engine.rb +5 -0
- data/decidim-proposals/lib/decidim/proposals/feature.rb +14 -0
- data/decidim-proposals/spec/factories.rb +1 -0
- data/decidim-proposals/spec/features/admin_manages_proposals_spec.rb +1 -0
- data/decidim-proposals/spec/features/process_admin_manages_proposals_spec.rb +1 -0
- data/decidim-proposals/spec/features/proposals_spec.rb +29 -28
- data/decidim-proposals/spec/features/report_proposal_spec.rb +2 -2
- data/decidim-proposals/spec/features/vote_proposal_spec.rb +36 -32
- data/decidim-proposals/spec/helpers/proposal_order_helper_spec.rb +3 -3
- data/decidim-proposals/spec/jobs/export_job_spec.rb +57 -0
- data/decidim-proposals/spec/lib/decidim/proposals/feature_spec.rb +1 -0
- data/decidim-proposals/spec/models/decidim/proposals/proposal_vote_spec.rb +3 -3
- data/decidim-proposals/spec/queries/decidim/proposals/filtered_proposals_spec.rb +21 -0
- data/decidim-proposals/spec/services/decidim/proposals/proposal_search_spec.rb +12 -12
- data/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb +71 -0
- data/decidim-proposals/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-proposals/spec/shared/create_proposal_examples.rb +4 -3
- data/decidim-proposals/spec/shared/export_proposals_examples.rb +37 -0
- data/decidim-proposals/spec/shared/manage_proposals_examples.rb +12 -11
- data/decidim-proposals/spec/shared/proposal_form_examples.rb +9 -8
- data/decidim-proposals/spec/spec_helper.rb +1 -0
- data/decidim-results/app/controllers/decidim/results/result_widgets_controller.rb +1 -0
- data/decidim-results/app/controllers/decidim/results/results_controller.rb +1 -1
- data/decidim-results/app/queries/decidim/results/filtered_results.rb +36 -0
- data/decidim-results/app/services/decidim/results/result_stats_calculator.rb +1 -1
- data/decidim-results/app/views/decidim/results/result_widgets/show.html.erb +2 -10
- data/decidim-results/config/locales/fr.yml +75 -1
- data/decidim-results/decidim-results.gemspec +2 -2
- data/decidim-results/lib/decidim/results/feature.rb +9 -0
- data/decidim-results/spec/commands/create_result_spec.rb +4 -3
- data/decidim-results/spec/commands/update_result_spec.rb +5 -4
- data/decidim-results/spec/controllers/results_controller_spec.rb +31 -0
- data/decidim-results/spec/factories.rb +1 -0
- data/decidim-results/spec/features/explore_results_spec.rb +75 -74
- data/decidim-results/spec/forms/result_form_spec.rb +2 -1
- data/decidim-results/spec/queries/decidim/results/filtered_results_spec.rb +21 -0
- data/decidim-results/spec/services/result_search_spec.rb +4 -3
- data/decidim-results/spec/services/result_stats_calculator_spec.rb +1 -0
- data/decidim-results/spec/shared/admin_shared_context.rb +1 -0
- data/decidim-results/spec/spec_helper.rb +1 -0
- data/decidim-system/config/locales/fr.yml +64 -1
- data/decidim-system/decidim-system.gemspec +3 -3
- data/decidim-system/spec/factories.rb +1 -0
- data/decidim-system/spec/spec_helper.rb +1 -0
- data/docs/how_to_create_a_plugin.md +117 -139
- data/lib/generators/decidim/install_generator.rb +1 -1
- data/package.json +30 -31
- data/tslint.json +1 -2
- data/webpack.config.js +2 -3
- data/yarn.lock +976 -1326
- metadata +68 -31
- data/decidim-admin/yarn.lock +0 -4
- data/decidim-api/.gitignore +0 -7
- data/decidim-budgets/.gitignore +0 -7
- data/decidim-meetings/.gitignore +0 -7
- data/decidim-pages/.gitignore +0 -3
- data/decidim-proposals/.gitignore +0 -3
- data/decidim-results/.gitignore +0 -7
@@ -16,7 +16,7 @@ describe "Admin manage participatory processes", type: :feature do
|
|
16
16
|
|
17
17
|
it "creates a new participatory_process" do
|
18
18
|
within ".secondary-nav__actions" do
|
19
|
-
page.find(
|
19
|
+
page.find("a.button").click
|
20
20
|
end
|
21
21
|
|
22
22
|
within ".new_participatory_process" do
|
@@ -65,8 +65,8 @@ describe "Admin manage participatory processes", type: :feature do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
within ".container" do
|
68
|
-
expect(page).to
|
69
|
-
expect(page).to
|
68
|
+
expect(page).to have_selector("input[value='My participatory process']")
|
69
|
+
expect(page).to have_selector("option[selected]", text: @group_name)
|
70
70
|
expect(page).to have_css("img[src*='#{image1_filename}']")
|
71
71
|
expect(page).to have_css("img[src*='#{image2_filename}']")
|
72
72
|
end
|
@@ -21,8 +21,9 @@ describe "Content pages", type: :feature do
|
|
21
21
|
it "shows the list of all the pages" do
|
22
22
|
decidim_pages.each do |decidim_page|
|
23
23
|
expect(page).to have_css(
|
24
|
-
|
25
|
-
|
24
|
+
"a[href=\"#{decidim.page_path(decidim_page)}\"]",
|
25
|
+
text: decidim_page.title[I18n.locale.to_s].upcase
|
26
|
+
)
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
@@ -79,19 +80,19 @@ describe "Content pages", type: :feature do
|
|
79
80
|
|
80
81
|
it "can edit them" do
|
81
82
|
within find("tr", text: translated(decidim_page.title)) do
|
82
|
-
page.find(
|
83
|
+
page.find(".action-icon.action-icon--edit").click
|
83
84
|
end
|
84
85
|
|
85
86
|
within ".edit_static_page" do
|
86
87
|
fill_in_i18n(
|
87
88
|
:static_page_title,
|
88
89
|
"#title-tabs",
|
89
|
-
en: "Not welcomed anymore"
|
90
|
+
en: "Not welcomed anymore"
|
90
91
|
)
|
91
92
|
fill_in_i18n_editor(
|
92
93
|
:static_page_content,
|
93
94
|
"#content-tabs",
|
94
|
-
en: "This is the new <strong>content</strong>"
|
95
|
+
en: "This is the new <strong>content</strong>"
|
95
96
|
)
|
96
97
|
find("*[type=submit]").click
|
97
98
|
end
|
@@ -107,7 +108,7 @@ describe "Content pages", type: :feature do
|
|
107
108
|
|
108
109
|
it "can destroy them" do
|
109
110
|
within find("tr", text: translated(decidim_page.title)) do
|
110
|
-
page.find(
|
111
|
+
page.find(".action-icon.action-icon--remove").click
|
111
112
|
end
|
112
113
|
|
113
114
|
within ".callout-wrapper" do
|
@@ -121,7 +122,7 @@ describe "Content pages", type: :feature do
|
|
121
122
|
|
122
123
|
it "can visit them" do
|
123
124
|
within find("tr", text: translated(decidim_page.title)) do
|
124
|
-
page.find(
|
125
|
+
page.find(".action-icon.action-icon--preview").click
|
125
126
|
end
|
126
127
|
|
127
128
|
expect(page).to have_content(translated(decidim_page.title))
|
@@ -23,8 +23,8 @@ module Decidim
|
|
23
23
|
end
|
24
24
|
|
25
25
|
subject do
|
26
|
-
described_class.new(subject: newsletter_subject, body: body)
|
27
|
-
|
26
|
+
described_class.new(subject: newsletter_subject, body: body)
|
27
|
+
.with_context(current_organization: organization)
|
28
28
|
end
|
29
29
|
|
30
30
|
context "when everything is OK" do
|
@@ -27,18 +27,18 @@ module Decidim
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
let(:organization) { create(:organization) }
|
30
|
-
let(:homepage_image_path)
|
30
|
+
let(:homepage_image_path) do
|
31
31
|
File.expand_path(
|
32
32
|
File.join(File.dirname(__FILE__), "..", "..", "..", "decidim-dev", "spec", "support", "city.jpeg")
|
33
33
|
)
|
34
|
-
|
34
|
+
end
|
35
35
|
let(:attributes) do
|
36
36
|
{
|
37
37
|
"organization" => {
|
38
38
|
"name" => name,
|
39
39
|
"reference_prefix" => reference_prefix,
|
40
40
|
"default_locale" => :en,
|
41
|
-
"available_locales" => %w
|
41
|
+
"available_locales" => %w(en ca es),
|
42
42
|
"welcome_text_en" => welcome_text[:en],
|
43
43
|
"welcome_text_es" => welcome_text[:es],
|
44
44
|
"welcome_text_ca" => welcome_text[:ca],
|
@@ -35,7 +35,7 @@ module Decidim
|
|
35
35
|
}
|
36
36
|
end
|
37
37
|
let(:slug) { "slug" }
|
38
|
-
let(:
|
38
|
+
let(:attachment) { test_file("city.jpeg", "image/jpeg") }
|
39
39
|
let(:attributes) do
|
40
40
|
{
|
41
41
|
"participatory_process" => {
|
@@ -51,8 +51,8 @@ module Decidim
|
|
51
51
|
"short_description_en" => short_description[:en],
|
52
52
|
"short_description_es" => short_description[:es],
|
53
53
|
"short_description_ca" => short_description[:ca],
|
54
|
-
"hero_image" =>
|
55
|
-
"banner_image" =>
|
54
|
+
"hero_image" => attachment,
|
55
|
+
"banner_image" => attachment,
|
56
56
|
"slug" => slug
|
57
57
|
}
|
58
58
|
}
|
@@ -86,7 +86,7 @@ module Decidim
|
|
86
86
|
end
|
87
87
|
|
88
88
|
context "when images are not the expected type" do
|
89
|
-
let(:
|
89
|
+
let(:attachment) { test_file("Exampledocument.pdf", "application/pdf") }
|
90
90
|
|
91
91
|
it { is_expected.not_to be_valid }
|
92
92
|
end
|
@@ -16,9 +16,9 @@ module Decidim
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "increments the delivery count" do
|
19
|
-
expect
|
19
|
+
expect do
|
20
20
|
NewsletterDeliveryJob.perform_now(user, newsletter)
|
21
|
-
|
21
|
+
end.to change { newsletter.reload.total_deliveries }.by(1)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -3,7 +3,7 @@ require "spec_helper"
|
|
3
3
|
|
4
4
|
describe Decidim::Admin::ProcessAdmins do
|
5
5
|
let(:organization) { create :organization }
|
6
|
-
let(:participatory_process) { create :participatory_process, organization: organization}
|
6
|
+
let(:participatory_process) { create :participatory_process, organization: organization }
|
7
7
|
let!(:admin) { create(:user, :admin, :confirmed, organization: organization) }
|
8
8
|
let!(:participatory_process_admin) do
|
9
9
|
user = create(:user, :confirmed, organization: organization)
|
@@ -45,7 +45,7 @@ RSpec.shared_examples "manage process admins examples" do
|
|
45
45
|
it "updates a process admin" do
|
46
46
|
within "#process_admins" do
|
47
47
|
within find("#process_admins tr", text: other_user.email) do
|
48
|
-
page.find(
|
48
|
+
page.find(".action-icon--edit").click
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -66,7 +66,7 @@ RSpec.shared_examples "manage process admins examples" do
|
|
66
66
|
|
67
67
|
it "deletes a participatory_process_user_role" do
|
68
68
|
within find("#process_admins tr", text: other_user.email) do
|
69
|
-
page.find(
|
69
|
+
page.find("a.action-icon--remove").click
|
70
70
|
end
|
71
71
|
|
72
72
|
within ".callout-wrapper" do
|
@@ -42,7 +42,7 @@ RSpec.shared_examples "manage process categories examples" do
|
|
42
42
|
it "updates a category" do
|
43
43
|
within "#categories" do
|
44
44
|
within find("tr", text: translated(category.name)) do
|
45
|
-
page.find(
|
45
|
+
page.find("a.action-icon--edit").click
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -77,7 +77,7 @@ RSpec.shared_examples "manage process categories examples" do
|
|
77
77
|
|
78
78
|
it "deletes a category" do
|
79
79
|
within find("tr", text: translated(category2.name)) do
|
80
|
-
page.find(
|
80
|
+
page.find("a.action-icon--remove").click
|
81
81
|
end
|
82
82
|
|
83
83
|
within ".callout-wrapper" do
|
@@ -99,7 +99,7 @@ RSpec.shared_examples "manage process categories examples" do
|
|
99
99
|
|
100
100
|
it "deletes a category" do
|
101
101
|
within find("tr", text: translated(category2.name)) do
|
102
|
-
page.find(
|
102
|
+
page.find("a.action-icon--remove").click
|
103
103
|
end
|
104
104
|
|
105
105
|
within ".callout-wrapper" do
|
@@ -36,9 +36,9 @@ RSpec.shared_examples "manage process steps examples" do
|
|
36
36
|
)
|
37
37
|
|
38
38
|
page.execute_script("$('#date_field_participatory_process_step_start_date').focus()")
|
39
|
-
page.find(
|
39
|
+
page.find(".datepicker-dropdown .day", text: "12").click
|
40
40
|
page.execute_script("$('#date_field_participatory_process_step_end_date').focus()")
|
41
|
-
page.find(
|
41
|
+
page.find(".datepicker-dropdown .day", text: "22").click
|
42
42
|
|
43
43
|
within ".new_participatory_process_step" do
|
44
44
|
find("*[type=submit]").click
|
@@ -58,7 +58,7 @@ RSpec.shared_examples "manage process steps examples" do
|
|
58
58
|
it "updates a participatory_process_step" do
|
59
59
|
within "#steps" do
|
60
60
|
within find("tr", text: translated(process_step.title)) do
|
61
|
-
page.find(
|
61
|
+
page.find(".action-icon--edit").click
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -93,7 +93,7 @@ RSpec.shared_examples "manage process steps examples" do
|
|
93
93
|
|
94
94
|
it "deletes a participatory_process_step" do
|
95
95
|
within find("tr", text: translated(process_step2.title)) do
|
96
|
-
page.find(
|
96
|
+
page.find(".action-icon--remove").click
|
97
97
|
end
|
98
98
|
|
99
99
|
within ".callout-wrapper" do
|
@@ -109,7 +109,7 @@ RSpec.shared_examples "manage process steps examples" do
|
|
109
109
|
context "activating a step" do
|
110
110
|
it "activates a step" do
|
111
111
|
within find("tr", text: translated(process_step.title)) do
|
112
|
-
page.find(
|
112
|
+
page.find(".action-icon--activate").click
|
113
113
|
end
|
114
114
|
|
115
115
|
within find("tr", text: translated(process_step.title)) do
|
@@ -7,7 +7,7 @@ RSpec.shared_examples "manage processes examples" do
|
|
7
7
|
|
8
8
|
it "allows the user to preview the unpublished process" do
|
9
9
|
within find("tr", text: translated(participatory_process.title)) do
|
10
|
-
page.find(
|
10
|
+
page.find("a.action-icon--preview").click
|
11
11
|
end
|
12
12
|
|
13
13
|
expect(page).to have_css(".process-header")
|
@@ -20,7 +20,7 @@ RSpec.shared_examples "manage processes examples" do
|
|
20
20
|
|
21
21
|
it "allows the user to preview the unpublished process" do
|
22
22
|
within find("tr", text: translated(participatory_process.title)) do
|
23
|
-
page.find(
|
23
|
+
page.find("a.action-icon--preview").click
|
24
24
|
end
|
25
25
|
|
26
26
|
expect(current_path).to eq decidim.participatory_process_path(participatory_process)
|
@@ -42,7 +42,7 @@ RSpec.shared_examples "manage processes examples" do
|
|
42
42
|
attach_file :participatory_process_banner_image, image3_path
|
43
43
|
|
44
44
|
page.execute_script("$('#date_field_participatory_process_end_date').focus()")
|
45
|
-
page.find(
|
45
|
+
page.find(".datepicker-dropdown .day", text: "22").click
|
46
46
|
|
47
47
|
within ".edit_participatory_process" do
|
48
48
|
find("*[type=submit]").click
|
@@ -92,7 +92,7 @@ RSpec.shared_examples "manage processes examples" do
|
|
92
92
|
|
93
93
|
participatory_process.reload
|
94
94
|
expect(participatory_process).not_to be_published
|
95
|
-
|
95
|
+
end
|
96
96
|
end
|
97
97
|
|
98
98
|
context "when there are multiple organizations in the system" do
|
@@ -3,7 +3,7 @@ module Decidim
|
|
3
3
|
module Api
|
4
4
|
# Base controller for `decidim-api`. All other controllers inherit from this.
|
5
5
|
class ApplicationController < ::DecidimController
|
6
|
-
|
6
|
+
skip_before_action :verify_authenticity_token
|
7
7
|
include NeedsOrganization
|
8
8
|
end
|
9
9
|
end
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = "API engine for decidim"
|
13
13
|
s.description = "API engine for decidim"
|
14
14
|
|
15
|
-
s.files = Dir["{app,config,db,lib,vendor}/**/*", "
|
15
|
+
s.files = Dir["{app,config,db,lib,vendor}/**/*", "Rakefile", "README.md"]
|
16
16
|
|
17
17
|
s.add_dependency "rails", *Decidim.rails_version
|
18
18
|
s.add_dependency "graphql", "~> 1.5.3"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
module Budgets
|
4
|
+
# A class used to find projects filtered by features and a date range
|
5
|
+
class FilteredProjects < Rectify::Query
|
6
|
+
# Syntactic sugar to initialize the class and return the queried objects.
|
7
|
+
#
|
8
|
+
# features - An array of Decidim::Feature
|
9
|
+
# start_at - A date to filter resources created after it
|
10
|
+
# end_at - A date to filter resources created before it.
|
11
|
+
def self.for(features, start_at = nil, end_at = nil)
|
12
|
+
new(features, start_at, end_at).query
|
13
|
+
end
|
14
|
+
|
15
|
+
# Initializes the class.
|
16
|
+
#
|
17
|
+
# features - An array of Decidim::Feature
|
18
|
+
# start_at - A date to filter resources created after it
|
19
|
+
# end_at - A date to filter resources created before it.
|
20
|
+
def initialize(features, start_at = nil, end_at = nil)
|
21
|
+
@features = features
|
22
|
+
@start_at = start_at
|
23
|
+
@end_at = end_at
|
24
|
+
end
|
25
|
+
|
26
|
+
# Finds the Projects scoped to an array of features and filtered
|
27
|
+
# by a range of dates.
|
28
|
+
def query
|
29
|
+
projects = Decidim::Budgets::Project.where(feature: @features)
|
30
|
+
projects = projects.where("created_at >= ?", @start_at) if @start_at.present?
|
31
|
+
projects = projects.where("created_at <= ?", @end_at) if @end_at.present?
|
32
|
+
projects
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -4,7 +4,7 @@ fr:
|
|
4
4
|
project:
|
5
5
|
budget: Budget
|
6
6
|
decidim_category_id: Catégorie
|
7
|
-
decidim_scope_id:
|
7
|
+
decidim_scope_id: Domaine d'application
|
8
8
|
description: Description
|
9
9
|
proposal_ids: Propositions liées
|
10
10
|
title: Titre
|
@@ -15,6 +15,7 @@ fr:
|
|
15
15
|
confirm_destroy: Êtes-vous certain de vouloir supprimer ce projet?
|
16
16
|
destroy: Supprimer
|
17
17
|
edit: Modifier
|
18
|
+
new: Nouveau
|
18
19
|
preview: Aperçu
|
19
20
|
title: Actions
|
20
21
|
admin:
|
@@ -29,11 +30,13 @@ fr:
|
|
29
30
|
success: Projet supprimé avec succès
|
30
31
|
edit:
|
31
32
|
title: Éditer un projet
|
33
|
+
update: Mettre à jour
|
32
34
|
index:
|
33
35
|
finished_orders: Commandes terminées
|
34
36
|
pending_orders: Commandes en attente
|
35
37
|
title: Projets
|
36
38
|
new:
|
39
|
+
create: Créer
|
37
40
|
title: Nouveau résultat
|
38
41
|
update:
|
39
42
|
invalid: Il y a eu un problème de mise à jour de ce projet
|
@@ -70,7 +73,7 @@ fr:
|
|
70
73
|
filters:
|
71
74
|
category: Catégorie
|
72
75
|
category_prompt: Sélectionner une catégorie
|
73
|
-
scopes:
|
76
|
+
scopes: Domaines d'application
|
74
77
|
search: Rechercher
|
75
78
|
filters_small_view:
|
76
79
|
close_modal: Fermer la vue
|
@@ -90,8 +93,37 @@ fr:
|
|
90
93
|
count:
|
91
94
|
one: 1 soutien
|
92
95
|
other: "%{count} soutiens"
|
96
|
+
remove: Supprimer
|
97
|
+
project_budget_button:
|
98
|
+
add: Ajouter
|
99
|
+
added: Ajouté
|
100
|
+
show:
|
101
|
+
budget: Budget
|
102
|
+
view_all_projects: Voir tous les projets
|
93
103
|
features:
|
94
104
|
budgets:
|
105
|
+
actions:
|
106
|
+
vote: Voter
|
107
|
+
name: Budgets
|
95
108
|
settings:
|
96
109
|
global:
|
97
|
-
|
110
|
+
comments_enabled: Commentaires activés
|
111
|
+
total_budget: Budget total
|
112
|
+
vote_threshold_percent: Pourcentage de seuil de vote
|
113
|
+
step:
|
114
|
+
comments_blocked: Commentaires bloqués
|
115
|
+
show_votes: Afficher les votes
|
116
|
+
votes_enabled: Votes activés
|
117
|
+
orders:
|
118
|
+
checkout:
|
119
|
+
error: Une erreur s'est produite lors du traitement de votre vote
|
120
|
+
success: Votre vote a été enregistré avec succès
|
121
|
+
destroy:
|
122
|
+
error: Une erreur s'est produite lors de l'annulation de votre vote
|
123
|
+
success: Votre vote a été annulé avec succès
|
124
|
+
resource_links:
|
125
|
+
included_proposals:
|
126
|
+
project_proposals: 'Propositions incluses dans ce projet:'
|
127
|
+
index:
|
128
|
+
confirmed_orders_count: Nombre de votes comptés
|
129
|
+
total_budget: Budget total
|