decidim-core 0.31.5 → 0.31.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/amendable/amend_button_card/show.erb +2 -2
- data/app/cells/decidim/author_cell.rb +0 -4
- data/app/cells/decidim/content_blocks/cta_settings_form/show.erb +1 -1
- data/app/cells/decidim/content_blocks/hero_settings_form/show.erb +2 -2
- data/app/cells/decidim/content_blocks/highlighted_content_banner_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/highlighted_content_banner_settings_form/show.erb +1 -1
- data/app/cells/decidim/content_blocks/highlighted_participatory_spaces_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/participatory_space_hero_settings_form/show.erb +1 -1
- data/app/cells/decidim/content_blocks/static_page/section_settings_form/show.erb +3 -1
- data/app/cells/decidim/content_blocks/static_page/summary_settings_form/show.erb +3 -1
- data/app/cells/decidim/content_blocks/static_page/two_pane_section_settings_form/show.erb +4 -2
- data/app/cells/decidim/resource_types_filter/show.erb +2 -2
- data/app/commands/decidim/destroy_account.rb +12 -1
- data/app/commands/decidim/multiple_attachments_methods.rb +28 -27
- data/app/controllers/concerns/decidim/devise_controllers.rb +10 -0
- data/app/jobs/decidim/process_inactive_participant_job.rb +0 -7
- data/app/mailers/decidim/delete_user_mailer.rb +14 -0
- data/app/mailers/decidim/participants_account_mailer.rb +0 -16
- data/app/models/decidim/moderation.rb +1 -1
- data/app/models/decidim/participatory_space_private_user.rb +1 -1
- data/app/models/decidim/user_base_entity.rb +17 -2
- data/app/models/decidim/user_moderation.rb +1 -1
- data/app/packs/src/decidim/controllers/form_validator/form_validator.js +6 -6
- data/app/packs/src/decidim/controllers/form_validator/form_validator.test.js +23 -1
- data/app/packs/src/decidim/controllers/mention/controller.js +296 -140
- data/app/packs/src/decidim/controllers/mention/input_mentions.test.js +120 -457
- data/app/packs/src/decidim/controllers/multiple_mentions/controller.js +68 -32
- data/app/packs/src/decidim/controllers/multiple_mentions/input_multiple_mentions.test.js +30 -23
- data/app/packs/src/decidim/direct_uploads/upload_field.js +4 -4
- data/app/packs/src/decidim/direct_uploads/upload_modal.js +11 -7
- data/app/packs/src/decidim/geocoding/reverse_geocoding.js +15 -5
- data/app/packs/src/decidim/geocoding/reverse_geocoding.test.js +197 -0
- data/app/packs/src/decidim/index.js +4 -3
- data/app/packs/src/decidim/sw/sw.js +1 -1
- data/app/packs/src/decidim/utilities/text.js +6 -6
- data/app/packs/stylesheets/decidim/_conversations.scss +14 -0
- data/app/packs/stylesheets/decidim/_editor_suggestions.scss +49 -0
- data/app/packs/stylesheets/decidim/_floating_help.scss +1 -1
- data/app/packs/stylesheets/decidim/_tom_select.scss +23 -0
- data/app/packs/stylesheets/decidim/application.scss +2 -0
- data/app/packs/stylesheets/decidim/editor.scss +2 -33
- data/app/packs/stylesheets/decidim/geocoding_addons.scss +10 -2
- data/app/presenters/decidim/menu_item_presenter.rb +9 -3
- data/app/presenters/decidim/stats_presenter.rb +1 -1
- data/app/uploaders/decidim/image_uploader.rb +1 -1
- data/app/views/decidim/delete_user_mailer/delete.html.erb +6 -0
- data/app/views/decidim/gamification/badges/index.html.erb +1 -1
- data/app/views/decidim/homepage/show.html.erb +1 -1
- data/app/views/decidim/last_activities/index.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/_error_modal.html.erb +11 -19
- data/app/views/decidim/messaging/conversations/error.js.erb +12 -7
- data/app/views/decidim/newsletters/unsubscribe.html.erb +1 -1
- data/app/views/decidim/offline/show.html.erb +1 -1
- data/app/views/decidim/pages/index.html.erb +1 -1
- data/app/views/decidim/profiles/show.html.erb +1 -1
- data/app/views/decidim/shared/_resource_actions.html.erb +4 -4
- data/app/views/decidim/user_activities/index.html.erb +1 -1
- data/app/views/layouts/decidim/_wrapper.html.erb +2 -2
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_center.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_item.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_two_col.html.erb +1 -1
- data/config/locales/ar.yml +0 -5
- data/config/locales/bg.yml +0 -6
- data/config/locales/ca-IT.yml +9 -10
- data/config/locales/ca.yml +9 -10
- data/config/locales/cs.yml +2 -13
- data/config/locales/de.yml +5 -17
- data/config/locales/el.yml +0 -4
- data/config/locales/en.yml +8 -9
- data/config/locales/es-MX.yml +8 -9
- data/config/locales/es-PY.yml +8 -9
- data/config/locales/es.yml +8 -9
- data/config/locales/eu.yml +48 -49
- data/config/locales/fi-plain.yml +9 -9
- data/config/locales/fi.yml +9 -9
- data/config/locales/fr-CA.yml +9 -9
- data/config/locales/fr.yml +9 -9
- data/config/locales/gl.yml +0 -3
- data/config/locales/hu.yml +0 -5
- data/config/locales/id-ID.yml +0 -3
- data/config/locales/it.yml +1 -3
- data/config/locales/ja.yml +24 -21
- data/config/locales/lb.yml +0 -5
- data/config/locales/lt.yml +0 -5
- data/config/locales/lv.yml +0 -3
- data/config/locales/nl.yml +0 -5
- data/config/locales/no.yml +0 -5
- data/config/locales/pl.yml +2 -8
- data/config/locales/pt-BR.yml +2 -15
- data/config/locales/pt.yml +0 -5
- data/config/locales/ro-RO.yml +1 -14
- data/config/locales/sk.yml +1 -14
- data/config/locales/sv.yml +2 -11
- data/config/locales/tr-TR.yml +0 -6
- data/config/locales/zh-CN.yml +0 -5
- data/config/locales/zh-TW.yml +0 -5
- data/lib/decidim/api/functions/user_entity_list.rb +2 -0
- data/lib/decidim/attachment_attributes.rb +58 -9
- data/lib/decidim/command.rb +1 -1
- data/lib/decidim/content_renderers/base_renderer.rb +112 -0
- data/lib/decidim/content_renderers/blob_renderer.rb +4 -7
- data/lib/decidim/content_renderers/mention_resource_renderer.rb +10 -6
- data/lib/decidim/content_renderers/resource_renderer.rb +16 -7
- data/lib/decidim/content_renderers/user_renderer.rb +11 -9
- data/lib/decidim/core/content_blocks/registry_manager.rb +4 -4
- data/lib/decidim/core/engine.rb +8 -0
- data/lib/decidim/core/test/factories.rb +3 -0
- data/lib/decidim/core/test/shared_examples/admin_resource_gallery_examples.rb +10 -10
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +6 -6
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/map/autocomplete.rb +4 -3
- data/lib/decidim/searchable.rb +5 -0
- data/lib/decidim/view_model.rb +1 -1
- data/lib/tasks/decidim_mailers_tasks.rake +31 -9
- metadata +11 -10
- data/app/commands/decidim/gallery_methods.rb +0 -107
- data/app/packs/src/decidim/vendor/tribute.js +0 -1890
- data/app/packs/stylesheets/decidim/_tribute.scss +0 -36
- data/app/views/decidim/participants_account_mailer/removal_notification.html.erb +0 -11
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.31.
|
|
4
|
+
version: 0.31.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2026-
|
|
13
|
+
date: 2026-07-06 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: concurrent-ruby
|
|
@@ -828,28 +828,28 @@ dependencies:
|
|
|
828
828
|
requirements:
|
|
829
829
|
- - '='
|
|
830
830
|
- !ruby/object:Gem::Version
|
|
831
|
-
version: 0.31.
|
|
831
|
+
version: 0.31.6
|
|
832
832
|
type: :development
|
|
833
833
|
prerelease: false
|
|
834
834
|
version_requirements: !ruby/object:Gem::Requirement
|
|
835
835
|
requirements:
|
|
836
836
|
- - '='
|
|
837
837
|
- !ruby/object:Gem::Version
|
|
838
|
-
version: 0.31.
|
|
838
|
+
version: 0.31.6
|
|
839
839
|
- !ruby/object:Gem::Dependency
|
|
840
840
|
name: decidim-dev
|
|
841
841
|
requirement: !ruby/object:Gem::Requirement
|
|
842
842
|
requirements:
|
|
843
843
|
- - '='
|
|
844
844
|
- !ruby/object:Gem::Version
|
|
845
|
-
version: 0.31.
|
|
845
|
+
version: 0.31.6
|
|
846
846
|
type: :development
|
|
847
847
|
prerelease: false
|
|
848
848
|
version_requirements: !ruby/object:Gem::Requirement
|
|
849
849
|
requirements:
|
|
850
850
|
- - '='
|
|
851
851
|
- !ruby/object:Gem::Version
|
|
852
|
-
version: 0.31.
|
|
852
|
+
version: 0.31.6
|
|
853
853
|
description: Adds core features so other engines can hook into the framework.
|
|
854
854
|
email:
|
|
855
855
|
- josepjaume@gmail.com
|
|
@@ -1195,7 +1195,6 @@ files:
|
|
|
1195
1195
|
- app/commands/decidim/delete_follow.rb
|
|
1196
1196
|
- app/commands/decidim/destroy_account.rb
|
|
1197
1197
|
- app/commands/decidim/destroy_ephemeral_user.rb
|
|
1198
|
-
- app/commands/decidim/gallery_methods.rb
|
|
1199
1198
|
- app/commands/decidim/invite_user.rb
|
|
1200
1199
|
- app/commands/decidim/invite_user_again.rb
|
|
1201
1200
|
- app/commands/decidim/like_resource.rb
|
|
@@ -1430,6 +1429,7 @@ files:
|
|
|
1430
1429
|
- app/mailers/decidim/application_mailer.rb
|
|
1431
1430
|
- app/mailers/decidim/block_user_mailer.rb
|
|
1432
1431
|
- app/mailers/decidim/decidim_devise_mailer.rb
|
|
1432
|
+
- app/mailers/decidim/delete_user_mailer.rb
|
|
1433
1433
|
- app/mailers/decidim/export_mailer.rb
|
|
1434
1434
|
- app/mailers/decidim/messaging/conversation_mailer.rb
|
|
1435
1435
|
- app/mailers/decidim/newsletter_mailer.rb
|
|
@@ -1712,6 +1712,7 @@ files:
|
|
|
1712
1712
|
- app/packs/src/decidim/geocoding/provider/here.js
|
|
1713
1713
|
- app/packs/src/decidim/geocoding/provider/photon.js
|
|
1714
1714
|
- app/packs/src/decidim/geocoding/reverse_geocoding.js
|
|
1715
|
+
- app/packs/src/decidim/geocoding/reverse_geocoding.test.js
|
|
1715
1716
|
- app/packs/src/decidim/identity_selector_dialog.js
|
|
1716
1717
|
- app/packs/src/decidim/index.js
|
|
1717
1718
|
- app/packs/src/decidim/map.js
|
|
@@ -1754,7 +1755,6 @@ files:
|
|
|
1754
1755
|
- app/packs/src/decidim/utilities/dom.js
|
|
1755
1756
|
- app/packs/src/decidim/utilities/text.js
|
|
1756
1757
|
- app/packs/src/decidim/vendor/jquery-tmpl.js
|
|
1757
|
-
- app/packs/src/decidim/vendor/tribute.js
|
|
1758
1758
|
- app/packs/stylesheets/decidim/_accordion.scss
|
|
1759
1759
|
- app/packs/stylesheets/decidim/_actions.scss
|
|
1760
1760
|
- app/packs/stylesheets/decidim/_activity.scss
|
|
@@ -1769,6 +1769,7 @@ files:
|
|
|
1769
1769
|
- app/packs/stylesheets/decidim/_datepicker.scss
|
|
1770
1770
|
- app/packs/stylesheets/decidim/_documents.scss
|
|
1771
1771
|
- app/packs/stylesheets/decidim/_dropdown.scss
|
|
1772
|
+
- app/packs/stylesheets/decidim/_editor_suggestions.scss
|
|
1772
1773
|
- app/packs/stylesheets/decidim/_emoji.scss
|
|
1773
1774
|
- app/packs/stylesheets/decidim/_filters.scss
|
|
1774
1775
|
- app/packs/stylesheets/decidim/_flash.scss
|
|
@@ -1809,9 +1810,9 @@ files:
|
|
|
1809
1810
|
- app/packs/stylesheets/decidim/_tabs_x.scss
|
|
1810
1811
|
- app/packs/stylesheets/decidim/_tags.scss
|
|
1811
1812
|
- app/packs/stylesheets/decidim/_toggle_switch.scss
|
|
1813
|
+
- app/packs/stylesheets/decidim/_tom_select.scss
|
|
1812
1814
|
- app/packs/stylesheets/decidim/_tooltip.scss
|
|
1813
1815
|
- app/packs/stylesheets/decidim/_tos.scss
|
|
1814
|
-
- app/packs/stylesheets/decidim/_tribute.scss
|
|
1815
1816
|
- app/packs/stylesheets/decidim/_typography.scss
|
|
1816
1817
|
- app/packs/stylesheets/decidim/_versions.scss
|
|
1817
1818
|
- app/packs/stylesheets/decidim/_vertical_tabs.scss
|
|
@@ -2001,6 +2002,7 @@ files:
|
|
|
2001
2002
|
- app/views/decidim/application/_radio_accordion.html.erb
|
|
2002
2003
|
- app/views/decidim/authorization_modals/show.html.erb
|
|
2003
2004
|
- app/views/decidim/block_user_mailer/notify.html.erb
|
|
2005
|
+
- app/views/decidim/delete_user_mailer/delete.html.erb
|
|
2004
2006
|
- app/views/decidim/devise/confirmations/new.html.erb
|
|
2005
2007
|
- app/views/decidim/devise/invitations/edit.html.erb
|
|
2006
2008
|
- app/views/decidim/devise/omniauth_registrations/new.html.erb
|
|
@@ -2068,7 +2070,6 @@ files:
|
|
|
2068
2070
|
- app/views/decidim/pages/index.html.erb
|
|
2069
2071
|
- app/views/decidim/pages/show.html.erb
|
|
2070
2072
|
- app/views/decidim/participants_account_mailer/inactivity_notification.html.erb
|
|
2071
|
-
- app/views/decidim/participants_account_mailer/removal_notification.html.erb
|
|
2072
2073
|
- app/views/decidim/participatory_space_private_users/_participatory_space_private_user.html.erb
|
|
2073
2074
|
- app/views/decidim/profiles/show.html.erb
|
|
2074
2075
|
- app/views/decidim/qr/show.html.erb
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Decidim
|
|
4
|
-
# A module with all the gallery common methods
|
|
5
|
-
# Allows to create several image attachments at once
|
|
6
|
-
module GalleryMethods
|
|
7
|
-
private
|
|
8
|
-
|
|
9
|
-
def build_gallery(attached_to = nil)
|
|
10
|
-
@gallery = []
|
|
11
|
-
@form.add_photos.compact_blank.each do |photo|
|
|
12
|
-
if photo.is_a?(Hash) && photo.has_key?(:id)
|
|
13
|
-
update_attachment_title_for(photo)
|
|
14
|
-
next
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
@gallery << Attachment.new(
|
|
18
|
-
title: photos_title(photo),
|
|
19
|
-
attached_to: attached_to || gallery_attached_to,
|
|
20
|
-
file: photos_signed_id(photo), # Define attached_to before this
|
|
21
|
-
content_type: photos_content_type(photo)
|
|
22
|
-
)
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def update_attachment_title_for(photo)
|
|
27
|
-
Decidim::Attachment.find(photo[:id]).update(title: photos_title(photo))
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def image?(signed_id)
|
|
31
|
-
blob(signed_id).content_type.start_with? "image"
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def gallery_invalid?
|
|
35
|
-
@gallery.each do |photo|
|
|
36
|
-
if photo.invalid? && photo.errors.has_key?(:file)
|
|
37
|
-
@form.errors.add(:add_photos, photo.errors[:file])
|
|
38
|
-
return true
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
false
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def create_gallery(first_weight: 0)
|
|
45
|
-
weight = first_weight
|
|
46
|
-
# Add the weights first to the old photos
|
|
47
|
-
@form.photos.each do |photo|
|
|
48
|
-
photo.update!(weight:)
|
|
49
|
-
weight += 1
|
|
50
|
-
end
|
|
51
|
-
@gallery.map! do |photo|
|
|
52
|
-
photo.weight = weight
|
|
53
|
-
photo.attached_to = gallery_attached_to
|
|
54
|
-
photo.save!
|
|
55
|
-
weight += 1
|
|
56
|
-
@form.photos << photo
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def photo_cleanup!
|
|
61
|
-
gallery_attached_to.photos.each do |photo|
|
|
62
|
-
next unless @form.photos.map(&:id).exclude?(photo.id)
|
|
63
|
-
|
|
64
|
-
photo.destroy! if (@form.respond_to?(:documents) && @form.documents.map(&:id).exclude?(photo.id)) || !@form.respond_to?(:documents)
|
|
65
|
-
end
|
|
66
|
-
# manually reset cached photos
|
|
67
|
-
gallery_attached_to.reload
|
|
68
|
-
gallery_attached_to.instance_variable_set(:@photos, nil)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# maybe a custom settings options would be nice
|
|
72
|
-
def gallery_allowed?
|
|
73
|
-
true
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def process_gallery?
|
|
77
|
-
gallery_allowed? && @form.add_photos.any?
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
def gallery_attached_to
|
|
81
|
-
return @attached_to if @attached_to.present?
|
|
82
|
-
return form.current_organization if form.respond_to?(:current_organization)
|
|
83
|
-
|
|
84
|
-
form.current_component.organization if form.respond_to?(:current_component)
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
def photos_signed_id(photo)
|
|
88
|
-
return photo[:file] if photo.is_a?(Hash)
|
|
89
|
-
|
|
90
|
-
photo
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
def photos_title(photo)
|
|
94
|
-
return { I18n.locale => photo[:title] } if photo.is_a?(Hash) && photo.has_key?(:title)
|
|
95
|
-
|
|
96
|
-
{ I18n.locale => "" }
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
def photos_content_type(photo)
|
|
100
|
-
blob(photos_signed_id(photo)).content_type
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
def blob(signed_id)
|
|
104
|
-
ActiveStorage::Blob.find_signed(signed_id)
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|