decidim-core 0.32.0.rc2 → 0.32.0
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/card_metadata_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/cta_settings_form/show.erb +1 -1
- data/app/cells/decidim/content_blocks/hero_settings_form/show.erb +1 -1
- 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 +9 -0
- data/app/events/decidim/amendable/amendment_base_event.rb +7 -1
- 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/member.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/breadcrumb_truncate/breadcrumb_truncate.test.js +230 -0
- data/app/packs/src/decidim/controllers/breadcrumb_truncate/controller.js +172 -0
- 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/main_menu/controller.js +33 -0
- data/app/packs/src/decidim/controllers/main_menu/main_menu.test.js +77 -0
- 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/editor/common/suggestion.js +3 -1
- data/app/packs/src/decidim/editor/extensions/indent/index.js +9 -0
- 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/_dropdown.scss +1 -1
- 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/_header.scss +41 -8
- 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.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb +31 -4
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile.html.erb +18 -13
- 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/initializers/decidim_locale_aware_named_route_helper.rb +16 -0
- data/config/locales/ar.yml +0 -25
- data/config/locales/bg.yml +0 -25
- data/config/locales/ca-IT.yml +46 -35
- data/config/locales/ca.yml +46 -35
- data/config/locales/cs.yml +12 -34
- data/config/locales/de.yml +5 -46
- data/config/locales/el.yml +0 -22
- data/config/locales/en.yml +45 -34
- data/config/locales/es-MX.yml +45 -34
- data/config/locales/es-PY.yml +45 -34
- data/config/locales/es.yml +45 -34
- data/config/locales/eu.yml +85 -74
- data/config/locales/fi-plain.yml +46 -34
- data/config/locales/fi.yml +46 -34
- data/config/locales/fr-CA.yml +24 -30
- data/config/locales/fr.yml +24 -30
- data/config/locales/gl.yml +0 -22
- data/config/locales/hu.yml +0 -22
- data/config/locales/id-ID.yml +0 -21
- data/config/locales/is-IS.yml +0 -6
- data/config/locales/it.yml +1 -20
- data/config/locales/ja.yml +55 -44
- data/config/locales/lb.yml +0 -23
- data/config/locales/lt.yml +0 -24
- data/config/locales/lv.yml +0 -21
- data/config/locales/nl.yml +0 -23
- data/config/locales/no.yml +0 -23
- data/config/locales/pl.yml +2 -27
- data/config/locales/pt-BR.yml +2 -40
- data/config/locales/pt.yml +0 -23
- data/config/locales/ro-RO.yml +1 -32
- data/config/locales/ru.yml +0 -8
- data/config/locales/sk.yml +1 -43
- data/config/locales/sv.yml +6 -40
- data/config/locales/tr-TR.yml +0 -24
- data/config/locales/uk.yml +0 -6
- data/config/locales/zh-CN.yml +0 -21
- data/config/locales/zh-TW.yml +0 -24
- data/decidim-core.gemspec +1 -1
- 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/amendable/amendment_event_examples.rb +2 -2
- data/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +3 -3
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +6 -6
- data/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb +2 -1
- data/lib/decidim/core/test/shared_examples/resource_liked_event_examples.rb +3 -3
- 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 +13 -9
- 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.32.0
|
|
4
|
+
version: 0.32.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -893,28 +893,28 @@ dependencies:
|
|
|
893
893
|
requirements:
|
|
894
894
|
- - '='
|
|
895
895
|
- !ruby/object:Gem::Version
|
|
896
|
-
version: 0.32.0
|
|
896
|
+
version: 0.32.0
|
|
897
897
|
type: :development
|
|
898
898
|
prerelease: false
|
|
899
899
|
version_requirements: !ruby/object:Gem::Requirement
|
|
900
900
|
requirements:
|
|
901
901
|
- - '='
|
|
902
902
|
- !ruby/object:Gem::Version
|
|
903
|
-
version: 0.32.0
|
|
903
|
+
version: 0.32.0
|
|
904
904
|
- !ruby/object:Gem::Dependency
|
|
905
905
|
name: decidim-dev
|
|
906
906
|
requirement: !ruby/object:Gem::Requirement
|
|
907
907
|
requirements:
|
|
908
908
|
- - '='
|
|
909
909
|
- !ruby/object:Gem::Version
|
|
910
|
-
version: 0.32.0
|
|
910
|
+
version: 0.32.0
|
|
911
911
|
type: :development
|
|
912
912
|
prerelease: false
|
|
913
913
|
version_requirements: !ruby/object:Gem::Requirement
|
|
914
914
|
requirements:
|
|
915
915
|
- - '='
|
|
916
916
|
- !ruby/object:Gem::Version
|
|
917
|
-
version: 0.32.0
|
|
917
|
+
version: 0.32.0
|
|
918
918
|
description: Adds core features so other engines can hook into the framework.
|
|
919
919
|
email:
|
|
920
920
|
- josepjaume@gmail.com
|
|
@@ -1256,7 +1256,6 @@ files:
|
|
|
1256
1256
|
- app/commands/decidim/delete_follow.rb
|
|
1257
1257
|
- app/commands/decidim/destroy_account.rb
|
|
1258
1258
|
- app/commands/decidim/destroy_ephemeral_user.rb
|
|
1259
|
-
- app/commands/decidim/gallery_methods.rb
|
|
1260
1259
|
- app/commands/decidim/invite_user.rb
|
|
1261
1260
|
- app/commands/decidim/invite_user_again.rb
|
|
1262
1261
|
- app/commands/decidim/like_resource.rb
|
|
@@ -1489,6 +1488,7 @@ files:
|
|
|
1489
1488
|
- app/mailers/decidim/application_mailer.rb
|
|
1490
1489
|
- app/mailers/decidim/block_user_mailer.rb
|
|
1491
1490
|
- app/mailers/decidim/decidim_devise_mailer.rb
|
|
1491
|
+
- app/mailers/decidim/delete_user_mailer.rb
|
|
1492
1492
|
- app/mailers/decidim/export_mailer.rb
|
|
1493
1493
|
- app/mailers/decidim/messaging/conversation_mailer.rb
|
|
1494
1494
|
- app/mailers/decidim/newsletter_mailer.rb
|
|
@@ -1646,6 +1646,8 @@ files:
|
|
|
1646
1646
|
- app/packs/src/decidim/controllers/account_form/controller.js
|
|
1647
1647
|
- app/packs/src/decidim/controllers/assign_role/assign_role.test.js
|
|
1648
1648
|
- app/packs/src/decidim/controllers/assign_role/controller.js
|
|
1649
|
+
- app/packs/src/decidim/controllers/breadcrumb_truncate/breadcrumb_truncate.test.js
|
|
1650
|
+
- app/packs/src/decidim/controllers/breadcrumb_truncate/controller.js
|
|
1649
1651
|
- app/packs/src/decidim/controllers/character_counter/controller.js
|
|
1650
1652
|
- app/packs/src/decidim/controllers/clipboard_copy/clipboard_copy.test.js
|
|
1651
1653
|
- app/packs/src/decidim/controllers/clipboard_copy/controller.js
|
|
@@ -1772,6 +1774,7 @@ files:
|
|
|
1772
1774
|
- app/packs/src/decidim/geocoding/provider/here.js
|
|
1773
1775
|
- app/packs/src/decidim/geocoding/provider/photon.js
|
|
1774
1776
|
- app/packs/src/decidim/geocoding/reverse_geocoding.js
|
|
1777
|
+
- app/packs/src/decidim/geocoding/reverse_geocoding.test.js
|
|
1775
1778
|
- app/packs/src/decidim/index.js
|
|
1776
1779
|
- app/packs/src/decidim/map.js
|
|
1777
1780
|
- app/packs/src/decidim/map/controller.js
|
|
@@ -1813,7 +1816,6 @@ files:
|
|
|
1813
1816
|
- app/packs/src/decidim/utilities/dom.js
|
|
1814
1817
|
- app/packs/src/decidim/utilities/text.js
|
|
1815
1818
|
- app/packs/src/decidim/vendor/jquery-tmpl.js
|
|
1816
|
-
- app/packs/src/decidim/vendor/tribute.js
|
|
1817
1819
|
- app/packs/stylesheets/decidim/_accordion.scss
|
|
1818
1820
|
- app/packs/stylesheets/decidim/_actions.scss
|
|
1819
1821
|
- app/packs/stylesheets/decidim/_activity.scss
|
|
@@ -1828,6 +1830,7 @@ files:
|
|
|
1828
1830
|
- app/packs/stylesheets/decidim/_datepicker.scss
|
|
1829
1831
|
- app/packs/stylesheets/decidim/_documents.scss
|
|
1830
1832
|
- app/packs/stylesheets/decidim/_dropdown.scss
|
|
1833
|
+
- app/packs/stylesheets/decidim/_editor_suggestions.scss
|
|
1831
1834
|
- app/packs/stylesheets/decidim/_emoji.scss
|
|
1832
1835
|
- app/packs/stylesheets/decidim/_filters.scss
|
|
1833
1836
|
- app/packs/stylesheets/decidim/_flash.scss
|
|
@@ -1869,9 +1872,9 @@ files:
|
|
|
1869
1872
|
- app/packs/stylesheets/decidim/_tabs_x.scss
|
|
1870
1873
|
- app/packs/stylesheets/decidim/_tags.scss
|
|
1871
1874
|
- app/packs/stylesheets/decidim/_toggle_switch.scss
|
|
1875
|
+
- app/packs/stylesheets/decidim/_tom_select.scss
|
|
1872
1876
|
- app/packs/stylesheets/decidim/_tooltip.scss
|
|
1873
1877
|
- app/packs/stylesheets/decidim/_tos.scss
|
|
1874
|
-
- app/packs/stylesheets/decidim/_tribute.scss
|
|
1875
1878
|
- app/packs/stylesheets/decidim/_typography.scss
|
|
1876
1879
|
- app/packs/stylesheets/decidim/_versions.scss
|
|
1877
1880
|
- app/packs/stylesheets/decidim/_vertical_tabs.scss
|
|
@@ -2062,6 +2065,7 @@ files:
|
|
|
2062
2065
|
- app/views/decidim/application/_radio_accordion.html.erb
|
|
2063
2066
|
- app/views/decidim/authorization_modals/show.html.erb
|
|
2064
2067
|
- app/views/decidim/block_user_mailer/notify.html.erb
|
|
2068
|
+
- app/views/decidim/delete_user_mailer/delete.html.erb
|
|
2065
2069
|
- app/views/decidim/devise/confirmations/new.html.erb
|
|
2066
2070
|
- app/views/decidim/devise/invitations/edit.html.erb
|
|
2067
2071
|
- app/views/decidim/devise/omniauth_registrations/new.html.erb
|
|
@@ -2129,7 +2133,6 @@ files:
|
|
|
2129
2133
|
- app/views/decidim/pages/index.html.erb
|
|
2130
2134
|
- app/views/decidim/pages/show.html.erb
|
|
2131
2135
|
- app/views/decidim/participants_account_mailer/inactivity_notification.html.erb
|
|
2132
|
-
- app/views/decidim/participants_account_mailer/removal_notification.html.erb
|
|
2133
2136
|
- app/views/decidim/participatory_space/members/_member.html.erb
|
|
2134
2137
|
- app/views/decidim/profiles/show.html.erb
|
|
2135
2138
|
- app/views/decidim/qr/show.html.erb
|
|
@@ -2238,6 +2241,7 @@ files:
|
|
|
2238
2241
|
- config/initializers/active_storage.rb
|
|
2239
2242
|
- config/initializers/active_support.rb
|
|
2240
2243
|
- config/initializers/browser.rb
|
|
2244
|
+
- config/initializers/decidim_locale_aware_named_route_helper.rb
|
|
2241
2245
|
- config/initializers/devise.rb
|
|
2242
2246
|
- config/initializers/invisible_captcha.rb
|
|
2243
2247
|
- config/initializers/omniauth.rb
|
|
@@ -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
|