decidim-admin 0.28.5 → 0.29.0.rc1
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/README.md +13 -0
- data/app/cells/decidim/admin/content_block_cell.rb +0 -1
- data/app/cells/decidim/admin/results_per_page/show.erb +2 -2
- data/app/cells/decidim/admin/results_per_page_cell.rb +0 -2
- data/app/commands/decidim/admin/block_user.rb +0 -1
- data/app/commands/decidim/admin/create_area.rb +4 -32
- data/app/commands/decidim/admin/create_area_type.rb +4 -33
- data/app/commands/decidim/admin/create_attachment.rb +5 -4
- data/app/commands/decidim/admin/create_attachment_collection.rb +3 -3
- data/app/commands/decidim/admin/create_category.rb +4 -37
- data/app/commands/decidim/admin/create_component.rb +7 -40
- data/app/commands/decidim/admin/create_newsletter.rb +11 -29
- data/app/commands/decidim/admin/create_participatory_space_private_user.rb +4 -4
- data/app/commands/decidim/admin/create_scope.rb +15 -32
- data/app/commands/decidim/admin/create_scope_type.rb +3 -32
- data/app/commands/decidim/admin/create_static_page.rb +6 -47
- data/app/commands/decidim/admin/create_static_page_topic.rb +4 -26
- data/app/commands/decidim/admin/deliver_newsletter.rb +4 -5
- data/app/commands/decidim/admin/destroy_area.rb +2 -25
- data/app/commands/decidim/admin/destroy_category.rb +4 -29
- data/app/commands/decidim/admin/destroy_component.rb +5 -43
- data/app/commands/decidim/admin/destroy_newsletter.rb +2 -30
- data/app/commands/decidim/admin/destroy_participatory_space_private_user.rb +5 -32
- data/app/commands/decidim/admin/destroy_scope.rb +6 -33
- data/app/commands/decidim/admin/officialize_user.rb +1 -1
- data/app/commands/decidim/admin/participatory_space/create_admin.rb +4 -4
- data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +5 -4
- data/app/commands/decidim/admin/promote_managed_user.rb +4 -5
- data/app/commands/decidim/admin/unofficialize_user.rb +1 -1
- data/app/commands/decidim/admin/update_area.rb +2 -41
- data/app/commands/decidim/admin/update_area_type.rb +2 -42
- data/app/commands/decidim/admin/update_attachment.rb +10 -7
- data/app/commands/decidim/admin/update_attachment_collection.rb +3 -3
- data/app/commands/decidim/admin/update_category.rb +2 -45
- data/app/commands/decidim/admin/update_component.rb +4 -5
- data/app/commands/decidim/admin/update_component_permissions.rb +3 -3
- data/app/commands/decidim/admin/{update_external_domain_whitelist.rb → update_external_domain_allowlist.rb} +6 -5
- data/app/commands/decidim/admin/update_help_sections.rb +6 -3
- data/app/commands/decidim/admin/update_newsletter.rb +8 -8
- data/app/commands/decidim/admin/update_organization.rb +9 -53
- data/app/commands/decidim/admin/update_organization_appearance.rb +10 -81
- data/app/commands/decidim/admin/update_scope.rb +7 -40
- data/app/commands/decidim/admin/update_scope_type.rb +2 -42
- data/app/commands/decidim/admin/update_static_page.rb +5 -46
- data/app/commands/decidim/admin/update_static_page_topic.rb +2 -43
- data/app/constraints/decidim/admin/organization_dashboard_constraint.rb +1 -1
- data/app/controllers/concerns/decidim/admin/content_blocks/landing_page.rb +2 -2
- data/app/controllers/concerns/decidim/admin/filterable.rb +79 -4
- data/app/controllers/concerns/decidim/admin/global_moderation_context.rb +1 -1
- data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +0 -7
- data/app/controllers/concerns/decidim/admin/paginable.rb +20 -0
- data/app/controllers/concerns/decidim/admin/participatory_space_export.rb +1 -1
- data/app/controllers/decidim/admin/application_controller.rb +2 -1
- data/app/controllers/decidim/admin/area_types_controller.rb +8 -9
- data/app/controllers/decidim/admin/areas_controller.rb +1 -1
- data/app/controllers/decidim/admin/authorization_workflows_controller.rb +1 -1
- data/app/controllers/decidim/admin/block_user_controller.rb +1 -1
- data/app/controllers/decidim/admin/categories_controller.rb +2 -2
- data/app/controllers/decidim/admin/component_permissions_controller.rb +1 -1
- data/app/controllers/decidim/admin/components_controller.rb +2 -2
- data/app/controllers/decidim/admin/concerns/has_attachment_collections.rb +2 -2
- data/app/controllers/decidim/admin/concerns/has_attachments.rb +2 -2
- data/app/controllers/decidim/admin/concerns/has_private_users.rb +1 -1
- data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +1 -1
- data/app/controllers/decidim/admin/conflicts_controller.rb +6 -14
- data/app/controllers/decidim/admin/help_sections_controller.rb +1 -1
- data/app/controllers/decidim/admin/impersonations_controller.rb +0 -1
- data/app/controllers/decidim/admin/managed_users/promotions_controller.rb +1 -1
- data/app/controllers/decidim/admin/moderations/reports_controller.rb +4 -4
- data/app/controllers/decidim/admin/moderations_controller.rb +7 -7
- data/app/controllers/decidim/admin/newsletter_templates_controller.rb +1 -1
- data/app/controllers/decidim/admin/newsletters_controller.rb +6 -7
- data/app/controllers/decidim/admin/organization_appearance_controller.rb +1 -1
- data/app/controllers/decidim/admin/organization_controller.rb +1 -1
- data/app/controllers/decidim/admin/{organization_external_domain_whitelist_controller.rb → organization_external_domain_allowlist_controller.rb} +7 -7
- data/app/controllers/decidim/admin/scope_types_controller.rb +7 -8
- data/app/controllers/decidim/admin/scopes_controller.rb +1 -1
- data/app/controllers/decidim/admin/share_tokens_controller.rb +1 -1
- data/app/controllers/decidim/admin/static_page_topics_controller.rb +2 -2
- data/app/controllers/decidim/admin/static_pages_controller.rb +2 -2
- data/app/forms/decidim/admin/attachment_form.rb +7 -1
- data/app/forms/decidim/admin/help_section_form.rb +1 -1
- data/app/forms/decidim/admin/impersonate_user_form.rb +0 -5
- data/app/forms/decidim/admin/organization_appearance_form.rb +2 -5
- data/app/forms/decidim/admin/{organization_external_domain_whitelist_form.rb → organization_external_domain_allowlist_form.rb} +3 -3
- data/app/forms/decidim/admin/organization_form.rb +4 -4
- data/app/forms/decidim/admin/static_page_form.rb +1 -2
- data/app/forms/decidim/admin/transfer_user_form.rb +0 -15
- data/app/helpers/decidim/admin/application_helper.rb +0 -13
- data/app/helpers/decidim/admin/filterable_helper.rb +19 -3
- data/app/helpers/decidim/admin/moderations/reports_helper.rb +3 -1
- data/app/helpers/decidim/admin/newsletters_helper.rb +3 -3
- data/app/helpers/decidim/admin/paginable/per_page_helper.rb +22 -0
- data/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +2 -2
- data/app/packs/entrypoints/decidim_admin.js +4 -1
- data/app/packs/src/decidim/admin/application.js +19 -15
- data/app/packs/src/decidim/admin/css_preview.js +39 -0
- data/app/packs/src/decidim/admin/form.js +18 -1
- data/app/packs/src/decidim/admin/newsletters.js +9 -18
- data/app/packs/src/decidim/admin/participatory_space_search.js +1 -1
- data/app/packs/src/decidim/admin/proposal_infinite_edit.js +2 -2
- data/app/packs/src/decidim/admin/sync_radio_buttons.js +27 -0
- data/app/packs/src/decidim/admin/text_copy.js +19 -0
- data/app/packs/stylesheets/decidim/admin/_cards.scss +1 -1
- data/app/packs/stylesheets/decidim/admin/_datepicker.scss +62 -0
- data/app/packs/stylesheets/decidim/admin/_item_edit.scss +1 -1
- data/app/packs/stylesheets/decidim/admin/_item_show.scss +8 -0
- data/app/packs/stylesheets/decidim/admin/_moderations.scss +0 -8
- data/app/packs/stylesheets/decidim/admin/_proposal_status.scss +5 -0
- data/app/packs/stylesheets/decidim/admin/application.scss +2 -0
- data/app/permissions/decidim/admin/permissions.rb +2 -2
- data/app/queries/decidim/admin/newsletter_recipients.rb +5 -9
- data/app/queries/decidim/admin/user_filter.rb +4 -4
- data/app/queries/decidim/admin/user_groups_evaluation.rb +1 -1
- data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -1
- data/app/views/decidim/admin/attachments/_form.html.erb +21 -2
- data/app/views/decidim/admin/attachments/index.html.erb +2 -2
- data/app/views/decidim/admin/authorization_workflows/index.html.erb +26 -8
- data/app/views/decidim/admin/block_user/new.html.erb +1 -1
- data/app/views/decidim/admin/categories/index.html.erb +2 -2
- data/app/views/decidim/admin/components/_form.html.erb +1 -1
- data/app/views/decidim/admin/components/index.html.erb +1 -5
- data/app/views/decidim/admin/conflicts/edit.html.erb +11 -21
- data/app/views/decidim/admin/conflicts/index.html.erb +6 -29
- data/app/views/decidim/admin/dashboard/_pending_moderations.html.erb +1 -1
- data/app/views/decidim/admin/dashboard/show.html.erb +1 -1
- data/app/views/decidim/admin/exports/_dropdown.html.erb +6 -6
- data/app/views/decidim/admin/impersonatable_users/index.html.erb +3 -3
- data/app/views/decidim/admin/imports/_dropdown.html.erb +5 -7
- data/app/views/decidim/admin/imports/new.html.erb +6 -7
- data/app/views/decidim/admin/logs/_filters.html.erb +3 -3
- data/app/views/decidim/admin/managed_users/promotions/new.html.erb +1 -1
- data/app/views/decidim/admin/moderated_users/index.html.erb +4 -4
- data/app/views/decidim/admin/moderations/index.html.erb +5 -5
- data/app/views/decidim/admin/moderations/reports/index.html.erb +6 -6
- data/app/views/decidim/admin/moderations/reports/show.html.erb +4 -4
- data/app/views/decidim/admin/newsletter_templates/index.html.erb +3 -2
- data/app/views/decidim/admin/newsletter_templates/show.html.erb +7 -7
- data/app/views/decidim/admin/newsletters/index.html.erb +1 -1
- data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +6 -7
- data/app/views/decidim/admin/newsletters/show.html.erb +1 -1
- data/app/views/decidim/admin/organization/_form.html.erb +3 -3
- data/app/views/decidim/admin/organization_appearance/form/_colors.html.erb +0 -3
- data/app/views/decidim/admin/organization_appearance/form/_images.html.erb +5 -5
- data/app/views/decidim/admin/organization_appearance/form/_minimap.html.erb +3 -3
- data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/_external_domain.html.erb +4 -4
- data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/_form.html.erb +2 -2
- data/app/views/decidim/admin/{organization_external_domain_whitelist → organization_external_domain_allowlist}/edit.html.erb +2 -2
- data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +1 -1
- data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +1 -1
- data/app/views/decidim/admin/share_tokens/_share_tokens.html.erb +1 -1
- data/app/views/decidim/admin/shared/_adjacent_navigation.html.erb +30 -0
- data/app/views/decidim/admin/shared/_admin_confirm_modal.html.erb +7 -7
- data/app/views/decidim/admin/shared/_filters.html.erb +1 -1
- data/app/views/decidim/admin/shared/_gallery.html.erb +1 -1
- data/app/views/decidim/admin/shared/landing_page/_content_blocks.html.erb +2 -2
- data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +1 -1
- data/app/views/decidim/admin/static_page_topics/index.html.erb +1 -1
- data/app/views/decidim/admin/static_pages/_form.html.erb +0 -4
- data/app/views/decidim/admin/users_statistics/_users_count.html.erb +2 -2
- data/app/views/layouts/decidim/admin/_admin_timeout_modal.html.erb +2 -2
- data/app/views/layouts/decidim/admin/_application.html.erb +4 -4
- data/app/views/layouts/decidim/admin/_callouts_full.html.erb +1 -1
- data/app/views/layouts/decidim/admin/_js_configuration.html.erb +3 -1
- data/app/views/layouts/decidim/admin/_title_bar.html.erb +2 -2
- data/app/views/layouts/decidim/admin/_title_bar_responsive.html.erb +2 -2
- data/config/locales/ar.yml +1 -54
- data/config/locales/bg.yml +15 -12
- data/config/locales/ca.yml +18 -15
- data/config/locales/cs.yml +15 -17
- data/config/locales/de.yml +18 -15
- data/config/locales/el.yml +0 -11
- data/config/locales/en.yml +15 -12
- data/config/locales/es-MX.yml +17 -14
- data/config/locales/es-PY.yml +17 -14
- data/config/locales/es.yml +19 -16
- data/config/locales/eu.yml +145 -154
- data/config/locales/fi-plain.yml +18 -15
- data/config/locales/fi.yml +39 -36
- data/config/locales/fr-CA.yml +15 -12
- data/config/locales/fr.yml +13 -10
- data/config/locales/ga-IE.yml +0 -3
- data/config/locales/gl.yml +2 -6
- data/config/locales/hu.yml +9 -10
- data/config/locales/id-ID.yml +0 -7
- data/config/locales/is-IS.yml +0 -15
- data/config/locales/it.yml +3 -10
- data/config/locales/ja.yml +20 -17
- data/config/locales/kaa.yml +3 -3
- data/config/locales/ko.yml +1 -6
- data/config/locales/lb.yml +4 -11
- data/config/locales/lt.yml +0 -12
- data/config/locales/lv.yml +2 -6
- data/config/locales/nl.yml +1 -8
- data/config/locales/no.yml +1 -8
- data/config/locales/pl.yml +15 -10
- data/config/locales/pt-BR.yml +8 -12
- data/config/locales/pt.yml +0 -11
- data/config/locales/ro-RO.yml +5 -22
- data/config/locales/ru.yml +1 -6
- data/config/locales/sk.yml +2 -6
- data/config/locales/sl.yml +2 -0
- data/config/locales/sq-AL.yml +3 -3
- data/config/locales/sr-CS.yml +3 -6
- data/config/locales/sv.yml +209 -357
- data/config/locales/th-TH.yml +0 -13
- data/config/locales/tr-TR.yml +2 -6
- data/config/locales/uk.yml +0 -6
- data/config/locales/zh-CN.yml +6 -3
- data/config/locales/zh-TW.yml +0 -11
- data/config/routes.rb +2 -2
- data/decidim-admin.gemspec +2 -2
- data/lib/decidim/admin/engine.rb +0 -1
- data/lib/decidim/admin/import/creator.rb +1 -1
- data/lib/decidim/admin/import/importer_factory.rb +2 -2
- data/lib/decidim/admin/menu.rb +4 -4
- data/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +3 -2
- data/lib/decidim/admin/test/commands/create_category_examples.rb +4 -2
- data/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb +3 -2
- data/lib/decidim/admin/test/commands/update_category_examples.rb +3 -2
- data/lib/decidim/admin/test/filterable_examples.rb +5 -3
- data/lib/decidim/admin/test/filters_participatory_space_user_roles_examples.rb +5 -5
- data/lib/decidim/admin/test/invite_participatory_space_admins_shared_examples.rb +1 -1
- data/lib/decidim/admin/test/invite_participatory_space_users_shared_context.rb +0 -1
- data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +12 -12
- data/lib/decidim/admin/test/manage_attachments_examples.rb +52 -28
- data/lib/decidim/admin/test/manage_categories_examples.rb +13 -13
- data/lib/decidim/admin/test/manage_component_permissions_examples.rb +5 -5
- data/lib/decidim/admin/test/manage_hide_content_examples.rb +4 -4
- data/lib/decidim/admin/test/manage_moderations_examples.rb +21 -21
- data/lib/decidim/admin/test/manage_paginated_collection_examples.rb +5 -5
- data/lib/decidim/admin/test/manage_participatory_space_publications_examples.rb +2 -2
- data/lib/decidim/admin/version.rb +1 -1
- data/lib/decidim/admin.rb +15 -0
- metadata +28 -27
- data/app/commands/decidim/admin/destroy_share_token.rb +0 -46
- data/app/commands/decidim/admin/destroy_static_page.rb +0 -40
- data/app/commands/decidim/admin/destroy_static_page_topic.rb +0 -40
- data/app/controllers/concerns/decidim/admin/verification_conflicts/filterable.rb +0 -31
- data/app/views/layouts/decidim/admin/login.html.erb +0 -19
- data/config/locales/bn-BD.yml +0 -1
- data/config/locales/bs-BA.yml +0 -528
- /data/app/packs/src/decidim/admin/{external_domain_whitelist.js → external_domain_allowlist.js} +0 -0
@@ -1,10 +1,10 @@
|
|
1
1
|
$(() => {
|
2
|
-
const $
|
2
|
+
const $limitedTimeLabel = $("label[for='component_settings_proposal_edit_time_limited']")
|
3
3
|
const $limitedTimeRadioButton = $("#component_settings_proposal_edit_time_limited")
|
4
4
|
const $infiniteTimeRadioButton = $("#component_settings_proposal_edit_time_infinite")
|
5
5
|
const $editTimeContainer = $(".proposal_edit_before_minutes_container")
|
6
6
|
|
7
|
-
$editTimeContainer.detach().appendTo($
|
7
|
+
$editTimeContainer.detach().appendTo($limitedTimeLabel)
|
8
8
|
|
9
9
|
if ($infiniteTimeRadioButton.is(":checked")) {
|
10
10
|
$editTimeContainer.hide();
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// Check one radio button when another is checked
|
2
|
+
//
|
3
|
+
// @example
|
4
|
+
// ```erb
|
5
|
+
// <%= form.radio_button :text_color, "Blue",
|
6
|
+
// data: {
|
7
|
+
// "sync-radio-buttons" => true,
|
8
|
+
// "sync-radio-buttons-value" => "unique-key"
|
9
|
+
// } %>
|
10
|
+
//
|
11
|
+
// <%= form.radio_button :bg_color, "Blue,"
|
12
|
+
// data: {
|
13
|
+
// "sync-radio-buttons-value-target" => "unique-key"
|
14
|
+
// } %>
|
15
|
+
// ```
|
16
|
+
//
|
17
|
+
window.addEventListener("DOMContentLoaded", () => {
|
18
|
+
document.querySelectorAll("input[data-sync-radio-buttons=true]").forEach((element) => {
|
19
|
+
element.addEventListener("change", (event) => {
|
20
|
+
const value = event.target.dataset.syncRadioButtonsValue;
|
21
|
+
const radio = document.querySelector(`input[data-sync-radio-buttons-value-target=${value}]`);
|
22
|
+
|
23
|
+
radio.checked = true;
|
24
|
+
radio.dispatchEvent(new Event("change"));
|
25
|
+
})
|
26
|
+
})
|
27
|
+
})
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Copy the value of a text input or textarea to another element.
|
2
|
+
//
|
3
|
+
// @example
|
4
|
+
// ```erb
|
5
|
+
// <%= form.translated :text_field, :example, data: { "text-copy" => true, "target" => "strong[data-copy-example]" } %>
|
6
|
+
//
|
7
|
+
// <div data-copy-example>
|
8
|
+
// <%= t(".preview") %>
|
9
|
+
// </div>
|
10
|
+
// ```
|
11
|
+
//
|
12
|
+
window.addEventListener("DOMContentLoaded", () => {
|
13
|
+
document.querySelectorAll("input[data-text-copy=true], textarea[data-text-copy=true]").forEach((element) => {
|
14
|
+
element.addEventListener("change", (event) => {
|
15
|
+
const target = document.querySelector(event.target.dataset.target);
|
16
|
+
target.innerText = event.target.value;
|
17
|
+
})
|
18
|
+
});
|
19
|
+
})
|
@@ -0,0 +1,62 @@
|
|
1
|
+
.wc-datepicker {
|
2
|
+
@apply z-[2];
|
3
|
+
|
4
|
+
&__current-month {
|
5
|
+
@apply mt-4;
|
6
|
+
}
|
7
|
+
|
8
|
+
&__next-month-button,
|
9
|
+
&__previous-month-button {
|
10
|
+
> svg {
|
11
|
+
@apply fill-none w-16 h-16;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.datepicker {
|
17
|
+
&__clock-button {
|
18
|
+
@apply top-0;
|
19
|
+
}
|
20
|
+
|
21
|
+
&__calendar-button {
|
22
|
+
@apply top-0;
|
23
|
+
}
|
24
|
+
|
25
|
+
&__pick-calendar {
|
26
|
+
@apply z-[3];
|
27
|
+
}
|
28
|
+
|
29
|
+
&__close-calendar {
|
30
|
+
@apply z-[3];
|
31
|
+
}
|
32
|
+
|
33
|
+
&__time-frame {
|
34
|
+
@apply z-[1];
|
35
|
+
}
|
36
|
+
|
37
|
+
&__hour-picker,
|
38
|
+
&__minute-picker {
|
39
|
+
@apply left-2 ml-px;
|
40
|
+
}
|
41
|
+
|
42
|
+
&__hour-down,
|
43
|
+
&__hour-up,
|
44
|
+
&__minute-up,
|
45
|
+
&__minute-down {
|
46
|
+
@apply h-6 w-full;
|
47
|
+
|
48
|
+
> svg {
|
49
|
+
@apply w-10 h-6 pr-1;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
.item__edit {
|
55
|
+
&-form {
|
56
|
+
.form {
|
57
|
+
[type="number"].wc-datepicker__year-select {
|
58
|
+
@apply text-sm;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
@@ -35,4 +35,6 @@
|
|
35
35
|
@import "stylesheets/decidim/admin/_data_picker.scss";
|
36
36
|
@import "stylesheets/decidim/admin/_legacy_foundation.scss";
|
37
37
|
@import "stylesheets/decidim/admin/_sidebar-menu.scss";
|
38
|
+
@import "stylesheets/decidim/admin/_datepicker.scss";
|
38
39
|
@import "stylesheets/decidim/admin/_minimap.scss";
|
40
|
+
@import "stylesheets/decidim/admin/_proposal_status.scss";
|
@@ -218,11 +218,11 @@ module Decidim
|
|
218
218
|
@organization ||= context.fetch(:organization, nil) || context.fetch(:current_organization, nil)
|
219
219
|
end
|
220
220
|
|
221
|
-
def user_can_enter_space_area?(**
|
221
|
+
def user_can_enter_space_area?(**)
|
222
222
|
return unless permission_action.action == :enter &&
|
223
223
|
permission_action.subject == :space_area
|
224
224
|
|
225
|
-
space_allows_admin_access_to_current_action?(**
|
225
|
+
space_allows_admin_access_to_current_action?(**)
|
226
226
|
end
|
227
227
|
|
228
228
|
def space_allows_admin_access_to_current_action?(require_admin_terms_accepted: false)
|
@@ -20,7 +20,11 @@ module Decidim
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def query
|
23
|
-
recipients =
|
23
|
+
recipients = Decidim::User.where(organization: @form.current_organization)
|
24
|
+
.where.not(newsletter_notifications_at: nil)
|
25
|
+
.where.not(email: nil)
|
26
|
+
.where.not(confirmed_at: nil)
|
27
|
+
.not_deleted
|
24
28
|
|
25
29
|
recipients = recipients.interested_in_scopes(@form.scope_ids) if @form.scope_ids.present?
|
26
30
|
|
@@ -37,14 +41,6 @@ module Decidim
|
|
37
41
|
|
38
42
|
private
|
39
43
|
|
40
|
-
def recipients_base_query
|
41
|
-
Decidim::User.available
|
42
|
-
.where(organization: @form.current_organization)
|
43
|
-
.where.not(newsletter_notifications_at: nil)
|
44
|
-
.where.not(email: nil)
|
45
|
-
.confirmed
|
46
|
-
end
|
47
|
-
|
48
44
|
# Return the ids of the ParticipatorySpace selected
|
49
45
|
# in form, grouped by type
|
50
46
|
# This will be used to take followers and
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Admin
|
5
|
-
# A class used to filter users by
|
5
|
+
# A class used to filter users by allowed scope or searches on their
|
6
6
|
# name
|
7
7
|
class UserFilter < Decidim::Query
|
8
|
-
|
8
|
+
ALLOWED_STATE_SCOPES = %w(
|
9
9
|
officialized
|
10
10
|
not_officialized
|
11
11
|
managed
|
@@ -32,7 +32,7 @@ module Decidim
|
|
32
32
|
@state = state
|
33
33
|
end
|
34
34
|
|
35
|
-
# List the User groups by the
|
35
|
+
# List the User groups by the different filters.
|
36
36
|
def query
|
37
37
|
users = scope
|
38
38
|
users = filter_by_search(users)
|
@@ -50,7 +50,7 @@ module Decidim
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def filter_by_state(users)
|
53
|
-
return users unless
|
53
|
+
return users unless ALLOWED_STATE_SCOPES.include?(state)
|
54
54
|
|
55
55
|
users.public_send(state)
|
56
56
|
end
|
@@ -17,8 +17,27 @@
|
|
17
17
|
<%= form.select :attachment_collection_id, @form.attachment_collections.map { |c| [translated_attribute(c.name), c.id] }, include_blank: true %>
|
18
18
|
</div>
|
19
19
|
|
20
|
-
<div class="
|
21
|
-
<%=
|
20
|
+
<div class="p-6" data-file-or-link-tabs-controller>
|
21
|
+
<%= cell "decidim/tab_panels", [
|
22
|
+
{
|
23
|
+
enabled: true,
|
24
|
+
id: "file",
|
25
|
+
text: "Upload file",
|
26
|
+
icon: "file-upload-line",
|
27
|
+
method: :cell,
|
28
|
+
selected: form.object.file.present?,
|
29
|
+
args: ["/decidim/attachments_file_tab", form]
|
30
|
+
},
|
31
|
+
{
|
32
|
+
enabled: true,
|
33
|
+
id: "link",
|
34
|
+
text: "Link",
|
35
|
+
icon: "link",
|
36
|
+
method: :cell,
|
37
|
+
selected: form.object.link.present?,
|
38
|
+
args: ["/decidim/attachments_link_tab", form]
|
39
|
+
}
|
40
|
+
] %>
|
22
41
|
</div>
|
23
42
|
</div>
|
24
43
|
</div>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<th><%= t("models.attachment.fields.collection", scope: "decidim.admin") %></th>
|
19
19
|
<th><%= t("models.attachment.fields.content_type", scope: "decidim.admin") %></th>
|
20
20
|
<th><%= t("models.attachment.fields.file_size", scope: "decidim.admin") %></th>
|
21
|
-
<th
|
21
|
+
<th></th>
|
22
22
|
</tr>
|
23
23
|
</thead>
|
24
24
|
<tbody>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<%= attachment.file_type %>
|
35
35
|
</td>
|
36
36
|
<td>
|
37
|
-
<%= number_to_human_size(attachment.file_size) %>
|
37
|
+
<%= attachment.file? ? number_to_human_size(attachment.file_size) : "-" %>
|
38
38
|
</td>
|
39
39
|
<td class="table-list__actions">
|
40
40
|
<% if allowed_to? :update, :attachment, attachment: attachment %>
|
@@ -14,24 +14,42 @@
|
|
14
14
|
</h2>
|
15
15
|
</div>
|
16
16
|
<div class="card-section">
|
17
|
-
<table class="table-list
|
17
|
+
<table class="table-list">
|
18
18
|
<thead>
|
19
19
|
<tr>
|
20
20
|
<th><%= t("decidim.authorization_handlers.name") %></th>
|
21
|
-
<th><%= t("decidim.authorization_handlers.help") %></th>
|
21
|
+
<th class="!text-left"><%= t("decidim.authorization_handlers.help") %></th>
|
22
22
|
</tr>
|
23
23
|
</thead>
|
24
24
|
<tbody>
|
25
25
|
<% @workflows.each do |manifest| %>
|
26
26
|
<tr>
|
27
27
|
<% workflow = Decidim::Verifications::Adapter.new(manifest) %>
|
28
|
-
<td><%= link_to workflow.fullname, workflow.admin_root_path %></td>
|
29
28
|
<td>
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
<% if workflow.has_admin_root_path? %>
|
30
|
+
<%= link_to workflow.fullname, workflow.admin_root_path %>
|
31
|
+
<% else %>
|
32
|
+
<%= workflow.fullname %>
|
33
|
+
<% end %>
|
34
|
+
</td>
|
35
|
+
<td class="!text-left">
|
36
|
+
<% i18n_key = "decidim.authorization_handlers.admin.#{workflow.key}.help" %>
|
37
|
+
<% if I18n.exists?(i18n_key, current_locale) %>
|
38
|
+
<ul class="list-decimal ml-4">
|
39
|
+
<% t(i18n_key).each do |tip| %>
|
40
|
+
<li><%= tip %></li>
|
41
|
+
<% end %>
|
42
|
+
</ul>
|
43
|
+
<% else %>
|
44
|
+
<div class="flash warning">
|
45
|
+
<ul>
|
46
|
+
<% default_help = t("decidim.authorization_handlers.admin.default.help", authorization_handler: i18n_key) %>
|
47
|
+
<% default_help.each do |tip| %>
|
48
|
+
<li><%= tip %></li>
|
49
|
+
<% end %>
|
50
|
+
</ul>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
35
53
|
</td>
|
36
54
|
</tr>
|
37
55
|
<% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%= cell("decidim/announcement", t(".already_reported_html"), callout_class: "alert" ) %>
|
20
20
|
<% end %>
|
21
21
|
|
22
|
-
<% if
|
22
|
+
<% if defined?(Decidim::Templates) %>
|
23
23
|
<%= render "decidim/templates/admin/block_user_templates/template_chooser", form: f %>
|
24
24
|
<% end %>
|
25
25
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<thead>
|
15
15
|
<tr>
|
16
16
|
<th><%= t("activemodel.attributes.category.name") %></th>
|
17
|
-
<th
|
17
|
+
<th></th>
|
18
18
|
</tr>
|
19
19
|
</thead>
|
20
20
|
<tbody>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
</td>
|
39
39
|
</tr>
|
40
40
|
<% category.subcategories.each do |subcategory| %>
|
41
|
-
<tr
|
41
|
+
<tr>
|
42
42
|
<td>
|
43
43
|
<%= link_to translated_attribute(subcategory.name), edit_category_path(current_participatory_space, subcategory) %><br>
|
44
44
|
</td>
|
@@ -59,7 +59,7 @@
|
|
59
59
|
|
60
60
|
<div id="panel-step_settings" class="card-section">
|
61
61
|
<div class="row column">
|
62
|
-
<fieldset
|
62
|
+
<fieldset>
|
63
63
|
<div class="card-section">
|
64
64
|
<% current_participatory_space.steps.each do |step| %>
|
65
65
|
<fieldset class="step-settings-<%= step.id %>">
|
@@ -14,12 +14,8 @@
|
|
14
14
|
<div class="dropdown-pane" id="add-component-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
|
15
15
|
<ul class="vertical menu add-components font-normal">
|
16
16
|
<% @manifests.each do |manifest| %>
|
17
|
-
|
18
|
-
<li>
|
19
|
-
<%= t("#{manifest.name}.name", scope: "decidim.components") %>
|
20
|
-
</li>
|
17
|
+
<li><%= link_to t("#{manifest.name}.name", scope: "decidim.components"), new_component_path(type: manifest.name), class: manifest.name %></li>
|
21
18
|
<% end %>
|
22
|
-
<% end %>
|
23
19
|
</ul>
|
24
20
|
</div>
|
25
21
|
</div>
|
@@ -27,28 +27,18 @@
|
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
|
30
|
-
|
31
|
-
<div class="
|
32
|
-
|
33
|
-
<div class="
|
34
|
-
|
35
|
-
<div class="card-section">
|
36
|
-
<div class="row column">
|
30
|
+
<%= decidim_form_for(@form, url: conflict_path, method: :put, html: { class: "form" }) do |f| %>
|
31
|
+
<div class="card">
|
32
|
+
<div class="card-section">
|
33
|
+
<div class="row column">
|
34
|
+
<%= f.text_field :reason, label: t("reason", scope: "decidim.admin.conflicts.transfer") %>
|
37
35
|
|
38
|
-
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="row column">
|
42
|
-
|
43
|
-
<%= f.text_field :email, label: t("email", scope: "decidim.admin.conflicts.transfer") %>
|
44
|
-
</div>
|
45
|
-
</div>
|
46
|
-
</div>
|
36
|
+
<%= f.text_field :email, label: t("email", scope: "decidim.admin.conflicts.transfer") %>
|
47
37
|
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
48
40
|
|
49
|
-
|
50
|
-
|
51
|
-
</div>
|
52
|
-
<% end %>
|
41
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
42
|
+
<%= f.submit t("title", scope: "decidim.admin.conflicts.transfer"), class: "button button__sm button__secondary" %>
|
53
43
|
</div>
|
54
|
-
|
44
|
+
<% end %>
|
@@ -1,32 +1,10 @@
|
|
1
1
|
<% add_decidim_page_title(t("title", scope: "decidim.admin.conflicts")) %>
|
2
|
-
<div class="item_show__header">
|
3
|
-
<h1 class="item_show__header-title">
|
4
|
-
<%= t("title", scope: "decidim.admin.conflicts") %>
|
5
|
-
</h1>
|
6
|
-
</div>
|
7
|
-
|
8
|
-
<div class="filters__section">
|
9
|
-
<div class="fcell search">
|
10
|
-
<%= search_form_for(query, url: url_for) do |form| %>
|
11
|
-
<%= applied_filters_hidden_field_tags %>
|
12
|
-
<div class="input-group">
|
13
|
-
<%= form.search_field(
|
14
|
-
search_field_predicate,
|
15
|
-
class: "input-group-field",
|
16
|
-
label: false,
|
17
|
-
placeholder: t(".text")
|
18
|
-
) %>
|
19
|
-
<div class="input-group-button">
|
20
|
-
<button type="submit" class="text-secondary" aria-label="<%= t("decidim.search.term_input_placeholder") %>">
|
21
|
-
<%= icon "search-line", class: "fill-secondary w-4 h-4" %>
|
22
|
-
</button>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
<% end %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
|
29
2
|
<div class="card">
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h1 class="item_show__header-title">
|
5
|
+
<%= t("title", scope: "decidim.admin.conflicts") %>
|
6
|
+
</h1>
|
7
|
+
</div>
|
30
8
|
<div class="table-scroll">
|
31
9
|
<table class="table-list">
|
32
10
|
<thead>
|
@@ -39,7 +17,7 @@
|
|
39
17
|
</tr>
|
40
18
|
</thead>
|
41
19
|
<tbody>
|
42
|
-
<% conflicts.each do |conflict| %>
|
20
|
+
<% @conflicts.each do |conflict| %>
|
43
21
|
<tr>
|
44
22
|
<td><%= conflict.current_user.name %></td>
|
45
23
|
<td><%= conflict.managed_user.name %></td>
|
@@ -52,4 +30,3 @@
|
|
52
30
|
</table>
|
53
31
|
</div>
|
54
32
|
</div>
|
55
|
-
<%= decidim_paginate conflicts %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
</div>
|
7
7
|
|
8
8
|
<div class="card-section">
|
9
|
-
<p><%= t(".
|
9
|
+
<p><%= t(".announcement", count: count_pending_moderations) %></p>
|
10
10
|
<p><%= link_to t(".goto_moderation"), moderations_path, class: "button button__sm button__secondary mt-2" %></p>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<span class="exports button button__sm button__secondary
|
1
|
+
<span class="exports button button__sm button__secondary" data-toggle="<%= dropdown_id(filters) %>">
|
2
2
|
<% if filters.present? %>
|
3
3
|
<%= t("actions.export-selection", scope: "decidim.admin") %>
|
4
4
|
<% else %>
|
@@ -10,11 +10,11 @@
|
|
10
10
|
<ul class="vertical menu add-components">
|
11
11
|
<% component.manifest.export_manifests.each do |manifest| %>
|
12
12
|
<% manifest.formats.each do |format| %>
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<li class="exports--format--<%= format.downcase %> exports--<%= manifest.name %>">
|
14
|
+
<%= link_to t("decidim.admin.exports.export_as", name: t("decidim.#{component.manifest.name}.admin.exports.#{manifest.name}"), export_format: t("decidim.admin.exports.formats.#{format}")),
|
15
|
+
exports_path(component, id: manifest.name, format:, resource_id:, filters:),
|
16
|
+
method: :post %>
|
17
|
+
</li>
|
18
18
|
<% end %>
|
19
19
|
<% end %>
|
20
20
|
</ul>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% add_decidim_page_title(t("impersonatable_users", scope: "decidim.admin.titles")) %>
|
2
2
|
<% if current_organization.available_authorizations.empty? %>
|
3
|
-
<div
|
3
|
+
<div>
|
4
4
|
<%= cell("decidim/announcement", t(".needs_authorization_warning"), callout_class: "warning" ) %>
|
5
5
|
</div>
|
6
6
|
<% end %>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
</div>
|
33
33
|
<div class="fcell search">
|
34
34
|
<%= form_tag "", method: :get do %>
|
35
|
-
<div
|
35
|
+
<div>
|
36
36
|
<div class="input-group">
|
37
37
|
<%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
|
38
38
|
<%= hidden_field_tag :state, @state %>
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<td><%= user.managed? ? t(".managed") : t(".not_managed") %></td>
|
65
65
|
<td class="table-list__actions">
|
66
66
|
<% if allowed_to? :impersonate, :impersonatable_user, user: user %>
|
67
|
-
<%= icon_link_to "
|
67
|
+
<%= icon_link_to "user-line", new_impersonatable_user_impersonation_path(user), t(".impersonate"), class: "action-icon--impersonate" %>
|
68
68
|
<% end %>
|
69
69
|
<%= icon_link_to "time-line", impersonatable_user_impersonation_logs_path(user), t(".view_logs"), class: "action-icon--view-logs" %>
|
70
70
|
<% if allowed_to? :promote, :impersonatable_user, user: user %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<span class="imports button button__sm button__secondary
|
1
|
+
<span class="imports button button__sm button__secondary" data-toggle="import-dropdown">
|
2
2
|
<%= t "actions.import", scope: "decidim.admin" %>
|
3
3
|
<%= icon "arrow-down-s-line", class: "dropdown-filter-icon" %>
|
4
4
|
</span>
|
@@ -7,12 +7,10 @@
|
|
7
7
|
<% if custom %>
|
8
8
|
<%= yield %>
|
9
9
|
<% else %>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</li>
|
15
|
-
<% end %>
|
10
|
+
<% component.manifest.import_manifests.each do |import_manifest| %>
|
11
|
+
<li class="imports--file imports--<%= import_manifest.name %>">
|
12
|
+
<%= link_to import_manifest.message(:label, self), admin_imports_path(component, resource_id:, name: import_manifest.name) %>
|
13
|
+
</li>
|
16
14
|
<% end %>
|
17
15
|
<% end %>
|
18
16
|
</ul>
|