decidim-core 0.27.4 → 0.27.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/activity_cell.rb +2 -2
- data/app/cells/decidim/card_cell.rb +2 -2
- data/app/cells/decidim/card_m/top.erb +1 -1
- data/app/cells/decidim/card_m_cell.rb +1 -1
- data/app/cells/decidim/scopes_picker/scope_picker_values.erb +1 -1
- data/app/cells/decidim/tags_cell.rb +3 -1
- data/app/cells/decidim/upload_modal/modal.erb +4 -1
- data/app/cells/decidim/upload_modal_cell.rb +8 -4
- data/app/cells/decidim/user_profile_cell.rb +1 -1
- data/app/cells/decidim/version_cell.rb +1 -1
- data/app/cells/decidim/versions_list_cell.rb +1 -1
- data/app/commands/decidim/create_omniauth_registration.rb +2 -4
- data/app/commands/decidim/endorse_resource.rb +2 -0
- data/app/commands/decidim/messaging/reply_to_conversation.rb +3 -0
- data/app/commands/decidim/messaging/start_conversation.rb +3 -0
- data/app/commands/decidim/search.rb +1 -1
- data/app/commands/decidim/unendorse_resource.rb +1 -1
- data/app/controllers/concerns/decidim/devise_authentication_methods.rb +36 -0
- data/app/controllers/concerns/decidim/force_authentication.rb +6 -2
- data/app/controllers/concerns/decidim/paginable.rb +1 -1
- data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +1 -22
- data/app/controllers/decidim/devise/registrations_controller.rb +1 -1
- data/app/controllers/decidim/devise/sessions_controller.rb +1 -24
- data/app/controllers/decidim/links_controller.rb +1 -1
- data/app/controllers/decidim/searches_controller.rb +1 -1
- data/app/controllers/decidim/user_timeline_controller.rb +1 -1
- data/app/controllers/decidim/widgets_controller.rb +6 -0
- data/app/events/decidim/welcome_notification_event.rb +6 -9
- data/app/forms/decidim/account_form.rb +1 -1
- data/app/forms/decidim/notifications_settings_form.rb +0 -8
- data/app/forms/decidim/registration_form.rb +1 -1
- data/app/helpers/decidim/cells_paginate_helper.rb +1 -1
- data/app/helpers/decidim/check_boxes_tree_helper.rb +4 -4
- data/app/helpers/decidim/decidim_form_helper.rb +1 -0
- data/app/helpers/decidim/newsletters_helper.rb +83 -16
- data/app/helpers/decidim/omniauth_helper.rb +2 -0
- data/app/helpers/decidim/resource_helper.rb +3 -1
- data/app/helpers/decidim/sanitize_helper.rb +9 -0
- data/app/helpers/decidim/short_link_helper.rb +1 -1
- data/app/helpers/decidim/user_profile_helper.rb +7 -2
- data/app/jobs/decidim/download_your_data_export_job.rb +2 -1
- data/app/jobs/decidim/open_data_job.rb +2 -0
- data/app/mailers/decidim/messaging/conversation_mailer.rb +3 -72
- data/app/models/decidim/push_notification_message.rb +39 -0
- data/app/models/decidim/user.rb +9 -1
- data/app/packs/images/decidim/icons.svg +1 -1
- data/app/packs/images/decidim/vendor/social-share-button/x.svg +6 -0
- data/app/packs/src/decidim/autocomplete.js +11 -2
- data/app/packs/src/decidim/data_picker.js +1 -0
- data/app/packs/src/decidim/direct_uploads/upload_field.js +6 -4
- data/app/packs/src/decidim/direct_uploads/upload_modal.js +10 -8
- data/app/packs/src/decidim/direct_uploads/uploader.js +4 -1
- data/app/packs/src/decidim/geocoding/attach_input.js +4 -1
- data/app/packs/src/decidim/geocoding/provider/here.js +17 -21
- data/app/packs/src/decidim/geocoding/provider/photon.js +1 -1
- data/app/packs/src/decidim/input_hashtags.js +1 -1
- data/app/packs/src/decidim/input_mentions.js +1 -1
- data/app/packs/src/decidim/input_multiple_mentions.js +1 -1
- data/app/packs/src/decidim/utilities/text.js +17 -0
- data/app/packs/src/decidim/vizzs/index.js +1 -1
- data/app/packs/stylesheets/decidim/_variables.scss +1 -1
- data/app/packs/stylesheets/decidim/plugins/leaflet.scss +118 -114
- data/app/packs/stylesheets/decidim/vendor/_social_share_button.scss +4 -0
- data/app/presenters/decidim/admin_log/oauth_application_resource_presenter.rb +1 -1
- data/app/presenters/decidim/notification_to_mailer_presenter.rb +9 -0
- data/app/services/decidim/events_manager.rb +6 -0
- data/app/services/decidim/push_notification_message_sender.rb +36 -0
- data/app/services/decidim/send_push_notification.rb +22 -8
- data/app/views/decidim/devise/registrations/new.html.erb +2 -2
- data/app/views/decidim/notifications_digest_mailer/_email_content.html.erb +7 -0
- data/app/views/decidim/notifications_settings/show.html.erb +1 -1
- data/app/views/decidim/scopes/_scopes_picker_input.html.erb +1 -1
- data/app/views/decidim/searches/_filters.html.erb +3 -1
- data/app/views/decidim/shared/_address_details.html.erb +2 -2
- data/app/views/decidim/shared/_share_modal.html.erb +1 -1
- data/app/views/decidim/shared/participatory_space_filters/_filters.html.erb +1 -1
- data/app/views/layouts/decidim/_js_configuration.html.erb +1 -0
- data/app/views/layouts/decidim/_social_media_links.html.erb +2 -2
- data/config/locales/ar.yml +12 -16
- data/config/locales/bg.yml +77 -15
- data/config/locales/ca.yml +34 -30
- data/config/locales/cs.yml +18 -14
- data/config/locales/de.yml +62 -58
- data/config/locales/el.yml +11 -16
- data/config/locales/en.yml +5 -1
- data/config/locales/eo.yml +2 -3
- data/config/locales/es-MX.yml +15 -11
- data/config/locales/es-PY.yml +15 -11
- data/config/locales/es.yml +30 -26
- data/config/locales/eu.yml +500 -342
- data/config/locales/fi-plain.yml +7 -3
- data/config/locales/fi.yml +21 -17
- data/config/locales/fr-CA.yml +17 -13
- data/config/locales/fr.yml +12 -8
- data/config/locales/ga-IE.yml +5 -5
- data/config/locales/gl.yml +5 -19
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/hu.yml +63 -23
- data/config/locales/id-ID.yml +4 -19
- data/config/locales/is-IS.yml +4 -2
- data/config/locales/it.yml +15 -17
- data/config/locales/ja.yml +26 -22
- data/config/locales/lb.yml +15 -17
- data/config/locales/lt.yml +55 -10
- data/config/locales/lv.yml +4 -16
- data/config/locales/nl.yml +12 -12
- data/config/locales/no.yml +8 -10
- data/config/locales/pl.yml +151 -1
- data/config/locales/pt-BR.yml +267 -22
- data/config/locales/pt.yml +8 -10
- data/config/locales/ro-RO.yml +4 -10
- data/config/locales/ru.yml +13 -17
- data/config/locales/sk.yml +7 -17
- data/config/locales/sl.yml +0 -5
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sv.yml +55 -17
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +18 -15
- data/config/locales/uk.yml +17 -14
- data/config/locales/zh-CN.yml +6 -10
- data/config/locales/zh-TW.yml +0 -9
- data/db/migrate/20231027142329_change_default_value_for_decidim_endorsements.rb +11 -0
- data/db/seeds.rb +1 -0
- data/decidim-core.gemspec +78 -0
- data/lib/decidim/acts_as_tree.rb +14 -1
- data/lib/decidim/asset_router/storage.rb +4 -0
- data/lib/decidim/attribute_encryptor.rb +6 -4
- data/lib/decidim/core/engine.rb +7 -3
- data/lib/decidim/core/test/factories.rb +309 -95
- data/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb +6 -26
- data/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +8 -26
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +56 -0
- data/lib/decidim/core/test/shared_examples/embed_resource_examples.rb +187 -11
- data/lib/decidim/core/test/shared_examples/errors.rb +2 -0
- data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +8 -6
- data/lib/decidim/core/test/shared_examples/has_attachments.rb +4 -4
- data/lib/decidim/core/test/shared_examples/has_category.rb +27 -0
- data/lib/decidim/core/test/shared_examples/has_reference.rb +1 -1
- data/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb +1 -2
- data/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +6 -3
- data/lib/decidim/core/test/shared_examples/resource_locator_presenter_examples.rb +134 -0
- data/lib/decidim/core/test/shared_examples/searchable_results_examples.rb +1 -1
- data/lib/decidim/core/test/shared_examples/simple_event.rb +50 -2
- data/lib/decidim/core/test.rb +1 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +2 -1
- data/lib/decidim/endorsable.rb +1 -1
- data/lib/decidim/engine_router.rb +17 -4
- data/lib/decidim/events/base_event.rb +5 -2
- data/lib/decidim/events/simple_event.rb +3 -17
- data/lib/decidim/exporters.rb +10 -1
- data/lib/decidim/form_builder.rb +1 -0
- data/lib/decidim/has_category.rb +3 -3
- data/lib/decidim/has_conversations.rb +91 -0
- data/lib/decidim/participable.rb +17 -0
- data/lib/decidim/view_model.rb +1 -0
- data/lib/decidim/webpacker/webpack/.modernizrrc +9 -0
- data/lib/premailer/adapter/decidim.rb +5 -4
- data/lib/tasks/decidim_reminders_tasks.rake +1 -0
- data/lib/tasks/upgrade/decidim_deduplicate_endorsements.rake +53 -0
- data/lib/tasks/upgrade/decidim_fix_categorization.rake +15 -0
- data/lib/tasks/upgrade/decidim_fix_short_url_resolver.rake +22 -0
- metadata +37 -32
- data/app/helpers/decidim/layout_helper.rb.orig +0 -225
- data/app/packs/stylesheets/decidim/modules/_dropdown_menu.scss +0 -9
- data/app/views/decidim/devise/registrations/new.html.erb.orig +0 -231
- /data/{config/environment.rb → app/packs/images/decidim/.keep} +0 -0
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
- Marc Riera Casals
|
9
9
|
- Oriol Gual Oliva
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: active_link_to
|
@@ -74,14 +74,20 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 2.2.
|
77
|
+
version: 2.2.5
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 2.2.5
|
78
81
|
type: :runtime
|
79
82
|
prerelease: false
|
80
83
|
version_requirements: !ruby/object:Gem::Requirement
|
81
84
|
requirements:
|
82
85
|
- - "~>"
|
83
86
|
- !ruby/object:Gem::Version
|
84
|
-
version: 2.2.
|
87
|
+
version: 2.2.5
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 2.2.5
|
85
91
|
- !ruby/object:Gem::Dependency
|
86
92
|
name: cells-erb
|
87
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -366,20 +372,6 @@ dependencies:
|
|
366
372
|
- - "~>"
|
367
373
|
- !ruby/object:Gem::Version
|
368
374
|
version: '4.9'
|
369
|
-
- !ruby/object:Gem::Dependency
|
370
|
-
name: mustache
|
371
|
-
requirement: !ruby/object:Gem::Requirement
|
372
|
-
requirements:
|
373
|
-
- - "~>"
|
374
|
-
- !ruby/object:Gem::Version
|
375
|
-
version: 1.1.0
|
376
|
-
type: :runtime
|
377
|
-
prerelease: false
|
378
|
-
version_requirements: !ruby/object:Gem::Requirement
|
379
|
-
requirements:
|
380
|
-
- - "~>"
|
381
|
-
- !ruby/object:Gem::Version
|
382
|
-
version: 1.1.0
|
383
375
|
- !ruby/object:Gem::Dependency
|
384
376
|
name: omniauth
|
385
377
|
requirement: !ruby/object:Gem::Requirement
|
@@ -740,28 +732,28 @@ dependencies:
|
|
740
732
|
requirements:
|
741
733
|
- - '='
|
742
734
|
- !ruby/object:Gem::Version
|
743
|
-
version: 0.27.
|
744
|
-
type: :
|
735
|
+
version: 0.27.6
|
736
|
+
type: :development
|
745
737
|
prerelease: false
|
746
738
|
version_requirements: !ruby/object:Gem::Requirement
|
747
739
|
requirements:
|
748
740
|
- - '='
|
749
741
|
- !ruby/object:Gem::Version
|
750
|
-
version: 0.27.
|
742
|
+
version: 0.27.6
|
751
743
|
- !ruby/object:Gem::Dependency
|
752
744
|
name: decidim-dev
|
753
745
|
requirement: !ruby/object:Gem::Requirement
|
754
746
|
requirements:
|
755
747
|
- - '='
|
756
748
|
- !ruby/object:Gem::Version
|
757
|
-
version: 0.27.
|
749
|
+
version: 0.27.6
|
758
750
|
type: :development
|
759
751
|
prerelease: false
|
760
752
|
version_requirements: !ruby/object:Gem::Requirement
|
761
753
|
requirements:
|
762
754
|
- - '='
|
763
755
|
- !ruby/object:Gem::Version
|
764
|
-
version: 0.27.
|
756
|
+
version: 0.27.6
|
765
757
|
description: Adds core features so other engines can hook into the framework.
|
766
758
|
email:
|
767
759
|
- josepjaume@gmail.com
|
@@ -1041,6 +1033,7 @@ files:
|
|
1041
1033
|
- app/commands/decidim/validate_upload.rb
|
1042
1034
|
- app/constraints/decidim/current_component.rb
|
1043
1035
|
- app/controllers/concerns/decidim/amendments_controller.rb
|
1036
|
+
- app/controllers/concerns/decidim/devise_authentication_methods.rb
|
1044
1037
|
- app/controllers/concerns/decidim/devise_controllers.rb
|
1045
1038
|
- app/controllers/concerns/decidim/disable_redirection_to_external_host.rb
|
1046
1039
|
- app/controllers/concerns/decidim/filter_resource.rb
|
@@ -1201,7 +1194,6 @@ files:
|
|
1201
1194
|
- app/helpers/decidim/icon_helper.rb
|
1202
1195
|
- app/helpers/decidim/language_chooser_helper.rb
|
1203
1196
|
- app/helpers/decidim/layout_helper.rb
|
1204
|
-
- app/helpers/decidim/layout_helper.rb.orig
|
1205
1197
|
- app/helpers/decidim/localized_locales_helper.rb
|
1206
1198
|
- app/helpers/decidim/map_helper.rb
|
1207
1199
|
- app/helpers/decidim/markup_helper.rb
|
@@ -1309,6 +1301,7 @@ files:
|
|
1309
1301
|
- app/models/decidim/participatory_space_role_config/participatory_space_admin.rb
|
1310
1302
|
- app/models/decidim/participatory_space_role_config/valuator.rb
|
1311
1303
|
- app/models/decidim/permission_action.rb
|
1304
|
+
- app/models/decidim/push_notification_message.rb
|
1312
1305
|
- app/models/decidim/reminder.rb
|
1313
1306
|
- app/models/decidim/reminder_delivery.rb
|
1314
1307
|
- app/models/decidim/reminder_record.rb
|
@@ -1363,6 +1356,7 @@ files:
|
|
1363
1356
|
- app/packs/fonts/decidim/Source_Sans_Pro_900.ttf
|
1364
1357
|
- app/packs/fonts/decidim/Source_Sans_Pro_900.woff
|
1365
1358
|
- app/packs/fonts/decidim/Source_Sans_Pro_900.woff2
|
1359
|
+
- app/packs/images/decidim/.keep
|
1366
1360
|
- app/packs/images/decidim/avatar-multiuser.png
|
1367
1361
|
- app/packs/images/decidim/brands/google.svg
|
1368
1362
|
- app/packs/images/decidim/cc-badge.png
|
@@ -1396,6 +1390,7 @@ files:
|
|
1396
1390
|
- app/packs/images/decidim/vendor/social-share-button/wechat.svg
|
1397
1391
|
- app/packs/images/decidim/vendor/social-share-button/weibo.svg
|
1398
1392
|
- app/packs/images/decidim/vendor/social-share-button/whatsapp.svg
|
1393
|
+
- app/packs/images/decidim/vendor/social-share-button/x.svg
|
1399
1394
|
- app/packs/images/decidim/vendor/social-share-button/xing.svg
|
1400
1395
|
- app/packs/src/decidim/account_form.js
|
1401
1396
|
- app/packs/src/decidim/ajax_modals.js
|
@@ -1495,6 +1490,7 @@ files:
|
|
1495
1490
|
- app/packs/src/decidim/sw/sw.js
|
1496
1491
|
- app/packs/src/decidim/tooltip_keep_on_hover.js
|
1497
1492
|
- app/packs/src/decidim/user_registrations.js
|
1493
|
+
- app/packs/src/decidim/utilities/text.js
|
1498
1494
|
- app/packs/src/decidim/vendor/foundation-datepicker.js
|
1499
1495
|
- app/packs/src/decidim/vendor/image-resize.min.js
|
1500
1496
|
- app/packs/src/decidim/vendor/image-upload.min.js
|
@@ -1564,7 +1560,6 @@ files:
|
|
1564
1560
|
- app/packs/stylesheets/decidim/modules/_datepicker.scss
|
1565
1561
|
- app/packs/stylesheets/decidim/modules/_definition-data.scss
|
1566
1562
|
- app/packs/stylesheets/decidim/modules/_docs-manager.scss
|
1567
|
-
- app/packs/stylesheets/decidim/modules/_dropdown_menu.scss
|
1568
1563
|
- app/packs/stylesheets/decidim/modules/_extra.scss
|
1569
1564
|
- app/packs/stylesheets/decidim/modules/_filter-tags.scss
|
1570
1565
|
- app/packs/stylesheets/decidim/modules/_filters.scss
|
@@ -1750,6 +1745,7 @@ files:
|
|
1750
1745
|
- app/services/decidim/notifications_digest_sending_decider.rb
|
1751
1746
|
- app/services/decidim/notifications_subscriptions_persistor.rb
|
1752
1747
|
- app/services/decidim/open_data_exporter.rb
|
1748
|
+
- app/services/decidim/push_notification_message_sender.rb
|
1753
1749
|
- app/services/decidim/resource_search.rb
|
1754
1750
|
- app/services/decidim/send_push_notification.rb
|
1755
1751
|
- app/services/decidim/settings_change.rb
|
@@ -1828,7 +1824,6 @@ files:
|
|
1828
1824
|
- app/views/decidim/devise/passwords/edit.html.erb
|
1829
1825
|
- app/views/decidim/devise/passwords/new.html.erb
|
1830
1826
|
- app/views/decidim/devise/registrations/new.html.erb
|
1831
|
-
- app/views/decidim/devise/registrations/new.html.erb.orig
|
1832
1827
|
- app/views/decidim/devise/sessions/new.html.erb
|
1833
1828
|
- app/views/decidim/devise/shared/_links.html.erb
|
1834
1829
|
- app/views/decidim/devise/shared/_newsletter_modal.html.erb
|
@@ -2001,7 +1996,6 @@ files:
|
|
2001
1996
|
- app/views/layouts/decidim/widget.html.erb
|
2002
1997
|
- config/assets.rb
|
2003
1998
|
- config/brakeman.ignore
|
2004
|
-
- config/environment.rb
|
2005
1999
|
- config/initializers/active_support.rb
|
2006
2000
|
- config/initializers/browser.rb
|
2007
2001
|
- config/initializers/carrierwave.rb
|
@@ -2042,6 +2036,7 @@ files:
|
|
2042
2036
|
- config/locales/ga-IE.yml
|
2043
2037
|
- config/locales/gl.yml
|
2044
2038
|
- config/locales/gn-PY.yml
|
2039
|
+
- config/locales/he-IL.yml
|
2045
2040
|
- config/locales/hr-HR.yml
|
2046
2041
|
- config/locales/hr.yml
|
2047
2042
|
- config/locales/hu.yml
|
@@ -2076,9 +2071,11 @@ files:
|
|
2076
2071
|
- config/locales/sk.yml
|
2077
2072
|
- config/locales/sl.yml
|
2078
2073
|
- config/locales/so-SO.yml
|
2074
|
+
- config/locales/sq-AL.yml
|
2079
2075
|
- config/locales/sr-CS.yml
|
2080
2076
|
- config/locales/sv.yml
|
2081
2077
|
- config/locales/sw-KE.yml
|
2078
|
+
- config/locales/th-TH.yml
|
2082
2079
|
- config/locales/ti-ER.yml
|
2083
2080
|
- config/locales/tr-TR.yml
|
2084
2081
|
- config/locales/uk.yml
|
@@ -2296,8 +2293,10 @@ files:
|
|
2296
2293
|
- db/migrate/20220427142214_drop_emails_on_notifications_flag_from_user.rb
|
2297
2294
|
- db/migrate/20220518094535_add_previous_passwords_to_users.rb
|
2298
2295
|
- db/migrate/20220524195530_create_decidim_short_links.rb
|
2296
|
+
- db/migrate/20231027142329_change_default_value_for_decidim_endorsements.rb
|
2299
2297
|
- db/seeds.rb
|
2300
2298
|
- db/seeds/homepage_image.jpg
|
2299
|
+
- decidim-core.gemspec
|
2301
2300
|
- lib/decidim/action_authorization.rb
|
2302
2301
|
- lib/decidim/acts_as_author.rb
|
2303
2302
|
- lib/decidim/acts_as_tree.rb
|
@@ -2499,6 +2498,7 @@ files:
|
|
2499
2498
|
- lib/decidim/core/test/shared_examples/reportable.rb
|
2500
2499
|
- lib/decidim/core/test/shared_examples/reports_examples.rb
|
2501
2500
|
- lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb
|
2501
|
+
- lib/decidim/core/test/shared_examples/resource_locator_presenter_examples.rb
|
2502
2502
|
- lib/decidim/core/test/shared_examples/resource_search_examples.rb
|
2503
2503
|
- lib/decidim/core/test/shared_examples/resourceable.rb
|
2504
2504
|
- lib/decidim/core/test/shared_examples/rich_text_editor_examples.rb
|
@@ -2582,6 +2582,7 @@ files:
|
|
2582
2582
|
- lib/decidim/has_attachments.rb
|
2583
2583
|
- lib/decidim/has_category.rb
|
2584
2584
|
- lib/decidim/has_component.rb
|
2585
|
+
- lib/decidim/has_conversations.rb
|
2585
2586
|
- lib/decidim/has_private_users.rb
|
2586
2587
|
- lib/decidim/has_reference.rb
|
2587
2588
|
- lib/decidim/has_resource_permission.rb
|
@@ -2667,6 +2668,7 @@ files:
|
|
2667
2668
|
- lib/decidim/webpacker/postcss.config.js
|
2668
2669
|
- lib/decidim/webpacker/runner.rb
|
2669
2670
|
- lib/decidim/webpacker/thread_safe_compiler.rb
|
2671
|
+
- lib/decidim/webpacker/webpack/.modernizrrc
|
2670
2672
|
- lib/decidim/webpacker/webpack/base.js
|
2671
2673
|
- lib/decidim/webpacker/webpack/custom.js
|
2672
2674
|
- lib/decidim/webpacker/webpack/development.js
|
@@ -2688,22 +2690,25 @@ files:
|
|
2688
2690
|
- lib/tasks/decidim_reminders_tasks.rake
|
2689
2691
|
- lib/tasks/decidim_tasks.rake
|
2690
2692
|
- lib/tasks/decidim_webpacker_tasks.rake
|
2693
|
+
- lib/tasks/upgrade/decidim_deduplicate_endorsements.rake
|
2694
|
+
- lib/tasks/upgrade/decidim_fix_categorization.rake
|
2691
2695
|
- lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake
|
2696
|
+
- lib/tasks/upgrade/decidim_fix_short_url_resolver.rake
|
2692
2697
|
- lib/tasks/upgrade/decidim_moderation_tasks.rake
|
2693
2698
|
- lib/tasks/upgrade/decidim_user_moderation.rake
|
2694
2699
|
homepage: https://github.com/decidim/decidim
|
2695
2700
|
licenses:
|
2696
2701
|
- AGPL-3.0
|
2697
2702
|
metadata: {}
|
2698
|
-
post_install_message:
|
2703
|
+
post_install_message:
|
2699
2704
|
rdoc_options: []
|
2700
2705
|
require_paths:
|
2701
2706
|
- lib
|
2702
2707
|
required_ruby_version: !ruby/object:Gem::Requirement
|
2703
2708
|
requirements:
|
2704
|
-
- - "
|
2709
|
+
- - "~>"
|
2705
2710
|
- !ruby/object:Gem::Version
|
2706
|
-
version:
|
2711
|
+
version: 3.0.0
|
2707
2712
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2708
2713
|
requirements:
|
2709
2714
|
- - ">="
|
@@ -2711,7 +2716,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2711
2716
|
version: '0'
|
2712
2717
|
requirements: []
|
2713
2718
|
rubygems_version: 3.2.22
|
2714
|
-
signing_key:
|
2719
|
+
signing_key:
|
2715
2720
|
specification_version: 4
|
2716
2721
|
summary: The core of the Decidim framework.
|
2717
2722
|
test_files: []
|
@@ -1,225 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
# View helpers related to the layout.
|
5
|
-
module LayoutHelper
|
6
|
-
include Decidim::ModalHelper
|
7
|
-
include Decidim::TooltipHelper
|
8
|
-
|
9
|
-
# Public: Generates a set of meta tags that generate the different favicon
|
10
|
-
# versions for an organization.
|
11
|
-
#
|
12
|
-
# Returns a safe String with the versions.
|
13
|
-
def favicon
|
14
|
-
return if current_organization.favicon.blank?
|
15
|
-
|
16
|
-
safe_join(Decidim::OrganizationFaviconUploader::SIZES.map do |version, size|
|
17
|
-
favicon_link_tag(current_organization.attached_uploader(:favicon).variant_url(version, host: current_organization.host), sizes: "#{size}x#{size}")
|
18
|
-
end)
|
19
|
-
end
|
20
|
-
|
21
|
-
def apple_favicon
|
22
|
-
icon_image = current_organization.attached_uploader(:favicon).variant_url(:medium, host: current_organization.host)
|
23
|
-
return unless icon_image
|
24
|
-
|
25
|
-
favicon_link_tag(icon_image, rel: "apple-touch-icon", type: "image/png")
|
26
|
-
end
|
27
|
-
|
28
|
-
def legacy_favicon
|
29
|
-
variant = :favicon if current_organization.favicon.content_type != "image/vnd.microsoft.icon"
|
30
|
-
icon_image = current_organization.attached_uploader(:favicon).variant_url(variant, host: current_organization.host)
|
31
|
-
return unless icon_image
|
32
|
-
|
33
|
-
favicon_link_tag(icon_image, rel: "icon", sizes: "any", type: nil)
|
34
|
-
end
|
35
|
-
|
36
|
-
# Outputs an SVG-based icon.
|
37
|
-
#
|
38
|
-
# name - The String with the icon name.
|
39
|
-
# options - The Hash options used to customize the icon (default {}):
|
40
|
-
# :width - The Number of width in pixels (optional).
|
41
|
-
# :height - The Number of height in pixels (optional).
|
42
|
-
# :title - The title for the SVG element (optional, similar to alt for img)
|
43
|
-
# :aria_label - The String to set as aria label (optional).
|
44
|
-
# :aria_hidden - The Truthy value to enable aria_hidden (optional).
|
45
|
-
# :role - The String to set as the role (optional).
|
46
|
-
# :class - The String to add as a CSS class (optional).
|
47
|
-
#
|
48
|
-
# Returns a String.
|
49
|
-
def redesigned_icon(name, options = {})
|
50
|
-
default_html_properties = {
|
51
|
-
"width" => "1em",
|
52
|
-
"height" => "1em",
|
53
|
-
"role" => "img",
|
54
|
-
"aria-hidden" => "true"
|
55
|
-
}
|
56
|
-
|
57
|
-
html_properties = options.with_indifferent_access.transform_keys(&:dasherize).slice("width", "height", "aria-label", "role", "aria-hidden", "class", "style")
|
58
|
-
html_properties = default_html_properties.merge(html_properties)
|
59
|
-
|
60
|
-
href = Decidim.cors_enabled ? "" : asset_pack_path("media/images/remixicon.symbol.svg")
|
61
|
-
|
62
|
-
content_tag :svg, html_properties do
|
63
|
-
content_tag :use, nil, "href" => "#{href}#ri-#{name}", tabindex: -1
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def legacy_icon(name, options = {})
|
68
|
-
options = options.with_indifferent_access
|
69
|
-
html_properties = {}
|
70
|
-
|
71
|
-
html_properties["width"] = options[:width]
|
72
|
-
html_properties["height"] = options[:height]
|
73
|
-
html_properties["aria-label"] = options[:aria_label] || options[:"aria-label"]
|
74
|
-
html_properties["role"] = options[:role] || "img"
|
75
|
-
html_properties["aria-hidden"] = options[:aria_hidden] || options[:"aria-hidden"]
|
76
|
-
|
77
|
-
html_properties["class"] = (["icon--#{name}"] + _icon_classes(options)).join(" ")
|
78
|
-
|
79
|
-
title = options["title"] || html_properties["aria-label"]
|
80
|
-
if title.blank? && html_properties["role"] == "img"
|
81
|
-
# This will make the accessibility audit tools happy as with the "img"
|
82
|
-
# role, the alternative text (aria-label) and title are required for the
|
83
|
-
# element. This will also force the SVG to be hidden because otherwise
|
84
|
-
# the screen reader would announce the icon name which can be in
|
85
|
-
# different language (English) than the page language which is not
|
86
|
-
# allowed.
|
87
|
-
title = name
|
88
|
-
html_properties["aria-label"] = title
|
89
|
-
html_properties["aria-hidden"] = true
|
90
|
-
end
|
91
|
-
|
92
|
-
href = Decidim.cors_enabled ? "" : asset_pack_path("media/images/icons.svg")
|
93
|
-
|
94
|
-
content_tag :svg, html_properties do
|
95
|
-
inner = content_tag :title, title
|
96
|
-
inner += content_tag :use, nil, "href" => "#{href}#icon-#{name}"
|
97
|
-
|
98
|
-
inner
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
def icon(*args)
|
103
|
-
redesign_enabled? ? redesigned_icon(*args) : legacy_icon(*args)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Outputs a SVG icon from an external file. It apparently renders an image
|
107
|
-
# tag, but then a JS script kicks in and replaces it with an inlined SVG
|
108
|
-
# version.
|
109
|
-
#
|
110
|
-
# path - The asset's path
|
111
|
-
#
|
112
|
-
# Returns an <img /> tag with the SVG icon.
|
113
|
-
def external_icon(path, options = {})
|
114
|
-
classes = _icon_classes(options) + ["external-icon"]
|
115
|
-
|
116
|
-
if path.split(".").last == "svg"
|
117
|
-
icon_path = application_path(path)
|
118
|
-
return unless icon_path
|
119
|
-
|
120
|
-
attributes = { class: classes.join(" ") }.merge(options)
|
121
|
-
asset = File.read(icon_path)
|
122
|
-
asset.gsub("<svg ", "<svg#{tag_builder.tag_options(attributes)} ").html_safe
|
123
|
-
else
|
124
|
-
image_pack_tag(path, class: classes.join(" "), style: "display: none")
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
def application_path(path)
|
129
|
-
# Force the path to be returned without the protocol and host even when a
|
130
|
-
# custom asset host has been defined. The host parameter needs to be a
|
131
|
-
# non-nil because otherwise it will be set to the asset host at
|
132
|
-
# ActionView::Helpers::AssetUrlHelper#compute_asset_host.
|
133
|
-
img_path = asset_pack_path(path, host: "", protocol: :relative)
|
134
|
-
path = Rails.public_path.join(img_path.sub(%r{^/}, ""))
|
135
|
-
return unless File.exist?(path)
|
136
|
-
|
137
|
-
path
|
138
|
-
rescue ::Webpacker::Manifest::MissingEntryError
|
139
|
-
nil
|
140
|
-
end
|
141
|
-
|
142
|
-
# Allows to create role attribute according to accessibility rules
|
143
|
-
#
|
144
|
-
# Returns role attribute string if role option is specified
|
145
|
-
def role(options = {})
|
146
|
-
"role=\"#{options[:role]}\" " if options[:role]
|
147
|
-
end
|
148
|
-
|
149
|
-
def _icon_classes(options = {})
|
150
|
-
classes = options[:remove_icon_class] ? [] : ["icon"]
|
151
|
-
classes += [options[:class]]
|
152
|
-
classes.compact
|
153
|
-
end
|
154
|
-
|
155
|
-
def extended_navigation_bar(items, max_items: 5)
|
156
|
-
return unless items.any?
|
157
|
-
|
158
|
-
extra_items = items.slice((max_items + 1)..-1) || []
|
159
|
-
active_item = items.find { |item| item[:active] }
|
160
|
-
|
161
|
-
controller.view_context.render partial: "decidim/shared/extended_navigation_bar", locals: {
|
162
|
-
items:,
|
163
|
-
extra_items:,
|
164
|
-
active_item:,
|
165
|
-
max_items:
|
166
|
-
}
|
167
|
-
end
|
168
|
-
|
169
|
-
# Renders a view with the customizable CSS variables in two flavours:
|
170
|
-
# 1. as a hexadecimal valid CSS color (ie: #ff0000)
|
171
|
-
# 2. as a disassembled RGB components (ie: 255 0 0)
|
172
|
-
#
|
173
|
-
# Example:
|
174
|
-
#
|
175
|
-
# --primary: #ff0000;
|
176
|
-
# --primary-rgb: 255,0,0
|
177
|
-
#
|
178
|
-
# Hexadecimal variables can be used as a normal CSS color:
|
179
|
-
#
|
180
|
-
# color: var(--primary)
|
181
|
-
#
|
182
|
-
# While the disassembled variant can be used where you need to manipulate
|
183
|
-
# the color somehow (ie: adding a background transparency):
|
184
|
-
#
|
185
|
-
# background-color: rgba(var(--primary-rgb), 0.5)
|
186
|
-
def organization_colors
|
187
|
-
css = current_organization.colors.each.map { |k, v| "--#{k}: #{v};--#{k}-rgb: #{v[1..2].hex} #{v[3..4].hex} #{v[5..6].hex};" }.join
|
188
|
-
render partial: "layouts/decidim/organization_colors", locals: { css: }
|
189
|
-
end
|
190
|
-
|
191
|
-
<<<<<<< HEAD
|
192
|
-
def current_user_unread_data
|
193
|
-
return {} if current_user.blank?
|
194
|
-
|
195
|
-
{}.tap do |d|
|
196
|
-
d.merge!(unread_notifications: true) if current_user.notifications.any?
|
197
|
-
d.merge!(unread_conversations: true) if current_user.unread_conversations.any?
|
198
|
-
d.merge!(unread_items: d.present?)
|
199
|
-
end
|
200
|
-
end
|
201
|
-
|
202
|
-
||||||| parent of 53b6893e5c (Use local emojibase data instead of CDN)
|
203
|
-
=======
|
204
|
-
# Public: Gets the name of the webpacker entrypoint that will be used
|
205
|
-
# for the locale of the Emojibase NPM package, used with @picmo/popup-picker
|
206
|
-
#
|
207
|
-
# Returns a string with the entrypoint name
|
208
|
-
def emojibase_entrypoint_locale
|
209
|
-
entrypoint = Decidim::Webpacker.configuration.entrypoints.keys.select do |entry|
|
210
|
-
entry == "decidim_emojibase_#{I18n.locale}"
|
211
|
-
end
|
212
|
-
|
213
|
-
return "decidim_emojibase_en" if entrypoint.empty?
|
214
|
-
|
215
|
-
entrypoint.first
|
216
|
-
end
|
217
|
-
|
218
|
-
>>>>>>> 53b6893e5c (Use local emojibase data instead of CDN)
|
219
|
-
private
|
220
|
-
|
221
|
-
def tag_builder
|
222
|
-
@tag_builder ||= ActionView::Helpers::TagHelper::TagBuilder.new(self)
|
223
|
-
end
|
224
|
-
end
|
225
|
-
end
|