decidim 0.0.6 → 0.0.7
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/.babelrc +2 -1
- data/.ruby-version +1 -1
- data/.travis.yml +4 -6
- data/Dockerfile +2 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +48 -48
- data/README.md +6 -1
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_decidim.scss +9 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_variables.scss +7 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/application.scss +2 -19
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_categories.scss +5 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/{_email_preview.scss → extra/_email_preview.scss} +0 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/{_login.scss → extra/_login.scss} +0 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_select_multiple.scss +3 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/extra/_title_bar.scss +5 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +13 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_buttons.scss +44 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_callouts.scss +32 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_cards.scss +36 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_char-counter.scss +20 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_component-counter.scss +17 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_forms.scss +80 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_icons.scss +65 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_layout.scss +67 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_main-nav.scss +41 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_modules.scss +24 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_process-header.scss +11 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_secondary-nav.scss +95 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_table-list.scss +78 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_tabs.scss +49 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_title-bar.scss +32 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_typography.scss +15 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/modules/_user-login.scss +23 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_fontface.scss +27 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_helpers.scss +25 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_keyframes.scss +21 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_mixins.scss +20 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_settings.scss +590 -0
- data/decidim-admin/app/assets/stylesheets/decidim/admin/utils/_toggle-expand.scss +8 -0
- data/decidim-admin/app/commands/decidim/admin/create_attachment.rb +13 -4
- data/decidim-admin/app/commands/decidim/admin/update_participatory_process.rb +3 -3
- data/decidim-admin/app/commands/decidim/admin/update_participatory_process_admin.rb +40 -0
- data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +7 -1
- data/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb +1 -1
- data/decidim-admin/app/controllers/decidim/admin/organization_controller.rb +2 -0
- data/decidim-admin/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +29 -0
- data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +2 -2
- data/decidim-admin/app/controllers/decidim/admin/scopes_controller.rb +2 -0
- data/decidim-admin/app/controllers/decidim/admin/static_pages_controller.rb +2 -0
- data/decidim-admin/app/controllers/decidim/admin/user_groups_controller.rb +3 -1
- data/decidim-admin/app/controllers/decidim/admin/users_controller.rb +1 -1
- data/decidim-admin/app/helpers/decidim/admin/application_helper.rb +8 -0
- data/decidim-admin/app/helpers/decidim/admin/icon_link_helper.rb +30 -0
- data/decidim-admin/app/jobs/decidim/admin/newsletter_job.rb +1 -1
- data/decidim-admin/app/queries/decidim/admin/process_admin_roles_for_process.rb +1 -1
- data/decidim-admin/app/views/decidim/admin/attachments/_form.html.erb +29 -8
- data/decidim-admin/app/views/decidim/admin/attachments/edit.html.erb +3 -5
- data/decidim-admin/app/views/decidim/admin/attachments/index.html.erb +45 -35
- data/decidim-admin/app/views/decidim/admin/attachments/new.html.erb +3 -5
- data/decidim-admin/app/views/decidim/admin/categories/_form.html.erb +18 -10
- data/decidim-admin/app/views/decidim/admin/categories/edit.html.erb +3 -5
- data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +57 -42
- data/decidim-admin/app/views/decidim/admin/categories/new.html.erb +3 -5
- data/decidim-admin/app/views/decidim/admin/dashboard/show.html.erb +6 -3
- data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +11 -11
- data/decidim-admin/app/views/decidim/admin/features/_form.html.erb +56 -48
- data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +3 -5
- data/decidim-admin/app/views/decidim/admin/features/index.html.erb +21 -19
- data/decidim-admin/app/views/decidim/admin/features/new.html.erb +3 -4
- data/decidim-admin/app/views/decidim/admin/moderations/index.html.erb +71 -61
- data/decidim-admin/app/views/decidim/admin/newsletters/_form.html.erb +7 -1
- data/decidim-admin/app/views/decidim/admin/newsletters/edit.html.erb +10 -8
- data/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb +50 -43
- data/decidim-admin/app/views/decidim/admin/newsletters/new.html.erb +10 -8
- data/decidim-admin/app/views/decidim/admin/newsletters/show.html.erb +20 -12
- data/decidim-admin/app/views/decidim/admin/organization/_form.html.erb +98 -62
- data/decidim-admin/app/views/decidim/admin/organization/edit.html.erb +11 -8
- data/decidim-admin/app/views/decidim/admin/participatory_process_groups/_form.html.erb +4 -4
- data/decidim-admin/app/views/decidim/admin/participatory_process_groups/edit.html.erb +15 -9
- data/decidim-admin/app/views/decidim/admin/participatory_process_groups/index.html.erb +37 -35
- data/decidim-admin/app/views/decidim/admin/participatory_process_groups/new.html.erb +10 -8
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/_form.html.erb +21 -11
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/edit.html.erb +3 -4
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/index.html.erb +60 -51
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +4 -5
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/_form.html.erb +23 -0
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/edit.html.erb +7 -0
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +46 -34
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/new.html.erb +7 -0
- data/decidim-admin/app/views/decidim/admin/participatory_processes/_form.html.erb +103 -72
- data/decidim-admin/app/views/decidim/admin/participatory_processes/edit.html.erb +15 -17
- data/decidim-admin/app/views/decidim/admin/participatory_processes/index.html.erb +52 -43
- data/decidim-admin/app/views/decidim/admin/participatory_processes/new.html.erb +6 -5
- data/decidim-admin/app/views/decidim/admin/scopes/edit.html.erb +9 -7
- data/decidim-admin/app/views/decidim/admin/scopes/index.html.erb +37 -36
- data/decidim-admin/app/views/decidim/admin/scopes/new.html.erb +9 -6
- data/decidim-admin/app/views/decidim/admin/static_pages/_form.html.erb +3 -3
- data/decidim-admin/app/views/decidim/admin/static_pages/edit.html.erb +10 -8
- data/decidim-admin/app/views/decidim/admin/static_pages/index.html.erb +38 -37
- data/decidim-admin/app/views/decidim/admin/static_pages/new.html.erb +10 -8
- data/decidim-admin/app/views/decidim/admin/user_groups/index.html.erb +37 -31
- data/decidim-admin/app/views/decidim/admin/users/_form.html.erb +5 -4
- data/decidim-admin/app/views/decidim/admin/users/index.html.erb +57 -52
- data/decidim-admin/app/views/decidim/admin/users/new.html.erb +10 -7
- data/decidim-admin/app/views/layouts/decidim/admin/_application.html.erb +23 -36
- data/decidim-admin/app/views/layouts/decidim/admin/_callouts_full.html.erb +10 -0
- data/decidim-admin/app/views/layouts/decidim/admin/_language_chooser.html.erb +9 -9
- data/decidim-admin/app/views/layouts/decidim/admin/_main_nav.html.erb +11 -0
- data/decidim-admin/app/views/layouts/decidim/admin/_template_bottom.html.erb +2 -0
- data/decidim-admin/app/views/layouts/decidim/admin/_template_top.html.erb +3 -0
- data/decidim-admin/app/views/layouts/decidim/admin/_title_bar.html.erb +20 -0
- data/decidim-admin/app/views/layouts/decidim/admin/newsletters.erb +14 -0
- data/decidim-admin/app/views/layouts/decidim/admin/pages.html.erb +14 -0
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +55 -53
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_process_groups.html.erb +14 -0
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_processes.html.erb +14 -0
- data/decidim-admin/app/views/layouts/decidim/admin/settings.html.erb +19 -0
- data/decidim-admin/app/views/layouts/decidim/admin/users.html.erb +21 -0
- data/decidim-admin/config/i18n-tasks.yml +1 -0
- data/decidim-admin/config/locales/ca.yml +77 -22
- data/decidim-admin/config/locales/en.yml +75 -20
- data/decidim-admin/config/locales/es.yml +77 -22
- data/decidim-admin/config/locales/eu.yml +191 -16
- data/decidim-admin/config/locales/fi.yml +0 -29
- data/decidim-admin/config/routes.rb +1 -1
- data/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb +11 -11
- data/decidim-admin/spec/commands/deliver_newsletter_spec.rb +4 -1
- data/decidim-admin/spec/commands/update_participatory_process_spec.rb +117 -0
- data/decidim-admin/spec/features/admin_invite_spec.rb +5 -1
- data/decidim-admin/spec/features/admin_manages_feature_permissions_spec.rb +1 -1
- data/decidim-admin/spec/features/admin_manages_features_spec.rb +10 -10
- data/decidim-admin/spec/features/admin_manages_newsletters_spec.rb +11 -9
- data/decidim-admin/spec/features/admin_manages_organization_admins_spec.rb +8 -5
- data/decidim-admin/spec/features/admin_manages_organization_scopes_spec.rb +7 -6
- data/decidim-admin/spec/features/admin_manages_organization_spec.rb +14 -0
- data/decidim-admin/spec/features/admin_manages_participatory_process_groups_spec.rb +6 -6
- data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +27 -5
- data/decidim-admin/spec/features/admin_manages_user_groups_spec.rb +1 -1
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_admins_spec.rb +2 -2
- data/decidim-admin/spec/features/static_pages_spec.rb +9 -7
- data/decidim-admin/spec/jobs/newsletter_job_spec.rb +2 -0
- data/decidim-admin/spec/queries/process_admin_roles_for_process_spec.rb +4 -3
- data/decidim-admin/spec/shared/manage_process_admins_examples.rb +31 -8
- data/decidim-admin/spec/shared/manage_process_attachments_examples.rb +1 -1
- data/decidim-admin/spec/shared/manage_process_categories_examples.rb +11 -26
- data/decidim-admin/spec/shared/manage_process_steps_examples.rb +8 -23
- data/decidim-admin/spec/shared/manage_processes_examples.rb +5 -33
- data/decidim-admin/spec/support/processes_menu_links_helpers.rb +1 -1
- data/decidim-admin/yarn.lock +4 -0
- data/decidim-api/app/controllers/decidim/api/application_controller.rb +2 -1
- data/decidim-budgets/app/controllers/decidim/budgets/admin/projects_controller.rb +1 -1
- data/decidim-budgets/app/controllers/decidim/budgets/line_items_controller.rb +21 -15
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/_form.html.erb +34 -24
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/edit.html.erb +3 -5
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb +52 -34
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/new.html.erb +4 -5
- data/decidim-budgets/app/views/decidim/budgets/projects/_filters.html.erb +1 -1
- data/decidim-budgets/config/i18n-tasks.yml +1 -0
- data/decidim-budgets/config/locales/ca.yml +5 -0
- data/decidim-budgets/config/locales/en.yml +5 -0
- data/decidim-budgets/config/locales/es.yml +5 -0
- data/decidim-budgets/config/locales/eu.yml +27 -0
- data/decidim-budgets/spec/features/orders_spec.rb +22 -0
- data/decidim-budgets/spec/shared/manage_attachments_examples.rb +1 -1
- data/decidim-budgets/spec/shared/manage_projects_examples.rb +10 -8
- data/decidim-comments/README.md +33 -0
- data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
- data/decidim-comments/app/assets/javascripts/decidim/comments/comments.js.erb +2 -0
- data/decidim-comments/app/frontend/application/{apollo_client.js → apollo_client.ts} +5 -5
- data/decidim-comments/app/frontend/application/application.component.test.tsx +36 -0
- data/decidim-comments/app/frontend/application/application.component.tsx +37 -0
- data/decidim-comments/app/frontend/application/icon.component.test.tsx +49 -0
- data/decidim-comments/app/frontend/application/icon.component.tsx +35 -0
- data/decidim-comments/app/frontend/comments/{add_comment_form.component.test.jsx → add_comment_form.component.test.tsx} +98 -92
- data/decidim-comments/app/frontend/comments/{add_comment_form.component.jsx → add_comment_form.component.tsx} +152 -153
- data/decidim-comments/app/frontend/comments/{comment.component.test.jsx → comment.component.test.tsx} +59 -71
- data/decidim-comments/app/frontend/comments/{comment.component.jsx → comment.component.tsx} +114 -116
- data/decidim-comments/app/frontend/comments/comment_order_selector.component.test.tsx +21 -0
- data/decidim-comments/app/frontend/comments/comment_order_selector.component.tsx +88 -0
- data/decidim-comments/app/frontend/comments/comment_thread.component.test.tsx +65 -0
- data/decidim-comments/app/frontend/comments/comment_thread.component.tsx +70 -0
- data/decidim-comments/app/frontend/comments/{comments.component.test.jsx → comments.component.test.tsx} +38 -81
- data/decidim-comments/app/frontend/comments/{comments.component.jsx → comments.component.tsx} +49 -63
- data/decidim-comments/app/frontend/comments/down_vote_button.component.test.tsx +39 -0
- data/decidim-comments/app/frontend/comments/down_vote_button.component.tsx +89 -0
- data/decidim-comments/app/frontend/comments/up_vote_button.component.test.tsx +39 -0
- data/decidim-comments/app/frontend/comments/up_vote_button.component.tsx +89 -0
- data/decidim-comments/app/frontend/comments/vote_button.component.tsx +36 -0
- data/decidim-comments/app/frontend/comments/{vote_button_component.test.jsx → vote_button_component.test.tsx} +16 -20
- data/decidim-comments/app/frontend/entry.ts +19 -0
- data/decidim-comments/app/frontend/{comments → fragments}/add_comment_form_commentable.fragment.graphql +1 -1
- data/decidim-comments/app/frontend/{comments → fragments}/add_comment_form_session.fragment.graphql +1 -1
- data/decidim-comments/app/frontend/{comments → fragments}/comment.fragment.graphql +3 -1
- data/decidim-comments/app/frontend/{comments → fragments}/comment_data.fragment.graphql +6 -3
- data/decidim-comments/app/frontend/{comments → fragments}/comment_thread.fragment.graphql +3 -1
- data/decidim-comments/app/frontend/{comments/down_vote.fragment.graphql → fragments/down_vote_button.fragment.graphql} +2 -2
- data/decidim-comments/app/frontend/{comments/up_vote.fragment.graphql → fragments/up_vote_button.fragment.graphql} +2 -2
- data/decidim-comments/app/frontend/{comments/add_comment_form.mutation.graphql → mutations/add_comment.mutation.graphql} +3 -1
- data/decidim-comments/app/frontend/{comments → mutations}/down_vote.mutation.graphql +3 -1
- data/decidim-comments/app/frontend/{comments → mutations}/up_vote.mutation.graphql +3 -1
- data/decidim-comments/app/frontend/{comments → queries}/comments.query.graphql +4 -1
- data/decidim-comments/app/frontend/support/{asset_url.js → asset_url.ts} +1 -1
- data/decidim-comments/app/frontend/support/{generate_comments_data.js → generate_comments_data.ts} +11 -6
- data/decidim-comments/app/frontend/support/{generate_user_data.js → generate_user_data.ts} +2 -2
- data/decidim-comments/app/frontend/support/{generate_user_group_data.js → generate_user_group_data.ts} +2 -2
- data/decidim-comments/app/frontend/support/graphql_transformer.js +32 -0
- data/decidim-comments/app/frontend/support/load_translations.ts +44 -0
- data/decidim-comments/app/frontend/support/{require_all.js → require_all.ts} +1 -1
- data/decidim-comments/app/frontend/support/{resolve_graphql_query.js → resolve_graphql_query.ts} +7 -7
- data/decidim-comments/app/frontend/support/schema.ts +119 -0
- data/decidim-comments/config/locales/eu.yml +29 -5
- data/decidim-dev/Rakefile +2 -0
- data/decidim-dev/config/locales/eu.yml +1 -1
- data/decidim-dev/decidim-dev.gemspec +1 -1
- data/decidim-dev/lib/decidim/dev/test/rspec_support/capybara.rb +1 -4
- data/decidim-dev/lib/decidim/dev/test/rspec_support/feature.rb +1 -0
- data/decidim-dev/lib/decidim/dev/test/rspec_support/helpers.rb +1 -1
- data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/phantomjs-shim.js +215 -0
- data/decidim-dev/lib/decidim/dev/test/rspec_support/translation_helpers.rb +1 -1
- data/decidim-dev/lib/generators/decidim/dummy_generator.rb +5 -0
- data/decidim-meetings/app/controllers/decidim/meetings/admin/application_controller.rb +1 -1
- data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +30 -19
- data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/edit.html.erb +3 -5
- data/decidim-meetings/app/views/decidim/meetings/admin/meetings/_form.html.erb +46 -35
- data/decidim-meetings/app/views/decidim/meetings/admin/meetings/edit.html.erb +5 -6
- data/decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb +72 -51
- data/decidim-meetings/app/views/decidim/meetings/admin/meetings/new.html.erb +4 -6
- data/decidim-meetings/app/views/decidim/meetings/meetings/_filters.html.erb +1 -1
- data/decidim-meetings/config/locales/ca.yml +2 -1
- data/decidim-meetings/config/locales/en.yml +2 -1
- data/decidim-meetings/config/locales/es.yml +2 -1
- data/decidim-meetings/config/locales/eu.yml +25 -5
- data/decidim-meetings/config/locales/fi.yml +0 -1
- data/decidim-meetings/spec/shared/manage_attachments_examples.rb +1 -1
- data/decidim-meetings/spec/shared/manage_meetings_examples.rb +18 -16
- data/decidim-pages/app/views/decidim/pages/admin/pages/_form.html.erb +10 -3
- data/decidim-pages/app/views/decidim/pages/admin/pages/edit.html.erb +3 -5
- data/decidim-pages/config/locales/eu.yml +4 -2
- data/decidim-pages/spec/features/admin_spec.rb +1 -1
- data/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb +1 -1
- data/decidim-proposals/app/views/decidim/proposals/admin/proposal_answers/edit.html.erb +14 -8
- data/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb +28 -20
- data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +60 -43
- data/decidim-proposals/app/views/decidim/proposals/admin/proposals/new.html.erb +3 -5
- data/decidim-proposals/app/views/decidim/proposals/proposals/_filters.html.erb +1 -1
- data/decidim-proposals/config/locales/ca.yml +3 -0
- data/decidim-proposals/config/locales/en.yml +4 -1
- data/decidim-proposals/config/locales/es.yml +3 -0
- data/decidim-proposals/config/locales/eu.yml +42 -19
- data/decidim-proposals/config/locales/fi.yml +0 -1
- data/decidim-proposals/spec/shared/manage_proposals_examples.rb +15 -13
- data/decidim-results/README.md +1 -1
- data/decidim-results/app/controllers/decidim/results/admin/results_controller.rb +1 -1
- data/decidim-results/app/views/decidim/results/admin/results/_form.html.erb +30 -21
- data/decidim-results/app/views/decidim/results/admin/results/edit.html.erb +4 -5
- data/decidim-results/app/views/decidim/results/admin/results/index.html.erb +40 -25
- data/decidim-results/app/views/decidim/results/admin/results/new.html.erb +4 -5
- data/decidim-results/app/views/decidim/results/results/_filters.html.erb +1 -1
- data/decidim-results/config/locales/ca.yml +2 -0
- data/decidim-results/config/locales/en.yml +2 -0
- data/decidim-results/config/locales/es.yml +2 -0
- data/decidim-results/config/locales/eu.yml +22 -4
- data/decidim-results/spec/shared/manage_results_examples.rb +10 -8
- data/decidim-system/config/locales/eu.yml +60 -2
- data/lib/generators/decidim/app_generator.rb +0 -4
- data/lib/generators/decidim/install_generator.rb +0 -4
- data/lib/generators/decidim/templates/README.md.erb +18 -18
- data/package.json +47 -22
- data/tsconfig.json +17 -0
- data/tslint.json +12 -0
- data/webpack.config.js +8 -6
- data/webpack.d.ts +5 -0
- data/yarn.lock +1461 -781
- metadata +119 -83
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_actions.scss +0 -8
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_forms.scss +0 -10
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss +0 -53
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_icons.scss +0 -9
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_layout.scss +0 -27
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_settings.scss +0 -566
- data/decidim-admin/app/assets/stylesheets/decidim/admin/_tables.scss +0 -21
- data/decidim-admin/app/views/layouts/decidim/admin/_login_items.html.erb +0 -8
- data/decidim-admin/app/views/layouts/decidim/admin/_sidebar.html.erb +0 -22
- data/decidim-comments/app/frontend/application/application.component.jsx +0 -37
- data/decidim-comments/app/frontend/application/application.component.test.jsx +0 -33
- data/decidim-comments/app/frontend/application/icon.component.jsx +0 -26
- data/decidim-comments/app/frontend/application/icon.component.test.jsx +0 -53
- data/decidim-comments/app/frontend/comments/comment_order_selector.component.jsx +0 -72
- data/decidim-comments/app/frontend/comments/comment_order_selector.component.test.jsx +0 -20
- data/decidim-comments/app/frontend/comments/comment_thread.component.jsx +0 -75
- data/decidim-comments/app/frontend/comments/comment_thread.component.test.jsx +0 -83
- data/decidim-comments/app/frontend/comments/down_vote_button.component.jsx +0 -98
- data/decidim-comments/app/frontend/comments/down_vote_button.component.test.jsx +0 -48
- data/decidim-comments/app/frontend/comments/featured_comment.component.jsx +0 -23
- data/decidim-comments/app/frontend/comments/featured_comment.component.test.jsx +0 -15
- data/decidim-comments/app/frontend/comments/up_vote_button.component.jsx +0 -98
- data/decidim-comments/app/frontend/comments/up_vote_button.component.test.jsx +0 -48
- data/decidim-comments/app/frontend/comments/vote_button.component.jsx +0 -32
- data/decidim-comments/app/frontend/entry.js +0 -17
- data/decidim-comments/app/frontend/entry.test.js +0 -31
- data/decidim-comments/app/frontend/support/load_translations.js +0 -23
- data/decidim-comments/app/frontend/support/stub_component.js +0 -29
- data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/bind-polyfill.js +0 -18
- data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/object-assign-polyfill.js +0 -24
- data/karma.conf.js +0 -45
- data/lib/generators/decidim/review_app_generator.rb +0 -53
- data/lib/generators/decidim/templates/app.json.erb +0 -16
@@ -17,6 +17,7 @@ en:
|
|
17
17
|
destroy: Delete
|
18
18
|
edit: Edit
|
19
19
|
new: New %{name}
|
20
|
+
preview: Preview
|
20
21
|
title: Actions
|
21
22
|
admin:
|
22
23
|
models:
|
@@ -78,6 +79,7 @@ en:
|
|
78
79
|
other: "%{count} projects"
|
79
80
|
filters:
|
80
81
|
category: Category
|
82
|
+
category_prompt: Select a category
|
81
83
|
scopes: Scopes
|
82
84
|
search: Search
|
83
85
|
filters_small_view:
|
@@ -125,6 +127,9 @@ en:
|
|
125
127
|
destroy:
|
126
128
|
error: An error ocurred while canceling your vote
|
127
129
|
success: Your vote has been canceled successfully
|
130
|
+
resource_links:
|
131
|
+
included_proposals:
|
132
|
+
project_proposals: 'Proposals included in this project:'
|
128
133
|
index:
|
129
134
|
confirmed_orders_count: Orders count
|
130
135
|
total_budget: Total budget
|
@@ -16,6 +16,7 @@ es:
|
|
16
16
|
destroy: Borrar
|
17
17
|
edit: Editar
|
18
18
|
new: Nuevo %{name}
|
19
|
+
preview: Previsualizar
|
19
20
|
title: Acciones
|
20
21
|
admin:
|
21
22
|
models:
|
@@ -71,6 +72,7 @@ es:
|
|
71
72
|
other: "%{count} proyectos"
|
72
73
|
filters:
|
73
74
|
category: Categoría
|
75
|
+
category_prompt: Selecciona una categoría
|
74
76
|
scopes: Ámbitos
|
75
77
|
search: Buscar
|
76
78
|
filters_small_view:
|
@@ -118,6 +120,9 @@ es:
|
|
118
120
|
destroy:
|
119
121
|
error: Ha habido un error al cancelar tu voto
|
120
122
|
success: Tu voto ha sido cancelado correctamente
|
123
|
+
resource_links:
|
124
|
+
included_proposals:
|
125
|
+
project_proposals: 'Propuestas incluidas en este proyecto:'
|
121
126
|
index:
|
122
127
|
confirmed_orders_count: Número de votos
|
123
128
|
total_budget: Presupuesto total
|
@@ -16,6 +16,7 @@ eu:
|
|
16
16
|
destroy: Garbitu
|
17
17
|
edit: Editatu
|
18
18
|
new: '%{name} berria'
|
19
|
+
preview: Aurreikusi
|
19
20
|
title: Ekintzak
|
20
21
|
admin:
|
21
22
|
models:
|
@@ -31,6 +32,8 @@ eu:
|
|
31
32
|
title: Editatu proiektua
|
32
33
|
update: Eguneratu proiektua
|
33
34
|
index:
|
35
|
+
finished_orders: Emandako botoak
|
36
|
+
pending_orders: Emateke dauden botoak
|
34
37
|
title: Proiektuak
|
35
38
|
new:
|
36
39
|
create: Sortu proiektua
|
@@ -57,7 +60,9 @@ eu:
|
|
57
60
|
budget_summary:
|
58
61
|
are_you_sure: Ziur zaude zure botoa ezeztatu nahi duzula?
|
59
62
|
assigned: 'Esleituta:'
|
63
|
+
cancel_order: ezabatu ezazu botoa eta hasi berriro
|
60
64
|
checked_out:
|
65
|
+
description: 'Jada bozkatu duzu aurrekonturako. Iritziz aldatu baduzu, ezeztatu hemen: %{cancel_link}.'
|
61
66
|
title: Botoa zuzen bidali da
|
62
67
|
description: Zure aburuz, proiektuetako zeinei esleitu behar diegu aurrekontua? Gutxienez, %{minimum_budget} esleitu nahi dituzun proiektuei, eta bozkatu aurrekontua zehazteko.
|
63
68
|
title: Zure esku dago aurrekontua erabakitzea
|
@@ -67,10 +72,14 @@ eu:
|
|
67
72
|
other: "%{count} proiektu"
|
68
73
|
filters:
|
69
74
|
category: Kategoria
|
75
|
+
category_prompt: Aukeratu kategoria bat
|
70
76
|
scopes: Esparruak
|
71
77
|
search: Bilatu
|
72
78
|
filters_small_view:
|
79
|
+
close_modal: Itxi leihoa
|
80
|
+
filter: Iragazi
|
73
81
|
filter_by: 'Iragazi honen arabera:'
|
82
|
+
unfold: Zabaldu
|
74
83
|
order_progress:
|
75
84
|
vote: Bozkatu
|
76
85
|
order_selected_projects:
|
@@ -81,6 +90,9 @@ eu:
|
|
81
90
|
view: Ikusi
|
82
91
|
project:
|
83
92
|
add: Gehitu
|
93
|
+
count:
|
94
|
+
one: 1 sostengu
|
95
|
+
other: "%{count} sostengu"
|
84
96
|
remove: Kendu
|
85
97
|
project_budget_button:
|
86
98
|
add: Gehitu
|
@@ -90,7 +102,17 @@ eu:
|
|
90
102
|
view_all_projects: Ikusi proiektu guztiak
|
91
103
|
features:
|
92
104
|
budgets:
|
105
|
+
actions:
|
106
|
+
vote: Proiektuaren alde egin
|
93
107
|
name: Aurrekontuak
|
108
|
+
settings:
|
109
|
+
global:
|
110
|
+
comments_enabled: Iruzkinak gaituta
|
111
|
+
total_budget: Guztizko aurrekontua
|
112
|
+
vote_threshold_percent: Aurrekontuaren gutxieneko ehunekoa
|
113
|
+
step:
|
114
|
+
comments_blocked: Iruzkinak blokeatuta
|
115
|
+
votes_enabled: Botoak gaituta
|
94
116
|
orders:
|
95
117
|
checkout:
|
96
118
|
error: Errorea gertatu da zure botoa prozesatzean
|
@@ -98,4 +120,9 @@ eu:
|
|
98
120
|
destroy:
|
99
121
|
error: Errorea gertatu da zure botoa ezeztatzean
|
100
122
|
success: Zure botua zuzen ezeztatu da
|
123
|
+
resource_links:
|
124
|
+
included_proposals:
|
125
|
+
project_proposals: 'Proiektu honetan jasotako proposamenak:'
|
126
|
+
index:
|
127
|
+
confirmed_orders_count: Boto-kopurua
|
101
128
|
total_budget: Guztizko aurrekontua
|
@@ -233,5 +233,27 @@ describe "Orders", type: :feature do
|
|
233
233
|
expect(page).to have_i18n_content(project.title)
|
234
234
|
expect(page).to have_i18n_content(project.description)
|
235
235
|
end
|
236
|
+
|
237
|
+
context "with linked proposals" do
|
238
|
+
let(:proposal_feature) do
|
239
|
+
create(:feature, manifest_name: :proposals, participatory_process: project.feature.participatory_process)
|
240
|
+
end
|
241
|
+
let(:proposals) { create_list(:proposal, 3, feature: proposal_feature) }
|
242
|
+
|
243
|
+
before do
|
244
|
+
project.link_resources(proposals, "included_proposals")
|
245
|
+
end
|
246
|
+
|
247
|
+
it "shows related proposals" do
|
248
|
+
visit_feature
|
249
|
+
click_link translated(project.title)
|
250
|
+
|
251
|
+
proposals.each do |proposal|
|
252
|
+
expect(page).to have_content(proposal.title)
|
253
|
+
expect(page).to have_content(proposal.author_name)
|
254
|
+
expect(page).to have_content(proposal.votes.size)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
236
258
|
end
|
237
259
|
end
|
@@ -9,7 +9,7 @@ RSpec.shared_examples "manage project attachments" do
|
|
9
9
|
visit decidim_admin.manage_feature_path(participatory_process_id: participatory_process, feature_id: current_feature)
|
10
10
|
|
11
11
|
within find("tr", text: translated(project.title)) do
|
12
|
-
|
12
|
+
find("a.action-icon--attachments").click
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
RSpec.shared_examples "manage projects" do
|
4
4
|
it "updates a project" do
|
5
5
|
within find("tr", text: translated(project.title)) do
|
6
|
-
|
6
|
+
find("a.action-icon--edit").click
|
7
7
|
end
|
8
8
|
|
9
9
|
within ".edit_project" do
|
@@ -18,7 +18,7 @@ RSpec.shared_examples "manage projects" do
|
|
18
18
|
find("*[type=submit]").click
|
19
19
|
end
|
20
20
|
|
21
|
-
within ".
|
21
|
+
within ".callout-wrapper" do
|
22
22
|
expect(page).to have_content("successfully")
|
23
23
|
end
|
24
24
|
|
@@ -29,9 +29,11 @@ RSpec.shared_examples "manage projects" do
|
|
29
29
|
|
30
30
|
context "previewing projects" do
|
31
31
|
it "allows the user to preview the project" do
|
32
|
-
|
32
|
+
within find("tr", text: translated(project.title)) do
|
33
|
+
@new_window = window_opened_by { find("a.action-icon--preview").click }
|
34
|
+
end
|
33
35
|
|
34
|
-
within_window new_window do
|
36
|
+
within_window @new_window do
|
35
37
|
expect(current_path).to eq decidim_budgets.project_path(id: project.id, participatory_process_id: participatory_process.id, feature_id: current_feature.id)
|
36
38
|
expect(page).to have_content(translated(project.title))
|
37
39
|
end
|
@@ -61,7 +63,7 @@ RSpec.shared_examples "manage projects" do
|
|
61
63
|
end
|
62
64
|
|
63
65
|
it "creates a new project" do
|
64
|
-
|
66
|
+
click_link "New Project"
|
65
67
|
|
66
68
|
within ".new_project" do
|
67
69
|
fill_in_i18n(
|
@@ -86,7 +88,7 @@ RSpec.shared_examples "manage projects" do
|
|
86
88
|
find("*[type=submit]").click
|
87
89
|
end
|
88
90
|
|
89
|
-
within ".
|
91
|
+
within ".callout-wrapper" do
|
90
92
|
expect(page).to have_content("successfully")
|
91
93
|
end
|
92
94
|
|
@@ -104,10 +106,10 @@ RSpec.shared_examples "manage projects" do
|
|
104
106
|
|
105
107
|
it "deletes a project" do
|
106
108
|
within find("tr", text: translated(project2.title)) do
|
107
|
-
|
109
|
+
find("a.action-icon--remove").click
|
108
110
|
end
|
109
111
|
|
110
|
-
within ".
|
112
|
+
within ".callout-wrapper" do
|
111
113
|
expect(page).to have_content("successfully")
|
112
114
|
end
|
113
115
|
|
data/decidim-comments/README.md
CHANGED
@@ -35,6 +35,39 @@ And then execute:
|
|
35
35
|
$ bundle
|
36
36
|
```
|
37
37
|
|
38
|
+
## How to contribute
|
39
|
+
|
40
|
+
The technology stack used in this module is the following:
|
41
|
+
|
42
|
+
For the backend side:
|
43
|
+
- Ruby on Rails
|
44
|
+
- GraphQL
|
45
|
+
|
46
|
+
For the frontend side:
|
47
|
+
- Typescript (introduced in #1001)
|
48
|
+
- React
|
49
|
+
- Apollo
|
50
|
+
|
51
|
+
The frontend code can be found in the folder `app/frontend` instead of `app/assets`. We are using Webpack to build the React application so we are keeping the React files in a separate folder and then including the `bundle.js` file using sprockets as usual.
|
52
|
+
|
53
|
+
#### Developing React components
|
54
|
+
|
55
|
+
You need to execute `yarn start` in a separate terminal, in the `decidim` root folder while you are developing this module. When you are finished you can build the project for production like this: `yarn build:prod`. We are checking in the bundle into the repository.
|
56
|
+
|
57
|
+
#### Run tests
|
58
|
+
|
59
|
+
You can execute `yarn test` to run the javascript test suite or you can run `yarn test:watch` to listen for file changes.
|
60
|
+
|
61
|
+
#### GraphQL schema and Typescript
|
62
|
+
|
63
|
+
Since we are using Typescript we can generate interfaces and types from our schema using the following command:
|
64
|
+
|
65
|
+
```bash
|
66
|
+
yarn run graphql:generate_schema_types
|
67
|
+
```
|
68
|
+
|
69
|
+
This command will create a file called `app/frontend/support/schema.ts` that can be used to strict type checking in our components.
|
70
|
+
|
38
71
|
## Contributing
|
39
72
|
See [Decidim](https://github.com/AjuntamentdeBarcelona/decidim).
|
40
73
|
|
Binary file
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import ApolloClient, { createNetworkInterface } from
|
1
|
+
import ApolloClient, { createNetworkInterface } from "apollo-client";
|
2
2
|
|
3
3
|
// Create a custom network interface for Apollo since our
|
4
4
|
// API endpoint is not the default.
|
5
5
|
const networkInterface = createNetworkInterface({
|
6
|
-
uri:
|
6
|
+
uri: "/api",
|
7
7
|
opts: {
|
8
|
-
credentials:
|
9
|
-
}
|
8
|
+
credentials: "same-origin",
|
9
|
+
},
|
10
10
|
});
|
11
11
|
|
12
12
|
const client = new ApolloClient({
|
13
|
-
networkInterface
|
13
|
+
networkInterface,
|
14
14
|
});
|
15
15
|
|
16
16
|
export default client;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { shallow } from "enzyme";
|
2
|
+
import * as React from "react";
|
3
|
+
|
4
|
+
import * as moment from "moment";
|
5
|
+
|
6
|
+
import Application from "./application.component";
|
7
|
+
|
8
|
+
const { I18n } = require("react-i18nify");
|
9
|
+
|
10
|
+
describe("<Application />", () => {
|
11
|
+
afterEach(() => {
|
12
|
+
I18n.setLocale("en");
|
13
|
+
});
|
14
|
+
|
15
|
+
it("should set I18n locale to locale prop", () => {
|
16
|
+
spyOn(I18n, "setLocale");
|
17
|
+
const locale = "ca";
|
18
|
+
shallow(
|
19
|
+
<Application locale={locale}>
|
20
|
+
<div>My application</div>
|
21
|
+
</Application>,
|
22
|
+
);
|
23
|
+
expect(I18n.setLocale).toHaveBeenCalledWith(locale);
|
24
|
+
});
|
25
|
+
|
26
|
+
it("should set moment locale to locale prop", () => {
|
27
|
+
spyOn(moment, "locale");
|
28
|
+
const locale = "ca";
|
29
|
+
shallow(
|
30
|
+
<Application locale={locale}>
|
31
|
+
<div>My application</div>
|
32
|
+
</Application>,
|
33
|
+
);
|
34
|
+
expect(moment.locale).toHaveBeenCalledWith(locale);
|
35
|
+
});
|
36
|
+
});
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import * as moment from "moment";
|
2
|
+
import * as React from "react";
|
3
|
+
import { ApolloProvider } from "react-apollo";
|
4
|
+
|
5
|
+
import apolloClient from "./apollo_client";
|
6
|
+
|
7
|
+
const { I18n } = require("react-i18nify");
|
8
|
+
|
9
|
+
interface ApplicationProps {
|
10
|
+
locale: string;
|
11
|
+
}
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Wrapper component for all React applications using Apollo
|
15
|
+
* @class
|
16
|
+
* @augments Component
|
17
|
+
*/
|
18
|
+
export default class Application extends React.Component<ApplicationProps, undefined> {
|
19
|
+
constructor(props: ApplicationProps) {
|
20
|
+
const { locale } = props;
|
21
|
+
|
22
|
+
I18n.setLocale(locale);
|
23
|
+
moment.locale(locale);
|
24
|
+
|
25
|
+
super(props);
|
26
|
+
}
|
27
|
+
|
28
|
+
public render() {
|
29
|
+
const { children } = this.props;
|
30
|
+
|
31
|
+
return (
|
32
|
+
<ApolloProvider client={apolloClient}>
|
33
|
+
{children}
|
34
|
+
</ApolloProvider>
|
35
|
+
);
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { mount, shallow } from "enzyme";
|
2
|
+
import * as React from "react";
|
3
|
+
|
4
|
+
import { Icon } from "./icon.component";
|
5
|
+
|
6
|
+
describe("<Icon /", () => {
|
7
|
+
let userAgent: string;
|
8
|
+
|
9
|
+
beforeEach(() => {
|
10
|
+
window.DecidimComments = {
|
11
|
+
assets: {
|
12
|
+
"icons.svg": "/assets/icons.svg",
|
13
|
+
},
|
14
|
+
};
|
15
|
+
|
16
|
+
userAgent = window.navigator.userAgent;
|
17
|
+
});
|
18
|
+
|
19
|
+
it("renders a simple span with the icon name", () => {
|
20
|
+
const wrapper = shallow(<Icon name="icon-thumb-up" userAgent={userAgent} />);
|
21
|
+
expect(wrapper.find("span").text()).toBe("icon-thumb-up");
|
22
|
+
});
|
23
|
+
|
24
|
+
it("has a default prop iconExtraClassName with value 'icon--before'", () => {
|
25
|
+
const wrapper = mount(<Icon name="icon-thumb-up" userAgent={userAgent} />);
|
26
|
+
expect(wrapper.prop("iconExtraClassName")).toBe("icon--before");
|
27
|
+
});
|
28
|
+
|
29
|
+
it("renders the svg with an extra class defined by iconExtraClassName", () => {
|
30
|
+
const wrapper = mount(<Icon name="icon-thumb-up" userAgent={userAgent} iconExtraClassName="icon--small" />);
|
31
|
+
expect(wrapper.find(".icon--small").exists()).toBeTruthy();
|
32
|
+
});
|
33
|
+
|
34
|
+
describe("if user agent is not PhantomJS neither Node", () => {
|
35
|
+
beforeEach(() => {
|
36
|
+
userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36";
|
37
|
+
});
|
38
|
+
|
39
|
+
it("should render a svg with class defined by prop className", () => {
|
40
|
+
const wrapper = shallow(<Icon name="icon-thumb-down" userAgent={userAgent} />);
|
41
|
+
expect(wrapper.find("svg.icon-thumb-down").exists()).toBeTruthy();
|
42
|
+
});
|
43
|
+
|
44
|
+
it("should render a svg icon using the 'icons.svg' url and name", () => {
|
45
|
+
const wrapper = shallow(<Icon name="icon-thumb-up" userAgent={userAgent} />);
|
46
|
+
expect(wrapper.find("svg use").prop("xlinkHref")).toBe("/assets/icons.svg#icon-thumb-up");
|
47
|
+
});
|
48
|
+
});
|
49
|
+
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import assetUrl from "../support/asset_url";
|
3
|
+
|
4
|
+
interface IconProps {
|
5
|
+
name: string;
|
6
|
+
userAgent: string;
|
7
|
+
iconExtraClassName?: string;
|
8
|
+
}
|
9
|
+
|
10
|
+
export const Icon: React.SFC<IconProps> = ({ name, userAgent, iconExtraClassName }) => {
|
11
|
+
if (userAgent.match(/PhantomJS/) || userAgent.match(/Node/)) {
|
12
|
+
return <span className={`icon ${iconExtraClassName} ${name}`}>{name}</span>;
|
13
|
+
}
|
14
|
+
|
15
|
+
return (
|
16
|
+
<svg className={`icon ${iconExtraClassName} ${name}`}>
|
17
|
+
<use xmlnsXlink="http://www.w3.org/1999/xlink" xlinkHref={`${assetUrl("icons.svg")}#${name}`} />
|
18
|
+
</svg>
|
19
|
+
);
|
20
|
+
};
|
21
|
+
|
22
|
+
Icon.defaultProps = {
|
23
|
+
iconExtraClassName: "icon--before",
|
24
|
+
};
|
25
|
+
|
26
|
+
interface IconWithoutUserAgentProps {
|
27
|
+
name: string;
|
28
|
+
iconExtraClassName?: string;
|
29
|
+
}
|
30
|
+
|
31
|
+
const IconWithoutUserAgent: React.SFC<IconWithoutUserAgentProps> = ({ name, iconExtraClassName }) => (
|
32
|
+
<Icon name={name} userAgent={navigator.userAgent} iconExtraClassName={iconExtraClassName} />
|
33
|
+
);
|
34
|
+
|
35
|
+
export default IconWithoutUserAgent;
|