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
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
const escapeQuotes = (text) => {
|
|
2
2
|
if (!text) {
|
|
3
3
|
return "";
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
el.appendChild(document.createTextNode(text));
|
|
8
|
-
return el.innerHTML;
|
|
6
|
+
return text.replace(/"/g, """);
|
|
9
7
|
}
|
|
10
8
|
|
|
11
|
-
export const
|
|
9
|
+
export const escapeHtml = (text) => {
|
|
12
10
|
if (!text) {
|
|
13
11
|
return "";
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
const el = document.createElement("div");
|
|
15
|
+
el.appendChild(document.createTextNode(text));
|
|
16
|
+
return escapeQuotes(el.innerHTML);
|
|
17
17
|
}
|
|
@@ -88,6 +88,20 @@
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
&__modal {
|
|
91
|
+
&-error {
|
|
92
|
+
[data-dialog-closable] {
|
|
93
|
+
@apply top-6 right-6;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-dialog-container] {
|
|
97
|
+
@apply inline grid-cols-none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-dialog-title] {
|
|
101
|
+
@apply col-span-2 md:col-span-1 md:col-start-2 grid grid-cols-[auto_1fr] items-start md:items-center gap-2 pb-4 text-left text-xl text-gray-2 md:border-b md:border-gray-3;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
91
105
|
&-results {
|
|
92
106
|
@apply mb-20 flex flex-wrap gap-x-8 gap-y-4;
|
|
93
107
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.editor-suggestions-props {
|
|
2
|
+
--editor-suggestions-border-color: #000;
|
|
3
|
+
--editor-suggestions-background-color: #eee;
|
|
4
|
+
--editor-suggestions-selected-highlight-color: #ccc;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.editor-suggestions {
|
|
8
|
+
@apply editor-suggestions-props border-0 bg-[var(--editor-suggestions-background-color)] max-w-sm drop-shadow-md rounded-md;
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
.editor-suggestions-item[data-selected]:not(:hover) {
|
|
12
|
+
@apply bg-transparent;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.editor-suggestions-item {
|
|
17
|
+
@apply flex items-center gap-2 w-full text-left py-[0.375rem] px-1.5 border-0 rounded-none text-sm;
|
|
18
|
+
|
|
19
|
+
&:first-child {
|
|
20
|
+
@apply rounded-t-md;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:last-child {
|
|
24
|
+
@apply rounded-b-md;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:hover,
|
|
28
|
+
&[data-selected] {
|
|
29
|
+
@apply bg-[var(--editor-suggestions-selected-highlight-color)];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.editor-suggestions-item-avatar {
|
|
33
|
+
@apply rounded-full w-6 h-6 object-cover flex-none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.editor-suggestions-item-label {
|
|
37
|
+
@apply truncate;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.editor-suggestions-item-disabled {
|
|
42
|
+
@apply cursor-default;
|
|
43
|
+
|
|
44
|
+
&:hover,
|
|
45
|
+
&[data-selected] {
|
|
46
|
+
@apply bg-transparent;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[data-floating-help] {
|
|
2
|
-
@apply absolute z-10 top-
|
|
2
|
+
@apply absolute z-10 top-20 md:top-10 right-0 [&_button]:bg-background [&_button]:px-2 [&_button]:rounded-r-none [&_svg]:text-gray [&_svg]:fill-current;
|
|
3
3
|
|
|
4
4
|
&:hover {
|
|
5
5
|
@apply [&_svg]:text-white [&_button]:text-white [&_button]:bg-secondary [&_button]:no-underline;
|
|
@@ -248,6 +248,10 @@ header {
|
|
|
248
248
|
.account-container {
|
|
249
249
|
@apply before:block before:absolute before:top-16 before:right-14 before:content-[""] before:bg-white before:w-2 before:h-12 before:-mt-8;
|
|
250
250
|
}
|
|
251
|
+
|
|
252
|
+
#dropdown-trigger-links-mobile-close {
|
|
253
|
+
@apply relative z-10;
|
|
254
|
+
}
|
|
251
255
|
}
|
|
252
256
|
|
|
253
257
|
&__item {
|
|
@@ -322,19 +326,27 @@ header {
|
|
|
322
326
|
.menu-bar {
|
|
323
327
|
@apply container h-full flex justify-between items-center sm:relative last-of-type:[&>svg]:hidden;
|
|
324
328
|
|
|
329
|
+
&__breadcrumb-text {
|
|
330
|
+
@apply block min-w-0 max-w-full overflow-hidden whitespace-nowrap text-ellipsis;
|
|
331
|
+
}
|
|
332
|
+
|
|
325
333
|
&__container {
|
|
326
334
|
@apply bg-primary relative h-14 flex justify-between;
|
|
327
335
|
}
|
|
328
336
|
|
|
329
337
|
&__breadcrumb-desktop {
|
|
330
|
-
@apply hidden lg:flex
|
|
338
|
+
@apply hidden lg:flex flex-1 min-w-0 overflow-hidden items-center [&>*]:text-md [&>*]:text-white gap-x-2;
|
|
331
339
|
|
|
332
|
-
|
|
333
|
-
@apply
|
|
340
|
+
> * {
|
|
341
|
+
@apply min-w-0;
|
|
334
342
|
}
|
|
335
343
|
|
|
336
344
|
&__dropdown-trigger {
|
|
337
|
-
@apply flex rounded py-1 z-20 font-semibold;
|
|
345
|
+
@apply flex flex-none rounded px-2 py-1 z-20 font-semibold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-inset;
|
|
346
|
+
|
|
347
|
+
&--truncatable {
|
|
348
|
+
@apply min-w-0 overflow-hidden;
|
|
349
|
+
}
|
|
338
350
|
|
|
339
351
|
&:hover {
|
|
340
352
|
@apply z-10 relative before:content-[''] before:absolute before:w-[calc(100%+3rem+1px)] before:min-w-[10rem] before:h-40 before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/4 before:-z-10;
|
|
@@ -345,8 +357,16 @@ header {
|
|
|
345
357
|
}
|
|
346
358
|
}
|
|
347
359
|
|
|
360
|
+
.no-interactive {
|
|
361
|
+
@apply font-normal px-0 min-w-0;
|
|
362
|
+
}
|
|
363
|
+
|
|
348
364
|
&__dropdown-wrapper {
|
|
349
|
-
@apply flex items-center cursor-pointer underline;
|
|
365
|
+
@apply flex flex-none items-center cursor-pointer underline;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
&__label--truncatable {
|
|
369
|
+
@apply block w-full min-w-0 max-w-full overflow-hidden;
|
|
350
370
|
}
|
|
351
371
|
|
|
352
372
|
&__dropdown-content {
|
|
@@ -417,18 +437,31 @@ header {
|
|
|
417
437
|
}
|
|
418
438
|
|
|
419
439
|
&__breadcrumb-mobile {
|
|
420
|
-
@apply block lg:hidden w-full z-20;
|
|
440
|
+
@apply block lg:hidden w-full min-w-0 z-20;
|
|
421
441
|
|
|
422
442
|
&__dropdown-trigger {
|
|
423
|
-
@apply flex items-center justify-between text-white;
|
|
443
|
+
@apply flex min-w-0 items-center justify-between text-white;
|
|
444
|
+
|
|
445
|
+
.menu-bar__breadcrumb-item {
|
|
446
|
+
@apply min-w-0;
|
|
447
|
+
}
|
|
424
448
|
|
|
425
449
|
svg {
|
|
450
|
+
@apply flex-none;
|
|
426
451
|
@apply w-6 h-6 fill-current;
|
|
427
452
|
}
|
|
428
453
|
}
|
|
429
454
|
|
|
455
|
+
&__label-wrapper {
|
|
456
|
+
@apply block min-w-0 flex-1;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
&__label {
|
|
460
|
+
@apply flex w-11/12 items-center gap-x-2 min-w-0;
|
|
461
|
+
}
|
|
462
|
+
|
|
430
463
|
.menu-bar__breadcrumb-item {
|
|
431
|
-
@apply font-semibold underline;
|
|
464
|
+
@apply flex flex-1 min-w-0 items-center gap-x-1 whitespace-nowrap font-semibold underline focus:outline focus:outline-2 focus:outline-offset-2 rounded-sm;
|
|
432
465
|
}
|
|
433
466
|
|
|
434
467
|
/* overwrite default dropdown styles */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use "tom-select/dist/scss/tom-select";
|
|
2
|
+
|
|
3
|
+
.ts {
|
|
4
|
+
&-control {
|
|
5
|
+
@apply border-gray text-md min-h-[40px];
|
|
6
|
+
|
|
7
|
+
input {
|
|
8
|
+
@apply font-normal text-black text-md;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-dropdown {
|
|
13
|
+
@apply text-md text-gray-2 font-normal;
|
|
14
|
+
|
|
15
|
+
.option img {
|
|
16
|
+
@apply inline;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.active {
|
|
20
|
+
@apply bg-gray-3;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
// Datepicker
|
|
7
7
|
@use "stylesheets/decidim/vendor/datepicker_light";
|
|
8
8
|
@use "stylesheets/decidim/datepicker";
|
|
9
|
+
// TomSelect
|
|
10
|
+
@use "stylesheets/decidim/tom_select";
|
|
9
11
|
// On the other hand, the following styles match with specific routes
|
|
10
12
|
@use "stylesheets/decidim/header";
|
|
11
13
|
@use "stylesheets/decidim/footer";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "stylesheets/decidim/editor_suggestions";
|
|
2
|
+
|
|
1
3
|
.editor-props {
|
|
2
4
|
--editor-active-color: #487bda;
|
|
3
5
|
--editor-disabled-color: #eee;
|
|
@@ -5,12 +7,6 @@
|
|
|
5
7
|
--editor-bubble-shadow-color: #333;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
.editor-suggestions-props {
|
|
9
|
-
--editor-suggestions-border-color: #000;
|
|
10
|
-
--editor-suggestions-background-color: #eee;
|
|
11
|
-
--editor-suggestions-selected-highlight-color: #ccc;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
.editor-active {
|
|
15
11
|
@apply outline outline-4 outline-[var(--editor-active-color)];
|
|
16
12
|
}
|
|
@@ -186,30 +182,3 @@
|
|
|
186
182
|
}
|
|
187
183
|
}
|
|
188
184
|
}
|
|
189
|
-
|
|
190
|
-
.editor-suggestions {
|
|
191
|
-
@apply editor-suggestions-props border-0 bg-[var(--editor-suggestions-background-color)] max-w-sm drop-shadow-md rounded-md;
|
|
192
|
-
|
|
193
|
-
&:hover {
|
|
194
|
-
.editor-suggestions-item[data-selected]:not(:hover) {
|
|
195
|
-
@apply bg-transparent;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.editor-suggestions-item {
|
|
200
|
-
@apply block w-full text-left py-[0.375rem] px-1.5 border-0 rounded-none truncate text-sm;
|
|
201
|
-
|
|
202
|
-
&:first-child {
|
|
203
|
-
@apply rounded-t-md;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&:last-child {
|
|
207
|
-
@apply rounded-b-md;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&:hover,
|
|
211
|
-
&[data-selected] {
|
|
212
|
-
@apply bg-[var(--editor-suggestions-selected-highlight-color)];
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
.geocoding
|
|
2
|
-
.
|
|
1
|
+
.geocoding {
|
|
2
|
+
&__locate .geocoding__button {
|
|
3
3
|
@apply mt-4;
|
|
4
|
+
|
|
5
|
+
&--locating {
|
|
6
|
+
@apply opacity-70 cursor-wait;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.geocoding__spinner {
|
|
10
|
+
@apply inline-block w-4 h-4 rounded-full animate-spin border-2 border-l-transparent border-y-transparent border-r-secondary align-middle;
|
|
11
|
+
}
|
|
4
12
|
}
|
|
5
13
|
}
|
|
@@ -29,9 +29,9 @@ module Decidim
|
|
|
29
29
|
delegate :content_tag, :safe_join, :link_to, :active_link_to_class, :is_active_link?, :icon, to: :@view
|
|
30
30
|
|
|
31
31
|
def render
|
|
32
|
-
content_tag :li, role:
|
|
32
|
+
content_tag :li, role: wrapper_role, class: link_wrapper_classes do
|
|
33
33
|
output = if url == "#"
|
|
34
|
-
[content_tag(:span, composed_label, class: "sidebar-menu__item-disabled")]
|
|
34
|
+
[content_tag(:span, composed_label, class: "sidebar-menu__item-disabled", role: menuitem_role)]
|
|
35
35
|
else
|
|
36
36
|
[link_to(composed_label, url, link_options)]
|
|
37
37
|
end
|
|
@@ -52,7 +52,7 @@ module Decidim
|
|
|
52
52
|
{ aria: { current: "page" } }
|
|
53
53
|
else
|
|
54
54
|
{}
|
|
55
|
-
end.merge({ class: link_classes })
|
|
55
|
+
end.merge({ class: link_classes, role: menuitem_role })
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def composed_label
|
|
@@ -75,6 +75,12 @@ module Decidim
|
|
|
75
75
|
@options.role || :menuitem
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
+
def wrapper_role
|
|
79
|
+
return if menuitem_role.blank?
|
|
80
|
+
|
|
81
|
+
:presentation
|
|
82
|
+
end
|
|
83
|
+
|
|
78
84
|
def active_class
|
|
79
85
|
active_link_to_class(
|
|
80
86
|
url,
|
|
@@ -8,7 +8,7 @@ module Decidim
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def content_type_allowlist
|
|
11
|
-
extension_allowlist.
|
|
11
|
+
extension_allowlist.filter_map { |ext| MiniMime.lookup_by_extension(ext)&.content_type }.uniq
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# Fetches info about different variants, their processors and dimensions
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<p class="email-greeting"><%= t(".hello", username: @user_name) %></p>
|
|
2
|
+
|
|
3
|
+
<p class="email-instructions"><%= t ".body_1" %></p>
|
|
4
|
+
<p class="email-instructions"><%= t ".body_2" %></p>
|
|
5
|
+
|
|
6
|
+
<p class="email-closing"><%= t(".greetings_html", organization_name: organization_name(@organization), organization_url: decidim.root_url(host: @organization.host)) %></p>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% add_decidim_page_title(t("last_activity", scope: "decidim.last_activities.index")) %>
|
|
2
2
|
|
|
3
3
|
<%# NOTE: this page does not use a regular layout %>
|
|
4
|
-
<main class="container">
|
|
4
|
+
<main class="container" role="main">
|
|
5
5
|
<h1 class="title-decorator my-12"><%= t("last_activity", scope: "decidim.last_activities.index") %></h1>
|
|
6
6
|
|
|
7
7
|
<div class="profile__activity pb-16">
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
<div>
|
|
3
|
-
<h2><%= error %></h2>
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<p>
|
|
12
|
-
<%= messages.join("<br>") %>
|
|
13
|
-
</p>
|
|
14
|
-
<p><%= t(".correct_errors") %></p>
|
|
15
|
-
</div>
|
|
16
|
-
<div>
|
|
17
|
-
<div>
|
|
18
|
-
<a class="button" role="button" href="#" data-close aria-label="<%= t(".ok") %>"><%= t(".ok") %></a>
|
|
1
|
+
<%= decidim_modal id: "messageErrorModal", class: "conversation__modal-error" do %>
|
|
2
|
+
<div data-dialog-container>
|
|
3
|
+
<h2 id="dialog-title-messageErrorModal" tabindex="-1" data-dialog-title><%= error %></h2>
|
|
4
|
+
<div id="dialog-desc-messageErrorModal" class="mt-4">
|
|
5
|
+
<p><%= t(".intro") %></p>
|
|
6
|
+
<p><%= safe_join(messages, tag.br) %></p>
|
|
7
|
+
<p><%= t(".correct_errors") %></p>
|
|
8
|
+
</div>
|
|
9
|
+
<div data-dialog-actions>
|
|
10
|
+
<button type="button" class="button button__sm lg:button__lg button__secondary" data-dialog-close="messageErrorModal" aria-label="<%= t(".ok") %>"><%= t(".ok") %></button>
|
|
19
11
|
</div>
|
|
20
12
|
</div>
|
|
21
|
-
|
|
13
|
+
<% end %>
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var messageError = document.getElementById("messageErrorModal")
|
|
2
|
+
|
|
3
|
+
if (messageError) {
|
|
4
|
+
messageError.remove();
|
|
4
5
|
}
|
|
6
|
+
document.body.insertAdjacentHTML("beforeend", "<%= j(render "error_modal", error:, messages:).html_safe %>");
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
messageError = document.getElementById("messageErrorModal")
|
|
9
|
+
if (messageError) {
|
|
10
|
+
window.createDialog(messageError);
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
if (Decidim.currentDialogs.messageErrorModal) {
|
|
13
|
+
window.Decidim.currentDialogs.messageErrorModal.open();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% add_decidim_page_title(t("decidim.offline.name")) %>
|
|
2
2
|
|
|
3
|
-
<main id="offline-fallback-html" class="text-center my-8">
|
|
3
|
+
<main id="offline-fallback-html" class="text-center my-8" role="main">
|
|
4
4
|
<div class="flex justify-center">
|
|
5
5
|
<svg xmlns="http://www.w3.org/2000/svg" width="5rem" height="r5em" viewBox="0 0 25 25">
|
|
6
6
|
<path
|
|
@@ -42,7 +42,7 @@ edit_link(
|
|
|
42
42
|
<div id="accordion-panel-<%= ix %>" class="page__accordion-panel" aria-hidden="true">
|
|
43
43
|
<ul role="menu">
|
|
44
44
|
<% topic.pages.each do |page| %>
|
|
45
|
-
<li role="
|
|
45
|
+
<li role="presentation"><%= link_to translated_attribute(page.title), page_path(page), class: "text-secondary", role: "menuitem" %></li>
|
|
46
46
|
<% end %>
|
|
47
47
|
</ul>
|
|
48
48
|
</div>
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
<ul class="dropdown dropdown__bottom divide-y divide-gray-3" role="menu">
|
|
13
13
|
<%= yield %>
|
|
14
14
|
<% unless defined?(skip_report) && skip_report %>
|
|
15
|
-
<li role="
|
|
16
|
-
<%= cell "decidim/report_button", resource, button_classes: "dropdown__button" %>
|
|
15
|
+
<li role="presentation" class="dropdown__item">
|
|
16
|
+
<%= cell "decidim/report_button", resource, button_classes: "dropdown__button", html_options: { role: "menuitem" } %>
|
|
17
17
|
</li>
|
|
18
18
|
<% end %>
|
|
19
|
-
<li role="
|
|
20
|
-
<%= cell "decidim/follow_button", resource, large: false, button_classes: "dropdown__button" %>
|
|
19
|
+
<li role="presentation" class="dropdown__item">
|
|
20
|
+
<%= cell "decidim/follow_button", resource, large: false, button_classes: "dropdown__button", html_options: { role: "menuitem" } %>
|
|
21
21
|
</li>
|
|
22
22
|
</ul>
|
|
23
23
|
</div>
|
|
@@ -11,7 +11,7 @@ end
|
|
|
11
11
|
%>
|
|
12
12
|
|
|
13
13
|
<div class="layout-container">
|
|
14
|
-
<header <%= "class=with-admin-bar" if current_user && allowed_to?(:read, :admin_dashboard)
|
|
14
|
+
<header <%= "class=with-admin-bar" if current_user && allowed_to?(:read, :admin_dashboard) %> role="banner">
|
|
15
15
|
<div id="header-container">
|
|
16
16
|
<%= render partial: "layouts/decidim/impersonation_warning" %>
|
|
17
17
|
<%= render partial: "layouts/decidim/omnipresent_banner" %>
|
|
@@ -37,7 +37,7 @@ end
|
|
|
37
37
|
<%= yield %>
|
|
38
38
|
</div>
|
|
39
39
|
|
|
40
|
-
<footer>
|
|
40
|
+
<footer role="contentinfo">
|
|
41
41
|
<% if current_user&.ephemeral? || content_for?(:focus_mode) %>
|
|
42
42
|
<%= render partial: "layouts/decidim/footer/focus_mode_main" %>
|
|
43
43
|
<% else %>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="menu-bar">
|
|
3
3
|
|
|
4
4
|
<%# secondary dropdown only desktop %>
|
|
5
|
-
<nav class="menu-bar__breadcrumb-desktop">
|
|
5
|
+
<nav class="menu-bar__breadcrumb-desktop" data-controller="breadcrumb-truncate">
|
|
6
6
|
<%= render partial: "layouts/decidim/header/menu_breadcrumb_desktop" %>
|
|
7
7
|
</nav>
|
|
8
8
|
<% if content_for?(:participatory_space_actions) %>
|
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
<%= link_to decidim.root_url, class: "menu-bar__breadcrumb-desktop__dropdown-wrapper menu-bar__breadcrumb-desktop__dropdown-trigger" do %>
|
|
2
|
-
<span
|
|
2
|
+
<span><%= t("decidim.menu.home") %></span>
|
|
3
3
|
<% end %>
|
|
4
|
-
<% breadcrumb_items.
|
|
4
|
+
<% truncatable_items = breadcrumb_items.compact_blank.drop(1) %>
|
|
5
|
+
<% breadcrumb_items.each do |item| %>
|
|
5
6
|
<% next if item.blank? %>
|
|
6
7
|
|
|
7
8
|
<% item_label = translated_attribute(item[:label]) %>
|
|
9
|
+
<% truncatable = truncatable_items.include?(item) %>
|
|
10
|
+
<% trigger_classes = ["menu-bar__breadcrumb-desktop__dropdown-trigger"] %>
|
|
11
|
+
<% if item[:url].present? && !is_active_link?(item[:url], :exclusive) %>
|
|
12
|
+
<% trigger_classes.unshift("menu-bar__breadcrumb-desktop__dropdown-wrapper") %>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% if truncatable %>
|
|
15
|
+
<% trigger_classes << "menu-bar__breadcrumb-desktop__dropdown-trigger--truncatable" %>
|
|
16
|
+
<% end %>
|
|
8
17
|
<span aria-hidden="true"><%= icon "arrow-right-s-line", class: "fill-white" %></span>
|
|
9
|
-
|
|
18
|
+
<% if item[:url].present? && !is_active_link?(item[:url], :exclusive) %>
|
|
19
|
+
<%= link_to item[:url], class: trigger_classes.join(" "), data: (truncatable ? { breadcrumb_truncate_target: "item" } : {}), "aria-current": (item[:active] ? "page" : nil) do %>
|
|
20
|
+
<% if truncatable %>
|
|
21
|
+
<span class="menu-bar__breadcrumb-desktop__label--truncatable">
|
|
22
|
+
<span class="menu-bar__breadcrumb-text" data-breadcrumb-truncate-target="text"><%= item_label %></span>
|
|
23
|
+
</span>
|
|
24
|
+
<% else %>
|
|
25
|
+
<span><%= item_label %></span>
|
|
26
|
+
<% end %>
|
|
27
|
+
<% end %>
|
|
28
|
+
<% else %>
|
|
10
29
|
<%# This block is executed if the condition is false %>
|
|
11
|
-
<%= content_tag :span,
|
|
30
|
+
<%= content_tag :span, class: [*trigger_classes, "no-interactive"].join(" "), data: (truncatable ? { breadcrumb_truncate_target: "item" } : {}), "aria-current": (item[:active] ? "page" : nil) do %>
|
|
31
|
+
<% if truncatable %>
|
|
32
|
+
<span class="menu-bar__breadcrumb-desktop__label--truncatable">
|
|
33
|
+
<span class="menu-bar__breadcrumb-text" data-breadcrumb-truncate-target="text"><%= item_label %></span>
|
|
34
|
+
</span>
|
|
35
|
+
<% else %>
|
|
36
|
+
<span><%= item_label %></span>
|
|
37
|
+
<% end %>
|
|
38
|
+
<% end %>
|
|
12
39
|
<% end %>
|
|
13
40
|
<% end %>
|
|
14
41
|
|
|
@@ -3,22 +3,27 @@
|
|
|
3
3
|
<% previous_item = non_empty_items[-2] || non_empty_items[-1] %>
|
|
4
4
|
<% end %>
|
|
5
5
|
<div class="menu-bar__breadcrumb-mobile__dropdown-trigger">
|
|
6
|
-
<span class="
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<%
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<span class="menu-bar__breadcrumb-item"><%= item_label %></span>
|
|
6
|
+
<span class="menu-bar__breadcrumb-mobile__label-wrapper">
|
|
7
|
+
<span class="menu-bar__breadcrumb-mobile__label">
|
|
8
|
+
<% if previous_item %>
|
|
9
|
+
<% item_label = translated_attribute(previous_item[:label]) %>
|
|
10
|
+
<% if previous_item[:url].present? && !is_active_link?(previous_item[:url], :exclusive) %>
|
|
11
|
+
<%= link_to(previous_item[:url], class: "menu-bar__breadcrumb-item", data: { controller: "breadcrumb-truncate" }) do %>
|
|
12
|
+
<span aria-hidden="true" class="flex items-center"><%= icon "arrow-left-s-line" %></span>
|
|
13
|
+
<span class="menu-bar__breadcrumb-text" data-breadcrumb-truncate-target="text"><%= item_label %></span>
|
|
15
14
|
<% end %>
|
|
16
15
|
<% else %>
|
|
17
|
-
|
|
18
|
-
<span class=""
|
|
19
|
-
|
|
16
|
+
<span class="menu-bar__breadcrumb-item" data-controller="breadcrumb-truncate">
|
|
17
|
+
<span class="menu-bar__breadcrumb-text" data-breadcrumb-truncate-target="text"><%= item_label %></span>
|
|
18
|
+
</span>
|
|
19
|
+
<% end %>
|
|
20
|
+
<% else %>
|
|
21
|
+
<%= link_to decidim.root_url, class: "menu-bar__breadcrumb-item", data: { controller: "breadcrumb-truncate" } do %>
|
|
22
|
+
<span aria-hidden="true" class="flex items-center"><%= icon "arrow-left-s-line" %></span>
|
|
23
|
+
<span class="menu-bar__breadcrumb-text" data-breadcrumb-truncate-target="text"><%= t("decidim.menu.home") %></span>
|
|
20
24
|
<% end %>
|
|
21
|
-
|
|
25
|
+
<% end %>
|
|
26
|
+
</span>
|
|
22
27
|
</span>
|
|
23
28
|
<% if content_for?(:participatory_space_mobile_actions) %>
|
|
24
29
|
<div class="menu-bar__actions-mobile">
|