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
@@ -2,4 +2,78 @@ fr:
|
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
4
|
result:
|
5
|
-
decidim_category_id: Catégorie
|
5
|
+
decidim_category_id: Catégorie
|
6
|
+
decidim_scope_id: Domaine d'application
|
7
|
+
description: Description
|
8
|
+
proposal_ids: Propositions incluses
|
9
|
+
title: Titre
|
10
|
+
decidim:
|
11
|
+
features:
|
12
|
+
results:
|
13
|
+
name: Résultats
|
14
|
+
settings:
|
15
|
+
global:
|
16
|
+
comments_enabled: Commentaires activés
|
17
|
+
step:
|
18
|
+
comments_blocked: Commentaires bloqués
|
19
|
+
resource_links:
|
20
|
+
included_proposals:
|
21
|
+
result_proposals: Propositions incluses dans ce résultat
|
22
|
+
meetings_through_proposals:
|
23
|
+
result_meetings: Rencontres connexes
|
24
|
+
results:
|
25
|
+
actions:
|
26
|
+
confirm_destroy: Êtes-vous sûr de vouloir supprimer ce résultat?
|
27
|
+
destroy: Supprimer
|
28
|
+
edit: Modifier
|
29
|
+
new: Nouveau
|
30
|
+
preview: Aperçu
|
31
|
+
title: Actions
|
32
|
+
admin:
|
33
|
+
models:
|
34
|
+
result:
|
35
|
+
name: Résultat
|
36
|
+
results:
|
37
|
+
create:
|
38
|
+
invalid: Il y a eu un problème pour créer ce résultat
|
39
|
+
success: Résultat créé avec succès
|
40
|
+
destroy:
|
41
|
+
success: Résultat supprimé avec succès
|
42
|
+
edit:
|
43
|
+
title: Modifier le résultat
|
44
|
+
update: Mettre à jour
|
45
|
+
index:
|
46
|
+
title: Résultats
|
47
|
+
new:
|
48
|
+
create: Créer
|
49
|
+
title: Nouveau résultat
|
50
|
+
update:
|
51
|
+
invalid: Il y a eu un problème pour mettre à jour ce résultat
|
52
|
+
success: Résultat mis à jour avec succès
|
53
|
+
models:
|
54
|
+
result:
|
55
|
+
fields:
|
56
|
+
title: Titre
|
57
|
+
results:
|
58
|
+
count:
|
59
|
+
results_count:
|
60
|
+
one: 1 résultat
|
61
|
+
other: "%{count} résultats"
|
62
|
+
filters:
|
63
|
+
category: Catégorie
|
64
|
+
category_prompt: Sélectionner une catégorie
|
65
|
+
scopes: Domaines d'application
|
66
|
+
search: Rechercher
|
67
|
+
filters_small_view:
|
68
|
+
close_modal: Fermer la fenêtre de dialogue
|
69
|
+
filter: Filtrer
|
70
|
+
filter_by: Filtrer par
|
71
|
+
unfold: Déplier
|
72
|
+
show:
|
73
|
+
stats:
|
74
|
+
attendees: Participants
|
75
|
+
comments: Commentaires
|
76
|
+
contributions: Contributions
|
77
|
+
meetings: Rencontre
|
78
|
+
proposals: Propositions
|
79
|
+
votes: Soutiens
|
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_dependency "decidim-core", Decidim.version
|
17
17
|
s.add_dependency "decidim-comments", Decidim.version
|
18
|
-
s.add_dependency "rectify", "~> 0.
|
18
|
+
s.add_dependency "rectify", "~> 0.9.1"
|
19
19
|
s.add_dependency "searchlight", "~> 4.1.0"
|
20
|
-
s.add_dependency "kaminari", "~> 1.0.
|
20
|
+
s.add_dependency "kaminari", "~> 1.0.1"
|
21
21
|
|
22
22
|
s.add_development_dependency "decidim-dev", Decidim.version
|
23
23
|
s.add_development_dependency "decidim-comments", Decidim.version
|
@@ -16,6 +16,15 @@ Decidim.register_feature(:results) do |feature|
|
|
16
16
|
resource.template = "decidim/results/results/linked_results"
|
17
17
|
end
|
18
18
|
|
19
|
+
feature.register_stat :results_count, primary: true, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |features, start_at, end_at|
|
20
|
+
Decidim::Results::FilteredResults.for(features, start_at, end_at).count
|
21
|
+
end
|
22
|
+
|
23
|
+
feature.register_stat :comments_count, tag: :comments do |features, start_at, end_at|
|
24
|
+
results = Decidim::Results::FilteredResults.for(features, start_at, end_at)
|
25
|
+
Decidim::Comments::Comment.where(root_commentable: results).count
|
26
|
+
end
|
27
|
+
|
19
28
|
feature.settings(:global) do |settings|
|
20
29
|
settings.attribute :comments_enabled, type: :boolean, default: true
|
21
30
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe Decidim::Results::Admin::CreateResult do
|
@@ -27,9 +28,9 @@ describe Decidim::Results::Admin::CreateResult do
|
|
27
28
|
end
|
28
29
|
let(:form) do
|
29
30
|
double(
|
30
|
-
|
31
|
-
title: {en: "title"},
|
32
|
-
description: {en: "description"},
|
31
|
+
invalid?: invalid,
|
32
|
+
title: { en: "title" },
|
33
|
+
description: { en: "description" },
|
33
34
|
proposal_ids: proposals.map(&:id),
|
34
35
|
scope: scope,
|
35
36
|
category: category,
|
@@ -1,7 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe Decidim::Results::Admin::UpdateResult do
|
4
|
-
let(:result) { create :result}
|
5
|
+
let(:result) { create :result }
|
5
6
|
let(:organization) { result.feature.organization }
|
6
7
|
let(:scope) { create :scope, organization: organization }
|
7
8
|
let(:category) { create :category, participatory_process: result.feature.participatory_process }
|
@@ -27,9 +28,9 @@ describe Decidim::Results::Admin::UpdateResult do
|
|
27
28
|
end
|
28
29
|
let(:form) do
|
29
30
|
double(
|
30
|
-
|
31
|
-
title: {en: "title"},
|
32
|
-
description: {en: "description"},
|
31
|
+
invalid?: invalid,
|
32
|
+
title: { en: "title" },
|
33
|
+
description: { en: "description" },
|
33
34
|
proposal_ids: proposals.map(&:id),
|
34
35
|
scope: scope,
|
35
36
|
category: category
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "spec_helper"
|
3
|
+
|
4
|
+
module Decidim
|
5
|
+
module Results
|
6
|
+
describe ResultsController, type: :controller do
|
7
|
+
before do
|
8
|
+
@request.env["decidim.current_organization"] = feature.organization
|
9
|
+
@request.env["decidim.current_participatory_process"] = feature.participatory_process
|
10
|
+
@request.env["decidim.current_feature"] = feature
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "results" do
|
14
|
+
let(:titles) { %w(Biure Atque Delectus Quia Fuga) }
|
15
|
+
let(:feature) { create(:result_feature) }
|
16
|
+
let(:results_count) { titles.size }
|
17
|
+
|
18
|
+
it "returns a collection of results ordered by title" do
|
19
|
+
Array.new(results_count) do |n|
|
20
|
+
title = {}
|
21
|
+
title[I18n.locale.to_s] = titles[n]
|
22
|
+
create(:result, title: title, feature: feature)
|
23
|
+
end
|
24
|
+
|
25
|
+
results = controller.send(:results)
|
26
|
+
expect(results.pluck(:title).map { |title| title[I18n.locale.to_s] }).to eq(titles.sort)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,31 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "spec_helper"
|
2
3
|
|
3
4
|
describe "Explore results", type: :feature do
|
4
5
|
include_context "feature"
|
5
|
-
let(:manifest_name) { "results" }
|
6
6
|
|
7
|
+
let(:titles) { %w(Biure Atque Delectus Quia Fuga) }
|
8
|
+
let(:manifest_name) { "results" }
|
7
9
|
let(:results_count) { 5 }
|
8
10
|
let!(:scope) { create :scope, organization: organization }
|
9
11
|
let!(:results) do
|
10
|
-
|
11
|
-
:result,
|
12
|
-
|
13
|
-
feature: feature
|
14
|
-
)
|
15
|
-
end
|
16
|
-
|
17
|
-
before do
|
18
|
-
visit path
|
12
|
+
Array.new(results_count) do |n|
|
13
|
+
create(:result, title: { en: titles[n] }, feature: feature)
|
14
|
+
end
|
19
15
|
end
|
20
16
|
|
21
17
|
context "index" do
|
22
|
-
|
18
|
+
it "shows all results ordered alphabetically" do
|
19
|
+
visit_feature
|
23
20
|
|
24
|
-
|
25
|
-
expect(page).to have_selector("article.card", count: results_count)
|
21
|
+
expect(page).to have_selector(".card--result", count: results_count)
|
26
22
|
|
27
23
|
results.each do |result|
|
28
|
-
expect(page).to have_content(translated
|
24
|
+
expect(page).to have_content(translated(result.title))
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context "when filtering" do
|
29
|
+
before do
|
30
|
+
create(:result, feature: feature, scope: scope)
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when the process has a linked scope" do
|
34
|
+
before do
|
35
|
+
participatory_process.update_attributes(scope: scope)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "enables filtering by scope" do
|
39
|
+
visit_feature
|
40
|
+
|
41
|
+
within ".filters" do
|
42
|
+
expect(page).not_to have_content(/Scopes/i)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context "when the process has no linked scope" do
|
48
|
+
before do
|
49
|
+
participatory_process.update_attributes(scope: nil)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "enables filtering by scope" do
|
53
|
+
visit_feature
|
54
|
+
|
55
|
+
within ".filters" do
|
56
|
+
expect(page).to have_content(/Scopes/i)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context "when filtering by scope" do
|
62
|
+
it "lists the filtered results" do
|
63
|
+
visit_feature
|
64
|
+
|
65
|
+
within ".filters" do
|
66
|
+
check scope.name
|
67
|
+
end
|
68
|
+
|
69
|
+
expect(page).to have_css(".card--result", count: 1)
|
70
|
+
end
|
29
71
|
end
|
30
72
|
end
|
31
73
|
end
|
@@ -36,6 +78,8 @@ describe "Explore results", type: :feature do
|
|
36
78
|
let(:result) { results.first }
|
37
79
|
|
38
80
|
it "shows all result info" do
|
81
|
+
visit path
|
82
|
+
|
39
83
|
expect(page).to have_i18n_content(result.title)
|
40
84
|
expect(page).to have_i18n_content(result.description)
|
41
85
|
expect(page).to have_content(result.reference)
|
@@ -52,6 +96,8 @@ describe "Explore results", type: :feature do
|
|
52
96
|
|
53
97
|
context "without category or scope" do
|
54
98
|
it "does not show any tag" do
|
99
|
+
visit path
|
100
|
+
|
55
101
|
expect(page).not_to have_selector("ul.tags.tags--result")
|
56
102
|
end
|
57
103
|
end
|
@@ -65,6 +111,8 @@ describe "Explore results", type: :feature do
|
|
65
111
|
end
|
66
112
|
|
67
113
|
it "shows tags for category" do
|
114
|
+
visit path
|
115
|
+
|
68
116
|
expect(page).to have_selector("ul.tags.tags--result")
|
69
117
|
within "ul.tags.tags--result" do
|
70
118
|
expect(page).to have_content(translated(result.category.name))
|
@@ -72,6 +120,8 @@ describe "Explore results", type: :feature do
|
|
72
120
|
end
|
73
121
|
|
74
122
|
it "links to the filter for this category" do
|
123
|
+
visit path
|
124
|
+
|
75
125
|
within "ul.tags.tags--result" do
|
76
126
|
click_link translated(result.category.name)
|
77
127
|
end
|
@@ -88,6 +138,8 @@ describe "Explore results", type: :feature do
|
|
88
138
|
end
|
89
139
|
|
90
140
|
it "shows tags for scope" do
|
141
|
+
visit path
|
142
|
+
|
91
143
|
expect(page).to have_selector("ul.tags.tags--result")
|
92
144
|
within "ul.tags.tags--result" do
|
93
145
|
expect(page).to have_content(result.scope.name)
|
@@ -95,6 +147,8 @@ describe "Explore results", type: :feature do
|
|
95
147
|
end
|
96
148
|
|
97
149
|
it "links to the filter for this scope" do
|
150
|
+
visit path
|
151
|
+
|
98
152
|
within "ul.tags.tags--result" do
|
99
153
|
click_link result.scope.name
|
100
154
|
end
|
@@ -104,14 +158,12 @@ describe "Explore results", type: :feature do
|
|
104
158
|
|
105
159
|
context "when a proposal has comments" do
|
106
160
|
let(:result) { results.first }
|
107
|
-
let(:author) { create(:user, :confirmed, organization: feature.organization)}
|
161
|
+
let(:author) { create(:user, :confirmed, organization: feature.organization) }
|
108
162
|
let!(:comments) { create_list(:comment, 3, commentable: result) }
|
109
163
|
|
110
|
-
before do
|
111
|
-
visit current_path
|
112
|
-
end
|
113
|
-
|
114
164
|
it "shows the comments" do
|
165
|
+
visit path
|
166
|
+
|
115
167
|
comments.each do |comment|
|
116
168
|
expect(page).to have_content(comment.body)
|
117
169
|
end
|
@@ -126,10 +178,11 @@ describe "Explore results", type: :feature do
|
|
126
178
|
|
127
179
|
before do
|
128
180
|
result.link_resources(proposals, "included_proposals")
|
129
|
-
visit current_path
|
130
181
|
end
|
131
182
|
|
132
183
|
it "shows related proposals" do
|
184
|
+
visit path
|
185
|
+
|
133
186
|
proposals.each do |proposal|
|
134
187
|
expect(page).to have_content(proposal.title)
|
135
188
|
expect(page).to have_content(proposal.author_name)
|
@@ -146,68 +199,16 @@ describe "Explore results", type: :feature do
|
|
146
199
|
|
147
200
|
before do
|
148
201
|
result.link_resources(meetings, "meetings_through_proposals")
|
149
|
-
visit current_path
|
150
202
|
end
|
151
203
|
|
152
204
|
it "shows related meetings" do
|
205
|
+
visit path
|
206
|
+
|
153
207
|
meetings.each do |meeting|
|
154
208
|
expect(page).to have_i18n_content(meeting.title)
|
155
209
|
expect(page).to have_i18n_content(meeting.description)
|
156
210
|
end
|
157
211
|
end
|
158
212
|
end
|
159
|
-
|
160
|
-
context "when filtering" do
|
161
|
-
before do
|
162
|
-
create(:result, feature: feature, scope: scope)
|
163
|
-
visit_feature
|
164
|
-
end
|
165
|
-
|
166
|
-
context "when the process has a linked scope" do
|
167
|
-
before do
|
168
|
-
participatory_process.update_attributes(scope: scope)
|
169
|
-
visit current_path
|
170
|
-
end
|
171
|
-
|
172
|
-
it "enables filtering by scope" do
|
173
|
-
within ".filters" do
|
174
|
-
expect(page).not_to have_content(/Scopes/i)
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
context "when the process has no linked scope" do
|
180
|
-
before do
|
181
|
-
participatory_process.update_attributes(scope: nil)
|
182
|
-
visit current_path
|
183
|
-
end
|
184
|
-
|
185
|
-
it "enables filtering by scope" do
|
186
|
-
within ".filters" do
|
187
|
-
expect(page).to have_content(/Scopes/i)
|
188
|
-
end
|
189
|
-
end
|
190
|
-
end
|
191
|
-
|
192
|
-
context "by origin 'official'" do
|
193
|
-
it "lists the filtered results" do
|
194
|
-
within ".filters" do
|
195
|
-
check scope.name
|
196
|
-
end
|
197
|
-
|
198
|
-
expect(page).to have_css(".card--result", count: 1)
|
199
|
-
end
|
200
|
-
end
|
201
|
-
|
202
|
-
context "by origin 'citizenship'" do
|
203
|
-
it "lists the filtered results" do
|
204
|
-
within ".filters" do
|
205
|
-
check scope.name
|
206
|
-
end
|
207
|
-
|
208
|
-
expect(page).to have_css(".card--result", count: results.size)
|
209
|
-
end
|
210
|
-
end
|
211
|
-
end
|
212
213
|
end
|
213
214
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# frozen_literal_string: true
|
2
3
|
|
3
4
|
require "spec_helper"
|
@@ -27,7 +28,7 @@ describe Decidim::Results::Admin::ResultForm do
|
|
27
28
|
decidim_scope_id: scope_id,
|
28
29
|
decidim_category_id: category_id,
|
29
30
|
title_en: title[:en],
|
30
|
-
description_en: description[:en]
|
31
|
+
description_en: description[:en]
|
31
32
|
}
|
32
33
|
end
|
33
34
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "spec_helper"
|
3
|
+
|
4
|
+
describe Decidim::Results::FilteredResults do
|
5
|
+
let(:organization) { create(:organization) }
|
6
|
+
let(:participatory_process) { create(:participatory_process, organization: organization) }
|
7
|
+
let(:feature) { create(:result_feature, participatory_process: participatory_process) }
|
8
|
+
let(:another_feature) { create(:result_feature, participatory_process: participatory_process) }
|
9
|
+
|
10
|
+
let(:results) { create_list(:result, 3, feature: feature) }
|
11
|
+
let(:old_results) { create_list(:result, 3, feature: feature, created_at: 10.days.ago) }
|
12
|
+
let(:another_results) { create_list(:result, 3, feature: another_feature) }
|
13
|
+
|
14
|
+
it "returns results included in a collection of features" do
|
15
|
+
expect(Decidim::Results::FilteredResults.for([feature, another_feature])).to match_array results.concat(old_results, another_results)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "returns results created in a date range" do
|
19
|
+
expect(Decidim::Results::FilteredResults.for([feature, another_feature], 2.weeks.ago, 1.week.ago)).to match_array old_results
|
20
|
+
end
|
21
|
+
end
|