decidim-core 0.30.0 → 0.30.2
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/activity/show.erb +6 -6
- data/app/cells/decidim/address/show.erb +3 -3
- data/app/cells/decidim/author/show.erb +1 -1
- data/app/cells/decidim/content_blocks/participatory_space_extra_data/extra_data.erb +2 -2
- data/app/cells/decidim/content_blocks/participatory_space_main_data/title.erb +11 -2
- data/app/cells/decidim/footer_topics/show.erb +2 -2
- data/app/cells/decidim/group_admins/show.erb +3 -1
- data/app/cells/decidim/group_members/show.erb +6 -2
- data/app/cells/decidim/images_panel/show.erb +5 -2
- data/app/cells/decidim/participatory_space_dropdown_metadata/metadata.erb +4 -4
- data/app/cells/decidim/report_button/flag_modal.erb +11 -9
- data/app/cells/decidim/report_user_button/flag_modal.erb +11 -10
- data/app/cells/decidim/upload_modal/files.erb +4 -4
- data/app/cells/decidim/upload_modal_cell.rb +5 -3
- data/app/commands/decidim/amendable/accept.rb +2 -1
- data/app/commands/decidim/create_omniauth_registration.rb +1 -1
- data/app/commands/decidim/create_report.rb +5 -1
- data/app/commands/decidim/invite_user.rb +1 -1
- data/app/controllers/concerns/decidim/participatory_space_context.rb +4 -1
- data/app/controllers/decidim/amendments_controller.rb +3 -3
- data/app/controllers/decidim/reports_controller.rb +6 -1
- data/app/forms/decidim/ephemeral_user_form.rb +1 -1
- data/app/forms/decidim/omniauth_registration_form.rb +1 -1
- data/app/forms/decidim/registration_form.rb +1 -1
- data/app/helpers/decidim/amendments_helper.rb +2 -1
- data/app/helpers/decidim/filters_helper.rb +25 -0
- data/app/helpers/decidim/layout_helper.rb +6 -0
- data/app/helpers/decidim/menu_helper.rb +2 -2
- data/app/helpers/decidim/paginate_helper.rb +1 -1
- data/app/helpers/decidim/tooltip_helper.rb +4 -1
- data/app/mailers/decidim/notifications_digest_mailer.rb +7 -1
- data/app/mailers/decidim/reported_mailer.rb +17 -2
- data/app/packs/images/decidim/default-avatar.svg +1 -1
- data/app/packs/src/decidim/callout.js +13 -8
- data/app/packs/src/decidim/confirm.js +15 -3
- data/app/packs/src/decidim/datepicker/generate_datepicker.js +2 -0
- data/app/packs/src/decidim/datepicker/generate_timepicker.js +2 -0
- data/app/packs/src/decidim/direct_uploads/upload_field.js +3 -4
- data/app/packs/src/decidim/direct_uploads/upload_modal.js +8 -9
- data/app/packs/src/decidim/dropdown_menu.js +18 -0
- data/app/packs/src/decidim/editor/common/suggestion.js +11 -1
- data/app/packs/src/decidim/index.js +1 -0
- data/app/packs/src/decidim/input_character_counter.js +1 -1
- data/app/packs/stylesheets/decidim/_activity.scss +4 -4
- data/app/packs/stylesheets/decidim/_cards.scss +4 -0
- data/app/packs/stylesheets/decidim/_filters.scss +1 -1
- data/app/packs/stylesheets/decidim/_header.scss +64 -37
- data/app/packs/stylesheets/decidim/_layout.scss +2 -2
- data/app/packs/stylesheets/decidim/_modal.scss +1 -5
- data/app/packs/stylesheets/decidim/_modal_update.scss +5 -1
- data/app/packs/stylesheets/decidim/resource_history.scss +14 -4
- data/app/permissions/decidim/default_permissions.rb +2 -0
- data/app/permissions/decidim/permissions.rb +13 -1
- data/app/presenters/decidim/notification_to_mailer_presenter.rb +7 -3
- data/app/queries/decidim/last_activity.rb +25 -0
- data/app/validators/translated_etiquette_validator.rb +2 -0
- data/app/views/decidim/errors/internal_server_error.html.erb +1 -1
- data/app/views/decidim/errors/not_found.html.erb +1 -1
- data/app/views/decidim/messaging/conversations/_reply_form.html.erb +1 -2
- data/app/views/decidim/messaging/conversations/_start.html.erb +1 -1
- data/app/views/decidim/newsletters/unsubscribe.html.erb +16 -4
- data/app/views/decidim/reported_mailer/hidden_manually.html.erb +25 -0
- data/app/views/decidim/searches/_filters.html.erb +48 -13
- data/app/views/decidim/shared/_component_announcement.html.erb +1 -1
- data/app/views/decidim/shared/_confirm_modal.html.erb +3 -5
- data/app/views/decidim/shared/_filters.html.erb +6 -4
- data/app/views/decidim/shared/_results_per_page.html.erb +1 -1
- data/app/views/kaminari/decidim/_page.html.erb +1 -1
- data/app/views/kaminari/decidim/_paginator.html.erb +1 -1
- data/app/views/layouts/decidim/_logo.html.erb +2 -2
- data/app/views/layouts/decidim/footer/_main.html.erb +1 -1
- data/app/views/layouts/decidim/footer/_main_intro.html.erb +1 -1
- data/app/views/layouts/decidim/footer/_mini.html.erb +2 -2
- data/app/views/layouts/decidim/header/_main.html.erb +2 -2
- data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +6 -0
- data/app/views/layouts/decidim/header/_main_links_dropdown.html.erb +2 -0
- data/app/views/layouts/decidim/header/_main_links_mobile_account.html.erb +1 -1
- data/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_desktop.html.erb +5 -11
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +5 -5
- data/app/views/layouts/decidim/header/_mobile_language_choose.html.erb +1 -1
- data/config/locales/ar.yml +0 -10
- data/config/locales/bg-BG.yml +2 -2
- data/config/locales/bg.yml +0 -12
- data/config/locales/ca-IT.yml +40 -6
- data/config/locales/ca.yml +40 -6
- data/config/locales/cs.yml +37 -17
- data/config/locales/de.yml +76 -29
- data/config/locales/el.yml +0 -11
- data/config/locales/en.yml +40 -6
- data/config/locales/es-MX.yml +41 -7
- data/config/locales/es-PY.yml +41 -7
- data/config/locales/es.yml +40 -6
- data/config/locales/eu.yml +82 -47
- data/config/locales/fi-plain.yml +65 -9
- data/config/locales/fi.yml +66 -10
- data/config/locales/fr-CA.yml +42 -13
- data/config/locales/fr-LU.yml +3 -3
- data/config/locales/fr.yml +42 -13
- data/config/locales/gl.yml +0 -8
- data/config/locales/hu.yml +0 -12
- data/config/locales/id-ID.yml +0 -8
- data/config/locales/is-IS.yml +0 -6
- data/config/locales/it.yml +165 -8
- data/config/locales/ja.yml +47 -14
- data/config/locales/lb-LU.yml +2 -2
- data/config/locales/lb.yml +0 -8
- data/config/locales/lt.yml +0 -12
- data/config/locales/lv.yml +0 -8
- data/config/locales/nl.yml +0 -8
- data/config/locales/no.yml +0 -8
- data/config/locales/pl.yml +0 -12
- data/config/locales/pt-BR.yml +0 -11
- data/config/locales/pt.yml +0 -8
- data/config/locales/ro-RO.yml +0 -18
- data/config/locales/ru.yml +0 -8
- data/config/locales/sk-SK.yml +3 -3
- data/config/locales/sk.yml +2 -8
- data/config/locales/sv.yml +63 -16
- data/config/locales/tr-TR.yml +0 -8
- data/config/locales/uk.yml +0 -7
- data/config/locales/zh-CN.yml +0 -8
- data/config/locales/zh-TW.yml +0 -12
- data/db/migrate/20171212103803_create_unique_nicknames.rb +1 -1
- data/db/migrate/20180221101934_fix_nickname_index.rb +1 -1
- data/db/migrate/20180706104107_add_nickname_to_managed_users.rb +1 -1
- data/db/migrate/20181001124950_move_users_groups_to_users_table.rb +1 -1
- data/db/migrate/20190412131728_fix_user_names.rb +1 -1
- data/lib/decidim/assets/tailwind/tailwind.config.js.erb +2 -1
- data/lib/decidim/core/test/factories.rb +14 -2
- data/lib/decidim/core/test/shared_examples/announcements_examples.rb +4 -0
- data/lib/decidim/core/test/shared_examples/comments_examples.rb +7 -5
- data/lib/decidim/core/test/shared_examples/map_examples.rb +2 -2
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/form_builder.rb +14 -0
- data/lib/decidim/nicknamizable.rb +6 -9
- data/lib/decidim/private_download_helper.rb +3 -3
- data/lib/tasks/upgrade/clean.rake +9 -1
- data/lib/tasks/upgrade/decidim_fix_nickname_uniqueness.rake +1 -1
- data/lib/tasks/upgrade/migrations.rake +2 -0
- metadata +9 -7
- /data/app/views/decidim/reported_mailer/{hide.html.erb → hidden_automatically.html.erb} +0 -0
data/config/locales/uk.yml
CHANGED
@@ -345,10 +345,8 @@ uk:
|
|
345
345
|
unsubscribe:
|
346
346
|
success: Ви успішно скасували підписку.
|
347
347
|
token_error: Строк дії посилання закінчився.
|
348
|
-
unsubscribe: Скасувати підписку
|
349
348
|
newsletters_opt_in_mailer:
|
350
349
|
notify:
|
351
|
-
body_1: Обробка особистих даних та їх захист стають дедалі важливішими для всіх нас. За новим "Загальним положенням про захист даних" (GDPR) від 25 травня 2018 року люди мають змогу керувати своїми особистими даними. Тому ми потребуємо вашої згоди, щоб продовжувати надсилати вам свіжі новини про діяльність %{organization_name}.
|
352
350
|
body_2: 'Як ви можете дати нам свою згоду? Просто натисніть цю кнопку:'
|
353
351
|
body_3: Погодившись, ви зможете продовжувати отримувати відомості про послуги нашого майданчику. Якщо ж ми не отримаємо вашої згоди, ми припинимо надсилати вам наші повідомлення. Якщо ви підтвердите, що хочете продовжувати отримувати новини, ви зможете потім в будь-який момент від них відмовитись.
|
354
352
|
button: Так, я хочу продовжувати отримувати новини
|
@@ -396,11 +394,6 @@ uk:
|
|
396
394
|
actions:
|
397
395
|
edit_profile: Редагувати профіль
|
398
396
|
reported_mailer:
|
399
|
-
hide:
|
400
|
-
hello: Доброго дня, %{name}%!
|
401
|
-
manage_moderations: Керувати діями з модерації
|
402
|
-
report_html: <p>Наступний <a href="%{url}">вміст</a> було автоматично приховано.</p>
|
403
|
-
subject: Ресурс було автоматично приховано
|
404
397
|
report:
|
405
398
|
hello: Доброго дня, %{name}%!
|
406
399
|
report_html: <p>Про наступний <a href="%{url}">вміст</a> було передано скаргу адміністраторам.</p>
|
data/config/locales/zh-CN.yml
CHANGED
@@ -568,7 +568,6 @@ zh-CN:
|
|
568
568
|
reject_invitation: 拒绝
|
569
569
|
group_members:
|
570
570
|
actions:
|
571
|
-
are_you_sure: 您确定吗?
|
572
571
|
promote_to_admin: 设为管理员
|
573
572
|
remove_from_group: Remove participant
|
574
573
|
index:
|
@@ -730,10 +729,8 @@ zh-CN:
|
|
730
729
|
unsubscribe:
|
731
730
|
success: 您已成功取消订阅。
|
732
731
|
token_error: 链接已过期。
|
733
|
-
unsubscribe: 取消订阅
|
734
732
|
newsletters_opt_in_mailer:
|
735
733
|
notify:
|
736
|
-
body_1: 个人数据的处理和对数据的保护对我们大家都越来越重要。 根据2018年5月25日新的《一般数据保护条例》,个人可以更好地控制自己的个人数据。 为此原因,我们需要您的“确定”继续发送有关 %{organization_name} 活动的信息。
|
737
734
|
body_2: '你如何能够给予我们同意?只需点击下面的按钮:'
|
738
735
|
body_3: 如果您同意,您将能够继续接收有关平台服务的信息。 相反,如果我们没有得到你的肯定确认,我们将停止向你发送我们的信息。 如果您确认要随时收到通知,您将随时有取消的选项。
|
739
736
|
button: 是的,我想继续收到相关信息
|
@@ -815,11 +812,6 @@ zh-CN:
|
|
815
812
|
manage_user_group_users: 管理成员
|
816
813
|
resend_email_confirmation_instructions: 重新发送电子邮件确认说明
|
817
814
|
reported_mailer:
|
818
|
-
hide:
|
819
|
-
hello: 您好 %{name},
|
820
|
-
manage_moderations: 管理版面
|
821
|
-
report_html: <p>以下 <a href="%{url}">内容</a> 已被自动隐藏。</p>
|
822
|
-
subject: 资源已自动隐藏
|
823
815
|
report:
|
824
816
|
authors: 作者
|
825
817
|
content: 报告的内容
|
data/config/locales/zh-TW.yml
CHANGED
@@ -546,8 +546,6 @@ zh-TW:
|
|
546
546
|
error: 上傳圖片時發生錯誤.
|
547
547
|
success: 圖片上傳成功.
|
548
548
|
drag_and_drop_help: 通過拖放或粘貼方式添加圖片。
|
549
|
-
endorsement_buttons_cell:
|
550
|
-
endorse: 喜歡!
|
551
549
|
endorsements:
|
552
550
|
identities:
|
553
551
|
done: 已完成
|
@@ -816,7 +814,6 @@ zh-TW:
|
|
816
814
|
title: 徽章是什麼?
|
817
815
|
group_admins:
|
818
816
|
actions:
|
819
|
-
are_you_sure: 確定嗎?這將不會將該參與者從該組中移除。
|
820
817
|
demote_admin: 移除管理員
|
821
818
|
demote:
|
822
819
|
error: 刪除此參與者的管理員名單時發生問題。
|
@@ -845,7 +842,6 @@ zh-TW:
|
|
845
842
|
error: 加入請求接受時發生問題.
|
846
843
|
success: 加入申請已成功接受.
|
847
844
|
actions:
|
848
|
-
are_you_sure: 您確定嗎?
|
849
845
|
promote_to_admin: 設為管理員
|
850
846
|
remove_from_group: 刪除該參與者
|
851
847
|
index:
|
@@ -1058,18 +1054,15 @@ zh-TW:
|
|
1058
1054
|
main_image: 主圖片
|
1059
1055
|
newsletters:
|
1060
1056
|
unsubscribe:
|
1061
|
-
check_subscription: 如果您想更改您的偏好設定,您可以在<a href="%{link}" target="_blank">配置頁面</a>進行更改。
|
1062
1057
|
error: 取消訂閱時發生問題.
|
1063
1058
|
success: 你已經成功取消訂閱
|
1064
1059
|
token_error: 該連結已過期。
|
1065
|
-
unsubscribe: 取消訂閱
|
1066
1060
|
newsletters_opt_in:
|
1067
1061
|
update:
|
1068
1062
|
error: 儲存通訊設定時出現問題。
|
1069
1063
|
success: 成功更新電子報設定.
|
1070
1064
|
newsletters_opt_in_mailer:
|
1071
1065
|
notify:
|
1072
|
-
body_1: 個人資料的處理和保護對我們所有人來說變得越來越重要。隨著2018年5月25日新的《通用數據保護條例》(GDPR)的出台,個人對其個人資料擁有更好的控制權。因此,我們需要您的「確認」,以繼續向您發送有關 %{organization_name} 活動的相關資訊。
|
1073
1066
|
body_2: '您如何給予我們您的同意?只需點擊下面的按鈕:'
|
1074
1067
|
body_3: 通過此同意,您將能夠繼續接收有關平台服務的資訊。如果您沒有給予積極的確認,我們將停止向您發送訊息。如果您確認希望繼續收到資訊,您隨時可以選擇取消訂閱。
|
1075
1068
|
button: 是的,我希望繼續接收相關資訊。
|
@@ -1217,11 +1210,6 @@ zh-TW:
|
|
1217
1210
|
confirmation_instructions_sent: 電子郵件確認指示已發送.
|
1218
1211
|
fill_in_email_to_confirm_it: 請填寫您的群組電子郵件以進行確認.
|
1219
1212
|
reported_mailer:
|
1220
|
-
hide:
|
1221
|
-
hello: 哈囉,%{name},
|
1222
|
-
manage_moderations: 管理版主
|
1223
|
-
report_html: <p>以下<a href="%{url}">內容</a>已自動隱藏。</p>
|
1224
|
-
subject: 一個資源已被自動隱藏。
|
1225
1213
|
report:
|
1226
1214
|
authors: 作者
|
1227
1215
|
content: 已檢舉內容
|
@@ -11,7 +11,7 @@ class CreateUniqueNicknames < ActiveRecord::Migration[5.1]
|
|
11
11
|
add_column :decidim_users, :nickname, :string, limit: 20
|
12
12
|
|
13
13
|
User.where.not(name: nil).find_each do |user|
|
14
|
-
user.update!(nickname: UserBaseEntity.nicknamize(user.name,
|
14
|
+
user.update!(nickname: UserBaseEntity.nicknamize(user.name, user.decidim_organization_id))
|
15
15
|
end
|
16
16
|
|
17
17
|
add_index :decidim_users,
|
@@ -11,7 +11,7 @@ class FixNicknameIndex < ActiveRecord::Migration[5.1]
|
|
11
11
|
User.where(nickname: nil)
|
12
12
|
.where(deleted_at: nil)
|
13
13
|
.where(managed: false)
|
14
|
-
.find_each { |u| u.update(nickname: UserBaseEntity.nicknamize(u.name,
|
14
|
+
.find_each { |u| u.update(nickname: UserBaseEntity.nicknamize(u.name, u.decidim_organization_id)) }
|
15
15
|
|
16
16
|
# rubocop:disable Rails/SkipsModelValidations
|
17
17
|
User.where(nickname: nil).update_all("nickname = ''")
|
@@ -7,7 +7,7 @@ class AddNicknameToManagedUsers < ActiveRecord::Migration[5.2]
|
|
7
7
|
|
8
8
|
def up
|
9
9
|
User.where(managed: true, nickname: nil).includes(:organization).find_each do |user|
|
10
|
-
user.nickname = UserBaseEntity.nicknamize(user.name,
|
10
|
+
user.nickname = UserBaseEntity.nicknamize(user.name, user.decidim_organization_id)
|
11
11
|
user.save
|
12
12
|
end
|
13
13
|
end
|
@@ -64,7 +64,7 @@ class MoveUsersGroupsToUsersTable < ActiveRecord::Migration[5.2]
|
|
64
64
|
verified_at: old_user_group.verified_at
|
65
65
|
}
|
66
66
|
new_attributes = clean_attributes.merge(
|
67
|
-
nickname: UserBaseEntity.nicknamize(clean_attributes["name"]),
|
67
|
+
nickname: UserBaseEntity.nicknamize(clean_attributes["name"], old_user_group.decidim_organization_id),
|
68
68
|
extended_data:
|
69
69
|
)
|
70
70
|
new_user_group = NewUserGroup.create!(new_attributes)
|
@@ -23,7 +23,7 @@ class FixUserNames < ActiveRecord::Migration[5.2]
|
|
23
23
|
|
24
24
|
entity.name = entity.name.delete(characters_to_remove).strip
|
25
25
|
sanitized_nickname = entity.nickname.delete(characters_to_remove).strip
|
26
|
-
entity.nickname = UserBaseEntity.nicknamize(sanitized_nickname,
|
26
|
+
entity.nickname = UserBaseEntity.nicknamize(sanitized_nickname, entity.decidim_organization_id)
|
27
27
|
entity.save(validate: false)
|
28
28
|
end
|
29
29
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// https://docs.decidim.org/en/develop/customize/styles
|
6
6
|
//
|
7
7
|
|
8
|
-
const { inherit, current, transparent, white } = require("tailwindcss/colors")
|
8
|
+
const { inherit, current, transparent, white, neutral } = require("tailwindcss/colors")
|
9
9
|
|
10
10
|
const withOpacity =
|
11
11
|
(variable) =>
|
@@ -33,6 +33,7 @@ module.exports = {
|
|
33
33
|
current,
|
34
34
|
transparent,
|
35
35
|
white,
|
36
|
+
neutral,
|
36
37
|
primary: withOpacity("--primary-rgb"),
|
37
38
|
secondary: withOpacity("--secondary-rgb"),
|
38
39
|
tertiary: withOpacity("--tertiary-rgb"),
|
@@ -127,8 +127,8 @@ FactoryBot.define do
|
|
127
127
|
sequence(:host) { |n| "#{n}.lvh.me" }
|
128
128
|
description { generate_localized_description(:organization_description, skip_injection:) }
|
129
129
|
favicon { Decidim::Dev.test_file("icon.png", "image/png") }
|
130
|
-
default_locale {
|
131
|
-
available_locales {
|
130
|
+
default_locale { "en" }
|
131
|
+
available_locales { %w(en ca es) }
|
132
132
|
users_registration_mode { :enabled }
|
133
133
|
official_img_footer { Decidim::Dev.test_file("avatar.jpg", "image/jpeg") }
|
134
134
|
official_url { Faker::Internet.url }
|
@@ -932,6 +932,18 @@ FactoryBot.define do
|
|
932
932
|
scopes { "public" }
|
933
933
|
end
|
934
934
|
|
935
|
+
factory :private_export, class: "Decidim::PrivateExport" do
|
936
|
+
transient do
|
937
|
+
skip_injection { false }
|
938
|
+
organization { create(:organization) }
|
939
|
+
end
|
940
|
+
expires_at { 1.week.from_now }
|
941
|
+
attached_to { create(:user, organization:, skip_injection:) }
|
942
|
+
export_type { "dummy" }
|
943
|
+
content_type { "application/zip" }
|
944
|
+
file_size { 10.kilobytes }
|
945
|
+
end
|
946
|
+
|
935
947
|
factory :searchable_resource, class: "Decidim::SearchableResource" do
|
936
948
|
transient do
|
937
949
|
skip_injection { false }
|
@@ -14,6 +14,8 @@ shared_examples "manage announcements" do
|
|
14
14
|
|
15
15
|
click_on "Update"
|
16
16
|
|
17
|
+
expect(page).to have_content "The component was updated successfully"
|
18
|
+
|
17
19
|
visit main_component_path(current_component)
|
18
20
|
|
19
21
|
within page.find("[data-announcement]", match: :first) do
|
@@ -48,6 +50,8 @@ shared_examples "manage announcements" do
|
|
48
50
|
|
49
51
|
click_on "Update"
|
50
52
|
|
53
|
+
expect(page).to have_content "The component was updated successfully"
|
54
|
+
|
51
55
|
visit main_component_path(current_component)
|
52
56
|
|
53
57
|
within page.find("[data-announcement]", match: :first) do
|
@@ -181,10 +181,10 @@ shared_examples "comments" do
|
|
181
181
|
click_on "Accept all"
|
182
182
|
login_as user, scope: :user
|
183
183
|
visit resource_path
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
184
|
+
if page.has_content?("Log in")
|
185
|
+
login_as user, scope: :user
|
186
|
+
visit resource_path
|
187
|
+
end
|
188
188
|
end
|
189
189
|
|
190
190
|
it "does not show a message so user can Log in or create an account" do
|
@@ -192,7 +192,7 @@ shared_examples "comments" do
|
|
192
192
|
end
|
193
193
|
|
194
194
|
it "shows a modal with the comment form" do
|
195
|
-
|
195
|
+
expect(page).to have_content("Add comment")
|
196
196
|
click_on "Add comment"
|
197
197
|
sleep 1
|
198
198
|
expect(page).to have_content("Add comment")
|
@@ -567,6 +567,8 @@ shared_examples "comments" do
|
|
567
567
|
field.native.send_keys content
|
568
568
|
click_on "Publish comment"
|
569
569
|
end
|
570
|
+
|
571
|
+
expect(page).to have_content(content)
|
570
572
|
end
|
571
573
|
|
572
574
|
it "shows comment to the user, updates the comments counter and clears the comment textarea" do
|
@@ -203,8 +203,8 @@ shared_examples "a record with front-end geocoding address field" do |geocoded_m
|
|
203
203
|
# geocoding should be bypassed in this situation which is why these match
|
204
204
|
# what was returned by the front-end geocoding. These values are returned by
|
205
205
|
# the dummy test geocoding API defined at
|
206
|
-
# `decidim-dev/lib/decidim/dev/test/
|
207
|
-
#
|
206
|
+
# `decidim-dev/lib/decidim/dev/test/map_server.rb`. Search for
|
207
|
+
# `serve_autocomplete`.
|
208
208
|
expect(page).to have_content("successfully")
|
209
209
|
final = if geocoded_record
|
210
210
|
geocoded_model.find(geocoded_record.id)
|
data/lib/decidim/core/version.rb
CHANGED
data/lib/decidim/form_builder.rb
CHANGED
@@ -92,6 +92,20 @@ module Decidim
|
|
92
92
|
safe_join [label_tabs, tabs_content]
|
93
93
|
end
|
94
94
|
|
95
|
+
def datetime_field(attribute, opts = {})
|
96
|
+
label = label_for(attribute)
|
97
|
+
opts.reverse_merge!(
|
98
|
+
data: {
|
99
|
+
"date-label": I18n.t("datetime.widget.label.date", label:),
|
100
|
+
"time-label": I18n.t("datetime.widget.label.time", label:),
|
101
|
+
"button-date-label": I18n.t("datetime.widget.picker.date_button", label:),
|
102
|
+
"button-time-label": I18n.t("datetime.widget.picker.time_button", label:)
|
103
|
+
}
|
104
|
+
)
|
105
|
+
|
106
|
+
super
|
107
|
+
end
|
108
|
+
|
95
109
|
def password_field(attribute, options = {})
|
96
110
|
field attribute, options do |opts|
|
97
111
|
opts[:autocomplete] ||= :off
|
@@ -27,19 +27,16 @@ module Decidim
|
|
27
27
|
# * Disambiguates it so it is unique.
|
28
28
|
#
|
29
29
|
# name - the String to nicknamize
|
30
|
-
#
|
30
|
+
# organization_id - the organization id we are using as scope for the uniqueness
|
31
31
|
#
|
32
32
|
# Example to nicknamize a user name, scoped to the organization:
|
33
33
|
#
|
34
|
-
# nicknamize(user_name,
|
34
|
+
# nicknamize(user_name, organization_id)
|
35
35
|
#
|
36
|
-
def nicknamize(name,
|
36
|
+
def nicknamize(name, organization_id)
|
37
37
|
return unless name
|
38
38
|
|
39
|
-
disambiguate(
|
40
|
-
name.parameterize(separator: "_")[nickname_length_range],
|
41
|
-
scope
|
42
|
-
)
|
39
|
+
disambiguate(name.parameterize(separator: "_")[nickname_length_range], organization_id)
|
43
40
|
end
|
44
41
|
|
45
42
|
private
|
@@ -48,11 +45,11 @@ module Decidim
|
|
48
45
|
(0...nickname_max_length)
|
49
46
|
end
|
50
47
|
|
51
|
-
def disambiguate(name,
|
48
|
+
def disambiguate(name, organization_id)
|
52
49
|
candidate = name
|
53
50
|
|
54
51
|
2.step do |n|
|
55
|
-
return candidate if Decidim::UserBaseEntity.where(nickname: candidate.downcase).where(
|
52
|
+
return candidate if Decidim::UserBaseEntity.where(nickname: candidate.downcase).where(decidim_organization_id: organization_id).empty?
|
56
53
|
|
57
54
|
candidate = numbered_variation_of(name, n)
|
58
55
|
end
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module PrivateDownloadHelper
|
5
|
-
def attach_archive(export_data,
|
5
|
+
def attach_archive(export_data, file_name, user, export_type = nil)
|
6
6
|
private_exports = user.private_exports.build
|
7
|
-
private_exports.export_type =
|
8
|
-
private_exports.file.attach(io: StringIO.open(FileZipper.new(export_data.filename(
|
7
|
+
private_exports.export_type = export_type || file_name
|
8
|
+
private_exports.file.attach(io: StringIO.open(FileZipper.new(export_data.filename(file_name), export_data.read).zip), filename: "#{file_name}.zip")
|
9
9
|
private_exports.expires_at = Decidim.download_your_data_expiry_time.from_now
|
10
10
|
private_exports.metadata = {}
|
11
11
|
private_exports.save!
|
@@ -11,7 +11,8 @@ namespace :decidim do
|
|
11
11
|
:"decidim:upgrade:clean:categories",
|
12
12
|
:"decidim:upgrade:clean:action_logs",
|
13
13
|
:"decidim:upgrade:clean:clean_deleted_users",
|
14
|
-
:"decidim:upgrade:clean:fix_blocked_user_notification"
|
14
|
+
:"decidim:upgrade:clean:fix_blocked_user_notification",
|
15
|
+
:"decidim:upgrade:clean:invalid_private_exports"
|
15
16
|
]
|
16
17
|
|
17
18
|
desc "Remove data from deleted users"
|
@@ -140,6 +141,13 @@ namespace :decidim do
|
|
140
141
|
logger.info("===== Updated #{blocked_users} blocked users")
|
141
142
|
end
|
142
143
|
|
144
|
+
desc "Removes all the invalid records from private downloads"
|
145
|
+
task invalid_private_exports: :environment do
|
146
|
+
invalid_private_exports = Decidim::PrivateExport.where("export_type ~ '^survey_user_answers_[0-9a-f]{64}$'")
|
147
|
+
logger.info("=== Removing #{invalid_private_exports.length} private exports")
|
148
|
+
invalid_private_exports.delete_all
|
149
|
+
end
|
150
|
+
|
143
151
|
def logger
|
144
152
|
@logger ||= Logger.new($stdout)
|
145
153
|
end
|
@@ -16,7 +16,7 @@ namespace :decidim do
|
|
16
16
|
has_changed << user.id
|
17
17
|
end
|
18
18
|
rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique
|
19
|
-
update_user_nickname(user, Decidim::UserBaseEntity.nicknamize(user.nickname,
|
19
|
+
update_user_nickname(user, Decidim::UserBaseEntity.nicknamize(user.nickname, user.decidim_organization_id))
|
20
20
|
has_changed << user.id
|
21
21
|
rescue ActiveRecord::RecordInvalid # rubocop:disable Lint/DuplicateRescueException
|
22
22
|
logger.warn("User ID (#{user.id}) : #{e}")
|
@@ -75,7 +75,9 @@ namespace :decidim do
|
|
75
75
|
end
|
76
76
|
|
77
77
|
new_source = "#{magic_comments}#{inserted_comment}#{source}"
|
78
|
+
|
78
79
|
old_source = File.binread(target_file)
|
80
|
+
old_source = old_source.gsub(/# This file has been modified by `decidim upgrade:migrations` task on (.*)\n/, "")
|
79
81
|
|
80
82
|
return if old_source == new_source
|
81
83
|
|
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.30.
|
4
|
+
version: 0.30.2
|
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: 2025-
|
13
|
+
date: 2025-09-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: concurrent-ruby
|
@@ -780,28 +780,28 @@ dependencies:
|
|
780
780
|
requirements:
|
781
781
|
- - '='
|
782
782
|
- !ruby/object:Gem::Version
|
783
|
-
version: 0.30.
|
783
|
+
version: 0.30.2
|
784
784
|
type: :development
|
785
785
|
prerelease: false
|
786
786
|
version_requirements: !ruby/object:Gem::Requirement
|
787
787
|
requirements:
|
788
788
|
- - '='
|
789
789
|
- !ruby/object:Gem::Version
|
790
|
-
version: 0.30.
|
790
|
+
version: 0.30.2
|
791
791
|
- !ruby/object:Gem::Dependency
|
792
792
|
name: decidim-dev
|
793
793
|
requirement: !ruby/object:Gem::Requirement
|
794
794
|
requirements:
|
795
795
|
- - '='
|
796
796
|
- !ruby/object:Gem::Version
|
797
|
-
version: 0.30.
|
797
|
+
version: 0.30.2
|
798
798
|
type: :development
|
799
799
|
prerelease: false
|
800
800
|
version_requirements: !ruby/object:Gem::Requirement
|
801
801
|
requirements:
|
802
802
|
- - '='
|
803
803
|
- !ruby/object:Gem::Version
|
804
|
-
version: 0.30.
|
804
|
+
version: 0.30.2
|
805
805
|
description: Adds core features so other engines can hook into the framework.
|
806
806
|
email:
|
807
807
|
- josepjaume@gmail.com
|
@@ -1606,6 +1606,7 @@ files:
|
|
1606
1606
|
- app/packs/src/decidim/direct_uploads/upload_modal.js
|
1607
1607
|
- app/packs/src/decidim/direct_uploads/upload_utility.js
|
1608
1608
|
- app/packs/src/decidim/direct_uploads/uploader.js
|
1609
|
+
- app/packs/src/decidim/dropdown_menu.js
|
1609
1610
|
- app/packs/src/decidim/editor/common/bubble_menu.js
|
1610
1611
|
- app/packs/src/decidim/editor/common/helpers.js
|
1611
1612
|
- app/packs/src/decidim/editor/common/input_dialog.js
|
@@ -2080,7 +2081,8 @@ files:
|
|
2080
2081
|
- app/views/decidim/pages/show.html.erb
|
2081
2082
|
- app/views/decidim/participatory_space_private_users/_participatory_space_private_user.html.erb
|
2082
2083
|
- app/views/decidim/profiles/show.html.erb
|
2083
|
-
- app/views/decidim/reported_mailer/
|
2084
|
+
- app/views/decidim/reported_mailer/hidden_automatically.html.erb
|
2085
|
+
- app/views/decidim/reported_mailer/hidden_manually.html.erb
|
2084
2086
|
- app/views/decidim/reported_mailer/report.html.erb
|
2085
2087
|
- app/views/decidim/searches/_count.html.erb
|
2086
2088
|
- app/views/decidim/searches/_filters.html.erb
|
File without changes
|