decidim-decidim_awesome 0.10.1 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-decidim_awesome might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +177 -60
- data/app/cells/concerns/decidim/decidim_awesome/global_menu_cell_override.rb +20 -0
- data/app/cells/concerns/decidim/decidim_awesome/{proposal_m_cell_override.rb → proposal_l_cell_override.rb} +10 -4
- data/app/cells/decidim/decidim_awesome/content_blocks/map/show.erb +5 -12
- data/app/cells/decidim/decidim_awesome/content_blocks/map_cell.rb +9 -5
- data/app/cells/decidim/decidim_awesome/voting/proposal_metadata_cell.rb +54 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/modal.erb +18 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +37 -32
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +9 -4
- data/app/commands/concerns/decidim/decidim_awesome/admin/needs_constraint_helpers.rb +2 -2
- data/app/commands/concerns/decidim/decidim_awesome/proposals/admin/update_proposal_override.rb +31 -0
- data/app/commands/concerns/decidim/decidim_awesome/proposals/create_collaborative_draft_override.rb +27 -0
- data/app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb +27 -0
- data/app/commands/concerns/decidim/decidim_awesome/proposals/update_collaborative_draft_override.rb +27 -0
- data/app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb +26 -0
- data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/create_proposal_custom_field.rb +4 -3
- data/app/commands/decidim/decidim_awesome/admin/destroy_custom_redirect.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/destroy_menu_hack.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/destroy_proposal_custom_field.rb +6 -3
- data/app/commands/decidim/decidim_awesome/admin/rename_scope_label.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/update_constraint.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/update_custom_redirect.rb +2 -2
- data/app/commands/decidim/decidim_awesome/command.rb +1 -7
- data/app/controllers/concerns/decidim/decidim_awesome/admin/maintenance_context.rb +43 -0
- data/app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb +1 -1
- data/app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb +34 -0
- data/app/controllers/concerns/decidim/decidim_awesome/limit_pending_amendments.rb +35 -0
- data/app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb +1 -1
- data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +3 -3
- data/app/controllers/decidim/decidim_awesome/admin/application_controller.rb +2 -0
- data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +14 -10
- data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +10 -9
- data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +23 -20
- data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -10
- data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +76 -0
- data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -10
- data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +14 -6
- data/app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/blank_component_controller.rb +8 -3
- data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +3 -3
- data/app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb +18 -5
- data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_form_override.rb +21 -0
- data/app/forms/{decidim → concerns/decidim}/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +2 -1
- data/app/forms/decidim/decidim_awesome/admin/config_form.rb +28 -14
- data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +2 -2
- data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +4 -0
- data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +4 -4
- data/app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb +65 -0
- data/app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb +23 -0
- data/app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb +110 -0
- data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +6 -27
- data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
- data/app/jobs/decidim/decidim_awesome/destroy_private_data_job.rb +22 -0
- data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +5 -4
- data/app/middleware/decidim/decidim_awesome/current_config.rb +3 -5
- data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +39 -10
- data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
- data/app/models/decidim/decidim_awesome/paper_trail_version.rb +3 -3
- data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +35 -1
- data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
- data/app/overrides/decidim/proposals/admin/proposals/show/add_private_body.html.erb.deface +7 -0
- data/app/overrides/decidim/proposals/admin/proposals/show/replace_body.html.erb.deface +5 -0
- data/app/overrides/decidim/proposals/proposals/_proposal_aside/limit_amendments_modal.html.erb.deface +5 -0
- data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +1 -1
- data/app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface +6 -0
- data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +4 -11
- data/app/overrides/layouts/decidim/admin/_header/add_awesome_tags.html.erb.deface +9 -0
- data/app/packs/entrypoints/decidim_admin_decidim_awesome.js +1 -2
- data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js +4 -0
- data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss +1 -0
- data/app/packs/entrypoints/decidim_decidim_awesome.js +2 -2
- data/app/packs/entrypoints/decidim_decidim_awesome_map.scss +1 -1
- data/app/packs/entrypoints/decidim_editor.js +14 -0
- data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +96 -69
- data/app/packs/src/decidim/decidim_awesome/admin/check_redirections.js +46 -41
- data/app/packs/src/decidim/decidim_awesome/admin/codemirror.js +3 -3
- data/app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js +115 -0
- data/app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js +9 -5
- data/app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js +22 -11
- data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +26 -8
- data/app/packs/src/decidim/decidim_awesome/admin/tabs_change.js +31 -0
- data/app/packs/src/decidim/decidim_awesome/admin/user_picker.js +34 -21
- data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +28 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +5 -16
- data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_application.js +1 -15
- data/app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js +33 -11
- data/app/packs/src/decidim/decidim_awesome/awesome_map/api/meetings_fetcher.js +9 -12
- data/app/packs/src/decidim/decidim_awesome/awesome_map/api/proposals_fetcher.js +28 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +3 -4
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +12 -12
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/meetings_controller.js +11 -7
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js +6 -13
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js +51 -20
- data/app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js +27 -18
- data/app/packs/src/decidim/decidim_awesome/editor/index.js +94 -0
- data/app/packs/src/decidim/decidim_awesome/forms/autosave.js +28 -23
- data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +29 -25
- data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
- data/app/packs/src/decidim/decidim_awesome/proposals/custom_fields.js +31 -15
- data/app/packs/src/decidim/decidim_awesome/proposals/images.js +16 -10
- data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +47 -38
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/auto_edits.scss +11 -12
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/check_redirections.scss +15 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss +24 -12
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +49 -29
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -71
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss +48 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss +11 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss +17 -26
- data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +11 -49
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +19 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +4 -19
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss +1 -1
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss +41 -35
- data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
- data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +118 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +26 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +41 -59
- data/app/permissions/decidim/decidim_awesome/admin/permissions.rb +14 -3
- data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -4
- data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb +23 -0
- data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_item_presenter_override.rb +10 -2
- data/app/presenters/{decidim → concerns/decidim}/decidim_awesome/menu_presenter_override.rb +8 -0
- data/app/presenters/concerns/decidim/decidim_awesome/proposals/proposal_presenter_override.rb +20 -0
- data/app/presenters/decidim/decidim_awesome/admin_log/component_presenter_override.rb +30 -0
- data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
- data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +70 -0
- data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
- data/app/queries/decidim/decidim_awesome/private_data_finder.rb +19 -0
- data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_methods.rb +72 -0
- data/app/serializers/concerns/decidim/decidim_awesome/proposals/proposal_serializer_override.rb +38 -0
- data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +34 -0
- data/app/types/concerns/decidim/decidim_awesome/add_proposal_type_custom_fields.rb +59 -0
- data/app/types/concerns/decidim/decidim_awesome/{proposal_type_override.rb → add_proposal_type_vote_weights.rb} +3 -1
- data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +23 -17
- data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +50 -48
- data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +7 -2
- data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +25 -18
- data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +7 -6
- data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +12 -16
- data/app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb +39 -23
- data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb +35 -17
- data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_private_custom_fields.html.erb +1 -0
- data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +68 -80
- data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +16 -12
- data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -6
- data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +22 -12
- data/app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb +1 -49
- data/app/views/decidim/decidim_awesome/admin/constraints/new.html.erb +14 -9
- data/app/views/decidim/decidim_awesome/admin/constraints/show.html.erb +14 -9
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb +20 -5
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb +5 -5
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb +14 -13
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb +5 -5
- data/app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb +44 -0
- data/app/views/decidim/decidim_awesome/admin/maintenance/show.html.erb +44 -0
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +6 -6
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +21 -12
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +39 -42
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
- data/app/views/decidim/decidim_awesome/admin/proposals/_editor.html.erb +8 -5
- data/app/views/decidim/decidim_awesome/admin/proposals/_private_body.html.erb +20 -0
- data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +14 -18
- data/app/views/decidim/decidim_awesome/amendments/_modal.html.erb +23 -0
- data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +8 -2
- data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +7 -12
- data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +53 -37
- data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +14 -5
- data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +0 -3
- data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +9 -7
- data/app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb +9 -6
- data/app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb +12 -0
- data/app/views/layouts/decidim/decidim_awesome/admin/application.html.erb +1 -73
- data/app/views/layouts/decidim/decidim_awesome/admin/maintenance.html.erb +19 -0
- data/config/assets.rb +3 -33
- data/config/i18n-tasks.yml +23 -3
- data/config/locales/ca.yml +28 -17
- data/config/locales/cs.yml +39 -14
- data/config/locales/de.yml +25 -15
- data/config/locales/en.yml +125 -35
- data/config/locales/es.yml +26 -16
- data/config/locales/eu.yml +7 -3
- data/config/locales/fr.yml +25 -16
- data/config/locales/hu.yml +43 -8
- data/config/locales/it.yml +8 -15
- data/config/locales/ja.yml +26 -15
- data/config/locales/lt.yml +0 -4
- data/config/locales/nl.yml +9 -14
- data/config/locales/pt-BR.yml +9 -14
- data/config/locales/ro-RO.yml +0 -3
- data/config/locales/sv.yml +9 -9
- data/config/rubocop/disabled.yml +11 -0
- data/config/rubocop/faker.yml +480 -0
- data/config/rubocop/rails.yml +88 -0
- data/config/rubocop/rspec.yml +65 -0
- data/config/rubocop/ruby.yml +1210 -0
- data/db/migrate/20240306175331_rename_editor_images_awesome_config.rb +18 -0
- data/db/migrate/20240531224204_add_decidim_awesome_proposal_private_fields.rb +29 -0
- data/db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +20 -0
- data/db/seeds.rb +3 -3
- data/lib/decidim/decidim_awesome/admin_engine.rb +26 -7
- data/lib/decidim/decidim_awesome/api/types/localized_custom_fields_type.rb +22 -0
- data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +51 -0
- data/lib/decidim/decidim_awesome/awesome.rb +70 -19
- data/lib/decidim/decidim_awesome/awesome_helpers.rb +6 -2
- data/lib/decidim/decidim_awesome/checksums.yml +46 -44
- data/lib/decidim/decidim_awesome/config.rb +1 -1
- data/lib/decidim/decidim_awesome/custom_fields.rb +13 -5
- data/lib/decidim/decidim_awesome/engine.rb +165 -56
- data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
- data/lib/decidim/decidim_awesome/lock.rb +47 -0
- data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
- data/lib/decidim/decidim_awesome/menu.rb +165 -0
- data/lib/decidim/decidim_awesome/menu_hacker.rb +4 -8
- data/lib/decidim/decidim_awesome/system_checker.rb +2 -4
- data/lib/decidim/decidim_awesome/test/factories.rb +10 -10
- data/lib/decidim/decidim_awesome/test/initializer.rb +7 -12
- data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -2
- data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +2 -2
- data/lib/decidim/decidim_awesome/test/shared_examples/{box_label_editor.rb → box_label_editor_examples.rb} +17 -17
- data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +23 -5
- data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +155 -0
- data/lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb +7 -7
- data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +42 -58
- data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +9 -8
- data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +32 -24
- data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +97 -22
- data/lib/decidim/decidim_awesome/version.rb +2 -2
- data/lib/decidim/decidim_awesome/voting_manifest.rb +5 -10
- data/lib/decidim/decidim_awesome.rb +1 -2
- data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +1 -1
- data/lib/tasks/decidim_awesome_upgrade_tasks.rake +4 -0
- data/package.json +21 -30
- metadata +83 -61
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +0 -15
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +0 -15
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +0 -21
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +0 -16
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +0 -20
- data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -13
- data/app/helpers/decidim/decidim_awesome/amendments_helper_override.rb +0 -48
- data/app/helpers/decidim/decidim_awesome/proposals/application_helper_override.rb +0 -78
- data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
- data/app/overrides/layouts/decidim/admin/_application/add_intergram.html.erb.deface +0 -5
- data/app/overrides/layouts/decidim/admin/_header/replace_scripts.html.erb.deface +0 -6
- data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +0 -3
- data/app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js +0 -2
- data/app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js +0 -1
- data/app/packs/src/decidim/decidim_awesome/admin/constraints.js +0 -55
- data/app/packs/src/decidim/decidim_awesome/editors/editor.js +0 -218
- data/app/packs/src/decidim/decidim_awesome/editors/tabs_focus.js +0 -22
- data/app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss +0 -19
- data/app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss +0 -58
- data/app/packs/stylesheets/vendor/select2-foundation-theme.scss +0 -348
- data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +0 -64
- data/app/views/decidim/decidim_awesome/admin/config/_modal.html.erb +0 -11
- data/app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb +0 -15
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
welcome_text = "
|
4
|
-
welcome_text = "Welcome to the Decidim Admin Panel." if legacy_version?
|
3
|
+
welcome_text = "Dashboard"
|
5
4
|
|
6
5
|
shared_examples "redirects to index" do |_link|
|
7
6
|
it "display index page" do
|
@@ -34,7 +33,7 @@ shared_examples "allows awesome access" do
|
|
34
33
|
|
35
34
|
it "allows module access" do
|
36
35
|
visit decidim_admin_decidim_awesome.config_path(:editors)
|
37
|
-
expect(page).to have_content("Tweaks for
|
36
|
+
expect(page).to have_content("Tweaks for Editor Hacks")
|
38
37
|
end
|
39
38
|
end
|
40
39
|
|
@@ -88,7 +87,7 @@ shared_examples "allows external accesses" do
|
|
88
87
|
|
89
88
|
it "shows participants access" do
|
90
89
|
visit decidim_admin.users_path
|
91
|
-
expect(page).to have_content(
|
90
|
+
expect(page).to have_content("New admin")
|
92
91
|
end
|
93
92
|
|
94
93
|
it "shows pages access" do
|
@@ -110,6 +109,10 @@ end
|
|
110
109
|
shared_examples "allows all admin routes" do
|
111
110
|
before do
|
112
111
|
visit decidim_admin.root_path
|
112
|
+
# this is a workaround to wait for the page to load
|
113
|
+
# it seems that the test might fail randomly otherwise
|
114
|
+
# underlaying issue is unknown, maybe capybara is faster clicking than ruby is at storing class variables?
|
115
|
+
sleep 0.1
|
113
116
|
end
|
114
117
|
|
115
118
|
it "allows the admin root page" do
|
@@ -117,13 +120,12 @@ shared_examples "allows all admin routes" do
|
|
117
120
|
end
|
118
121
|
|
119
122
|
it "allows the assemblies page" do
|
120
|
-
|
121
|
-
|
123
|
+
click_link_or_button "Assemblies"
|
122
124
|
expect(page).to have_content("New assembly")
|
123
125
|
end
|
124
126
|
|
125
127
|
it "allows the processes page" do
|
126
|
-
|
128
|
+
click_link_or_button "Processes"
|
127
129
|
|
128
130
|
expect(page).to have_content("New process")
|
129
131
|
end
|
@@ -132,6 +134,7 @@ end
|
|
132
134
|
shared_examples "allows scoped admin routes" do
|
133
135
|
before do
|
134
136
|
visit decidim_admin.root_path
|
137
|
+
sleep 0.1
|
135
138
|
end
|
136
139
|
|
137
140
|
it "allows the admin root page" do
|
@@ -139,14 +142,14 @@ shared_examples "allows scoped admin routes" do
|
|
139
142
|
end
|
140
143
|
|
141
144
|
it "allows the assemblies page" do
|
142
|
-
|
145
|
+
click_link_or_button "Assemblies"
|
143
146
|
|
144
147
|
expect(page).to have_content("New assembly")
|
145
148
|
end
|
146
149
|
|
147
150
|
describe "forbids processes" do
|
148
151
|
before do
|
149
|
-
|
152
|
+
click_link_or_button "Processes"
|
150
153
|
end
|
151
154
|
|
152
155
|
it_behaves_like "redirects to index"
|
@@ -159,16 +162,16 @@ end
|
|
159
162
|
|
160
163
|
shared_examples "has admin link" do
|
161
164
|
it "has menu link" do
|
162
|
-
within "
|
163
|
-
expect(page).to
|
165
|
+
within "header" do
|
166
|
+
expect(page).to have_css("#admin-bar", text: "Admin dashboard")
|
164
167
|
end
|
165
168
|
end
|
166
169
|
end
|
167
170
|
|
168
171
|
shared_examples "has no admin link" do
|
169
|
-
it "has menu link" do
|
170
|
-
within "
|
171
|
-
expect(page).not_to
|
172
|
+
it "has no menu link" do
|
173
|
+
within "header" do
|
174
|
+
expect(page).not_to have_css("#admin-bar", text: "Admin dashboard")
|
172
175
|
end
|
173
176
|
end
|
174
177
|
end
|
@@ -216,7 +219,7 @@ shared_examples "can edit assembly" do
|
|
216
219
|
ca: "Assamblea editada",
|
217
220
|
es: "Asamblea editada"
|
218
221
|
)
|
219
|
-
|
222
|
+
click_link_or_button "Update"
|
220
223
|
expect(page).to have_admin_callout("successfully")
|
221
224
|
end
|
222
225
|
end
|
@@ -265,7 +268,7 @@ shared_examples "can manage component" do
|
|
265
268
|
expect(page).to have_content("Title")
|
266
269
|
expect(page).to have_content(proposal.title["en"])
|
267
270
|
|
268
|
-
|
271
|
+
click_link_or_button "Edit proposal"
|
269
272
|
expect(page).to have_content("Update proposal")
|
270
273
|
fill_in_i18n(
|
271
274
|
:proposal_title,
|
@@ -274,14 +277,14 @@ shared_examples "can manage component" do
|
|
274
277
|
ca: "Proposta editada",
|
275
278
|
es: "Propuesta editada"
|
276
279
|
)
|
277
|
-
|
280
|
+
click_link_or_button "Update"
|
278
281
|
expect(page).to have_admin_callout("successfully")
|
279
282
|
end
|
280
283
|
|
281
284
|
it "can create a proposal" do
|
282
285
|
visit manage_component_path(component)
|
283
286
|
|
284
|
-
|
287
|
+
click_link_or_button "New proposal"
|
285
288
|
expect(page).to have_content("Create proposal")
|
286
289
|
fill_in_i18n(
|
287
290
|
:proposal_title,
|
@@ -297,7 +300,7 @@ shared_examples "can manage component" do
|
|
297
300
|
ca: "Body creat",
|
298
301
|
es: "Body creat"
|
299
302
|
)
|
300
|
-
|
303
|
+
click_link_or_button "Create"
|
301
304
|
expect(page).to have_admin_callout("successfully")
|
302
305
|
end
|
303
306
|
end
|
@@ -305,6 +308,7 @@ end
|
|
305
308
|
shared_examples "edits allowed components" do
|
306
309
|
before do
|
307
310
|
visit decidim_admin.root_path
|
311
|
+
sleep 0.1
|
308
312
|
end
|
309
313
|
|
310
314
|
it_behaves_like "can manage component"
|
@@ -365,8 +369,10 @@ shared_examples "allows access to group processes" do
|
|
365
369
|
end
|
366
370
|
|
367
371
|
it "shows the list of processes" do
|
368
|
-
|
369
|
-
|
372
|
+
within("[data-content]") do
|
373
|
+
expect(page).to have_content("Processes")
|
374
|
+
expect(page).to have_content(participatory_process.title["en"])
|
375
|
+
end
|
370
376
|
end
|
371
377
|
|
372
378
|
describe "forbids editing processes" do
|
@@ -383,8 +389,10 @@ shared_examples "allows access to group processes" do
|
|
383
389
|
end
|
384
390
|
|
385
391
|
it "shows the list of groups" do
|
386
|
-
|
387
|
-
|
392
|
+
within("[data-content]") do
|
393
|
+
expect(page).to have_content("Process groups")
|
394
|
+
expect(page).to have_content(process_group.title["en"])
|
395
|
+
end
|
388
396
|
end
|
389
397
|
end
|
390
398
|
end
|
@@ -403,7 +411,7 @@ shared_examples "allows edit any group process" do
|
|
403
411
|
ca: "Proces grup editat",
|
404
412
|
es: "Grupo de procesos editado"
|
405
413
|
)
|
406
|
-
|
414
|
+
click_link_or_button "Update"
|
407
415
|
expect(page).to have_admin_callout("successfully")
|
408
416
|
end
|
409
417
|
end
|
@@ -25,31 +25,115 @@ end
|
|
25
25
|
shared_examples "activated concerns" do |enabled|
|
26
26
|
it "common concerns are registered" do
|
27
27
|
expect(ActionView::Base.included_modules).to include(Decidim::DecidimAwesome::AwesomeHelpers)
|
28
|
-
expect(Decidim::
|
29
|
-
expect(Decidim::
|
28
|
+
expect(Decidim::ViewModel.included_modules).to include(Decidim::DecidimAwesome::AwesomeHelpers)
|
29
|
+
expect(Decidim::ApplicationController.included_modules).to include(Decidim::DecidimAwesome::ContentSecurityPolicy)
|
30
|
+
expect(Decidim::Admin::ApplicationController.included_modules).to include(Decidim::DecidimAwesome::ContentSecurityPolicy)
|
30
31
|
end
|
31
32
|
|
32
33
|
if enabled
|
33
34
|
it "concerns are registered" do
|
34
35
|
expect(Decidim::User.included_modules).to include(Decidim::DecidimAwesome::UserOverride)
|
36
|
+
expect(Decidim::MenuPresenter.included_modules).to include(Decidim::DecidimAwesome::MenuPresenterOverride)
|
37
|
+
expect(Decidim::MenuItemPresenter.included_modules).to include(Decidim::DecidimAwesome::MenuItemPresenterOverride)
|
35
38
|
expect(Decidim::ErrorsController.included_modules).to include(Decidim::DecidimAwesome::NotFoundRedirect)
|
36
39
|
expect(Decidim::Proposals::ApplicationHelper.included_modules).to include(Decidim::DecidimAwesome::Proposals::ApplicationHelperOverride)
|
37
40
|
expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalWizardCreateStepFormOverride)
|
41
|
+
expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
|
42
|
+
expect(Decidim::Proposals::Admin::ProposalForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
|
38
43
|
expect(Decidim::AmendmentsHelper.included_modules).to include(Decidim::DecidimAwesome::AmendmentsHelperOverride)
|
39
44
|
expect(EtiquetteValidator.included_modules).to include(Decidim::DecidimAwesome::EtiquetteValidatorOverride)
|
45
|
+
expect(Decidim::Proposals::ProposalVote.included_modules).to include(Decidim::DecidimAwesome::HasVoteWeight)
|
46
|
+
expect(Decidim::Proposals::ProposalType.included_modules).to include(Decidim::DecidimAwesome::AddProposalTypeVoteWeights)
|
47
|
+
expect(Decidim::Proposals::ProposalType.included_modules).to include(Decidim::DecidimAwesome::AddProposalTypeCustomFields)
|
48
|
+
expect(Decidim::Proposals::ProposalLCell.included_modules).to include(Decidim::DecidimAwesome::ProposalLCellOverride)
|
49
|
+
expect(Decidim::Proposals::Proposal.included_modules).to include(Decidim::DecidimAwesome::HasProposalExtraFields)
|
50
|
+
expect(Decidim::Proposals::CollaborativeDraft.included_modules).to include(Decidim::DecidimAwesome::HasProposalExtraFields)
|
51
|
+
expect(Decidim::ContentBlocks::GlobalMenuCell.included_modules).to include(Decidim::DecidimAwesome::GlobalMenuCellOverride)
|
52
|
+
expect(Decidim::BreadcrumbHelper.included_modules).to include(Decidim::DecidimAwesome::BreadcrumbHelperOverride)
|
53
|
+
expect(Decidim::BreadcrumbRootMenuItemPresenter.included_modules).to include(Decidim::DecidimAwesome::BreadcrumbRootMenuItemPresenterOverride)
|
54
|
+
expect(Decidim::Proposals::ProposalSerializer.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalSerializerOverride)
|
55
|
+
expect(Decidim::Proposals::ProposalVotesController.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalVotesControllerOverride)
|
56
|
+
expect(Decidim::AmendmentsController.included_modules).to include(Decidim::DecidimAwesome::LimitPendingAmendments)
|
57
|
+
expect(Decidim::Proposals::ProposalsController.included_modules).to include(Decidim::DecidimAwesome::Proposals::OrderableOverride)
|
58
|
+
expect(Decidim::AdminLog::ComponentPresenter.included_modules).to include(Decidim::DecidimAwesome::AdminLog::ComponentPresenterOverride)
|
40
59
|
end
|
60
|
+
|
41
61
|
else
|
42
62
|
it "concerns are not registered" do
|
43
63
|
expect(Decidim::User.included_modules).not_to include(Decidim::DecidimAwesome::UserOverride)
|
64
|
+
expect(Decidim::MenuPresenter.included_modules).not_to include(Decidim::DecidimAwesome::MenuPresenterOverride)
|
65
|
+
expect(Decidim::MenuItemPresenter.included_modules).not_to include(Decidim::DecidimAwesome::MenuItemPresenterOverride)
|
44
66
|
expect(Decidim::ErrorsController.included_modules).not_to include(Decidim::DecidimAwesome::NotFoundRedirect)
|
45
67
|
expect(Decidim::Proposals::ApplicationHelper.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ApplicationHelperOverride)
|
46
68
|
expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalWizardCreateStepFormOverride)
|
69
|
+
expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
|
70
|
+
expect(Decidim::Proposals::Admin::ProposalForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
|
47
71
|
expect(Decidim::AmendmentsHelper.included_modules).not_to include(Decidim::DecidimAwesome::AmendmentsHelperOverride)
|
48
72
|
expect(EtiquetteValidator.included_modules).not_to include(Decidim::DecidimAwesome::EtiquetteValidatorOverride)
|
73
|
+
expect(Decidim::Proposals::ProposalVote.included_modules).not_to include(Decidim::DecidimAwesome::HasVoteWeight)
|
74
|
+
expect(Decidim::Proposals::ProposalType.included_modules).not_to include(Decidim::DecidimAwesome::AddProposalTypeVoteWeights)
|
75
|
+
expect(Decidim::Proposals::ProposalType.included_modules).not_to include(Decidim::DecidimAwesome::AddProposalTypeCustomFields)
|
76
|
+
expect(Decidim::Proposals::ProposalLCell.included_modules).not_to include(Decidim::DecidimAwesome::ProposalLCellOverride)
|
77
|
+
expect(Decidim::Proposals::Proposal.included_modules).not_to include(Decidim::DecidimAwesome::HasProposalExtraFields)
|
78
|
+
expect(Decidim::Proposals::CollaborativeDraft.included_modules).not_to include(Decidim::DecidimAwesome::HasProposalExtraFields)
|
79
|
+
expect(Decidim::ContentBlocks::GlobalMenuCell.included_modules).not_to include(Decidim::DecidimAwesome::GlobalMenuCellOverride)
|
80
|
+
expect(Decidim::BreadcrumbHelper.included_modules).not_to include(Decidim::DecidimAwesome::BreadcrumbHelperOverride)
|
81
|
+
expect(Decidim::BreadcrumbRootMenuItemPresenter.included_modules).not_to include(Decidim::DecidimAwesome::BreadcrumbRootMenuItemPresenterOverride)
|
82
|
+
expect(Decidim::Proposals::ProposalSerializer.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalSerializerOverride)
|
83
|
+
expect(Decidim::Proposals::ProposalVotesController.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalVotesControllerOverride)
|
84
|
+
expect(Decidim::AmendmentsController.included_modules).not_to include(Decidim::DecidimAwesome::LimitPendingAmendments)
|
85
|
+
expect(Decidim::Proposals::ProposalsController.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::OrderableOverride)
|
86
|
+
expect(Decidim::AdminLog::ComponentPresenter.included_modules).not_to include(Decidim::DecidimAwesome::AdminLog::ComponentPresenterOverride)
|
49
87
|
end
|
50
88
|
end
|
51
89
|
end
|
52
90
|
|
91
|
+
shared_examples "csp directives" do |enabled|
|
92
|
+
let(:organization) { create(:organization) }
|
93
|
+
let(:fonts) { controller.content_security_policy.send(:policy)["font-src"] }
|
94
|
+
let(:scripts) { controller.content_security_policy.send(:policy)["script-src"] }
|
95
|
+
let(:frames) { controller.content_security_policy.send(:policy)["frame-src"] }
|
96
|
+
|
97
|
+
shared_examples "controller directives" do
|
98
|
+
if enabled
|
99
|
+
it "has CSP directives" do
|
100
|
+
get :show do
|
101
|
+
expect(fonts).to eq(["'self'", "data:"])
|
102
|
+
expect(scripts).to eq(["'self'", "'unsafe-inline'", "'unsafe-eval'", "https://www.intergram.xyz"])
|
103
|
+
expect(frames).to eq(["'self'", "www.youtube-nocookie.com", "player.vimeo.com", "https://www.intergram.xyz"])
|
104
|
+
end
|
105
|
+
end
|
106
|
+
else
|
107
|
+
it "has no CSP directives" do
|
108
|
+
get :show do
|
109
|
+
expect(fonts).to eq(["'self'"])
|
110
|
+
expect(scripts).to eq(["'self'", "'unsafe-inline'", "'unsafe-eval'"])
|
111
|
+
expect(frames).to eq(["'self'", "www.youtube-nocookie.com", "player.vimeo.com"])
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
describe Decidim::HomepageController, type: :controller do
|
118
|
+
routes { Decidim::Core::Engine.routes }
|
119
|
+
before do
|
120
|
+
request.env["decidim.current_organization"] = user.organization
|
121
|
+
end
|
122
|
+
|
123
|
+
it_behaves_like "controller directives"
|
124
|
+
end
|
125
|
+
|
126
|
+
describe Decidim::Admin::DashboardController, type: :controller do
|
127
|
+
routes { Decidim::Admin::Engine.routes }
|
128
|
+
|
129
|
+
before do
|
130
|
+
request.env["decidim.current_organization"] = user.organization
|
131
|
+
end
|
132
|
+
|
133
|
+
it_behaves_like "controller directives"
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
53
137
|
shared_examples "custom menus" do |enabled|
|
54
138
|
describe Decidim::MenuPresenter, type: :helper do
|
55
139
|
before do
|
@@ -74,11 +158,9 @@ shared_examples "basic rendering" do |enabled|
|
|
74
158
|
let(:image_vars) do
|
75
159
|
[
|
76
160
|
:allow_images_in_proposals,
|
77
|
-
:
|
78
|
-
:
|
161
|
+
:allow_videos_in_editors,
|
162
|
+
:allow_images_in_editors,
|
79
163
|
:allow_images_in_proposals,
|
80
|
-
:use_markdown_editor,
|
81
|
-
:allow_images_in_markdown_editor,
|
82
164
|
:auto_save_forms,
|
83
165
|
:intergram_for_admins,
|
84
166
|
:intergram_for_public
|
@@ -91,7 +173,7 @@ shared_examples "basic rendering" do |enabled|
|
|
91
173
|
end
|
92
174
|
|
93
175
|
it "renders the home page" do
|
94
|
-
expect(page).to
|
176
|
+
expect(page).to have_css(".home")
|
95
177
|
end
|
96
178
|
|
97
179
|
it "has DecidimAwesome object" do
|
@@ -111,7 +193,7 @@ shared_examples "basic rendering" do |enabled|
|
|
111
193
|
end
|
112
194
|
|
113
195
|
it "has custom fields javascript" do
|
114
|
-
expect(page).to have_xpath("//script[contains(@src,'
|
196
|
+
expect(page).to have_xpath("//script[contains(@src,'decidim_decidim_awesome_custom_fields')]", visible: :all)
|
115
197
|
end
|
116
198
|
|
117
199
|
it "has custom styles CSS" do
|
@@ -125,7 +207,7 @@ shared_examples "basic rendering" do |enabled|
|
|
125
207
|
end
|
126
208
|
|
127
209
|
it "do not have custom fields javascript" do
|
128
|
-
expect(page).not_to have_xpath("//script[contains(@src,'
|
210
|
+
expect(page).not_to have_xpath("//script[contains(@src,'decidim_decidim_awesome_custom_fields')]", visible: :all)
|
129
211
|
end
|
130
212
|
|
131
213
|
it "do not have custom styles CSS" do
|
@@ -143,7 +225,8 @@ shared_examples "basic rendering" do |enabled|
|
|
143
225
|
"config/styles",
|
144
226
|
"config/proposal_custom_fields",
|
145
227
|
"config/admins",
|
146
|
-
"
|
228
|
+
"menus/menu/hacks",
|
229
|
+
"menus/home_content_block_menu/hacks",
|
147
230
|
"custom_redirects",
|
148
231
|
"config/livechat"
|
149
232
|
]
|
@@ -167,32 +250,24 @@ shared_examples "basic rendering" do |enabled|
|
|
167
250
|
|
168
251
|
if enabled
|
169
252
|
it "renders the editors page" do
|
170
|
-
expect(page).to have_content("Tweaks for
|
171
|
-
end
|
172
|
-
|
173
|
-
it "has custom fields javascript" do
|
174
|
-
expect(page).to have_xpath("//script[contains(@src,'decidim_admin_decidim_awesome_custom_fields')]", visible: :all)
|
253
|
+
expect(page).to have_content("Tweaks for Editor Hacks")
|
175
254
|
end
|
176
255
|
|
177
256
|
it "has all admin menus" do
|
178
257
|
menus.each do |menu|
|
179
|
-
within ".
|
258
|
+
within ".sidebar-menu" do
|
180
259
|
expect(page).to have_link(href: "/admin/decidim_awesome/#{menu}")
|
181
260
|
end
|
182
261
|
end
|
183
262
|
end
|
184
263
|
else
|
185
264
|
it "renders the compatibility checks page" do
|
186
|
-
expect(page).to have_content("System
|
187
|
-
end
|
188
|
-
|
189
|
-
it "do not have custom fields javascript" do
|
190
|
-
expect(page).not_to have_xpath("//script[contains(@src,'decidim_admin_decidim_awesome_custom_fields')]", visible: :all)
|
265
|
+
expect(page).to have_content("Maintenance tools: System Compatibility Checks")
|
191
266
|
end
|
192
267
|
|
193
268
|
it "has no admin menus" do
|
194
269
|
menus.each do |menu|
|
195
|
-
within ".
|
270
|
+
within ".sidebar-menu" do
|
196
271
|
expect(page).not_to have_link(href: "/admin/decidim_awesome/#{menu}")
|
197
272
|
end
|
198
273
|
end
|
@@ -4,12 +4,7 @@ module Decidim
|
|
4
4
|
module DecidimAwesome
|
5
5
|
class VotingManifest
|
6
6
|
include ActiveModel::Model
|
7
|
-
|
8
|
-
if defined? Decidim::AttributeObject::Model
|
9
|
-
include Decidim::AttributeObject::Model
|
10
|
-
else
|
11
|
-
include Virtus.model
|
12
|
-
end
|
7
|
+
include Decidim::AttributeObject::Model
|
13
8
|
|
14
9
|
attribute :name, Symbol
|
15
10
|
|
@@ -17,12 +12,12 @@ module Decidim
|
|
17
12
|
# not defining it will use the original view from Decidim
|
18
13
|
# setting it to an empty string will hide the original content
|
19
14
|
|
20
|
-
# original is decidim-proposals/app/views/proposals/proposals/_vote_button.html.erb
|
15
|
+
# original is decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb
|
21
16
|
attribute :show_vote_button_view, String
|
22
|
-
# original is decidim-proposals/app/views/proposals/proposals/_votes_count.html.erb
|
17
|
+
# original is decidim-proposals/app/views/decidim/proposals/proposals/_votes_count.html.erb
|
23
18
|
attribute :show_votes_count_view, String
|
24
|
-
# original is decidim-proposals/app/cells/proposals/
|
25
|
-
attribute :
|
19
|
+
# original is from decidim-proposals/app/cells/decidim/proposals/proposal_metadata_cell.rb
|
20
|
+
attribute :proposal_metadata_cell, String
|
26
21
|
|
27
22
|
# a callback that will be called by the method valid_weight?
|
28
23
|
# Do not access this parameter directly, use the weight_validator method to register a block
|
@@ -14,9 +14,8 @@ require "decidim/decidim_awesome/iframe_component/component"
|
|
14
14
|
require "decidim/decidim_awesome/content_parsers/editor_images_parser"
|
15
15
|
|
16
16
|
# Engines to handle logic unrelated to participatory spaces or components
|
17
|
-
|
18
17
|
Decidim.register_global_engine(
|
19
18
|
:decidim_decidim_awesome, # this is the name of the global method to access engine routes
|
20
|
-
|
19
|
+
Decidim::DecidimAwesome::Engine,
|
21
20
|
at: "/decidim_awesome"
|
22
21
|
)
|
@@ -4,6 +4,10 @@ Rake::Task["decidim:webpacker:install"].enhance do
|
|
4
4
|
Rake::Task["decidim_decidim_awesome:webpacker:install"].invoke
|
5
5
|
end
|
6
6
|
|
7
|
+
Rake::Task["decidim:choose_target_plugins"].enhance do
|
8
|
+
ENV["FROM"] = "#{ENV.fetch("FROM", nil)},decidim_decidim_awesome"
|
9
|
+
end
|
10
|
+
|
7
11
|
Rake::Task["decidim:webpacker:upgrade"].enhance do
|
8
12
|
Rake::Task["decidim_decidim_awesome:webpacker:install"].invoke
|
9
13
|
end
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "decidim-module-decidim_awesome",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.11.0",
|
4
4
|
"description": "Mods and tweaks for Decidim",
|
5
5
|
"main": "index.js",
|
6
6
|
"directories": {
|
@@ -12,7 +12,9 @@
|
|
12
12
|
"lint": "eslint -c .eslintrc.json --ext .js app/packs/",
|
13
13
|
"lint-fix": "eslint -c .eslintrc.json --ext .js app/packs/ --fix",
|
14
14
|
"stylelint": "stylelint **/*.scss",
|
15
|
-
"stylelint-fix": "stylelint **/*.scss --fix"
|
15
|
+
"stylelint-fix": "stylelint **/*.scss --fix",
|
16
|
+
"prettier": "prettier --check '**/*.scss'",
|
17
|
+
"prettify": "prettier --write '**/*.scss'"
|
16
18
|
},
|
17
19
|
"repository": {
|
18
20
|
"type": "git",
|
@@ -21,50 +23,39 @@
|
|
21
23
|
"keywords": [
|
22
24
|
"decidim"
|
23
25
|
],
|
24
|
-
"author": "ivan@
|
26
|
+
"author": "ivan@pokecode.net",
|
25
27
|
"license": "AGPL-3.0-or-later",
|
26
28
|
"bugs": {
|
27
29
|
"url": "https://github.com/decidim-ice/decidim-module-decidim_awesome/issues"
|
28
30
|
},
|
29
31
|
"homepage": "https://github.com/decidim-ice/decidim-module-decidim_awesome#readme",
|
30
32
|
"stylelint": {
|
31
|
-
"extends": "@decidim/stylelint-config"
|
32
|
-
"rules": {
|
33
|
-
"block-opening-brace-space-before": "always"
|
34
|
-
}
|
33
|
+
"extends": "@decidim/stylelint-config"
|
35
34
|
},
|
35
|
+
"prettier": "@decidim/prettier-config",
|
36
36
|
"devDependencies": {
|
37
|
-
"@babel/eslint-parser": "^7.
|
38
|
-
"@babel/plugin-
|
39
|
-
"@babel/plugin-
|
40
|
-
"@babel/plugin-
|
41
|
-
"@babel/
|
42
|
-
"@babel/
|
43
|
-
"@
|
44
|
-
"@
|
45
|
-
"@
|
46
|
-
"@decidim/
|
47
|
-
"
|
48
|
-
"@decidim/stylelint-config": "0.27.4",
|
49
|
-
"eslint-config-prettier": "^8.2.0",
|
50
|
-
"eslint-config-standard": "^11.0.0",
|
51
|
-
"eslint-plugin-import": "^2.22.0",
|
52
|
-
"eslint-plugin-standard": "^3.1.0",
|
37
|
+
"@babel/eslint-parser": "^7.23.10",
|
38
|
+
"@babel/plugin-transform-classes": "^7.23.8",
|
39
|
+
"@babel/plugin-transform-regenerator": "^7.23.3",
|
40
|
+
"@babel/plugin-transform-runtime": "^7.23.9",
|
41
|
+
"@babel/preset-env": "^7.23.9",
|
42
|
+
"@babel/preset-react": "^7.23.3",
|
43
|
+
"@decidim/dev": "0.28.0",
|
44
|
+
"@decidim/eslint-config": "0.28.0",
|
45
|
+
"@decidim/prettier-config": "0.28.0",
|
46
|
+
"@decidim/stylelint-config": "0.28.0",
|
47
|
+
"postcss-scss": "^4.0.9",
|
53
48
|
"sass-embedded": "~1.57.1"
|
54
49
|
},
|
55
50
|
"dependencies": {
|
56
51
|
"@rails/actioncable": "^6.1.7-6",
|
57
52
|
"codemirror": "^5.65.0",
|
58
|
-
"europa": "^4.0.0",
|
59
53
|
"form-storage": "^1.3.5",
|
60
|
-
"formBuilder": "^3.
|
54
|
+
"formBuilder": "^3.19.12",
|
61
55
|
"highlight.js": "^11.4.0",
|
62
|
-
"inline-
|
63
|
-
"inscrybmde": "^1.11.6",
|
64
|
-
"jquery-ui": "^1.13.0",
|
56
|
+
"inline-attacher": "^0.0.7",
|
65
57
|
"jsrender": "^1.0.9",
|
66
58
|
"leaflet.featuregroup.subgroup": "^1.0.2",
|
67
|
-
"
|
68
|
-
"select2": "^4.1.0-rc.0"
|
59
|
+
"tom-select": "2.2.2"
|
69
60
|
}
|
70
61
|
}
|