decidim-core 0.28.0 → 0.28.2
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/address/online.erb +27 -9
- data/app/cells/decidim/address/show.erb +27 -12
- data/app/cells/decidim/address_cell.rb +29 -0
- data/app/cells/decidim/announcement/show.erb +2 -2
- data/app/cells/decidim/author/show.erb +5 -5
- data/app/cells/decidim/authorization_modal/show.erb +8 -4
- data/app/cells/decidim/authorization_modal_cell.rb +1 -0
- data/app/cells/decidim/card/show.erb +1 -1
- data/app/cells/decidim/card_metadata/show.erb +2 -2
- data/app/cells/decidim/card_metadata_cell.rb +3 -3
- data/app/cells/decidim/coauthorships_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/menu_breadcrumb_last_activity_cell.rb +6 -0
- data/app/cells/decidim/content_blocks/participatory_space_hero_cell.rb +20 -4
- data/app/cells/decidim/content_blocks/participatory_space_hero_settings_form/show.erb +8 -0
- data/app/cells/decidim/content_blocks/participatory_space_hero_settings_form_cell.rb +13 -0
- data/app/cells/decidim/content_blocks/participatory_space_metadata_cell.rb +1 -1
- data/app/cells/decidim/data_consent/category.erb +1 -1
- data/app/cells/decidim/footer_pages_cell.rb +3 -3
- data/app/cells/decidim/nav_links/show.erb +2 -2
- data/app/cells/decidim/notification/moderated.erb +12 -0
- data/app/cells/decidim/notification_cell.rb +5 -1
- data/app/cells/decidim/profile/details.erb +1 -1
- data/app/cells/decidim/profile/tabs.erb +3 -2
- data/app/cells/decidim/progress_bar/show.erb +1 -1
- data/app/cells/decidim/progress_bar_cell.rb +2 -0
- data/app/cells/decidim/report_button/flag_modal.erb +5 -1
- data/app/cells/decidim/resource_types_filter/show.erb +3 -3
- data/app/cells/decidim/statistic/show.erb +2 -2
- data/app/cells/decidim/tags_cell.rb +3 -1
- data/app/cells/decidim/upload_modal/modal.erb +1 -2
- data/app/commands/decidim/create_omniauth_registration.rb +1 -3
- data/app/commands/decidim/messaging/reply_to_conversation.rb +3 -0
- data/app/commands/decidim/messaging/start_conversation.rb +3 -0
- data/app/controllers/concerns/decidim/devise_authentication_methods.rb +36 -0
- data/app/controllers/concerns/decidim/force_authentication.rb +1 -1
- data/app/controllers/concerns/decidim/paginable.rb +1 -1
- data/app/controllers/concerns/decidim/use_organization_time_zone.rb +1 -1
- data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +1 -22
- data/app/controllers/decidim/devise/sessions_controller.rb +1 -24
- data/app/controllers/decidim/gamification/badges_controller.rb +2 -0
- data/app/controllers/decidim/links_controller.rb +15 -2
- data/app/events/decidim/welcome_notification_event.rb +6 -9
- data/app/helpers/concerns/decidim/flash_helper_extensions.rb +2 -2
- data/app/helpers/decidim/application_helper.rb +0 -18
- data/app/helpers/decidim/cells_paginate_helper.rb +1 -1
- data/app/helpers/decidim/check_boxes_tree_helper.rb +7 -8
- data/app/helpers/decidim/layout_helper.rb +1 -1
- data/app/helpers/decidim/map_helper.rb +1 -1
- data/app/helpers/decidim/menu_helper.rb +2 -0
- data/app/helpers/decidim/newsletters_helper.rb +83 -16
- data/app/helpers/decidim/paginate_helper.rb +1 -1
- data/app/helpers/decidim/sanitize_helper.rb +9 -0
- data/app/helpers/decidim/social_share_button_helper.rb +1 -1
- data/app/helpers/decidim/user_profile_helper.rb +7 -2
- data/app/mailers/decidim/application_mailer.rb +40 -6
- data/app/mailers/decidim/messaging/conversation_mailer.rb +3 -72
- data/app/models/decidim/push_notification_message.rb +38 -0
- data/app/packs/entrypoints/decidim_overrides.scss +2 -0
- data/app/packs/images/decidim/.keep +0 -0
- data/app/packs/src/decidim/a11y.js +15 -1
- data/app/packs/src/decidim/abide_form_validator_fixer.js +44 -0
- data/app/packs/src/decidim/account_form.js +1 -1
- data/app/packs/src/decidim/data_consent/consent_manager.test.js +1 -1
- data/app/packs/src/decidim/data_consent/index.js +1 -1
- data/app/packs/src/decidim/direct_uploads/upload_field.js +1 -1
- data/app/packs/src/decidim/direct_uploads/upload_modal.js +5 -5
- data/app/packs/src/decidim/editor/extensions/hashtag/index.js +1 -1
- data/app/packs/src/decidim/editor/extensions/mention/index.js +1 -1
- data/app/packs/src/decidim/editor/extensions/video_embed/index.js +3 -0
- data/app/packs/src/decidim/editor/test/editor/create.test.js +1 -1
- data/app/packs/src/decidim/editor/test/extensions/bold.test.js +2 -3
- data/app/packs/src/decidim/editor/test/extensions/character_count.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/decidim_kit.test.js +2 -3
- data/app/packs/src/decidim/editor/test/extensions/dialog.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/emoji.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/hashtag.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/heading.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/image.test.js +4 -4
- data/app/packs/src/decidim/editor/test/extensions/indent.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/link.test.js +3 -3
- data/app/packs/src/decidim/editor/test/extensions/mention.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/ordered_list.test.js +2 -2
- data/app/packs/src/decidim/editor/test/extensions/video_embed.test.js +3 -3
- data/app/packs/src/decidim/editor/test/helpers.js +5 -4
- data/app/packs/src/decidim/editor/test/toolbar/basic.test.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/content.test.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/full.test.js +3 -3
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic.js +6 -6
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_block.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_formatting.js +1 -1
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_indent.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_link.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_list.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_styling.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_content.js +7 -7
- data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_content_styling.js +2 -2
- data/app/packs/src/decidim/editor/test/toolbar/shared/context.js +1 -1
- data/app/packs/src/decidim/editor/test/utilities/paste_transform.test.js +2 -2
- data/app/packs/src/decidim/external_domain_warning.js +13 -0
- data/app/packs/src/decidim/external_domain_warning.test.js +1 -1
- data/app/packs/src/decidim/external_link.js +48 -9
- data/app/packs/src/decidim/external_link.test.js +1 -1
- data/app/packs/src/decidim/focus_guard.js +8 -20
- data/app/packs/src/decidim/form_filter.component_for_testing.js +1 -1
- data/app/packs/src/decidim/form_filter.js +3 -3
- data/app/packs/src/decidim/geocoding/attach_input.js +1 -1
- data/app/packs/src/decidim/i18n.test.js +1 -1
- data/app/packs/src/decidim/index.js +33 -2
- 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/sw/index.js +3 -3
- data/app/packs/src/decidim/user_registrations.js +1 -1
- data/app/packs/src/decidim/vizzs/index.js +1 -1
- data/app/packs/stylesheets/decidim/_accordion.scss +2 -2
- data/app/packs/stylesheets/decidim/_cards.scss +4 -4
- data/app/packs/stylesheets/decidim/_dropdown.scss +2 -2
- data/app/packs/stylesheets/decidim/_layout.scss +7 -7
- data/app/packs/stylesheets/decidim/_modal_update.scss +1 -3
- data/app/packs/stylesheets/decidim/application.scss +0 -3
- data/app/packs/stylesheets/decidim/decidim_application.scss +4 -0
- data/app/packs/stylesheets/decidim/legacy/leaflet.scss +88 -107
- data/app/presenters/decidim/admin_log/oauth_application_resource_presenter.rb +1 -1
- data/app/presenters/decidim/admin_log/organization_presenter.rb +1 -1
- data/app/presenters/decidim/log/diff_presenter.rb +1 -1
- data/app/presenters/decidim/log/resource_presenter.rb +7 -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/iframe_disabler.rb +4 -0
- data/app/services/decidim/log/diff_changeset_calculator.rb +1 -1
- data/app/services/decidim/push_notification_message_sender.rb +40 -0
- data/app/services/decidim/send_push_notification.rb +22 -8
- data/app/uploaders/decidim/background_image_uploader.rb +11 -0
- data/app/views/decidim/account/show.html.erb +2 -2
- data/app/views/decidim/application/_collection.html.erb +2 -2
- data/app/views/decidim/application/_document.html.erb +3 -3
- data/app/views/decidim/devise/registrations/new.html.erb +2 -2
- data/app/views/decidim/endorsements/update_buttons_and_counters.js.erb +2 -1
- data/app/views/decidim/gamification/badges/index.html.erb +34 -33
- data/app/views/decidim/links/_modal.html.erb +1 -1
- data/app/views/decidim/links/new.html.erb +3 -1
- data/app/views/decidim/manifests/show.json.erb +1 -1
- data/app/views/decidim/messaging/conversations/create.js.erb +1 -1
- data/app/views/decidim/notifications_digest_mailer/_email_content.html.erb +7 -0
- data/app/views/decidim/notifications_settings/show.html.erb +6 -6
- data/app/views/decidim/offline/show.html.erb +15 -9
- data/app/views/decidim/pages/_tabbed.html.erb +2 -2
- data/app/views/decidim/searches/_filters.html.erb +2 -2
- data/app/views/decidim/shared/_filters.html.erb +2 -2
- data/app/views/decidim/shared/_orders.html.erb +2 -2
- data/app/views/decidim/shared/filters/_collection.html.erb +5 -3
- data/app/views/decidim/shared/filters/_dropdown_label.html.erb +21 -19
- data/app/views/layouts/decidim/_head.html.erb +1 -0
- data/app/views/layouts/decidim/_js_configuration.html.erb +3 -1
- data/app/views/layouts/decidim/_wrapper.html.erb +1 -1
- data/app/views/layouts/decidim/footer/_main_links.html.erb +3 -1
- data/app/views/layouts/decidim/footer/_main_social_media_links.html.erb +5 -5
- data/app/views/layouts/decidim/footer/_mini.html.erb +2 -2
- data/app/views/layouts/decidim/header/_main_links_desktop.html.erb +4 -2
- data/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb +2 -0
- data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +1 -1
- data/app/views/layouts/decidim/shared/_layout_user_profile.html.erb +2 -2
- data/config/assets.rb +1 -0
- data/config/locales/ar.yml +60 -8
- data/config/locales/bg.yml +909 -2
- data/config/locales/ca.yml +31 -24
- data/config/locales/cs.yml +7 -3
- data/config/locales/de.yml +37 -30
- data/config/locales/el.yml +11 -7
- data/config/locales/en.yml +10 -3
- data/config/locales/es-MX.yml +17 -10
- data/config/locales/es-PY.yml +17 -10
- data/config/locales/es.yml +59 -52
- data/config/locales/eu.yml +26 -10
- data/config/locales/fi-plain.yml +11 -4
- data/config/locales/fi.yml +14 -7
- data/config/locales/fr-CA.yml +14 -7
- data/config/locales/fr.yml +14 -7
- data/config/locales/ga-IE.yml +9 -0
- data/config/locales/gl.yml +5 -2
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/hu.yml +264 -8
- data/config/locales/id-ID.yml +0 -2
- data/config/locales/it.yml +9 -6
- data/config/locales/ja.yml +14 -7
- data/config/locales/kaa.yml +5 -0
- data/config/locales/lb.yml +9 -6
- data/config/locales/lt.yml +8 -12
- data/config/locales/lv.yml +8 -3
- data/config/locales/nl.yml +8 -3
- data/config/locales/no.yml +9 -6
- data/config/locales/pl.yml +616 -2
- data/config/locales/pt-BR.yml +202 -19
- data/config/locales/pt.yml +9 -6
- data/config/locales/ro-RO.yml +10 -5
- data/config/locales/ru.yml +15 -2
- data/config/locales/sk.yml +8 -3
- data/config/locales/sl.yml +8 -0
- data/config/locales/sv.yml +32 -6
- data/config/locales/tr-TR.yml +24 -9
- data/config/locales/uk.yml +22 -2
- data/config/locales/zh-CN.yml +0 -6
- data/config/locales/zh-TW.yml +10 -11
- data/decidim-core.gemspec +90 -0
- data/lib/decidim/asset_router/storage.rb +2 -0
- data/lib/decidim/attribute_encryptor.rb +6 -4
- data/lib/decidim/attributes/time_with_zone.rb +1 -1
- data/lib/decidim/core/engine.rb +7 -6
- data/lib/decidim/core/seeds.rb +37 -33
- data/lib/decidim/core/test/factories.rb +296 -89
- 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 +76 -6
- data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +8 -6
- data/lib/decidim/core/test/shared_examples/has_attachments.rb +8 -8
- 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 -1
- data/lib/decidim/core/test/shared_examples/logo_email.rb +2 -2
- data/lib/decidim/core/test/shared_examples/map_examples.rb +3 -0
- data/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +5 -2
- data/lib/decidim/core/test/shared_examples/resource_locator_presenter_examples.rb +134 -0
- data/lib/decidim/core/test/shared_examples/simple_event.rb +18 -2
- data/lib/decidim/core/test.rb +1 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +7 -1
- data/lib/decidim/engine_router.rb +17 -4
- data/lib/decidim/events/base_event.rb +7 -3
- data/lib/decidim/events/simple_event.rb +3 -17
- data/lib/decidim/form_builder.rb +8 -2
- data/lib/decidim/has_category.rb +1 -1
- data/lib/decidim/has_conversations.rb +91 -0
- data/lib/decidim/organization_settings.rb +10 -2
- data/lib/decidim/participable.rb +17 -0
- data/lib/decidim/upgrade/wysiwyg_migrator.rb +7 -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_fix_categorization.rake +15 -0
- metadata +26 -27
- data/app/views/decidim/searches/index.js.erb +0 -7
- data/config/brakeman.ignore +0 -37
- data/config/environment.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 524ec4d380f620c07119a6ccbee1b28408f6072799aa32cd74a1836f1ede5070
|
4
|
+
data.tar.gz: 4e1b60ce9a2cb9e340b0db3a22f66b326ade8f05cb8551352b39fe4198a06bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ff8135707ab3ae9aa1d483cd41d104385c079e8dcbd575c3c618ae05c524c345b340bd4b82c47eccf533dc98e187985ba76ddb2293332977449ed8af95b4b3
|
7
|
+
data.tar.gz: 9188473aa2d7c440f2aa773e9e08824b2c847f8a29a6d1d1ff75900e9a2fd325f860d80d8faad5d2498dc594f20b92ad9e8f7e6b98551ba9f68ffe24a879dcc1
|
@@ -1,9 +1,27 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<ul>
|
2
|
+
<li class="mb-4">
|
3
|
+
<div class="address__container">
|
4
|
+
<%= icon "map-pin-line" %>
|
5
|
+
<div class="address">
|
6
|
+
<div class="address__location"><%= t(model.type_of_meeting, scope: "decidim.meetings.meetings.filters.type_values") %></div>
|
7
|
+
<% if display_online_meeting_url? %>
|
8
|
+
<a href="<%= model.online_meeting_url %>" target="_blank" rel="noopener noreferrer" class="address__hints underline break-all">
|
9
|
+
<%= model.online_meeting_url %>
|
10
|
+
<% end %>
|
11
|
+
</a>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</li>
|
15
|
+
<% if display_start_and_end_time? %>
|
16
|
+
<li>
|
17
|
+
<div class="address__container">
|
18
|
+
<%= icon "time-line" %>
|
19
|
+
<div class="address">
|
20
|
+
<div class="address__location">
|
21
|
+
<%= start_and_end_time %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</li>
|
26
|
+
<% end %>
|
27
|
+
</ul>
|
@@ -1,14 +1,29 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<div class="
|
6
|
-
|
1
|
+
<ul>
|
2
|
+
<li class="mb-4">
|
3
|
+
<div class="address__container">
|
4
|
+
<%= icon "map-pin-line" %>
|
5
|
+
<div class="address">
|
6
|
+
<% if has_location? %>
|
7
|
+
<div class="address__location"><%= location %></div>
|
8
|
+
<% end %>
|
7
9
|
|
8
|
-
|
10
|
+
<div class="address__address"><%= address %></div>
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</div>
|
12
|
+
<% if has_location_hints? %>
|
13
|
+
<div class="address__hints"><%= location_hints %></div>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</li>
|
18
|
+
<% if display_start_and_end_time? %>
|
19
|
+
<li>
|
20
|
+
<div class="address__container">
|
21
|
+
<%= icon "time-line" %>
|
22
|
+
<div class="address">
|
23
|
+
<div class="address__location">
|
24
|
+
<%= start_and_end_time %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</li>
|
28
|
+
<% end %>
|
29
|
+
</ul>
|
@@ -32,5 +32,34 @@ module Decidim
|
|
32
32
|
def address
|
33
33
|
decidim_sanitize(translated_attribute(model.address))
|
34
34
|
end
|
35
|
+
|
36
|
+
def display_start_and_end_time?
|
37
|
+
model.respond_to?(:start_time) && model.respond_to?(:end_time)
|
38
|
+
end
|
39
|
+
|
40
|
+
def start_and_end_time
|
41
|
+
<<~HTML
|
42
|
+
#{with_tooltip(l(model.start_time, format: :tooltip)) { start_time }}
|
43
|
+
-
|
44
|
+
#{with_tooltip(l(model.end_time, format: :tooltip)) { end_time }}
|
45
|
+
HTML
|
46
|
+
end
|
47
|
+
|
48
|
+
def display_online_meeting_url?
|
49
|
+
return true unless model.respond_to?(:online?)
|
50
|
+
return true unless model.respond_to?(:iframe_access_level_allowed_for_user?)
|
51
|
+
|
52
|
+
model.online? && model.iframe_access_level_allowed_for_user?(current_user)
|
53
|
+
end
|
54
|
+
|
55
|
+
private
|
56
|
+
|
57
|
+
def start_time
|
58
|
+
l model.start_time, format: "%H:%M %p"
|
59
|
+
end
|
60
|
+
|
61
|
+
def end_time
|
62
|
+
l model.end_time, format: "%H:%M %p %Z"
|
63
|
+
end
|
35
64
|
end
|
36
65
|
end
|
@@ -1,16 +1,16 @@
|
|
1
1
|
<% data = has_tooltip? ? { tooltip: render(:profile_minicard).html_safe } : nil %>
|
2
|
-
<
|
3
|
-
<%= content_tag :
|
2
|
+
<span class="author" data-author>
|
3
|
+
<%= content_tag :span, class: "author__container#{" is-compact" if layout == :compact}", data: do %>
|
4
4
|
<% if layout == :compact %>
|
5
5
|
<%= render :avatar %>
|
6
6
|
|
7
|
-
<
|
7
|
+
<span>
|
8
8
|
<%= render :name %>
|
9
9
|
|
10
10
|
<% context_actions.each do |action| %>
|
11
11
|
<%= render action %>
|
12
12
|
<% end %>
|
13
|
-
</
|
13
|
+
</span>
|
14
14
|
<% elsif layout == :avatar %>
|
15
15
|
<%= render :avatar %>
|
16
16
|
<% else %>
|
@@ -24,4 +24,4 @@
|
|
24
24
|
<%= render action %>
|
25
25
|
<% end %>
|
26
26
|
<% end %>
|
27
|
-
</
|
27
|
+
</span>
|
@@ -1,6 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% add_decidim_page_title(title) %>
|
2
|
+
|
3
|
+
<main data-dialog-container class="text-center mt-8">
|
4
|
+
<div class="flex justify-center">
|
5
|
+
<%= icon "lock-line", class: "w-20 h-20" %>
|
6
|
+
</div>
|
7
|
+
<h1 tabindex="-1" class="h1" data-dialog-title><%= title %></h1>
|
4
8
|
<div>
|
5
9
|
<div class="authorization-modal__verification-container">
|
6
10
|
<% verifications.each do |verification| %>
|
@@ -25,4 +29,4 @@
|
|
25
29
|
<% end %>
|
26
30
|
</div>
|
27
31
|
</div>
|
28
|
-
</
|
32
|
+
</main>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="py-4 space-y-2">
|
2
|
-
<a href="" class="text-lg text-secondary font-semibold hover:underline"><%= title %></a>
|
2
|
+
<a href="" class="text-lg text-secondary font-semibold hover:underline"><%= decidim_html_escape(title) %></a>
|
3
3
|
<div class="flex items-center divide-x divide-gray-3">
|
4
4
|
<% metadata.first(4).each do |item| %>
|
5
5
|
<div class="flex items-center gap-1 px-4 lg:px-6 first:pl-0 last:pr-0 max-w-xs">
|
@@ -3,12 +3,12 @@
|
|
3
3
|
<% hook_output = render_hook(item[:hook]) %>
|
4
4
|
<% next if hook_output.blank? %>
|
5
5
|
|
6
|
-
<%= content_tag :
|
6
|
+
<%= content_tag :div, data: item[:data_attributes] do %>
|
7
7
|
<%= icon item[:icon] if item[:icon].present? %>
|
8
8
|
<%= hook_output %>
|
9
9
|
<% end %>
|
10
10
|
<% else %>
|
11
|
-
<%= content_tag :
|
11
|
+
<%= content_tag :div, data: item[:data_attributes] do %>
|
12
12
|
<%= icon item[:icon] if item[:icon].present? %>
|
13
13
|
<% if item[:text].present? %>
|
14
14
|
<%= link_to_if enable_links? && item.has_key?(:url), item[:text], item[:url] %>
|
@@ -75,7 +75,7 @@ module Decidim
|
|
75
75
|
|
76
76
|
{
|
77
77
|
cell: "decidim/coauthorships",
|
78
|
-
args: [resource, { stack: true }]
|
78
|
+
args: [resource, { stack: true, context_actions: [] }]
|
79
79
|
}
|
80
80
|
end
|
81
81
|
|
@@ -105,11 +105,11 @@ module Decidim
|
|
105
105
|
}
|
106
106
|
end
|
107
107
|
|
108
|
-
def
|
108
|
+
def start_date_item
|
109
109
|
return if dates_blank?
|
110
110
|
|
111
111
|
{
|
112
|
-
text:
|
112
|
+
text: I18n.l(start_date, format: "%H:%M %p %Z"),
|
113
113
|
icon: "time-line"
|
114
114
|
}
|
115
115
|
end
|
@@ -5,6 +5,12 @@ module Decidim
|
|
5
5
|
# A cell to be rendered as a content block with the latest activities performed
|
6
6
|
# in a Decidim Organization.
|
7
7
|
class MenuBreadcrumbLastActivityCell < LastActivityCell
|
8
|
+
def show
|
9
|
+
return if current_user.blank? && current_organization&.force_users_to_authenticate_before_access_organization
|
10
|
+
|
11
|
+
super
|
12
|
+
end
|
13
|
+
|
8
14
|
private
|
9
15
|
|
10
16
|
def activities
|
@@ -7,19 +7,35 @@ module Decidim
|
|
7
7
|
include Decidim::TranslationsHelper
|
8
8
|
include Decidim::TwitterSearchHelper
|
9
9
|
|
10
|
-
|
10
|
+
delegate :title, :hashtag, :attached_uploader, to: :resource
|
11
11
|
|
12
|
-
|
12
|
+
def cta_text
|
13
|
+
return unless model
|
14
|
+
|
15
|
+
@cta_text ||= translated_attribute(model.settings.button_text).presence
|
16
|
+
end
|
17
|
+
|
18
|
+
def cta_path
|
19
|
+
return unless model
|
20
|
+
|
21
|
+
@cta_path ||= translated_attribute(model.settings.button_url).presence
|
22
|
+
end
|
13
23
|
|
14
24
|
def title_text
|
15
|
-
|
25
|
+
decidim_escape_translated(title)
|
16
26
|
end
|
17
27
|
|
18
28
|
def subtitle_text
|
19
|
-
|
29
|
+
return unless resource.respond_to?(:subtitle)
|
30
|
+
|
31
|
+
decidim_escape_translated(resource.subtitle)
|
20
32
|
end
|
21
33
|
|
34
|
+
# If it is called from the landing page content block, use the background image defined there
|
35
|
+
# Else, use the banner image defined in the space (for assemblies)
|
22
36
|
def image_path
|
37
|
+
return model.images_container.attached_uploader(:background_image).path if model.respond_to?(:images_container)
|
38
|
+
|
23
39
|
attached_uploader(:banner_image).path
|
24
40
|
end
|
25
41
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% form.fields_for :settings, form.object.settings do |settings_fields| %>
|
2
|
+
<%= settings_fields.translated :text_field, :button_text, label: t("decidim.content_blocks.cta_settings_form.button_text") %>
|
3
|
+
<%= settings_fields.translated :text_field, :button_url, label: t("decidim.content_blocks.cta_settings_form.button_url") %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% form.fields_for :images, form.object.images do |images_fields| %>
|
7
|
+
<%= images_fields.upload :background_image, label: t("decidim.content_blocks.cta_settings_form.background_image") %>
|
8
|
+
<% end %>
|
@@ -11,7 +11,7 @@ module Decidim
|
|
11
11
|
|
12
12
|
def metadata_valued_items
|
13
13
|
metadata_items.filter_map do |item|
|
14
|
-
next if (value =
|
14
|
+
next if (value = decidim_escape_translated(presented_space.send(item))).blank?
|
15
15
|
|
16
16
|
{
|
17
17
|
title: t(item, scope: translations_scope),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="cookies__category-trigger">
|
3
3
|
<label for="dc-<%= category[:slug] %>" class="cookies__category-toggle">
|
4
4
|
<input
|
5
|
-
|
5
|
+
<%== %(checked="checked") if category[:mandatory] %>
|
6
6
|
id="dc-<%= category[:slug] %>"
|
7
7
|
type="checkbox"
|
8
8
|
name="<%= category[:slug] %>"
|
@@ -42,7 +42,7 @@ module Decidim
|
|
42
42
|
.static_pages_accessible_for(current_user)
|
43
43
|
.where(show_in_footer: true, topic_id: nil)
|
44
44
|
.where.not(slug: "terms-and-conditions").map do |page|
|
45
|
-
{ title:
|
45
|
+
{ title: decidim_escape_translated(page.title), path: decidim.page_path(page) }
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -51,9 +51,9 @@ module Decidim
|
|
51
51
|
next if (topic_pages = topic.accessible_pages_for(current_user).where(show_in_footer: true)).blank?
|
52
52
|
|
53
53
|
{
|
54
|
-
title:
|
54
|
+
title: decidim_escape_translated(topic.title),
|
55
55
|
pages: topic_pages.map do |page|
|
56
|
-
{ title:
|
56
|
+
{ title: decidim_escape_translated(page.title), path: decidim.page_path(page) }
|
57
57
|
end
|
58
58
|
}
|
59
59
|
end.compact
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="participatory-space__nav-container">
|
2
|
-
<button id="dropdown-trigger-participatory-space" data-component="dropdown" data-target="dropdown-menu-participatory-space" data-auto-close="true" data-
|
2
|
+
<button id="dropdown-trigger-participatory-space" data-component="dropdown" data-target="dropdown-menu-participatory-space" data-auto-close="true" data-scroll-to-menu="true">
|
3
3
|
<span><%= t("decidim.searches.filters.jump_to") %></span>
|
4
4
|
<%= icon "arrow-down-s-line" %>
|
5
5
|
<%= icon "arrow-up-s-line" %>
|
6
6
|
</button>
|
7
|
-
<ul id="dropdown-menu-participatory-space" class="participatory-space__nav">
|
7
|
+
<ul id="dropdown-menu-participatory-space" class="participatory-space__nav" aria-hidden="true">
|
8
8
|
<% model.each do |item| %>
|
9
9
|
<li>
|
10
10
|
<%= link_to item[:url], class: "participatory-space__nav-item" do %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="notification" data-notification>
|
2
|
+
<div class="notification__wrapper">
|
3
|
+
<div class="notification__time" title="<%= l(notification.created_at) %>"> <%= notification.created_at_in_words %></div>
|
4
|
+
<div class="notification__snippet">
|
5
|
+
<span class="notification__snippet-title text-gray"><%= t("decidim.notifications.show.moderated") %></span>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<%= link_to model, remote: true, method: :delete, class: "notification__button", data: { "notification-read": "" } do %>
|
9
|
+
<span class="sr-only md:not-sr-only"><%= t("mark_as_read", scope: "layouts.decidim.notifications_dashboard") %></span>
|
10
|
+
<%= icon "check-line", class: "fill-current" %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<% tab_items.each do |tab_item| %>
|
2
|
-
|
3
|
-
|
2
|
+
<% active_link = is_active_link?(tab_item[:path]) %>
|
3
|
+
<li class="profile__tab<%= " is-active" if active_link %>">
|
4
|
+
<%= link_to tab_item[:path], title: tab_item[:text], class: "profile__tab-item", aria: { current: active_link ? "page" : nil } do %>
|
4
5
|
<%= icon tab_item[:icon] %>
|
5
6
|
<span><%= tab_item[:text] %></span>
|
6
7
|
<% if tab_item[:count].present? %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= content_tag :div, units_name_text, class: "progress-bar__units" if units_name %>
|
8
8
|
|
9
9
|
<% if total != 0 %>
|
10
|
-
<div class="progress-bar" role="progressbar"
|
10
|
+
<div class="progress-bar" role="progressbar" aria-label="<%= units_name.present? ? units_name_text : t("decidim.shared.progress") %>" aria-valuenow="<%= number_with_precision(percentage, separator: ".", precision: 2) %>" aria-valuemin="0" aria-valuemax="100" aria-valuetext="<%= number_to_percentage(percentage, precision: 2) %>">
|
11
11
|
<div style="width: <%= percentage %>%"></div>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
@@ -34,11 +34,15 @@
|
|
34
34
|
<%= f.check_box :hide,
|
35
35
|
label: t("decidim.shared.flag_modal.hide_content"),
|
36
36
|
include_hidden: false,
|
37
|
+
id: hide_checkbox_id,
|
37
38
|
data: {
|
38
39
|
label_action: t("decidim.shared.flag_modal.hide"),
|
39
40
|
label_report: t("decidim.shared.flag_modal.report"),
|
40
41
|
hide: "true"
|
41
|
-
},
|
42
|
+
},
|
43
|
+
label_options: {
|
44
|
+
for: hide_checkbox_id
|
45
|
+
} %>
|
42
46
|
<% end %>
|
43
47
|
<% end %>
|
44
48
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="<%= id %>" class="filter-container">
|
2
|
-
<button id="dropdown-trigger-resource" data-component="dropdown" data-target="dropdown-menu-resource" data-auto-close="true"
|
2
|
+
<button id="dropdown-trigger-resource" data-component="dropdown" data-target="dropdown-menu-resource" data-auto-close="true">
|
3
3
|
<% resource_types.each do |resource_type| %>
|
4
4
|
<span data-value="<%= resource_type[0] %>" class="<%= "is-active" if filter_param == resource_type[0] %>">
|
5
5
|
<%= text_with_resource_icon(*resource_type) %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= icon "arrow-down-s-line" %>
|
9
9
|
<%= icon "arrow-up-s-line" %>
|
10
10
|
</button>
|
11
|
-
<%= filter_form_for filter, form_path, class
|
11
|
+
<%= filter_form_for filter, form_path, :class => "new_filter", :id => "dropdown-menu-resource", "aria-hidden" => true do |form| %>
|
12
12
|
<%= form.collection_radio_buttons(
|
13
13
|
filter_param_key,
|
14
14
|
resource_types,
|
@@ -16,7 +16,7 @@
|
|
16
16
|
:last,
|
17
17
|
{ checked: filter_param }
|
18
18
|
) do |builder|
|
19
|
-
builder.label { builder.radio_button(class: "reset-defaults", hidden: true) + content_tag(:
|
19
|
+
builder.label { builder.radio_button(class: "reset-defaults", hidden: true) + content_tag(:span, text_with_resource_icon(builder.value, builder.text), class: "filter") }
|
20
20
|
end %>
|
21
21
|
<% end %>
|
22
22
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="statistic <%= stat_dom_class %>" data-statistic>
|
2
|
-
<
|
2
|
+
<span class="statistic__title" title="<%= stat_title %>">
|
3
3
|
<%= stat_title %>
|
4
|
-
</
|
4
|
+
</span>
|
5
5
|
<span class="statistic__number">
|
6
6
|
<%= stat_number %>
|
7
7
|
</span>
|
@@ -9,6 +9,8 @@ module Decidim
|
|
9
9
|
# <%= cell("decidim/category", model.category, context: {resource: model}) %>
|
10
10
|
#
|
11
11
|
class TagsCell < Decidim::ViewModel
|
12
|
+
include Decidim::SanitizeHelper
|
13
|
+
|
12
14
|
def show
|
13
15
|
render if category? || scope?
|
14
16
|
end
|
@@ -69,7 +71,7 @@ module Decidim
|
|
69
71
|
end
|
70
72
|
|
71
73
|
def category_name
|
72
|
-
model.category.translated_name
|
74
|
+
decidim_html_escape model.category.translated_name
|
73
75
|
end
|
74
76
|
|
75
77
|
def category_path
|
@@ -60,8 +60,7 @@
|
|
60
60
|
<%= t("decidim.shared.confirm_modal.cancel") %>
|
61
61
|
</button>
|
62
62
|
<button type="button" class="button button__sm md:button__lg button__secondary" data-dropzone-save data-dialog-close="<%= modal_id %>" disabled>
|
63
|
-
<%= t("
|
64
|
-
<%= icon "arrow-right-line", class: "fill-current" %>
|
63
|
+
<%= t("save", scope: "decidim.forms.upload.labels") %>
|
65
64
|
</button>
|
66
65
|
</div>
|
67
66
|
<% end %>
|
@@ -57,13 +57,11 @@ module Decidim
|
|
57
57
|
# to be marked confirmed.
|
58
58
|
@user.skip_confirmation! if !@user.confirmed? && @user.email == verified_email
|
59
59
|
else
|
60
|
-
generated_password = SecureRandom.hex
|
61
|
-
|
62
60
|
@user.email = (verified_email || form.email)
|
63
61
|
@user.name = form.name
|
64
62
|
@user.nickname = form.normalized_nickname
|
65
63
|
@user.newsletter_notifications_at = nil
|
66
|
-
@user.password =
|
64
|
+
@user.password = SecureRandom.hex
|
67
65
|
if form.avatar_url.present?
|
68
66
|
url = URI.parse(form.avatar_url)
|
69
67
|
filename = File.basename(url.path)
|
@@ -54,11 +54,13 @@ module Decidim
|
|
54
54
|
notify(manager) do
|
55
55
|
ConversationMailer.new_group_message(sender, manager, conversation, message, recipient).deliver_later
|
56
56
|
end
|
57
|
+
Decidim::PushNotificationMessageSender.new.new_group_message(sender, manager, conversation, message, recipient).deliver
|
57
58
|
end
|
58
59
|
else
|
59
60
|
notify(recipient) do
|
60
61
|
ConversationMailer.new_message(sender, recipient, conversation, message).deliver_later
|
61
62
|
end
|
63
|
+
Decidim::PushNotificationMessageSender.new.new_message(sender, recipient, conversation, message).deliver
|
62
64
|
end
|
63
65
|
end
|
64
66
|
end
|
@@ -68,6 +70,7 @@ module Decidim
|
|
68
70
|
notify(recipient) do
|
69
71
|
ConversationMailer.comanagers_new_message(sender, recipient, conversation, message, form.context.current_user).deliver_later
|
70
72
|
end
|
73
|
+
Decidim::PushNotificationMessageSender.new.comanagers_new_message(sender, recipient, conversation, message, form.context.current_user).deliver
|
71
74
|
end
|
72
75
|
end
|
73
76
|
|
@@ -54,11 +54,13 @@ module Decidim
|
|
54
54
|
notify(manager) do
|
55
55
|
ConversationMailer.new_group_conversation(originator, manager, conversation, recipient).deliver_later
|
56
56
|
end
|
57
|
+
Decidim::PushNotificationMessageSender.new.new_group_conversation(originator, manager, conversation, recipient).deliver
|
57
58
|
end
|
58
59
|
else
|
59
60
|
notify(recipient) do
|
60
61
|
ConversationMailer.new_conversation(originator, recipient, conversation).deliver_later
|
61
62
|
end
|
63
|
+
Decidim::PushNotificationMessageSender.new.new_conversation(originator, recipient, conversation).deliver
|
62
64
|
end
|
63
65
|
end
|
64
66
|
end
|
@@ -68,6 +70,7 @@ module Decidim
|
|
68
70
|
notify(recipient) do
|
69
71
|
ConversationMailer.comanagers_new_conversation(originator, recipient, conversation, form.context.current_user).deliver_later
|
70
72
|
end
|
73
|
+
Decidim::PushNotificationMessageSender.new.comanagers_new_conversation(originator, recipient, conversation, form.context.current_user).deliver
|
71
74
|
end
|
72
75
|
end
|
73
76
|
|