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
@@ -17,7 +17,6 @@ module Decidim
|
|
17
17
|
query
|
18
18
|
.where(localized_search_text_in(:title), text: "%#{search_text}%")
|
19
19
|
.or(query.where(localized_search_text_in(:description), text: "%#{search_text}%"))
|
20
|
-
.or(query.where(localized_search_text_in(:short_description), text: "%#{search_text}%"))
|
21
20
|
end
|
22
21
|
|
23
22
|
# Handle the scope_id filter
|
@@ -19,6 +19,7 @@
|
|
19
19
|
</td>
|
20
20
|
<td class="actions">
|
21
21
|
<%= link_to t("actions.edit", scope: "decidim.budgets"), edit_project_path(project) if can? :update, current_feature %>
|
22
|
+
<%= link_to t("actions.attachments", scope: "decidim.budgets"), project_attachments_path(project) if can? :update, current_feature %>
|
22
23
|
<%= link_to t("actions.destroy", scope: "decidim.budgets"), project_path(project), method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.budgets") } if can? :destroy, current_feature %>
|
23
24
|
</td>
|
24
25
|
</tr>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<span class="card--list__data__number budget-list__number">
|
15
15
|
<%= budget_to_currency(project.budget) %>
|
16
16
|
</span>
|
17
|
-
<%=
|
17
|
+
<%= action_authorized_button_to "vote", order_line_item_path(project_id: project), method: :delete, remote: true, data: { disable: true, budget: project.budget }, disabled: current_order_checked_out?, class: "button tiny budget--list__action success" do %>
|
18
18
|
<%= icon("check", class: "icon--small", aria_label: t('.remove'), role: "img") %>
|
19
19
|
<% end %>
|
20
20
|
</div>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<span class="card--list__data__number budget-list__number">
|
24
24
|
<%= budget_to_currency(project.budget) %>
|
25
25
|
</span>
|
26
|
-
<%=
|
26
|
+
<%= action_authorized_button_to "vote", order_line_item_path(project_id: project), method: :post, remote: true, data: { disable: true, budget: project.budget, add: true }, disabled: current_order_checked_out?, class: "button tiny hollow budget--list__action" do %>
|
27
27
|
<%= icon("check", class: "icon--small", aria_label: t('.add'), role: "img") %>
|
28
28
|
<% end %>
|
29
29
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% if current_user.present? %>
|
2
2
|
<% if current_order && current_order.projects.include?(project) %>
|
3
|
-
<%=
|
3
|
+
<%= action_authorized_button_to "vote", t('.added'), order_line_item_path(project_id: project), method: :delete, remote: true, data: { disable: true, budget: project.budget }, disabled: current_order_checked_out?, class: "button expanded button--sc success budget--list__action" %>
|
4
4
|
<% else %>
|
5
|
-
<%=
|
5
|
+
<%= action_authorized_button_to "vote", t('.add'), order_line_item_path(project_id: project), method: :post, remote: true, data: { disable: true, budget: project.budget, add: true }, disabled: current_order_checked_out?, class: "button expanded button--sc budget--list__action" %>
|
6
6
|
<% end %>
|
7
7
|
<% else %>
|
8
8
|
<button class="button expanded button--sc disabled" data-toggle="loginModal"><%= t('.add') %></button>
|
@@ -1,4 +1,6 @@
|
|
1
|
-
<%
|
1
|
+
<% add_meta_tags({
|
2
|
+
title: t(".meta_title", feature_name: translated_attribute(current_feature.name))
|
3
|
+
}) %>
|
2
4
|
|
3
5
|
<% if current_user.present? %>
|
4
6
|
<div class="row column">
|
@@ -23,4 +25,3 @@
|
|
23
25
|
|
24
26
|
<%= javascript_include_tag("decidim/filters") %>
|
25
27
|
<%= javascript_include_tag("decidim/budgets/projects") %>
|
26
|
-
<%= render partial: "decidim/shared/login_modal" %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%
|
1
|
+
<% provide(:title, translated_attribute(project.title)) %>
|
2
2
|
|
3
3
|
<div class="row column view-header">
|
4
4
|
<% if current_user.present? %>
|
@@ -27,12 +27,8 @@
|
|
27
27
|
</div>
|
28
28
|
<div class="columns mediumlarge-8 mediumlarge-pull-4">
|
29
29
|
<div class="section">
|
30
|
-
<%== translated_attribute project.short_description %>
|
31
|
-
<%= render partial: "tags", locals: { project: project } %>
|
32
|
-
</div>
|
33
|
-
<div class="section">
|
34
|
-
<h3 class="section-heading"><%= t(".project_description") %></h3>
|
35
30
|
<%== translated_attribute project.description %>
|
31
|
+
<%= render partial: "tags", locals: { project: project } %>
|
36
32
|
</div>
|
37
33
|
<%= linked_resources_for project, :proposals, "included_proposals" %>
|
38
34
|
</div>
|
@@ -44,5 +40,5 @@
|
|
44
40
|
<% end %>
|
45
41
|
<% end %>
|
46
42
|
|
43
|
+
<%= attachments_for project %>
|
47
44
|
<%= javascript_include_tag("decidim/budgets/projects") %>
|
48
|
-
<%= render partial: "decidim/shared/login_modal" %>
|
@@ -1,7 +1,17 @@
|
|
1
1
|
ca:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
project:
|
5
|
+
budget: Pressupost
|
6
|
+
decidim_category_id: Categoria
|
7
|
+
decidim_scope_id: Àmbit
|
8
|
+
description: Descripció
|
9
|
+
proposal_ids: Propostes relacionades
|
10
|
+
title: Títol
|
2
11
|
decidim:
|
3
12
|
budgets:
|
4
13
|
actions:
|
14
|
+
attachments: Adjunts
|
5
15
|
confirm_destroy: Estàs segur que vols eliminar aquest projecte?
|
6
16
|
destroy: Esborrar
|
7
17
|
edit: Editar
|
@@ -15,6 +25,8 @@ ca:
|
|
15
25
|
create:
|
16
26
|
invalid: Hi ha hagut un problema creant aquest projecte
|
17
27
|
success: Projecte creat correctament
|
28
|
+
destroy:
|
29
|
+
success: Projecte eliminat correctament
|
18
30
|
edit:
|
19
31
|
title: Editar projecte
|
20
32
|
update: Actualitzar projecte
|
@@ -32,7 +44,7 @@ ca:
|
|
32
44
|
title: Títol
|
33
45
|
projects:
|
34
46
|
budget_confirm:
|
35
|
-
are_you_sure:
|
47
|
+
are_you_sure: Hi estàs d'acord? Un cop hagis confirmat el teu vot, no podràs canviar-lo.
|
36
48
|
cancel: Cancel·lar
|
37
49
|
confirm: Confirmar
|
38
50
|
description: Aquests són els projectes que has seleccionat per formar part del pressupost.
|
@@ -43,12 +55,13 @@ ca:
|
|
43
55
|
ok: D'acord
|
44
56
|
title: Pressupost superat
|
45
57
|
budget_summary:
|
58
|
+
are_you_sure: Estàs segur de que vols cancel·lar el teu vot?
|
46
59
|
assigned: 'Assignat:'
|
47
60
|
cancel_order: eliminar el teu vot i començar de nou
|
48
61
|
checked_out:
|
49
|
-
description: Ja has votat pel pressupost. Si
|
62
|
+
description: Ja has votat pel pressupost. Si has canviat d'idea, pots %{cancel_link}.
|
50
63
|
title: Vot pels pressupostos completat
|
51
|
-
description:
|
64
|
+
description: En quins projectes creus que hem de destinar el pressupost? Has d'assignar com a mínim %{minimum_budget} als projectes que desitges i votar amb les teves preferències per definir el pressupost.
|
52
65
|
title: Tu decideixes el pressupost
|
53
66
|
count:
|
54
67
|
projects_count:
|
@@ -59,7 +72,7 @@ ca:
|
|
59
72
|
scopes: Àmbits
|
60
73
|
search: Cerca
|
61
74
|
index:
|
62
|
-
|
75
|
+
meta_title: "%{feature_name}"
|
63
76
|
order_progress:
|
64
77
|
vote: Votar
|
65
78
|
order_selected_projects:
|
@@ -76,9 +89,15 @@ ca:
|
|
76
89
|
added: Afegit
|
77
90
|
show:
|
78
91
|
budget: Pressupost
|
79
|
-
project_description: Descripció del projecte
|
80
92
|
view_all_projects: Veure tots els projectes
|
81
93
|
features:
|
82
94
|
budgets:
|
83
95
|
name: Pressupostos
|
96
|
+
orders:
|
97
|
+
checkout:
|
98
|
+
error: S'ha produït un error en processar el teu vot
|
99
|
+
success: El teu vot s'ha tramitat amb èxit
|
100
|
+
destroy:
|
101
|
+
error: S'ha produït un error en cancel·lar el seu vot
|
102
|
+
success: El seu vot ha estat cancel·lat correctament
|
84
103
|
total_budget: Pressupost total
|
@@ -1,8 +1,18 @@
|
|
1
1
|
---
|
2
2
|
en:
|
3
|
+
activemodel:
|
4
|
+
attributes:
|
5
|
+
project:
|
6
|
+
budget: Budget
|
7
|
+
decidim_category_id: Category
|
8
|
+
decidim_scope_id: Scope
|
9
|
+
description: Description
|
10
|
+
proposal_ids: Related proposals
|
11
|
+
title: Title
|
3
12
|
decidim:
|
4
13
|
budgets:
|
5
14
|
actions:
|
15
|
+
attachments: Attachments
|
6
16
|
confirm_destroy: Are you sure you want to delete this project?
|
7
17
|
destroy: Delete
|
8
18
|
edit: Edit
|
@@ -52,7 +62,7 @@ en:
|
|
52
62
|
checked_out:
|
53
63
|
description: You've already voted for the budget. If you've changed your mind, you can %{cancel_link}.
|
54
64
|
title: Budget vote completed
|
55
|
-
description:
|
65
|
+
description: What projects do you think we should allocate budget for? Assign at least %{minimum_budget} to the projects you want and vote with your preferences to define the budget.
|
56
66
|
title: You decide the budget
|
57
67
|
count:
|
58
68
|
projects_count:
|
@@ -63,7 +73,7 @@ en:
|
|
63
73
|
scopes: Scopes
|
64
74
|
search: Search
|
65
75
|
index:
|
66
|
-
|
76
|
+
meta_title: "%{feature_name}"
|
67
77
|
order_progress:
|
68
78
|
vote: Vote
|
69
79
|
order_selected_projects:
|
@@ -80,7 +90,6 @@ en:
|
|
80
90
|
added: Added
|
81
91
|
show:
|
82
92
|
budget: Budget
|
83
|
-
project_description: Project description
|
84
93
|
view_all_projects: View all projects
|
85
94
|
features:
|
86
95
|
budgets:
|
@@ -1,7 +1,17 @@
|
|
1
1
|
es:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
project:
|
5
|
+
budget: Presupuesto
|
6
|
+
decidim_category_id: Categoría
|
7
|
+
decidim_scope_id: Ámbito
|
8
|
+
description: Descripción
|
9
|
+
proposal_ids: Propuestas relacionadas
|
10
|
+
title: Título
|
2
11
|
decidim:
|
3
12
|
budgets:
|
4
13
|
actions:
|
14
|
+
attachments: Archivos adjuntos
|
5
15
|
confirm_destroy: '¿Estás seguro de que deseas eliminar este proyecto?'
|
6
16
|
destroy: Borrar
|
7
17
|
edit: Editar
|
@@ -15,6 +25,8 @@ es:
|
|
15
25
|
create:
|
16
26
|
invalid: Ha habido un problema al crear este proyecto
|
17
27
|
success: Proyecto creado con éxito
|
28
|
+
destroy:
|
29
|
+
success: Proyecto eliminado exitosamente
|
18
30
|
edit:
|
19
31
|
title: Editar proyecto
|
20
32
|
update: Actualizar proyecto
|
@@ -43,12 +55,13 @@ es:
|
|
43
55
|
ok: De acuerdo
|
44
56
|
title: Presupuesto excedido
|
45
57
|
budget_summary:
|
58
|
+
are_you_sure: '¿Estás seguro de que deseas cancelar tu voto?'
|
46
59
|
assigned: 'Asignado:'
|
47
60
|
cancel_order: eliminar tu voto y empezar de nuevo
|
48
61
|
checked_out:
|
49
62
|
description: Ya has votado para el presupuesto. Si has cambiado de idea, puedes %{cancel_link}.
|
50
63
|
title: Voto enviado correctamente
|
51
|
-
description:
|
64
|
+
description: '¿Qué proyectos crees que deberíamos asignar el presupuesto? Asigna por lo menos %{minimum_budget} a los proyectos que desees y vota para definir el presupuesto.'
|
52
65
|
title: Tú decides el presupuesto
|
53
66
|
count:
|
54
67
|
projects_count:
|
@@ -59,7 +72,7 @@ es:
|
|
59
72
|
scopes: Ámbitos
|
60
73
|
search: Buscar
|
61
74
|
index:
|
62
|
-
|
75
|
+
meta_title: "%{feature_name}"
|
63
76
|
order_progress:
|
64
77
|
vote: Votar
|
65
78
|
order_selected_projects:
|
@@ -76,9 +89,15 @@ es:
|
|
76
89
|
added: Añadido
|
77
90
|
show:
|
78
91
|
budget: Presupuesto
|
79
|
-
project_description: Descripción del proyecto
|
80
92
|
view_all_projects: Ver todos los proyectos
|
81
93
|
features:
|
82
94
|
budgets:
|
83
95
|
name: Presupuestos
|
96
|
+
orders:
|
97
|
+
checkout:
|
98
|
+
error: Se ha producido un error al procesar tu voto
|
99
|
+
success: Tu voto se ha tramitado con éxito
|
100
|
+
destroy:
|
101
|
+
error: Ha habido un error al cancelar tu voto
|
102
|
+
success: Tu voto ha sido cancelado correctamente
|
84
103
|
total_budget: Presupuesto total
|
@@ -8,6 +8,8 @@ Decidim.register_feature(:budgets) do |feature|
|
|
8
8
|
feature.icon = "decidim/budgets/icon.svg"
|
9
9
|
feature.stylesheet = "decidim/budgets/budgets"
|
10
10
|
|
11
|
+
feature.actions = %(vote)
|
12
|
+
|
11
13
|
feature.on(:before_destroy) do |instance|
|
12
14
|
raise StandardError, "Can't remove this feature" if Decidim::Budgets::Project.where(feature: instance).any?
|
13
15
|
end
|
@@ -34,6 +36,7 @@ Decidim.register_feature(:budgets) do |feature|
|
|
34
36
|
feature = Decidim::Feature.create!(
|
35
37
|
name: Decidim::Features::Namer.new(process.organization.available_locales, :budgets).i18n_name,
|
36
38
|
manifest_name: :budgets,
|
39
|
+
published_at: Time.current,
|
37
40
|
participatory_process: process
|
38
41
|
)
|
39
42
|
|
@@ -46,12 +49,20 @@ Decidim.register_feature(:budgets) do |feature|
|
|
46
49
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
47
50
|
Decidim::Faker::Localized.paragraph(3)
|
48
51
|
end,
|
49
|
-
short_description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
50
|
-
Decidim::Faker::Localized.paragraph(3)
|
51
|
-
end,
|
52
52
|
budget: Faker::Number.number(8)
|
53
53
|
)
|
54
|
-
|
54
|
+
Decidim::Attachment.create!(
|
55
|
+
title: Decidim::Faker::Localized.sentence(2),
|
56
|
+
description: Decidim::Faker::Localized.sentence(5),
|
57
|
+
file: File.new(Decidim::Dev.asset("city.jpeg")),
|
58
|
+
attached_to: project
|
59
|
+
)
|
60
|
+
Decidim::Attachment.create!(
|
61
|
+
title: Decidim::Faker::Localized.sentence(2),
|
62
|
+
description: Decidim::Faker::Localized.sentence(5),
|
63
|
+
file: File.new(Decidim::Dev.asset("Exampledocument.pdf")),
|
64
|
+
attached_to: project
|
65
|
+
)
|
55
66
|
Decidim::Comments::Seed.comments_for(project)
|
56
67
|
end
|
57
68
|
end
|
@@ -3,7 +3,7 @@ require "decidim/faker/localized"
|
|
3
3
|
require "decidim/dev"
|
4
4
|
|
5
5
|
FactoryGirl.define do
|
6
|
-
factory :budget_feature,
|
6
|
+
factory :budget_feature, parent: :feature do
|
7
7
|
name { Decidim::Features::Namer.new(participatory_process.organization.available_locales, :budgets).i18n_name }
|
8
8
|
manifest_name :budgets
|
9
9
|
participatory_process
|
@@ -26,9 +26,8 @@ FactoryGirl.define do
|
|
26
26
|
factory :project, class: Decidim::Budgets::Project do
|
27
27
|
title { Decidim::Faker::Localized.sentence(3) }
|
28
28
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
|
29
|
-
short_description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
|
30
29
|
budget { Faker::Number.number(8) }
|
31
|
-
feature { create(:budget_feature) }
|
30
|
+
feature { create(:budget_feature) }
|
32
31
|
end
|
33
32
|
|
34
33
|
factory :order, class: Decidim::Budgets::Order do
|
@@ -21,7 +21,6 @@ describe Decidim::Budgets::Admin::CreateProject do
|
|
21
21
|
:invalid? => invalid,
|
22
22
|
title: {en: "title"},
|
23
23
|
description: {en: "description"},
|
24
|
-
short_description: {en: "short_description"},
|
25
24
|
budget: 10_000_000,
|
26
25
|
proposal_ids: proposals.map(&:id),
|
27
26
|
scope: scope,
|
@@ -21,7 +21,6 @@ describe Decidim::Budgets::Admin::UpdateProject do
|
|
21
21
|
:invalid? => invalid,
|
22
22
|
title: {en: "title"},
|
23
23
|
description: {en: "description"},
|
24
|
-
short_description: {en: "short_description"},
|
25
24
|
budget: 10_000_000,
|
26
25
|
proposal_ids: proposals.map(&:id),
|
27
26
|
scope: scope,
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
require_relative "../shared/admin_shared_context"
|
5
|
+
require_relative "../shared/manage_attachments_examples"
|
6
|
+
|
7
|
+
describe "Admin manages project attachments", type: :feature do
|
8
|
+
include_context "admin"
|
9
|
+
it_behaves_like "manage project attachments"
|
10
|
+
end
|