decidim-decidim_awesome 0.10.3 → 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 +14 -5
- data/README.md +65 -67
- data/app/cells/concerns/decidim/decidim_awesome/global_menu_cell_override.rb +20 -0
- data/app/cells/concerns/decidim/decidim_awesome/proposal_l_cell_override.rb +44 -0
- data/app/cells/decidim/decidim_awesome/content_blocks/map/show.erb +5 -12
- 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 +1 -1
- data/app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb +2 -2
- data/app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb +2 -2
- data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
- 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/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 +1 -1
- data/app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb +3 -4
- data/app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb +34 -0
- data/app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb +1 -1
- data/app/controllers/concerns/decidim/decidim_awesome/proposals/orderable_override.rb +22 -9
- data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +3 -3
- data/app/controllers/decidim/decidim_awesome/admin/admin_accountability_controller.rb +7 -7
- data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +7 -7
- data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +8 -10
- data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +20 -19
- data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -8
- data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -8
- data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +2 -2
- 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 +11 -5
- data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +1 -1
- data/app/forms/decidim/decidim_awesome/admin/config_form.rb +13 -25
- 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 +8 -1
- 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 +23 -39
- data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +2 -2
- data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
- 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 +1 -1
- data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
- data/app/models/decidim/decidim_awesome/paper_trail_version.rb +4 -8
- data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +1 -1
- data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
- data/app/overrides/decidim/proposals/proposals/{show → _proposal_aside}/limit_amendments_modal.html.erb.deface +1 -1
- 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/{replace_scripts.html.erb.deface → add_awesome_tags.html.erb.deface} +4 -4
- 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_editor.js +14 -0
- data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +95 -70
- 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 +4 -1
- 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/user_picker.js +34 -21
- data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +20 -22
- 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 +0 -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 +9 -14
- data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
- 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 +19 -12
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +8 -32
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -78
- 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 +15 -24
- data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +9 -47
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +3 -12
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +3 -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 +27 -21
- data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
- data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +32 -101
- data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +5 -26
- data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +34 -52
- 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/concerns/decidim/decidim_awesome/menu_item_presenter_override.rb +10 -2
- data/app/presenters/concerns/decidim/decidim_awesome/menu_presenter_override.rb +8 -0
- data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
- data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +11 -11
- data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
- data/app/queries/decidim/decidim_awesome/private_data_finder.rb +1 -1
- data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +0 -8
- 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 +1 -3
- data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +3 -3
- data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +20 -21
- data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +6 -5
- data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +2 -2
- 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 +4 -6
- data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +64 -76
- data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +15 -11
- 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 +15 -15
- 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 +4 -4
- 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 +16 -18
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
- 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 +18 -11
- data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +3 -5
- 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 +3 -12
- data/config/assets.rb +3 -33
- data/config/i18n-tasks.yml +1 -0
- data/config/locales/ca.yml +17 -94
- data/config/locales/cs.yml +15 -93
- data/config/locales/de.yml +15 -91
- data/config/locales/en.yml +24 -28
- data/config/locales/es.yml +18 -96
- data/config/locales/eu.yml +8 -18
- data/config/locales/fr.yml +15 -94
- data/config/locales/hu.yml +4 -18
- data/config/locales/it.yml +9 -26
- data/config/locales/ja.yml +16 -93
- data/config/locales/lt.yml +2 -4
- data/config/locales/nl.yml +8 -18
- data/config/locales/pt-BR.yml +11 -25
- data/config/locales/ro-RO.yml +2 -14
- data/config/locales/sv.yml +10 -21
- 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/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +1 -1
- data/db/seeds.rb +3 -3
- data/lib/decidim/decidim_awesome/admin_engine.rb +4 -1
- data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +2 -3
- data/lib/decidim/decidim_awesome/awesome.rb +42 -28
- data/lib/decidim/decidim_awesome/awesome_helpers.rb +1 -1
- data/lib/decidim/decidim_awesome/checksums.yml +39 -60
- data/lib/decidim/decidim_awesome/config.rb +1 -1
- data/lib/decidim/decidim_awesome/custom_fields.rb +5 -5
- data/lib/decidim/decidim_awesome/engine.rb +24 -6
- data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
- data/lib/decidim/decidim_awesome/lock.rb +2 -2
- data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
- data/lib/decidim/decidim_awesome/menu.rb +33 -14
- 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 +3 -11
- 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_examples.rb +18 -18
- data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +3 -3
- data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +11 -11
- 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 +26 -66
- data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +10 -9
- data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +30 -20
- data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +19 -10
- 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 +19 -28
- metadata +40 -56
- data/app/cells/concerns/decidim/decidim_awesome/proposal_m_cell_override.rb +0 -18
- 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/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
- 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 -213
- 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 -65
- 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
- /data/app/packs/src/decidim/decidim_awesome/{editors/tabs_focus.js → admin/tabs_change.js} +0 -0
@@ -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
|
@@ -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
|
@@ -123,6 +126,7 @@ shared_examples "allows all admin routes" do
|
|
123
126
|
|
124
127
|
it "allows the processes page" do
|
125
128
|
click_link_or_button "Processes"
|
129
|
+
|
126
130
|
expect(page).to have_content("New process")
|
127
131
|
end
|
128
132
|
end
|
@@ -130,6 +134,7 @@ end
|
|
130
134
|
shared_examples "allows scoped admin routes" do
|
131
135
|
before do
|
132
136
|
visit decidim_admin.root_path
|
137
|
+
sleep 0.1
|
133
138
|
end
|
134
139
|
|
135
140
|
it "allows the admin root page" do
|
@@ -137,14 +142,14 @@ shared_examples "allows scoped admin routes" do
|
|
137
142
|
end
|
138
143
|
|
139
144
|
it "allows the assemblies page" do
|
140
|
-
|
145
|
+
click_link_or_button "Assemblies"
|
141
146
|
|
142
147
|
expect(page).to have_content("New assembly")
|
143
148
|
end
|
144
149
|
|
145
150
|
describe "forbids processes" do
|
146
151
|
before do
|
147
|
-
|
152
|
+
click_link_or_button "Processes"
|
148
153
|
end
|
149
154
|
|
150
155
|
it_behaves_like "redirects to index"
|
@@ -157,16 +162,16 @@ end
|
|
157
162
|
|
158
163
|
shared_examples "has admin link" do
|
159
164
|
it "has menu link" do
|
160
|
-
within "
|
161
|
-
expect(page).to
|
165
|
+
within "header" do
|
166
|
+
expect(page).to have_css("#admin-bar", text: "Admin dashboard")
|
162
167
|
end
|
163
168
|
end
|
164
169
|
end
|
165
170
|
|
166
171
|
shared_examples "has no admin link" do
|
167
|
-
it "has menu link" do
|
168
|
-
within "
|
169
|
-
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")
|
170
175
|
end
|
171
176
|
end
|
172
177
|
end
|
@@ -214,7 +219,7 @@ shared_examples "can edit assembly" do
|
|
214
219
|
ca: "Assamblea editada",
|
215
220
|
es: "Asamblea editada"
|
216
221
|
)
|
217
|
-
|
222
|
+
click_link_or_button "Update"
|
218
223
|
expect(page).to have_admin_callout("successfully")
|
219
224
|
end
|
220
225
|
end
|
@@ -263,7 +268,7 @@ shared_examples "can manage component" do
|
|
263
268
|
expect(page).to have_content("Title")
|
264
269
|
expect(page).to have_content(proposal.title["en"])
|
265
270
|
|
266
|
-
|
271
|
+
click_link_or_button "Edit proposal"
|
267
272
|
expect(page).to have_content("Update proposal")
|
268
273
|
fill_in_i18n(
|
269
274
|
:proposal_title,
|
@@ -272,14 +277,14 @@ shared_examples "can manage component" do
|
|
272
277
|
ca: "Proposta editada",
|
273
278
|
es: "Propuesta editada"
|
274
279
|
)
|
275
|
-
|
280
|
+
click_link_or_button "Update"
|
276
281
|
expect(page).to have_admin_callout("successfully")
|
277
282
|
end
|
278
283
|
|
279
284
|
it "can create a proposal" do
|
280
285
|
visit manage_component_path(component)
|
281
286
|
|
282
|
-
|
287
|
+
click_link_or_button "New proposal"
|
283
288
|
expect(page).to have_content("Create proposal")
|
284
289
|
fill_in_i18n(
|
285
290
|
:proposal_title,
|
@@ -295,7 +300,7 @@ shared_examples "can manage component" do
|
|
295
300
|
ca: "Body creat",
|
296
301
|
es: "Body creat"
|
297
302
|
)
|
298
|
-
|
303
|
+
click_link_or_button "Create"
|
299
304
|
expect(page).to have_admin_callout("successfully")
|
300
305
|
end
|
301
306
|
end
|
@@ -303,6 +308,7 @@ end
|
|
303
308
|
shared_examples "edits allowed components" do
|
304
309
|
before do
|
305
310
|
visit decidim_admin.root_path
|
311
|
+
sleep 0.1
|
306
312
|
end
|
307
313
|
|
308
314
|
it_behaves_like "can manage component"
|
@@ -363,8 +369,10 @@ shared_examples "allows access to group processes" do
|
|
363
369
|
end
|
364
370
|
|
365
371
|
it "shows the list of processes" do
|
366
|
-
|
367
|
-
|
372
|
+
within("[data-content]") do
|
373
|
+
expect(page).to have_content("Processes")
|
374
|
+
expect(page).to have_content(participatory_process.title["en"])
|
375
|
+
end
|
368
376
|
end
|
369
377
|
|
370
378
|
describe "forbids editing processes" do
|
@@ -381,8 +389,10 @@ shared_examples "allows access to group processes" do
|
|
381
389
|
end
|
382
390
|
|
383
391
|
it "shows the list of groups" do
|
384
|
-
|
385
|
-
|
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
|
386
396
|
end
|
387
397
|
end
|
388
398
|
end
|
@@ -401,7 +411,7 @@ shared_examples "allows edit any group process" do
|
|
401
411
|
ca: "Proces grup editat",
|
402
412
|
es: "Grupo de procesos editado"
|
403
413
|
)
|
404
|
-
|
414
|
+
click_link_or_button "Update"
|
405
415
|
expect(page).to have_admin_callout("successfully")
|
406
416
|
end
|
407
417
|
end
|
@@ -26,6 +26,8 @@ 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
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)
|
29
31
|
end
|
30
32
|
|
31
33
|
if enabled
|
@@ -43,8 +45,12 @@ shared_examples "activated concerns" do |enabled|
|
|
43
45
|
expect(Decidim::Proposals::ProposalVote.included_modules).to include(Decidim::DecidimAwesome::HasVoteWeight)
|
44
46
|
expect(Decidim::Proposals::ProposalType.included_modules).to include(Decidim::DecidimAwesome::AddProposalTypeVoteWeights)
|
45
47
|
expect(Decidim::Proposals::ProposalType.included_modules).to include(Decidim::DecidimAwesome::AddProposalTypeCustomFields)
|
48
|
+
expect(Decidim::Proposals::ProposalLCell.included_modules).to include(Decidim::DecidimAwesome::ProposalLCellOverride)
|
46
49
|
expect(Decidim::Proposals::Proposal.included_modules).to include(Decidim::DecidimAwesome::HasProposalExtraFields)
|
47
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)
|
48
54
|
expect(Decidim::Proposals::ProposalSerializer.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalSerializerOverride)
|
49
55
|
expect(Decidim::Proposals::ProposalVotesController.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalVotesControllerOverride)
|
50
56
|
expect(Decidim::AmendmentsController.included_modules).to include(Decidim::DecidimAwesome::LimitPendingAmendments)
|
@@ -67,8 +73,12 @@ shared_examples "activated concerns" do |enabled|
|
|
67
73
|
expect(Decidim::Proposals::ProposalVote.included_modules).not_to include(Decidim::DecidimAwesome::HasVoteWeight)
|
68
74
|
expect(Decidim::Proposals::ProposalType.included_modules).not_to include(Decidim::DecidimAwesome::AddProposalTypeVoteWeights)
|
69
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)
|
70
77
|
expect(Decidim::Proposals::Proposal.included_modules).not_to include(Decidim::DecidimAwesome::HasProposalExtraFields)
|
71
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)
|
72
82
|
expect(Decidim::Proposals::ProposalSerializer.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalSerializerOverride)
|
73
83
|
expect(Decidim::Proposals::ProposalVotesController.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalVotesControllerOverride)
|
74
84
|
expect(Decidim::AmendmentsController.included_modules).not_to include(Decidim::DecidimAwesome::LimitPendingAmendments)
|
@@ -148,11 +158,9 @@ shared_examples "basic rendering" do |enabled|
|
|
148
158
|
let(:image_vars) do
|
149
159
|
[
|
150
160
|
:allow_images_in_proposals,
|
151
|
-
:
|
152
|
-
:
|
161
|
+
:allow_videos_in_editors,
|
162
|
+
:allow_images_in_editors,
|
153
163
|
:allow_images_in_proposals,
|
154
|
-
:use_markdown_editor,
|
155
|
-
:allow_images_in_markdown_editor,
|
156
164
|
:auto_save_forms,
|
157
165
|
:intergram_for_admins,
|
158
166
|
:intergram_for_public
|
@@ -165,7 +173,7 @@ shared_examples "basic rendering" do |enabled|
|
|
165
173
|
end
|
166
174
|
|
167
175
|
it "renders the home page" do
|
168
|
-
expect(page).to
|
176
|
+
expect(page).to have_css(".home")
|
169
177
|
end
|
170
178
|
|
171
179
|
it "has DecidimAwesome object" do
|
@@ -185,7 +193,7 @@ shared_examples "basic rendering" do |enabled|
|
|
185
193
|
end
|
186
194
|
|
187
195
|
it "has custom fields javascript" do
|
188
|
-
expect(page).to have_xpath("//script[contains(@src,'
|
196
|
+
expect(page).to have_xpath("//script[contains(@src,'decidim_decidim_awesome_custom_fields')]", visible: :all)
|
189
197
|
end
|
190
198
|
|
191
199
|
it "has custom styles CSS" do
|
@@ -199,7 +207,7 @@ shared_examples "basic rendering" do |enabled|
|
|
199
207
|
end
|
200
208
|
|
201
209
|
it "do not have custom fields javascript" do
|
202
|
-
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)
|
203
211
|
end
|
204
212
|
|
205
213
|
it "do not have custom styles CSS" do
|
@@ -217,7 +225,8 @@ shared_examples "basic rendering" do |enabled|
|
|
217
225
|
"config/styles",
|
218
226
|
"config/proposal_custom_fields",
|
219
227
|
"config/admins",
|
220
|
-
"
|
228
|
+
"menus/menu/hacks",
|
229
|
+
"menus/home_content_block_menu/hacks",
|
221
230
|
"custom_redirects",
|
222
231
|
"config/livechat"
|
223
232
|
]
|
@@ -246,7 +255,7 @@ shared_examples "basic rendering" do |enabled|
|
|
246
255
|
|
247
256
|
it "has all admin menus" do
|
248
257
|
menus.each do |menu|
|
249
|
-
within ".
|
258
|
+
within ".sidebar-menu" do
|
250
259
|
expect(page).to have_link(href: "/admin/decidim_awesome/#{menu}")
|
251
260
|
end
|
252
261
|
end
|
@@ -258,7 +267,7 @@ shared_examples "basic rendering" do |enabled|
|
|
258
267
|
|
259
268
|
it "has no admin menus" do
|
260
269
|
menus.each do |menu|
|
261
|
-
within ".
|
270
|
+
within ".sidebar-menu" do
|
262
271
|
expect(page).not_to have_link(href: "/admin/decidim_awesome/#{menu}")
|
263
272
|
end
|
264
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",
|
@@ -28,43 +30,32 @@
|
|
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
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
|
}
|