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
@@ -2,18 +2,6 @@
|
|
2
2
|
.dropdown-pane {
|
3
3
|
z-index: 1000;
|
4
4
|
}
|
5
|
-
// Override padding in this component
|
6
|
-
.wrapper {
|
7
|
-
padding: 0;
|
8
|
-
|
9
|
-
.callout.announcement {
|
10
|
-
margin-top: 2rem;
|
11
|
-
}
|
12
|
-
|
13
|
-
.google-map {
|
14
|
-
margin-bottom: 0;
|
15
|
-
}
|
16
|
-
}
|
17
5
|
|
18
6
|
#awesome-map {
|
19
7
|
width: 100%;
|
@@ -21,21 +9,35 @@
|
|
21
9
|
justify-content: center;
|
22
10
|
align-items: center;
|
23
11
|
|
24
|
-
// .leaflet-marker-icon.svg-icon svg path{
|
25
|
-
// filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, .7));
|
26
|
-
// }
|
27
|
-
|
28
12
|
.loading-spinner {
|
29
13
|
z-index: 10000;
|
30
14
|
position: absolute;
|
31
|
-
right:
|
32
|
-
top:
|
15
|
+
right: 50%;
|
16
|
+
top: 50%;
|
33
17
|
}
|
34
18
|
|
35
|
-
.leaflet-
|
19
|
+
.leaflet-popup-content {
|
36
20
|
font: inherit;
|
37
21
|
|
38
|
-
|
22
|
+
h3 {
|
23
|
+
@apply mb-2;
|
24
|
+
}
|
25
|
+
|
26
|
+
a {
|
27
|
+
@apply text-white;
|
28
|
+
}
|
29
|
+
|
30
|
+
.description {
|
31
|
+
@apply m-0 px-0 text-sm font-sans text-white;
|
32
|
+
|
33
|
+
p {
|
34
|
+
@apply mt-0;
|
35
|
+
}
|
36
|
+
|
37
|
+
a {
|
38
|
+
@apply underline;
|
39
|
+
}
|
40
|
+
|
39
41
|
img,
|
40
42
|
iframe {
|
41
43
|
max-height: 5em;
|
@@ -103,6 +105,10 @@
|
|
103
105
|
}
|
104
106
|
}
|
105
107
|
|
108
|
+
.participatory-space__container #awesome-map {
|
109
|
+
@apply mt-8 mb-8;
|
110
|
+
}
|
111
|
+
|
106
112
|
#awesome_map- {
|
107
113
|
&categories-control {
|
108
114
|
display: none;
|
@@ -148,7 +154,7 @@
|
|
148
154
|
padding: 0.5rem;
|
149
155
|
|
150
156
|
span {
|
151
|
-
margin: 0 0
|
157
|
+
margin: 0 0 2px 0.4em;
|
152
158
|
}
|
153
159
|
|
154
160
|
input {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
.awesome_autosave-notice {
|
2
|
-
background-color:
|
2
|
+
background-color: rgb(var(--success-rgb) / 90%);
|
3
3
|
position: fixed;
|
4
|
-
top:
|
5
|
-
|
6
|
-
|
7
|
-
padding:
|
4
|
+
top: 90%;
|
5
|
+
left: 50%;
|
6
|
+
transform: translate(-50%, -50%);
|
7
|
+
padding: 1em 2em;
|
8
8
|
border-radius: 4px;
|
9
9
|
border: 1px solid var(--success);
|
10
10
|
font-weight: 600;
|
@@ -12,6 +12,6 @@
|
|
12
12
|
z-index: 1000;
|
13
13
|
|
14
14
|
&.error {
|
15
|
-
background-color:
|
15
|
+
background-color: rgb(var(--alert-rgb) / 90%);
|
16
16
|
}
|
17
17
|
}
|
@@ -1,186 +1,117 @@
|
|
1
1
|
.decidim_awesome-custom_fields {
|
2
2
|
&.private_body {
|
3
|
-
|
4
|
-
margin-top: 2rem;
|
5
|
-
border: 1px solid $medium-gray;
|
6
|
-
border-radius: $global-radius;
|
7
|
-
background-color: $medium-gray;
|
8
|
-
color: $black;
|
9
|
-
font-weight: $global-weight-normal;
|
3
|
+
@apply px-4 py-6 mt-8 border border-gray rounded-s rounded-ee bg-gray-5 text-black font-normal;
|
10
4
|
}
|
11
5
|
|
12
6
|
.private_body-disclosure {
|
13
|
-
|
14
|
-
font-size: 1.125rem;
|
15
|
-
font-style: italic;
|
7
|
+
@apply -mt-4 mb-8 text-lg italic;
|
16
8
|
|
17
9
|
svg {
|
18
|
-
|
19
|
-
width: 1.5rem;
|
20
|
-
height: 1.5rem;
|
21
|
-
margin-right: 0.5rem;
|
22
|
-
vertical-align: bottom;
|
10
|
+
@apply inline-block w-6 h-6 mr-2 align-bottom;
|
23
11
|
}
|
24
12
|
}
|
25
13
|
|
26
14
|
dt {
|
27
|
-
font-
|
28
|
-
font-weight: $global-weight-bold;
|
15
|
+
@apply font-sans font-semibold;
|
29
16
|
}
|
30
17
|
|
31
18
|
dd {
|
32
|
-
|
19
|
+
@apply px-0;
|
33
20
|
}
|
34
21
|
|
22
|
+
// styles to tune a bit the form presentation in proposals creation
|
35
23
|
.proposal_custom_field {
|
36
24
|
h1 {
|
37
|
-
font-
|
38
|
-
font-weight: $global-weight-bold;
|
39
|
-
font-size: 2.5rem;
|
40
|
-
margin-top: 1rem;
|
25
|
+
@apply font-sans font-bold text-4xl mt-4;
|
41
26
|
}
|
42
27
|
|
43
28
|
h2 {
|
44
|
-
font-
|
45
|
-
font-weight: $global-weight-bold;
|
46
|
-
font-size: 2rem;
|
47
|
-
margin-top: 1rem;
|
29
|
+
@apply font-sans font-bold text-3xl mt-4;
|
48
30
|
}
|
49
31
|
|
50
32
|
h3 {
|
51
|
-
font-
|
52
|
-
font-weight: $global-weight-bold;
|
53
|
-
font-size: 1.75rem;
|
54
|
-
margin-top: 1rem;
|
33
|
+
@apply font-sans font-semibold text-2xl mt-4;
|
55
34
|
}
|
56
35
|
|
57
36
|
h4 {
|
58
|
-
font-
|
59
|
-
font-weight: $global-weight-bold;
|
60
|
-
font-size: 1.5rem;
|
61
|
-
margin-top: 1rem;
|
37
|
+
@apply font-sans font-semibold text-xl mt-4;
|
62
38
|
}
|
63
39
|
|
64
40
|
h5 {
|
65
|
-
font-
|
66
|
-
font-weight: $global-weight-bold;
|
67
|
-
font-size: 1.125rem;
|
68
|
-
margin-top: 1rem;
|
41
|
+
@apply font-sans font-semibold text-lg mt-4;
|
69
42
|
}
|
70
43
|
|
71
44
|
h6 {
|
72
|
-
font-
|
73
|
-
font-weight: $global-weight-bold;
|
74
|
-
font-size: 1rem;
|
75
|
-
margin-top: 1rem;
|
45
|
+
@apply font-sans font-semibold text-md mt-4;
|
76
46
|
}
|
77
47
|
|
78
48
|
p {
|
79
|
-
|
49
|
+
@apply mt-4;
|
80
50
|
}
|
81
51
|
|
52
|
+
// replace tooltips javascript with css
|
82
53
|
label {
|
83
|
-
font-size: 0.875rem;
|
84
|
-
font-weight: $global-weight-bold;
|
85
|
-
|
86
54
|
.tooltip-element {
|
87
|
-
|
88
|
-
padding: 0;
|
89
|
-
visibility: hidden;
|
90
|
-
display: block;
|
55
|
+
@apply m-0 p-0 invisible block;
|
91
56
|
|
92
57
|
&::before {
|
93
|
-
|
94
|
-
|
95
|
-
color: $medium-gray;
|
96
|
-
font-weight: $global-weight-normal;
|
97
|
-
font-style: italic;
|
58
|
+
@apply visible text-xs text-gray-2 italic font-thin;
|
59
|
+
|
98
60
|
content: attr(tooltip);
|
99
61
|
}
|
100
62
|
}
|
101
63
|
}
|
102
64
|
|
103
65
|
.form-group:not(:first-of-type) {
|
104
|
-
|
66
|
+
@apply mt-6;
|
105
67
|
}
|
106
68
|
|
107
69
|
.form-control {
|
108
|
-
|
109
|
-
display: block;
|
70
|
+
@apply w-full block mt-4;
|
110
71
|
|
111
72
|
&:not(.reset-defaults) {
|
112
|
-
|
113
|
-
padding: 0.5rem 1rem;
|
114
|
-
border: 1px solid $medium-gray;
|
115
|
-
outline: 1px solid transparent;
|
116
|
-
border-radius: $global-radius;
|
117
|
-
background-color: $body-background;
|
118
|
-
color: $black;
|
119
|
-
font-weight: $global-weight-normal;
|
120
|
-
|
121
|
-
&:focus {
|
122
|
-
outline: 2px solid $secondary-color;
|
123
|
-
}
|
124
|
-
|
125
|
-
&:disabled {
|
126
|
-
background-color: $light-gray;
|
127
|
-
color: $medium-gray;
|
128
|
-
cursor: not-allowed;
|
129
|
-
}
|
73
|
+
@apply inline-block px-4 py-2 border border-gray outline outline-1 outline-transparent rounded bg-background-2 text-black font-normal placeholder:text-gray focus:outline-2 focus:outline-secondary disabled:bg-background-3 disabled:text-gray-2 disabled:cursor-not-allowed;
|
130
74
|
|
131
75
|
&.sm {
|
132
|
-
|
133
|
-
font-size: 0.875rem;
|
76
|
+
@apply px-1 py-0.5 text-sm;
|
134
77
|
}
|
135
78
|
|
136
79
|
&.sm-icon {
|
137
|
-
|
138
|
-
font-size: 0.875rem;
|
80
|
+
@apply pr-1 pl-6 py-0.5 text-sm;
|
139
81
|
}
|
140
82
|
|
141
83
|
&.is-invalid-input:not(:focus) {
|
142
|
-
outline
|
84
|
+
@apply outline-2 outline-alert;
|
143
85
|
}
|
144
86
|
}
|
145
87
|
|
88
|
+
/* read-only can be applied only to input and textarea, otherwise selects will be set as readonly */
|
146
89
|
&:not(select) {
|
147
|
-
|
148
|
-
background-color: $light-gray;
|
149
|
-
border: 0;
|
150
|
-
color: $medium-gray;
|
151
|
-
}
|
90
|
+
@apply read-only:bg-background read-only:border-0 read-only:text-gray-2;
|
152
91
|
}
|
153
92
|
}
|
154
93
|
|
155
94
|
.formbuilder-checkbox {
|
156
95
|
> label {
|
157
|
-
font-
|
96
|
+
@apply font-normal;
|
158
97
|
}
|
159
98
|
}
|
160
99
|
|
161
100
|
.formbuilder-autocomplete {
|
162
|
-
|
101
|
+
@apply relative;
|
163
102
|
|
164
103
|
.formbuilder-autocomplete-list {
|
165
|
-
z-
|
166
|
-
max-height: 13rem;
|
167
|
-
outline: 1px solid transparent;
|
168
|
-
border-radius: $global-radius;
|
169
|
-
border: 1px solid $medium-gray;
|
170
|
-
color: $black;
|
171
|
-
font-weight: $global-weight-normal;
|
172
|
-
display: none;
|
104
|
+
@apply z-20 max-h-52 outline outline-1 outline-transparent rounded border border-gray text-black font-normal;
|
173
105
|
|
174
106
|
li {
|
175
|
-
cursor
|
176
|
-
border-radius: $global-radius;
|
177
|
-
padding: 0.5rem 1rem;
|
178
|
-
background-color: $body-background;
|
107
|
+
@apply cursor-pointer rounded px-4 py-2 bg-background-2;
|
179
108
|
|
180
109
|
&.active-option {
|
181
|
-
|
110
|
+
@apply bg-background;
|
182
111
|
}
|
183
112
|
}
|
113
|
+
|
114
|
+
display: none;
|
184
115
|
}
|
185
116
|
}
|
186
117
|
}
|
@@ -1,47 +1,26 @@
|
|
1
1
|
// Loading spinner does not ocuppy all the width and height as the new spinner-container
|
2
2
|
.loading-spinner {
|
3
|
-
|
4
|
-
cursor: wait;
|
3
|
+
@apply relative cursor-wait;
|
5
4
|
|
6
5
|
&::before {
|
7
|
-
content:
|
8
|
-
display: block;
|
9
|
-
width: 1.5rem;
|
10
|
-
height: 1.5rem;
|
11
|
-
border-radius: 50%;
|
12
|
-
animation: spin 1s linear infinite;
|
13
|
-
border: 4px solid;
|
14
|
-
border-color: transparent transparent $secondary-color transparent;
|
15
|
-
z-index: 20;
|
16
|
-
margin-left: 50%;
|
17
|
-
transform: translateX(-50%);
|
6
|
+
@apply content-[""] ml-[50%] md:ml-[calc(50%-0.75rem)] block w-6 h-6 rounded-full animate-spin border-4 border-l-background border-y-background border-r-secondary z-20;
|
18
7
|
}
|
19
8
|
|
20
9
|
&.alert {
|
21
10
|
&::before {
|
22
|
-
border-
|
11
|
+
@apply border-r-alert;
|
23
12
|
}
|
24
13
|
}
|
25
14
|
|
26
15
|
&.warning {
|
27
16
|
&::before {
|
28
|
-
border-
|
17
|
+
@apply border-r-warning;
|
29
18
|
}
|
30
19
|
}
|
31
20
|
|
32
21
|
&.primary {
|
33
22
|
&::before {
|
34
|
-
border-
|
23
|
+
@apply border-r-primary;
|
35
24
|
}
|
36
25
|
}
|
37
26
|
}
|
38
|
-
|
39
|
-
@keyframes spin {
|
40
|
-
0% {
|
41
|
-
transform: rotate(0deg);
|
42
|
-
}
|
43
|
-
|
44
|
-
100% {
|
45
|
-
transform: rotate(360deg);
|
46
|
-
}
|
47
|
-
}
|
@@ -8,54 +8,6 @@
|
|
8
8
|
.voting-voting_cards {
|
9
9
|
$rectangle-width: 3rem;
|
10
10
|
|
11
|
-
// ProposalM card
|
12
|
-
&-card {
|
13
|
-
a {
|
14
|
-
margin-bottom: 0;
|
15
|
-
|
16
|
-
> svg {
|
17
|
-
margin-bottom: 2px;
|
18
|
-
vertical-align: middle;
|
19
|
-
}
|
20
|
-
|
21
|
-
&.button {
|
22
|
-
&.weight_0 {
|
23
|
-
background-color: var(--voting-cards-weight-0);
|
24
|
-
}
|
25
|
-
|
26
|
-
&.weight_1 {
|
27
|
-
background-color: var(--voting-cards-weight-1);
|
28
|
-
}
|
29
|
-
|
30
|
-
&.weight_2 {
|
31
|
-
background-color: var(--voting-cards-weight-2);
|
32
|
-
}
|
33
|
-
|
34
|
-
&.weight_3 {
|
35
|
-
background-color: var(--voting-cards-weight-3);
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
.votes_counter {
|
41
|
-
.weight_0 {
|
42
|
-
color: var(--voting-cards-weight-0);
|
43
|
-
}
|
44
|
-
|
45
|
-
.weight_1 {
|
46
|
-
color: var(--voting-cards-weight-1);
|
47
|
-
}
|
48
|
-
|
49
|
-
.weight_2 {
|
50
|
-
color: var(--voting-cards-weight-2);
|
51
|
-
}
|
52
|
-
|
53
|
-
.weight_3 {
|
54
|
-
color: var(--voting-cards-weight-3);
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
11
|
margin-bottom: 1.5rem;
|
60
12
|
border-bottom: 2px solid #d9d9d9;
|
61
13
|
|
@@ -69,7 +21,8 @@
|
|
69
21
|
|
70
22
|
.vote-label {
|
71
23
|
margin-bottom: 1rem;
|
72
|
-
|
24
|
+
|
25
|
+
@apply text-black;
|
73
26
|
}
|
74
27
|
}
|
75
28
|
|
@@ -84,11 +37,12 @@
|
|
84
37
|
pointer-events: none;
|
85
38
|
position: relative;
|
86
39
|
|
40
|
+
@apply relative cursor-wait;
|
41
|
+
|
87
42
|
&::before {
|
88
|
-
@
|
43
|
+
@apply content-[""] block w-6 h-6 rounded-full animate-spin border-4 border-l-background border-y-background border-r-secondary;
|
89
44
|
|
90
45
|
z-index: 1000;
|
91
|
-
content: "";
|
92
46
|
vertical-align: middle;
|
93
47
|
position: absolute;
|
94
48
|
top: calc(50% - 12.5px);
|
@@ -190,7 +144,7 @@
|
|
190
144
|
.vote-count {
|
191
145
|
font-size: 2rem;
|
192
146
|
font-weight: bolder;
|
193
|
-
margin-bottom: 0;
|
147
|
+
margin-bottom: 0.5rem;
|
194
148
|
}
|
195
149
|
}
|
196
150
|
|
@@ -221,3 +175,31 @@
|
|
221
175
|
}
|
222
176
|
}
|
223
177
|
}
|
178
|
+
|
179
|
+
.vote_proposal_modal {
|
180
|
+
div.button__sm {
|
181
|
+
display: inline-block;
|
182
|
+
}
|
183
|
+
|
184
|
+
.vote-label {
|
185
|
+
@apply ml-2;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
.card__list-metadata {
|
190
|
+
.voting-weight_3 {
|
191
|
+
color: var(--voting-cards-weight-3);
|
192
|
+
}
|
193
|
+
|
194
|
+
.voting-weight_2 {
|
195
|
+
color: var(--voting-cards-weight-2);
|
196
|
+
}
|
197
|
+
|
198
|
+
.voting-weight_1 {
|
199
|
+
color: var(--voting-cards-weight-1);
|
200
|
+
}
|
201
|
+
|
202
|
+
.voting-weight_0 {
|
203
|
+
color: var(--voting-cards-weight-0);
|
204
|
+
}
|
205
|
+
}
|
@@ -14,15 +14,14 @@ module Decidim
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def editor_image_action?
|
17
|
-
return unless permission_action.subject == :editor_image
|
17
|
+
return false unless permission_action.subject == :editor_image
|
18
18
|
|
19
19
|
config = context.fetch(:awesome_config, {})
|
20
20
|
|
21
21
|
return allow! if user.admin?
|
22
22
|
return allow! if config[:allow_images_in_proposals]
|
23
|
-
return allow! if config[:
|
24
|
-
return allow! if config[:
|
25
|
-
return allow! if config[:allow_images_in_markdown_editor]
|
23
|
+
return allow! if config[:allow_images_in_editors]
|
24
|
+
return allow! if config[:allow_videos_in_editors]
|
26
25
|
end
|
27
26
|
end
|
28
27
|
end
|
data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module DecidimAwesome
|
5
|
+
module BreadcrumbRootMenuItemPresenterOverride
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
|
8
|
+
included do
|
9
|
+
def arrow_link(text, url, args = {})
|
10
|
+
link_to url, extended_html_options.merge(class: args.with_indifferent_access[:class]) do
|
11
|
+
"<span>#{text}</span> #{icon("arrow-right-line")}".html_safe
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def extended_html_options
|
16
|
+
{}.tap do |opts|
|
17
|
+
opts[:target] = "_blank" if @menu_item.try(:target) == "_blank"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -6,12 +6,12 @@ module Decidim
|
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
8
|
included do
|
9
|
-
def link_to(name = nil, options = nil, html_options = nil, &
|
9
|
+
def link_to(name = nil, options = nil, html_options = nil, &)
|
10
10
|
html_options ||= {}
|
11
11
|
html_options[:target] = @menu_item.try(:target)
|
12
12
|
|
13
13
|
options ||= html_options
|
14
|
-
@view.link_to(name, options, html_options, &
|
14
|
+
@view.link_to(name, options, html_options, &)
|
15
15
|
end
|
16
16
|
|
17
17
|
def active
|
@@ -19,6 +19,14 @@ module Decidim
|
|
19
19
|
|
20
20
|
@menu_item&.active
|
21
21
|
end
|
22
|
+
|
23
|
+
def active_for_breadcrumb?
|
24
|
+
is_active_link?(url, @menu_item.try(:original_active) || active)
|
25
|
+
end
|
26
|
+
|
27
|
+
def hacked_not_overriding?
|
28
|
+
!(@menu_item.is_a?(Decidim::MenuItem) || @menu_item.overrided?)
|
29
|
+
end
|
22
30
|
end
|
23
31
|
end
|
24
32
|
end
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
class ParticipatorySpaceRolePresenter < RoleBasePresenter
|
6
6
|
# Finds the destroyed entry if exists
|
7
7
|
def destroy_entry
|
8
|
-
@destroy_entry ||= PaperTrail::Version.find_by(item_type
|
8
|
+
@destroy_entry ||= PaperTrail::Version.find_by(item_type:, event: "destroy", item_id:)
|
9
9
|
end
|
10
10
|
|
11
11
|
# roles are in the destroyed event if the role has been removed
|
@@ -17,15 +17,15 @@ module Decidim
|
|
17
17
|
|
18
18
|
def total
|
19
19
|
@total ||= Decidim::Proposals::Proposal.joins(:extra_fields)
|
20
|
-
.where(
|
21
|
-
.where.not(
|
20
|
+
.where(component: self)
|
21
|
+
.where.not(extra_fields: { private_body: nil })
|
22
22
|
.count.to_s
|
23
23
|
end
|
24
24
|
|
25
25
|
def last_date
|
26
26
|
@last_date ||= Decidim::Proposals::Proposal.joins(:extra_fields)
|
27
|
-
.where(
|
28
|
-
.where.not(
|
27
|
+
.where(component: self)
|
28
|
+
.where.not(extra_fields: { private_body: nil })
|
29
29
|
.order(private_body_updated_at: :desc)
|
30
30
|
.first&.extra_fields&.private_body_updated_at
|
31
31
|
end
|
@@ -46,14 +46,14 @@ module Decidim
|
|
46
46
|
|
47
47
|
def as_json(_options = nil)
|
48
48
|
{
|
49
|
-
id
|
50
|
-
name
|
51
|
-
path
|
52
|
-
total
|
53
|
-
last_date
|
54
|
-
time_ago
|
49
|
+
id:,
|
50
|
+
name:,
|
51
|
+
path:,
|
52
|
+
total:,
|
53
|
+
last_date:,
|
54
|
+
time_ago:,
|
55
55
|
locked: locked?,
|
56
|
-
done:
|
56
|
+
done:
|
57
57
|
}
|
58
58
|
end
|
59
59
|
|
@@ -6,7 +6,7 @@ module Decidim
|
|
6
6
|
# Finds the destroyed entry if exists
|
7
7
|
def destroy_entry
|
8
8
|
@destroy_entry ||= begin
|
9
|
-
query = PaperTrail::Version.where(item_type
|
9
|
+
query = PaperTrail::Version.where(item_type:, event: "update", item_id:)
|
10
10
|
.where("id > ?", entry.id)
|
11
11
|
if roles.include? "admin"
|
12
12
|
query.where("object_changes LIKE '%\nadmin:\n- true\n- false%'").first
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
module DecidimAwesome
|
5
5
|
class PrivateDataFinder
|
6
6
|
def query
|
7
|
-
Component.where(id: proposals.where.not(
|
7
|
+
Component.where(id: proposals.where.not(extra_fields: { private_body: nil }))
|
8
8
|
end
|
9
9
|
|
10
10
|
def proposals
|
@@ -28,14 +28,6 @@ module Decidim
|
|
28
28
|
end
|
29
29
|
payload
|
30
30
|
end
|
31
|
-
|
32
|
-
def author_name(author)
|
33
|
-
if author.respond_to?(:name)
|
34
|
-
translated_attribute(author.name) # is a Decidim::User or Decidim::Organization or Decidim::UserGroup
|
35
|
-
elsif author.respond_to?(:title)
|
36
|
-
translated_attribute(author.title) # is a Decidim::Meetings::Meeting
|
37
|
-
end
|
38
|
-
end
|
39
31
|
end
|
40
32
|
end
|
41
33
|
end
|