decidim 0.0.3 → 0.0.4
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/.github/ISSUE_TEMPLATE.md +23 -4
- data/.travis.yml +4 -1
- data/Gemfile.lock +56 -48
- data/Rakefile +1 -1
- data/decidim-admin/app/commands/decidim/admin/create_participatory_process_admin.rb +3 -0
- data/decidim-admin/app/commands/decidim/admin/update_feature_permissions.rb +46 -0
- data/decidim-admin/app/commands/decidim/admin/update_organization.rb +17 -2
- data/decidim-admin/app/commands/decidim/admin/update_participatory_process.rb +4 -2
- data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +3 -0
- data/decidim-admin/app/controllers/decidim/admin/feature_permissions_controller.rb +59 -0
- data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +20 -0
- data/decidim-admin/app/controllers/decidim/admin/users_controller.rb +3 -1
- data/decidim-admin/app/forms/decidim/admin/organization_form.rb +10 -0
- data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +8 -5
- data/decidim-admin/app/forms/decidim/admin/permission_form.rb +31 -0
- data/decidim-admin/app/forms/decidim/admin/permissions_form.rb +16 -0
- data/decidim-admin/app/helpers/decidim/admin/application_helper.rb +1 -0
- data/decidim-admin/app/models/decidim/admin/participatory_process_user_role.rb +1 -1
- data/decidim-admin/app/views/decidim/admin/attachments/edit.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/attachments/new.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/categories/edit.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/categories/new.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/dashboard/show.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/feature_permissions/edit.html.erb +27 -0
- data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +10 -0
- data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/features/new.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/organization/_form.html.erb +34 -0
- data/decidim-admin/app/views/decidim/admin/organization/edit.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/edit.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_processes/_form.html.erb +17 -4
- data/decidim-admin/app/views/decidim/admin/participatory_processes/edit.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_processes/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_processes/new.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/participatory_processes/show.html.erb +5 -2
- data/decidim-admin/app/views/decidim/admin/scopes/edit.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/scopes/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/scopes/new.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/static_pages/_form.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/static_pages/edit.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/static_pages/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/static_pages/new.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/static_pages/show.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/user_groups/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/users/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/users/new.html.erb +2 -2
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +1 -1
- data/decidim-admin/config/i18n-tasks.yml +4 -3
- data/decidim-admin/config/locales/ca.yml +20 -1
- data/decidim-admin/config/locales/en.yml +19 -0
- data/decidim-admin/config/locales/es.yml +19 -0
- data/decidim-admin/config/locales/eu.yml +5 -0
- data/decidim-admin/config/routes.rb +8 -1
- data/decidim-admin/db/seeds.rb +3 -1
- data/decidim-admin/spec/commands/create_participatory_process_admin_spec.rb +19 -0
- data/decidim-admin/spec/commands/update_organization_spec.rb +20 -0
- data/decidim-admin/spec/features/admin_invite_spec.rb +5 -3
- data/decidim-admin/spec/features/admin_manages_feature_permissions_spec.rb +44 -0
- data/decidim-admin/spec/features/admin_manages_features_spec.rb +38 -0
- data/decidim-admin/spec/features/admin_manages_participatory_process_admins_spec.rb +0 -2
- data/decidim-admin/spec/features/admin_manages_participatory_process_attachments_spec.rb +0 -2
- data/decidim-admin/spec/features/admin_manages_participatory_process_categories_spec.rb +0 -2
- data/decidim-admin/spec/features/admin_manages_participatory_process_steps_spec.rb +0 -2
- data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +0 -2
- data/decidim-admin/spec/features/admin_manages_user_groups_spec.rb +1 -3
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_admins_spec.rb +0 -2
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_attachments_spec.rb +0 -2
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_steps_spec.rb +0 -2
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_processes_spec.rb +0 -2
- data/decidim-admin/spec/features/process_admin_manages_participatory_process_categories_spec.rb +0 -2
- data/decidim-admin/spec/forms/organization_form_spec.rb +11 -2
- data/decidim-admin/spec/models/participatory_process_user_role_spec.rb +17 -0
- data/decidim-admin/spec/shared/manage_process_steps_examples.rb +3 -2
- data/decidim-budgets/app/assets/images/decidim/budgets/icon.svg +16 -4
- data/decidim-budgets/app/assets/javascripts/decidim/budgets/progressFixed.js.es6 +23 -0
- data/decidim-budgets/app/assets/javascripts/decidim/budgets/projects.js.es6 +1 -0
- data/decidim-budgets/app/assets/stylesheets/decidim/budgets/budget/_budget-list.scss +1 -1
- data/decidim-budgets/app/commands/decidim/budgets/admin/create_project.rb +0 -1
- data/decidim-budgets/app/commands/decidim/budgets/admin/update_project.rb +0 -1
- data/decidim-budgets/app/controllers/decidim/budgets/admin/application_controller.rb +9 -0
- data/decidim-budgets/app/controllers/decidim/budgets/admin/attachments_controller.rb +29 -0
- data/decidim-budgets/app/controllers/decidim/budgets/line_items_controller.rb +2 -0
- data/decidim-budgets/app/controllers/decidim/budgets/orders_controller.rb +2 -0
- data/decidim-budgets/app/forms/decidim/budgets/admin/project_form.rb +1 -2
- data/decidim-budgets/app/models/decidim/budgets/project.rb +1 -0
- data/decidim-budgets/app/services/decidim/budgets/project_search.rb +0 -1
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/_form.html.erb +0 -4
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/edit.html.erb +1 -1
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb +1 -0
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/new.html.erb +1 -1
- data/decidim-budgets/app/views/decidim/budgets/line_items/update_budget.js.erb +2 -0
- data/decidim-budgets/app/views/decidim/budgets/projects/_project.html.erb +2 -2
- data/decidim-budgets/app/views/decidim/budgets/projects/_project_budget_button.html.erb +2 -2
- data/decidim-budgets/app/views/decidim/budgets/projects/index.html.erb +3 -2
- data/decidim-budgets/app/views/decidim/budgets/projects/show.html.erb +3 -7
- data/decidim-budgets/config/i18n-tasks.yml +1 -0
- data/decidim-budgets/config/locales/ca.yml +24 -5
- data/decidim-budgets/config/locales/en.yml +12 -3
- data/decidim-budgets/config/locales/es.yml +22 -3
- data/decidim-budgets/config/locales/eu.yml +5 -0
- data/decidim-budgets/db/migrate/20170207101750_remove_short_description_from_decidim_projects.rb +5 -0
- data/decidim-budgets/decidim-budgets.gemspec +1 -0
- data/decidim-budgets/lib/decidim/budgets/admin_engine.rb +4 -1
- data/decidim-budgets/lib/decidim/budgets/feature.rb +15 -4
- data/decidim-budgets/lib/decidim/budgets/test/factories.rb +2 -3
- data/decidim-budgets/spec/commands/create_project_spec.rb +0 -1
- data/decidim-budgets/spec/commands/update_project_spec.rb +0 -1
- data/decidim-budgets/spec/features/admin_manages_project_attachments_spec.rb +10 -0
- data/decidim-budgets/spec/features/admin_manages_projects_spec.rb +0 -2
- data/decidim-budgets/spec/features/orders_spec.rb +43 -5
- data/decidim-budgets/spec/features/process_admin_manages_project_attachments_spec.rb +12 -0
- data/decidim-budgets/spec/features/process_admin_manages_projects_spec.rb +0 -2
- data/decidim-budgets/spec/forms/project_form_spec.rb +0 -10
- data/decidim-budgets/spec/shared/manage_attachments_examples.rb +17 -0
- data/decidim-budgets/spec/shared/manage_projects_examples.rb +0 -7
- data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
- data/decidim-comments/app/commands/decidim/comments/create_comment.rb +10 -0
- data/decidim-comments/app/forms/decidim/comments/comment_form.rb +1 -1
- data/decidim-comments/app/frontend/comments/add_comment_form.component.jsx +33 -12
- data/decidim-comments/app/frontend/comments/add_comment_form.component.test.jsx +6 -0
- data/decidim-comments/app/frontend/comments/comment.component.jsx +7 -5
- data/decidim-comments/app/frontend/comments/comment_order_selector.component.jsx +2 -2
- data/decidim-comments/app/frontend/comments/comment_thread.component.jsx +5 -0
- data/decidim-comments/app/frontend/comments/comments.component.jsx +11 -0
- data/decidim-comments/app/frontend/comments/vote_button.component.jsx +5 -0
- data/decidim-comments/app/frontend/comments/vote_button_component.test.jsx +1 -1
- data/decidim-comments/app/frontend/entry.test.js +2 -0
- data/decidim-comments/app/mailers/decidim/comments/comment_notification_mailer.rb +31 -0
- data/decidim-comments/app/models/decidim/comments/comment.rb +6 -0
- data/decidim-comments/app/views/decidim/comments/comment_notification_mailer/comment_created.html.erb +18 -0
- data/decidim-comments/app/views/decidim/comments/comment_notification_mailer/reply_created.html.erb +18 -0
- data/decidim-comments/config/locales/ca.yml +17 -3
- data/decidim-comments/config/locales/en.yml +17 -3
- data/decidim-comments/config/locales/es.yml +17 -3
- data/decidim-comments/config/locales/eu.yml +5 -0
- data/decidim-comments/lib/decidim/comments.rb +1 -0
- data/decidim-comments/{app/helpers → lib}/decidim/comments/comments_helper.rb +0 -0
- data/decidim-comments/spec/commands/create_comment_spec.rb +68 -1
- data/decidim-comments/spec/features/comments_spec.rb +27 -20
- data/decidim-comments/spec/features/notifications_spec.rb +45 -0
- data/decidim-comments/spec/forms/comment_form_spec.rb +6 -0
- data/decidim-comments/spec/mailers/comment_notification_mailer_spec.rb +36 -0
- data/decidim-comments/spec/models/comment_spec.rb +8 -0
- data/decidim-comments/spec/spec_helper.rb +0 -1
- data/decidim-comments/spec/types/mutation_type_spec.rb +8 -7
- data/decidim-dev/config/locales/ca.yml +5 -0
- data/decidim-dev/config/locales/es.yml +5 -0
- data/decidim-dev/config/locales/eu.yml +5 -0
- data/decidim-dev/decidim-dev.gemspec +2 -1
- data/decidim-dev/lib/decidim/dev.rb +2 -0
- data/decidim-dev/lib/decidim/dev/dummy_authorization_handler.rb +1 -0
- data/decidim-dev/lib/decidim/dev/test/base_spec_helper.rb +4 -1
- data/decidim-dev/lib/decidim/dev/test/rspec_support/action_mailer.rb +19 -0
- data/decidim-dev/lib/decidim/dev/test/rspec_support/feature.rb +26 -3
- data/decidim-dev/lib/decidim/dev/test/rspec_support/translation_helpers.rb +1 -1
- data/decidim-meetings/app/forms/decidim/meetings/admin/meeting_form.rb +2 -2
- data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/edit.html.erb +1 -1
- data/decidim-meetings/app/views/decidim/meetings/admin/meetings/edit.html.erb +1 -1
- data/decidim-meetings/app/views/decidim/meetings/admin/meetings/new.html.erb +1 -1
- data/decidim-meetings/app/views/decidim/meetings/meetings/index.html.erb +3 -1
- data/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb +11 -1
- data/decidim-meetings/config/locales/ca.yml +3 -3
- data/decidim-meetings/config/locales/en.yml +1 -1
- data/decidim-meetings/config/locales/es.yml +1 -1
- data/decidim-meetings/config/locales/eu.yml +5 -0
- data/decidim-meetings/decidim-meetings.gemspec +1 -1
- data/decidim-meetings/lib/decidim/meetings/feature.rb +1 -0
- data/decidim-meetings/spec/features/admin_manages_meetings_attachments_spec.rb +0 -2
- data/decidim-meetings/spec/features/admin_manages_meetings_spec.rb +0 -2
- data/decidim-meetings/spec/features/process_admin_manages_meetings_attachments_spec.rb +0 -2
- data/decidim-meetings/spec/features/process_admin_manages_meetings_spec.rb +0 -2
- data/decidim-pages/app/assets/images/decidim/pages/icon.svg +1 -3
- data/decidim-pages/app/views/decidim/pages/admin/pages/edit.html.erb +1 -1
- data/decidim-pages/app/views/decidim/pages/application/show.html.erb +4 -1
- data/decidim-pages/config/locales/eu.yml +7 -0
- data/decidim-pages/lib/decidim/pages/feature.rb +1 -0
- data/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb +42 -5
- data/decidim-proposals/app/forms/decidim/proposals/proposal_form.rb +3 -1
- data/decidim-proposals/app/helpers/decidim/proposals/proposal_votes_helper.rb +1 -1
- data/decidim-proposals/app/models/decidim/proposals/abilities/current_user.rb +22 -4
- data/decidim-proposals/app/models/decidim/proposals/proposal.rb +2 -2
- data/decidim-proposals/app/services/decidim/proposals/proposal_search.rb +25 -13
- data/decidim-proposals/app/views/decidim/proposals/admin/proposal_answers/edit.html.erb +1 -1
- data/decidim-proposals/app/views/decidim/proposals/admin/proposals/new.html.erb +1 -1
- data/decidim-proposals/app/views/decidim/proposals/proposals/_filters.html.erb +9 -1
- data/decidim-proposals/app/views/decidim/proposals/proposals/_proposal.html.erb +2 -6
- data/decidim-proposals/app/views/decidim/proposals/proposals/_proposals.html.erb +2 -1
- data/decidim-proposals/app/views/decidim/proposals/proposals/_tags.html.erb +10 -0
- data/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb +9 -9
- data/decidim-proposals/app/views/decidim/proposals/proposals/_votes_count.html.erb +2 -2
- data/decidim-proposals/app/views/decidim/proposals/proposals/index.html.erb +7 -3
- data/decidim-proposals/app/views/decidim/proposals/proposals/index.js.erb +6 -1
- data/decidim-proposals/app/views/decidim/proposals/proposals/new.html.erb +1 -1
- data/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb +22 -23
- data/decidim-proposals/config/i18n-tasks.yml +2 -0
- data/decidim-proposals/config/locales/ca.yml +23 -15
- data/decidim-proposals/config/locales/en.yml +12 -4
- data/decidim-proposals/config/locales/es.yml +12 -4
- data/decidim-proposals/config/locales/eu.yml +5 -0
- data/decidim-proposals/db/migrate/20170205082832_add_index_to_decidim_proposals_proposals_proposal_votes_count.rb +7 -0
- data/decidim-proposals/lib/decidim/proposals/feature.rb +10 -1
- data/decidim-proposals/lib/decidim/proposals/test/factories.rb +1 -1
- data/decidim-proposals/spec/commands/decidim/proposals/admin_create_proposal_spec.rb +0 -1
- data/decidim-proposals/spec/commands/decidim/proposals/create_proposal_spec.rb +0 -1
- data/decidim-proposals/spec/features/admin_manages_proposals_spec.rb +0 -2
- data/decidim-proposals/spec/features/process_admin_manages_proposals_spec.rb +0 -2
- data/decidim-proposals/spec/features/proposals_spec.rb +77 -0
- data/decidim-proposals/spec/features/vote_proposal_spec.rb +16 -1
- data/decidim-proposals/spec/forms/decidim/proposals/admin_proposal_form_spec.rb +0 -1
- data/decidim-proposals/spec/forms/decidim/proposals/proposal_form_spec.rb +0 -1
- data/decidim-proposals/spec/helpers/proposal_votes_helper_spec.rb +10 -0
- data/decidim-proposals/spec/services/decidim/proposals/proposal_search_spec.rb +56 -31
- data/decidim-proposals/spec/shared/create_proposal_examples.rb +2 -2
- data/decidim-results/app/views/decidim/results/admin/results/edit.html.erb +1 -1
- data/decidim-results/app/views/decidim/results/admin/results/new.html.erb +1 -1
- data/decidim-results/app/views/decidim/results/results/index.html.erb +3 -1
- data/decidim-results/app/views/decidim/results/results/show.html.erb +11 -1
- data/decidim-results/config/locales/ca.yml +2 -2
- data/decidim-results/config/locales/en.yml +1 -1
- data/decidim-results/config/locales/es.yml +1 -1
- data/decidim-results/config/locales/eu.yml +5 -0
- data/decidim-results/lib/decidim/results/feature.rb +1 -0
- data/decidim-results/spec/features/admin_manages_results_spec.rb +0 -2
- data/decidim-results/spec/features/process_admin_manages_results_spec.rb +0 -2
- data/decidim-system/app/assets/stylesheets/decidim/system/_foundation_and_overrides.scss +1 -1
- data/decidim-system/app/controllers/decidim/system/application_controller.rb +1 -0
- data/decidim-system/app/controllers/decidim/system/devise/sessions_controller.rb +1 -0
- data/decidim-system/app/views/decidim/system/admins/edit.html.erb +2 -2
- data/decidim-system/app/views/decidim/system/admins/index.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/admins/new.html.erb +2 -2
- data/decidim-system/app/views/decidim/system/admins/show.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/dashboard/show.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/devise/passwords/edit.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/devise/passwords/new.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/devise/sessions/new.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/organizations/edit.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/organizations/index.html.erb +1 -1
- data/decidim-system/app/views/decidim/system/organizations/new.html.erb +2 -2
- data/decidim-system/app/views/decidim/system/organizations/show.html.erb +1 -1
- data/decidim-system/config/locales/eu.yml +7 -0
- data/decidim-system/spec/features/organizations_spec.rb +1 -2
- data/lib/generators/decidim/install_generator.rb +9 -0
- data/lib/generators/decidim/templates/initializer.rb +1 -0
- data/package.json +6 -6
- data/yarn.lock +743 -738
- metadata +53 -25
- data/decidim-comments/spec/support/dummy.rb +0 -20
- data/decidim-proposals/app/views/decidim/proposals/proposals/_share.html.erb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e97ff36fe9b8afb5d18cd99bda0548b74fc4a76
|
4
|
+
data.tar.gz: 0b67d32ec3db0da5638529ca288650b33a7eb9bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40eb6e5b1dac004d17df2bc5a55432b6ee03277de42a6af69f7788a238a66ae0bbd370cf7c93ff15b75afc7ab8f174239395aba0c625d774fcacace98e6a7d12
|
7
|
+
data.tar.gz: d1087f76397658a05d5c114fde4ac42e649e41a5a2d30f7a55c1fc9edc39a5f3740d44067ce5d1ccd5ea270250b40f5c1b8080b316db96bdabdd2dd7c8c7bcec
|
data/.github/ISSUE_TEMPLATE.md
CHANGED
@@ -1,12 +1,31 @@
|
|
1
|
-
|
1
|
+
<!--
|
2
|
+
1. Please check if an issue already exists so there are no duplicates
|
3
|
+
2. Fill out the whole template so we have a good overview on the issue
|
4
|
+
3. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue
|
5
|
+
4. Please follow the template, otherwise we'll have to ask you to update it
|
6
|
+
-->
|
2
7
|
|
8
|
+
# This is a (Bug Report / Feature Proposal)
|
3
9
|
|
4
|
-
#### :
|
10
|
+
#### :tophat: Description
|
5
11
|
|
12
|
+
For bug reports:
|
13
|
+
* What went wrong?
|
14
|
+
* What did you expect should have happened?
|
15
|
+
* What was the config you used?
|
16
|
+
* What stacktrace or error message from your provider did you see?
|
6
17
|
|
7
|
-
|
8
|
-
|
18
|
+
For feature proposals:
|
19
|
+
* What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
|
20
|
+
* If there is additional config how would it look
|
9
21
|
|
10
22
|
#### :pushpin: Related issues
|
23
|
+
* #12345
|
11
24
|
|
25
|
+
#### :clipboard: Additional Data
|
12
26
|
|
27
|
+
* ***Decidim deployment where you found the issue***:
|
28
|
+
* ***Browser & version***:
|
29
|
+
* ***Screenshot***:
|
30
|
+
* ***Error messages***:
|
31
|
+
* ***URL to reproduce the error***:
|
data/.travis.yml
CHANGED
@@ -40,7 +40,10 @@ before_install:
|
|
40
40
|
# Repo for newer Node.js versions
|
41
41
|
- curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
|
42
42
|
- gem update --system
|
43
|
-
-
|
43
|
+
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
|
44
|
+
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
45
|
+
- sudo apt-get update -qq
|
46
|
+
- sudo apt-get install -y -qq yarn
|
44
47
|
|
45
48
|
bundler_args: --jobs=3 --retry=3 --deployment --path="$HOME/.bundle"
|
46
49
|
|
data/Gemfile.lock
CHANGED
@@ -1,34 +1,34 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
decidim (0.0.
|
5
|
-
decidim-admin (= 0.0.
|
6
|
-
decidim-api (= 0.0.
|
7
|
-
decidim-budgets (= 0.0.
|
8
|
-
decidim-comments (= 0.0.
|
9
|
-
decidim-core (= 0.0.
|
10
|
-
decidim-meetings (= 0.0.
|
11
|
-
decidim-pages (= 0.0.
|
12
|
-
decidim-proposals (= 0.0.
|
13
|
-
decidim-results (= 0.0.
|
14
|
-
decidim-system (= 0.0.
|
4
|
+
decidim (0.0.4)
|
5
|
+
decidim-admin (= 0.0.4)
|
6
|
+
decidim-api (= 0.0.4)
|
7
|
+
decidim-budgets (= 0.0.4)
|
8
|
+
decidim-comments (= 0.0.4)
|
9
|
+
decidim-core (= 0.0.4)
|
10
|
+
decidim-meetings (= 0.0.4)
|
11
|
+
decidim-pages (= 0.0.4)
|
12
|
+
decidim-proposals (= 0.0.4)
|
13
|
+
decidim-results (= 0.0.4)
|
14
|
+
decidim-system (= 0.0.4)
|
15
15
|
rails (~> 5.0.0, >= 5.0.0.1)
|
16
16
|
rails-i18n (~> 5.0.0, >= 5.0.0.1)
|
17
|
-
decidim-budgets (0.0.
|
18
|
-
decidim-comments (= 0.0.
|
19
|
-
decidim-core (= 0.0.
|
17
|
+
decidim-budgets (0.0.4)
|
18
|
+
decidim-comments (= 0.0.4)
|
19
|
+
decidim-core (= 0.0.4)
|
20
20
|
kaminari (~> 1.0.0.rc1)
|
21
21
|
rectify (~> 0.8)
|
22
22
|
searchlight (~> 4.1.0)
|
23
|
-
decidim-proposals (0.0.
|
24
|
-
decidim-comments (= 0.0.
|
25
|
-
decidim-core (= 0.0.
|
23
|
+
decidim-proposals (0.0.4)
|
24
|
+
decidim-comments (= 0.0.4)
|
25
|
+
decidim-core (= 0.0.4)
|
26
26
|
kaminari (~> 1.0.1)
|
27
27
|
rectify (~> 0.8.0)
|
28
28
|
social-share-button (~> 0.8.8)
|
29
|
-
decidim-results (0.0.
|
30
|
-
decidim-comments (= 0.0.
|
31
|
-
decidim-core (= 0.0.
|
29
|
+
decidim-results (0.0.4)
|
30
|
+
decidim-comments (= 0.0.4)
|
31
|
+
decidim-core (= 0.0.4)
|
32
32
|
kaminari (~> 1.0.0.rc1)
|
33
33
|
rectify (~> 0.8)
|
34
34
|
searchlight (~> 4.1.0)
|
@@ -36,11 +36,11 @@ PATH
|
|
36
36
|
PATH
|
37
37
|
remote: decidim-admin
|
38
38
|
specs:
|
39
|
-
decidim-admin (0.0.
|
39
|
+
decidim-admin (0.0.4)
|
40
40
|
active_link_to (~> 1.0.0)
|
41
41
|
cancancan (~> 1.15.0)
|
42
42
|
carrierwave (~> 1.0.0.rc)
|
43
|
-
decidim-core (= 0.0.
|
43
|
+
decidim-core (= 0.0.4)
|
44
44
|
devise (~> 4.2)
|
45
45
|
devise-i18n (~> 1.1.0)
|
46
46
|
devise_invitable (~> 1.7.0)
|
@@ -53,7 +53,7 @@ PATH
|
|
53
53
|
PATH
|
54
54
|
remote: decidim-api
|
55
55
|
specs:
|
56
|
-
decidim-api (0.0.
|
56
|
+
decidim-api (0.0.4)
|
57
57
|
graphiql-rails (~> 1.4.1)
|
58
58
|
graphql (~> 1.4.2)
|
59
59
|
rack-cors (~> 0.4.0)
|
@@ -63,20 +63,20 @@ PATH
|
|
63
63
|
PATH
|
64
64
|
remote: decidim-comments
|
65
65
|
specs:
|
66
|
-
decidim-comments (0.0.
|
67
|
-
decidim-core (= 0.0.
|
66
|
+
decidim-comments (0.0.4)
|
67
|
+
decidim-core (= 0.0.4)
|
68
68
|
jquery-rails (~> 4.0)
|
69
69
|
rails (~> 5.0.0, >= 5.0.0.1)
|
70
70
|
|
71
71
|
PATH
|
72
72
|
remote: decidim-core
|
73
73
|
specs:
|
74
|
-
decidim-core (0.0.
|
74
|
+
decidim-core (0.0.4)
|
75
75
|
active_link_to (~> 1.0.0)
|
76
76
|
cancancan (~> 1.15.0)
|
77
77
|
carrierwave (~> 1.0.0)
|
78
78
|
date_validator (~> 0.9.0)
|
79
|
-
decidim-api (= 0.0.
|
79
|
+
decidim-api (= 0.0.4)
|
80
80
|
devise (~> 4.2)
|
81
81
|
devise-i18n (~> 1.1.0)
|
82
82
|
file_validators (~> 2.1.0)
|
@@ -85,7 +85,7 @@ PATH
|
|
85
85
|
high_voltage (~> 3.0.0)
|
86
86
|
jquery-rails (~> 4.2.2)
|
87
87
|
mini_magick (~> 4.6.0)
|
88
|
-
omniauth (~> 1.
|
88
|
+
omniauth (~> 1.4.0)
|
89
89
|
omniauth-facebook (~> 4.0.0)
|
90
90
|
omniauth-google-oauth2 (~> 0.4.1)
|
91
91
|
omniauth-twitter (~> 1.3.0)
|
@@ -98,22 +98,24 @@ PATH
|
|
98
98
|
sassc-rails (~> 1.3.0)
|
99
99
|
sprockets-es6 (~> 0.9.2)
|
100
100
|
truncato (~> 0.7.9)
|
101
|
+
wisper (~> 1.6.1)
|
101
102
|
|
102
103
|
PATH
|
103
104
|
remote: decidim-dev
|
104
105
|
specs:
|
105
|
-
decidim-dev (0.0.
|
106
|
+
decidim-dev (0.0.4)
|
106
107
|
byebug
|
107
108
|
capybara (~> 2.12.0)
|
108
109
|
capybara-screenshot (~> 1.0.14)
|
109
110
|
codecov (~> 0.1.9)
|
110
111
|
database_cleaner (~> 1.5.0)
|
111
112
|
db-query-matchers (~> 0.7.0)
|
112
|
-
decidim (= 0.0.
|
113
|
+
decidim (= 0.0.4)
|
113
114
|
factory_girl_rails
|
114
|
-
faker (~> 1.7.
|
115
|
+
faker (~> 1.7.3)
|
115
116
|
i18n-tasks (= 0.9.8)
|
116
117
|
launchy
|
118
|
+
letter_opener_web (~> 1.3.0)
|
117
119
|
listen (~> 3.1.0)
|
118
120
|
poltergeist (~> 1.13.0)
|
119
121
|
rails-controller-testing (~> 1.0.1)
|
@@ -126,10 +128,10 @@ PATH
|
|
126
128
|
PATH
|
127
129
|
remote: decidim-meetings
|
128
130
|
specs:
|
129
|
-
decidim-meetings (0.0.
|
131
|
+
decidim-meetings (0.0.4)
|
130
132
|
date_validator (~> 0.9)
|
131
|
-
decidim-core (= 0.0.
|
132
|
-
geocoder (~> 1.4.
|
133
|
+
decidim-core (= 0.0.4)
|
134
|
+
geocoder (~> 1.4.2)
|
133
135
|
httparty (~> 0.14.0)
|
134
136
|
jquery-tmpl-rails (~> 1.1.0)
|
135
137
|
kaminari (~> 1.0.1)
|
@@ -139,17 +141,17 @@ PATH
|
|
139
141
|
PATH
|
140
142
|
remote: decidim-pages
|
141
143
|
specs:
|
142
|
-
decidim-pages (0.0.
|
143
|
-
decidim-comments (= 0.0.
|
144
|
-
decidim-core (= 0.0.
|
144
|
+
decidim-pages (0.0.4)
|
145
|
+
decidim-comments (= 0.0.4)
|
146
|
+
decidim-core (= 0.0.4)
|
145
147
|
rectify (~> 0.8.0)
|
146
148
|
|
147
149
|
PATH
|
148
150
|
remote: decidim-system
|
149
151
|
specs:
|
150
|
-
decidim-system (0.0.
|
152
|
+
decidim-system (0.0.4)
|
151
153
|
active_link_to (~> 1.0.0)
|
152
|
-
decidim-core (= 0.0.
|
154
|
+
decidim-core (= 0.0.4)
|
153
155
|
devise (~> 4.2)
|
154
156
|
devise-i18n (~> 1.1.0)
|
155
157
|
devise_invitable (~> 1.7.0)
|
@@ -248,7 +250,7 @@ GEM
|
|
248
250
|
concurrent-ruby (1.0.4)
|
249
251
|
crack (0.4.3)
|
250
252
|
safe_yaml (~> 1.0.0)
|
251
|
-
css_parser (1.4.
|
253
|
+
css_parser (1.4.8)
|
252
254
|
addressable
|
253
255
|
database_cleaner (1.5.3)
|
254
256
|
date_validator (0.9.0)
|
@@ -281,7 +283,7 @@ GEM
|
|
281
283
|
factory_girl_rails (4.8.0)
|
282
284
|
factory_girl (~> 4.8.0)
|
283
285
|
railties (>= 3.0.0)
|
284
|
-
faker (1.7.
|
286
|
+
faker (1.7.3)
|
285
287
|
i18n (~> 0.5)
|
286
288
|
faraday (0.10.1)
|
287
289
|
multipart-post (>= 1.2, < 3)
|
@@ -299,12 +301,12 @@ GEM
|
|
299
301
|
activesupport (>= 4.1)
|
300
302
|
railties (>= 4.1)
|
301
303
|
tzinfo (~> 1.2, >= 1.2.2)
|
302
|
-
geocoder (1.4.
|
304
|
+
geocoder (1.4.3)
|
303
305
|
globalid (0.3.7)
|
304
306
|
activesupport (>= 4.1.0)
|
305
307
|
graphiql-rails (1.4.1)
|
306
308
|
rails
|
307
|
-
graphql (1.4.
|
309
|
+
graphql (1.4.3)
|
308
310
|
hashdiff (0.3.2)
|
309
311
|
hashie (3.5.1)
|
310
312
|
high_voltage (3.0.0)
|
@@ -346,6 +348,12 @@ GEM
|
|
346
348
|
kaminari-core (1.0.1)
|
347
349
|
launchy (2.4.3)
|
348
350
|
addressable (~> 2.3)
|
351
|
+
letter_opener (1.4.1)
|
352
|
+
launchy (~> 2.2)
|
353
|
+
letter_opener_web (1.3.1)
|
354
|
+
actionmailer (>= 3.2)
|
355
|
+
letter_opener (~> 1.0)
|
356
|
+
railties (>= 3.2)
|
349
357
|
listen (3.1.5)
|
350
358
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
351
359
|
rb-inotify (~> 0.9, >= 0.9.7)
|
@@ -374,7 +382,7 @@ GEM
|
|
374
382
|
multi_json (~> 1.3)
|
375
383
|
multi_xml (~> 0.5)
|
376
384
|
rack (>= 1.2, < 3)
|
377
|
-
omniauth (1.
|
385
|
+
omniauth (1.4.1)
|
378
386
|
hashie (>= 1.2, < 4)
|
379
387
|
rack (>= 1.0, < 3)
|
380
388
|
omniauth-facebook (4.0.0)
|
@@ -394,7 +402,7 @@ GEM
|
|
394
402
|
omniauth-oauth (~> 1.1)
|
395
403
|
rack
|
396
404
|
orm_adapter (0.5.0)
|
397
|
-
parser (2.
|
405
|
+
parser (2.4.0.0)
|
398
406
|
ast (~> 2.2)
|
399
407
|
pg (0.19.0)
|
400
408
|
poltergeist (1.13.0)
|
@@ -528,7 +536,7 @@ GEM
|
|
528
536
|
thread (0.2.2)
|
529
537
|
thread_safe (0.3.5)
|
530
538
|
tilt (2.0.6)
|
531
|
-
tins (1.13.
|
539
|
+
tins (1.13.2)
|
532
540
|
truncato (0.7.9)
|
533
541
|
htmlentities (~> 4.3.1)
|
534
542
|
nokogiri (~> 1.7.0)
|
@@ -568,8 +576,8 @@ DEPENDENCIES
|
|
568
576
|
decidim-dev!
|
569
577
|
decidim-meetings!
|
570
578
|
decidim-pages!
|
571
|
-
decidim-proposals (= 0.0.
|
572
|
-
decidim-results (= 0.0.
|
579
|
+
decidim-proposals (= 0.0.4)
|
580
|
+
decidim-results (= 0.0.4)
|
573
581
|
decidim-system!
|
574
582
|
rake (~> 12.0.0)
|
575
583
|
rspec (~> 3.0)
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require "rspec/core/rake_task"
|
|
4
4
|
require_relative "lib/generators/decidim/app_generator"
|
5
5
|
require_relative "lib/generators/decidim/docker_generator"
|
6
6
|
|
7
|
-
DECIDIM_GEMS = %w(core system admin api pages meetings proposals comments).freeze
|
7
|
+
DECIDIM_GEMS = %w(core system admin api pages meetings proposals comments results budgets).freeze
|
8
8
|
|
9
9
|
RSpec::Core::RakeTask.new(:spec)
|
10
10
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Decidim
|
3
|
+
module Admin
|
4
|
+
# This command gets called when permissions for a feature are updated
|
5
|
+
# in the admin panel.
|
6
|
+
class UpdateFeaturePermissions < Rectify::Command
|
7
|
+
attr_reader :form, :feature
|
8
|
+
|
9
|
+
# Public: Initializes the command.
|
10
|
+
#
|
11
|
+
# form - The form from which the data in this feature comes from.
|
12
|
+
# feature - The feature to update.
|
13
|
+
def initialize(form, feature)
|
14
|
+
@form = form
|
15
|
+
@feature = feature
|
16
|
+
end
|
17
|
+
|
18
|
+
# Public: Sets the permissions for a feature.
|
19
|
+
#
|
20
|
+
# Broadcasts :ok if created, :invalid otherwise.
|
21
|
+
def call
|
22
|
+
return broadcast(:invalid) unless @form.valid?
|
23
|
+
|
24
|
+
update_permissions
|
25
|
+
broadcast(:ok)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def update_permissions
|
31
|
+
permissions = @form.permissions.inject({}) do |result, (key, value)|
|
32
|
+
serialized = {
|
33
|
+
"authorization_handler_name" => value.authorization_handler_name
|
34
|
+
}
|
35
|
+
|
36
|
+
serialized["options"] = JSON.parse(value.options) if value.options
|
37
|
+
result.update(key => serialized)
|
38
|
+
end
|
39
|
+
|
40
|
+
@feature.update_attributes!(
|
41
|
+
permissions: permissions
|
42
|
+
)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -23,7 +23,14 @@ module Decidim
|
|
23
23
|
return broadcast(:invalid) if form.invalid?
|
24
24
|
|
25
25
|
update_organization
|
26
|
-
|
26
|
+
|
27
|
+
if @organization.valid?
|
28
|
+
broadcast(:ok, @organization)
|
29
|
+
else
|
30
|
+
form.errors.add(:official_img_header, @organization.errors[:official_img_header]) if @organization.errors.include? :official_img_header
|
31
|
+
form.errors.add(:official_img_footer, @organization.errors[:official_img_footer]) if @organization.errors.include? :official_img_footer
|
32
|
+
broadcast(:invalid)
|
33
|
+
end
|
27
34
|
end
|
28
35
|
|
29
36
|
private
|
@@ -31,19 +38,27 @@ module Decidim
|
|
31
38
|
attr_reader :form, :organization
|
32
39
|
|
33
40
|
def update_organization
|
34
|
-
organization.
|
41
|
+
@organization.assign_attributes(attributes)
|
42
|
+
@organization.save! if @organization.valid?
|
35
43
|
end
|
36
44
|
|
37
45
|
def attributes
|
38
46
|
{
|
39
47
|
name: form.name,
|
40
48
|
twitter_handler: form.twitter_handler,
|
49
|
+
facebook_handler: form.facebook_handler,
|
50
|
+
instagram_handler: form.instagram_handler,
|
51
|
+
youtube_handler: form.youtube_handler,
|
52
|
+
github_handler: form.github_handler,
|
41
53
|
description: form.description,
|
42
54
|
welcome_text: form.welcome_text,
|
43
55
|
homepage_image: form.homepage_image || organization.homepage_image,
|
44
56
|
logo: form.logo || organization.logo,
|
45
57
|
favicon: form.favicon || organization.favicon,
|
46
58
|
default_locale: form.default_locale,
|
59
|
+
official_img_header: form.official_img_header || organization.official_img_header,
|
60
|
+
official_img_footer: form.official_img_footer || organization.official_img_footer,
|
61
|
+
official_url: form.official_url,
|
47
62
|
show_statistics: form.show_statistics
|
48
63
|
}
|
49
64
|
end
|
@@ -32,7 +32,6 @@ module Decidim
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
35
|
private
|
37
36
|
|
38
37
|
attr_reader :form
|
@@ -53,9 +52,12 @@ module Decidim
|
|
53
52
|
promoted: form.promoted,
|
54
53
|
description: form.description,
|
55
54
|
short_description: form.short_description,
|
56
|
-
domain: form.domain,
|
57
55
|
scope: form.scope,
|
58
56
|
developer_group: form.developer_group,
|
57
|
+
local_area: form.local_area,
|
58
|
+
target: form.target,
|
59
|
+
participatory_scope: form.participatory_scope,
|
60
|
+
participatory_structure: form.participatory_structure,
|
59
61
|
end_date: form.end_date
|
60
62
|
}.compact
|
61
63
|
end
|