decidim-admin 0.24.1 → 0.25.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/cells/decidim/admin/content_block/show.erb +2 -2
- data/app/commands/decidim/admin/block_user.rb +6 -0
- data/app/commands/decidim/admin/create_attachment.rb +2 -1
- data/app/commands/decidim/admin/hide_resource.rb +1 -0
- data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +1 -1
- data/app/commands/decidim/admin/update_attachment.rb +5 -1
- data/app/commands/decidim/admin/update_content_block.rb +1 -1
- data/app/commands/decidim/admin/update_external_domain_whitelist.rb +32 -0
- data/app/commands/decidim/admin/update_organization.rb +2 -1
- data/app/commands/decidim/admin/update_organization_appearance.rb +4 -14
- data/app/controllers/concerns/decidim/admin/filterable.rb +1 -3
- data/app/controllers/concerns/decidim/participatory_space_private_users/admin/filterable.rb +34 -0
- data/app/controllers/decidim/admin/concerns/has_attachments.rb +1 -4
- data/app/controllers/decidim/admin/concerns/has_private_users.rb +6 -3
- data/app/controllers/decidim/admin/imports_controller.rb +1 -0
- data/app/controllers/decidim/admin/moderated_users_controller.rb +6 -2
- data/app/controllers/decidim/admin/organization_controller.rb +11 -1
- data/app/controllers/decidim/admin/organization_external_domain_whitelist_controller.rb +38 -0
- data/app/controllers/decidim/admin/users_controller.rb +7 -1
- data/app/forms/decidim/admin/external_domain_form.rb +19 -0
- data/app/forms/decidim/admin/import_form.rb +1 -0
- data/app/forms/decidim/admin/organization_appearance_form.rb +7 -7
- data/app/forms/decidim/admin/organization_external_domain_whitelist_form.rb +23 -0
- data/app/forms/decidim/admin/organization_form.rb +1 -0
- data/app/forms/decidim/admin/participatory_space_private_user_csv_import_form.rb +2 -0
- data/app/forms/decidim/admin/user_group_csv_verification_form.rb +2 -0
- data/app/helpers/decidim/admin/filterable_helper.rb +1 -1
- data/app/helpers/decidim/admin/menu_helper.rb +7 -7
- data/app/helpers/decidim/admin/uploader_image_dimensions_helper.rb +2 -1
- data/app/jobs/decidim/admin/expire_impersonation_job.rb +1 -2
- data/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +1 -1
- data/app/packs/entrypoints/decidim_admin.js +43 -0
- data/app/packs/entrypoints/decidim_admin.scss +1 -0
- data/app/packs/src/decidim/admin/application.js +68 -0
- data/app/packs/src/decidim/admin/auto_buttons_by_position.component.js +37 -0
- data/app/packs/src/decidim/admin/auto_label_by_position.component.js +28 -0
- data/app/packs/src/decidim/admin/autocomplete.component.js +146 -0
- data/app/{frontend/components/autocomplete.component.test.tsx → packs/src/decidim/admin/autocomplete.component.test.js} +1 -2
- data/app/packs/src/decidim/admin/budget_rule_toggler.component.js +50 -0
- data/app/{assets/javascripts → packs/src}/decidim/admin/choose_language.js +0 -0
- data/app/packs/src/decidim/admin/draggable-list.js +30 -0
- data/app/packs/src/decidim/admin/dynamic_fields.component.js +230 -0
- data/app/packs/src/decidim/admin/external_domain_whitelist.js +100 -0
- data/app/packs/src/decidim/admin/field_dependent_inputs.component.js +37 -0
- data/app/{assets/javascripts/decidim/admin/form.js.es6 → packs/src/decidim/admin/form.js} +6 -9
- data/app/{assets/javascripts/decidim/admin/import_guidance.js.es6 → packs/src/decidim/admin/import_guidance.js} +2 -3
- data/app/{assets/javascripts/decidim/admin/managed_users.js.es6 → packs/src/decidim/admin/managed_users.js} +4 -4
- data/app/packs/src/decidim/admin/moderations.js +20 -0
- data/app/{assets/javascripts/decidim/admin/newsletters.js.es6 → packs/src/decidim/admin/newsletters.js} +0 -0
- data/app/{assets/javascripts/decidim/admin/officializations.js.es6 → packs/src/decidim/admin/officializations.js} +0 -0
- data/app/{assets/javascripts/decidim/admin/proposal_infinite_edit.js.es6 → packs/src/decidim/admin/proposal_infinite_edit.js} +0 -0
- data/app/{assets/javascripts/decidim/admin/resources_permissions.js.es6 → packs/src/decidim/admin/resources_permissions.js} +3 -5
- data/app/packs/src/decidim/admin/scope_picker_enabler.component.js +12 -0
- data/app/packs/src/decidim/admin/sort_list.component.js +31 -0
- data/app/packs/src/decidim/admin/sortable.js +21 -0
- data/app/packs/src/decidim/admin/subform_multi_toggler.component.js +38 -0
- data/app/packs/src/decidim/admin/subform_toggler.component.js +38 -0
- data/app/{assets/javascripts/decidim/admin/tab_focus.js.es6 → packs/src/decidim/admin/tab_focus.js} +0 -2
- data/app/packs/src/decidim/admin/toggle_nav.js +14 -0
- data/app/{assets/javascripts/decidim/admin/welcome_notification.js.es6 → packs/src/decidim/admin/welcome_notification.js} +2 -2
- data/app/packs/stylesheets/decidim/admin/_decidim.scss +24 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/_variables.scss +0 -0
- data/app/packs/stylesheets/decidim/admin/application.scss +22 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/bundle.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/components/_accordion.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/components/_autocomplete_select.component.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/components/_dropdown-menu.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/components/_sortable.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_action-icon.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_block_user.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_cards.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_categories.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_dropdown_inverted.scss +0 -0
- data/app/packs/stylesheets/decidim/admin/extra/_editor.scss +1 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_email_preview.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_label-required.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_login.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_logs.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_newsletter-templates-gallery.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_organization-appearance.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_quill.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_select_multiple.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_show_email.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_sort.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/extra/_title_bar.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_action-icon.scss +1 -1
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_agenda.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_buttons.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_callouts.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_card-grid.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_cards.scss +1 -1
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_char-counter.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_component-counter.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_draggable-list.scss +2 -2
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_dropdown.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_filters.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_forms.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_icons.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_import_result.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_layout.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_loading-spinner.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_main-nav.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_moderations.scss +0 -0
- data/app/packs/stylesheets/decidim/admin/modules/_modules.scss +43 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_pics.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_process-header.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_reveal.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_secondary-nav.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_table-list.scss +13 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_tabs.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_title-bar.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_typography.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_user-login.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/modules/_users_statistics.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/plugins/_foundation-datepicker.scss +0 -0
- data/{vendor/assets/stylesheets → app/packs/stylesheets/decidim/admin}/plugins/jquery.auto-complete.css +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/user_moderations.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/utils/_flex.scss +2 -2
- data/app/{assets → packs}/stylesheets/decidim/admin/utils/_helpers.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/utils/_keyframes.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/utils/_mixins.scss +30 -3
- data/app/{assets → packs}/stylesheets/decidim/admin/utils/_settings.scss +11 -3
- data/app/{assets → packs}/stylesheets/decidim/admin/utils/_toggle-expand.scss +0 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/_constants.scss +1 -1
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/_math.scss +0 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_acos.scss +14 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_asin.scss +16 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_atan.scss +36 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_atan2.scss +46 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_cos.scss +17 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/functions/_cot.scss +6 -3
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/functions/_csc.scss +6 -3
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/functions/_exp.scss +10 -6
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_fact.scss +21 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss +25 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss +20 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_log.scss +39 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_pow.scss +34 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/functions/_sec.scss +6 -3
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/functions/_sin.scss +4 -3
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/functions/_sqrt.scss +21 -0
- data/app/{assets → packs}/stylesheets/decidim/admin/vendor/mathsass/functions/_tan.scss +6 -3
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_deg-to-rad.scss +6 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_rad-to-deg.scss +6 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_strip-unit.scss +11 -0
- data/app/packs/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss +19 -0
- data/app/presenters/decidim/admin/simple_menu_presenter.rb +11 -0
- data/app/queries/decidim/admin/newsletter_recipients.rb +3 -1
- data/app/views/decidim/admin/area_types/index.html.erb +2 -2
- data/app/views/decidim/admin/areas/index.html.erb +1 -1
- data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -1
- data/app/views/decidim/admin/categories/index.html.erb +1 -1
- data/app/views/decidim/admin/components/_form.html.erb +0 -2
- data/app/views/decidim/admin/impersonations/_form.html.erb +3 -1
- data/app/views/decidim/admin/imports/new.html.erb +1 -9
- data/app/views/decidim/admin/newsletters/index.html.erb +1 -1
- data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +1 -3
- data/app/views/decidim/admin/newsletters/show.html.erb +1 -1
- data/app/views/decidim/admin/officializations/index.html.erb +3 -3
- data/app/views/decidim/admin/organization/_form.html.erb +6 -2
- data/app/views/decidim/admin/organization_appearance/_form.html.erb +0 -2
- data/app/views/decidim/admin/organization_appearance/form/_images.html.erb +20 -4
- data/app/views/decidim/admin/organization_appearance/form/_minimap.html.erb +7 -7
- data/app/views/decidim/admin/organization_external_domain_whitelist/_external_domain.html.erb +31 -0
- data/app/views/decidim/admin/organization_external_domain_whitelist/_form.html.erb +37 -0
- data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +6 -0
- data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +4 -4
- data/app/views/decidim/admin/resource_permissions/edit.html.erb +0 -2
- data/app/views/decidim/admin/scope_types/index.html.erb +3 -3
- data/app/views/decidim/admin/scopes/index.html.erb +1 -1
- data/app/views/decidim/admin/shared/_gallery.html.erb +1 -1
- data/app/views/decidim/admin/static_pages/_form.html.erb +0 -1
- data/app/views/decidim/admin/static_pages/_topic.html.erb +3 -3
- data/app/views/decidim/admin/user_groups/index.html.erb +2 -2
- data/app/views/decidim/admin/users/index.html.erb +10 -9
- data/app/views/layouts/decidim/admin/_application.html.erb +1 -1
- data/app/views/layouts/decidim/admin/_header.html.erb +2 -3
- data/app/views/layouts/decidim/admin/_js_configuration.html.erb +1 -1
- data/app/views/layouts/decidim/admin/_title_bar.html.erb +1 -1
- data/app/views/layouts/decidim/admin/global_moderations.html.erb +1 -1
- data/app/views/layouts/decidim/admin/newsletters.erb +1 -1
- data/app/views/layouts/decidim/admin/pages.html.erb +2 -2
- data/app/views/layouts/decidim/admin/settings.html.erb +1 -1
- data/app/views/layouts/decidim/admin/users.html.erb +2 -52
- data/config/assets.rb +8 -0
- data/config/locales/ar.yml +0 -4
- data/config/locales/bg.yml +0 -3
- data/config/locales/ca.yml +36 -6
- data/config/locales/cs.yml +48 -6
- data/config/locales/de.yml +18 -6
- data/config/locales/el.yml +0 -4
- data/config/locales/en.yml +58 -16
- data/config/locales/eo.yml +0 -1
- data/config/locales/es-MX.yml +19 -6
- data/config/locales/es-PY.yml +19 -6
- data/config/locales/es.yml +19 -6
- data/config/locales/eu.yml +0 -4
- data/config/locales/fi-plain.yml +48 -6
- data/config/locales/fi.yml +48 -6
- data/config/locales/fr-CA.yml +53 -6
- data/config/locales/fr-LU.yml +1029 -0
- data/config/locales/fr.yml +53 -6
- data/config/locales/gl.yml +71 -6
- data/config/locales/hu.yml +70 -4
- data/config/locales/id-ID.yml +0 -4
- data/config/locales/is-IS.yml +0 -4
- data/config/locales/it.yml +161 -10
- data/config/locales/ja.yml +152 -5
- data/config/locales/lb-LU.yml +1 -0
- data/config/locales/lv.yml +0 -4
- data/config/locales/nl.yml +17 -6
- data/config/locales/no.yml +6 -4
- data/config/locales/pl.yml +45 -24
- data/config/locales/pt-BR.yml +346 -4
- data/config/locales/pt.yml +6 -4
- data/config/locales/ro-RO.yml +112 -4
- data/config/locales/ru.yml +0 -4
- data/config/locales/sk.yml +0 -4
- data/config/locales/sl.yml +0 -4
- data/config/locales/sr-CS.yml +0 -4
- data/config/locales/sv.yml +45 -2
- data/config/locales/tr-TR.yml +0 -4
- data/config/locales/uk.yml +0 -2
- data/config/locales/zh-CN.yml +0 -4
- data/config/routes.rb +2 -0
- data/lib/decidim/admin/engine.rb +210 -137
- data/lib/decidim/admin/import/readers/xlsx.rb +25 -0
- data/lib/decidim/admin/import/readers.rb +3 -3
- data/lib/decidim/admin/test/filters_participatory_space_users_examples.rb +73 -0
- data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +1 -1
- data/lib/decidim/admin/test/manage_attachments_examples.rb +1 -1
- data/lib/decidim/admin/test.rb +1 -0
- data/lib/decidim/admin/version.rb +1 -1
- metadata +141 -180
- data/app/assets/config/decidim_admin_manifest.js +0 -8
- data/app/assets/javascripts/decidim/admin/application.js.es6 +0 -78
- data/app/assets/javascripts/decidim/admin/auto_buttons_by_position.component.js.es6 +0 -42
- data/app/assets/javascripts/decidim/admin/auto_label_by_position.component.js.es6 +0 -33
- data/app/assets/javascripts/decidim/admin/budget_rule_toggler.component.js.es6 +0 -55
- data/app/assets/javascripts/decidim/admin/bundle.js +0 -34
- data/app/assets/javascripts/decidim/admin/bundle.js.map +0 -1
- data/app/assets/javascripts/decidim/admin/draggable-list.js.es6 +0 -30
- data/app/assets/javascripts/decidim/admin/dynamic_fields.component.js.es6 +0 -233
- data/app/assets/javascripts/decidim/admin/field_dependent_inputs.component.js.es6 +0 -39
- data/app/assets/javascripts/decidim/admin/moderations.js.es6 +0 -24
- data/app/assets/javascripts/decidim/admin/scope_picker_enabler.component.js.es6 +0 -14
- data/app/assets/javascripts/decidim/admin/sort_list.component.js.es6 +0 -35
- data/app/assets/javascripts/decidim/admin/sortable.js.es6 +0 -22
- data/app/assets/javascripts/decidim/admin/subform_multi_toggler.component.js.es6 +0 -43
- data/app/assets/javascripts/decidim/admin/subform_toggler.component.js.es6 +0 -42
- data/app/assets/javascripts/decidim/admin/toggle_nav.js.es6 +0 -17
- data/app/assets/javascripts/decidim/admin/user_moderations.js +0 -2
- data/app/assets/stylesheets/decidim/admin/_decidim.scss +0 -20
- data/app/assets/stylesheets/decidim/admin/application.scss.erb +0 -6
- data/app/assets/stylesheets/decidim/admin/extra/_editor.scss +0 -1
- data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +0 -43
- data/app/assets/stylesheets/decidim/admin/utils/_fontface.scss +0 -29
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_acos.scss +0 -12
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_asin.scss +0 -12
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan.scss +0 -28
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan2.scss +0 -37
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cos.scss +0 -13
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_fact.scss +0 -18
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss +0 -21
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss +0 -17
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_log.scss +0 -34
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_pow.scss +0 -28
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sqrt.scss +0 -16
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_deg-to-rad.scss +0 -4
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_rad-to-deg.scss +0 -4
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_strip-unit.scss +0 -8
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss +0 -13
- data/app/frontend/components/autocomplete.component.tsx +0 -198
- data/app/frontend/entry.ts +0 -17
- data/app/frontend/entry_test.ts +0 -4
- data/app/helpers/decidim/admin/sidebar_menu_helper.rb +0 -13
- data/config/locales/ja-JP.yml +0 -855
- data/lib/decidim/admin/import/readers/xls.rb +0 -25
- data/vendor/assets/javascripts/html.sortable.js +0 -691
- data/vendor/assets/javascripts/jquery.auto-complete.js +0 -171
- data/vendor/assets/javascripts/jquery.serializejson.js +0 -344
- data/vendor/assets/javascripts/moment.min.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba9be1d6c92c0df366c8123da99195741a4a425449871b05cd6817bf2668d9fd
|
4
|
+
data.tar.gz: d327790d313875ce63bfcef6d8a0d8982241ae817e26b2f0c13a34400bfb7820
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e556f0359466879de42ba44514c6ba4b62a710f5e48571fa3c69e82881803a5152e0870079e1b8b83eba4c7d949162d4a5560d6d91ad76b988860bcc4f7086b
|
7
|
+
data.tar.gz: 7033fd5c958bfc75b324d98cf3d91dac969a2f9531a32bcf70c8414061917e3e1e320c750451ac5e6c0c3314b87f3cd9152f65f18ed08d399341c1a7d827091f
|
@@ -4,10 +4,10 @@
|
|
4
4
|
<div>
|
5
5
|
<% if has_settings? %>
|
6
6
|
<%= link_to edit_content_block_path, class: "mr-s text-muted" do %>
|
7
|
-
<%= icon "pencil", role: "img" %>
|
7
|
+
<%= icon "pencil", role: "img", "aria-hidden": true %>
|
8
8
|
<% end %>
|
9
9
|
<% end %>
|
10
|
-
<%= icon "menu", role: "img" %>
|
10
|
+
<%= icon "menu", role: "img", "aria-hidden": true %>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
</li>
|
@@ -55,6 +55,12 @@ module Decidim
|
|
55
55
|
extra: {
|
56
56
|
reportable_type: form.user.class.name,
|
57
57
|
current_justification: form.justification
|
58
|
+
},
|
59
|
+
resource: {
|
60
|
+
# Make sure the action log entry gets the original user name instead
|
61
|
+
# of "Blocked user". Otherwise the log entries would show funny
|
62
|
+
# messages such as "Mr. Admin blocked user Blocked user"-
|
63
|
+
title: form.user.name
|
58
64
|
}
|
59
65
|
) do
|
60
66
|
form.user.blocked = true
|
@@ -46,7 +46,8 @@ module Decidim
|
|
46
46
|
attached_to: @attached_to,
|
47
47
|
weight: form.weight,
|
48
48
|
attachment_collection: form.attachment_collection,
|
49
|
-
file: form.file # Define attached_to before this
|
49
|
+
file: form.file, # Define attached_to before this
|
50
|
+
content_type: form.file.content_type
|
50
51
|
)
|
51
52
|
end
|
52
53
|
|
@@ -32,7 +32,7 @@ module Decidim
|
|
32
32
|
private
|
33
33
|
|
34
34
|
def process_csv
|
35
|
-
CSV.foreach(@form.file.path) do |email, user_name|
|
35
|
+
CSV.foreach(@form.file.path, encoding: "BOM|UTF-8") do |email, user_name|
|
36
36
|
ImportParticipatorySpacePrivateUserCsvJob.perform_later(email, user_name, @private_users_to, @current_user) if email.present? && user_name.present?
|
37
37
|
end
|
38
38
|
end
|
@@ -5,6 +5,8 @@ module Decidim
|
|
5
5
|
# A command with all the business logic to update an attachment from a
|
6
6
|
# participatory process.
|
7
7
|
class UpdateAttachment < Rectify::Command
|
8
|
+
include ::Decidim::AttachmentAttributesMethods
|
9
|
+
|
8
10
|
attr_reader :attachment
|
9
11
|
|
10
12
|
# Public: Initializes the command.
|
@@ -44,7 +46,9 @@ module Decidim
|
|
44
46
|
description: form.description,
|
45
47
|
weight: form.weight,
|
46
48
|
attachment_collection: form.attachment_collection
|
47
|
-
}.
|
49
|
+
}.merge(
|
50
|
+
attachment_attributes(:file)
|
51
|
+
).reject do |attribute, value|
|
48
52
|
value.blank? && attribute != :attachment_collection
|
49
53
|
end
|
50
54
|
end
|
@@ -70,7 +70,7 @@ module Decidim
|
|
70
70
|
if form.images[image_name]
|
71
71
|
content_block.images_container.send("#{image_name}=", form.images[image_name])
|
72
72
|
elsif form.images["remove_#{image_name}".to_sym] == "1"
|
73
|
-
content_block.images_container.send("
|
73
|
+
content_block.images_container.send("#{image_name}=", nil)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Admin
|
5
|
+
class UpdateExternalDomainWhitelist < Rectify::Command
|
6
|
+
attr_reader :form, :organization
|
7
|
+
|
8
|
+
def initialize(form, organization)
|
9
|
+
@form = form
|
10
|
+
@organization = organization
|
11
|
+
end
|
12
|
+
|
13
|
+
def call
|
14
|
+
return broadcast(:invalid) if form.invalid?
|
15
|
+
|
16
|
+
save_domains!
|
17
|
+
|
18
|
+
broadcast(:ok)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def save_domains!
|
24
|
+
organization.external_domain_whitelist = form.external_domains.filter_map do |external_domain_form|
|
25
|
+
external_domain_form.value unless external_domain_form.deleted
|
26
|
+
end.flatten
|
27
|
+
|
28
|
+
organization.save!
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -56,7 +56,8 @@ module Decidim
|
|
56
56
|
comments_max_length: form.comments_max_length,
|
57
57
|
enable_machine_translations: form.enable_machine_translations,
|
58
58
|
admin_terms_of_use_body: form.admin_terms_of_use_body,
|
59
|
-
rich_text_editor_in_public_views: form.rich_text_editor_in_public_views
|
59
|
+
rich_text_editor_in_public_views: form.rich_text_editor_in_public_views,
|
60
|
+
enable_participatory_space_filters: form.enable_participatory_space_filters
|
60
61
|
}.merge(welcome_notification_attributes)
|
61
62
|
.merge(machine_translation_attributes || {})
|
62
63
|
end
|
@@ -5,14 +5,13 @@ module Decidim
|
|
5
5
|
# A command with all the business logic for updating the current
|
6
6
|
# organization appearance.
|
7
7
|
class UpdateOrganizationAppearance < Rectify::Command
|
8
|
+
include ::Decidim::AttachmentAttributesMethods
|
9
|
+
|
8
10
|
# Public: Initializes the command.
|
9
11
|
#
|
10
12
|
# organization - The Organization that will be updated.
|
11
13
|
# form - A form object with the params.
|
12
14
|
def initialize(organization, form)
|
13
|
-
image_fields.each do |field|
|
14
|
-
form.send("#{field}=".to_sym, organization.send(field)) if form.send(field).blank?
|
15
|
-
end
|
16
15
|
@organization = organization
|
17
16
|
@form = form
|
18
17
|
end
|
@@ -40,7 +39,7 @@ module Decidim
|
|
40
39
|
private
|
41
40
|
|
42
41
|
def image_fields
|
43
|
-
[:
|
42
|
+
[:logo, :highlighted_content_banner_image, :favicon, :official_img_header, :official_img_footer]
|
44
43
|
end
|
45
44
|
|
46
45
|
attr_reader :form, :organization
|
@@ -55,6 +54,7 @@ module Decidim
|
|
55
54
|
|
56
55
|
def attributes
|
57
56
|
appearance_attributes
|
57
|
+
.merge(attachment_attributes(*image_fields))
|
58
58
|
.merge(highlighted_content_banner_attributes)
|
59
59
|
.merge(omnipresent_banner_attributes)
|
60
60
|
.merge(colors_attributes)
|
@@ -69,14 +69,6 @@ module Decidim
|
|
69
69
|
cta_button_path: form.cta_button_path,
|
70
70
|
cta_button_text: form.cta_button_text,
|
71
71
|
description: form.description,
|
72
|
-
logo: form.logo,
|
73
|
-
remove_logo: form.remove_logo,
|
74
|
-
favicon: form.favicon,
|
75
|
-
remove_favicon: form.remove_favicon,
|
76
|
-
official_img_header: form.official_img_header,
|
77
|
-
remove_official_img_header: form.remove_official_img_header,
|
78
|
-
official_img_footer: form.official_img_footer,
|
79
|
-
remove_official_img_footer: form.remove_official_img_footer,
|
80
72
|
official_url: form.official_url
|
81
73
|
}
|
82
74
|
end
|
@@ -85,8 +77,6 @@ module Decidim
|
|
85
77
|
{
|
86
78
|
highlighted_content_banner_enabled: form.highlighted_content_banner_enabled,
|
87
79
|
highlighted_content_banner_action_url: form.highlighted_content_banner_action_url,
|
88
|
-
highlighted_content_banner_image: form.highlighted_content_banner_image,
|
89
|
-
remove_highlighted_content_banner_image: form.remove_highlighted_content_banner_image,
|
90
80
|
highlighted_content_banner_title: form.highlighted_content_banner_title,
|
91
81
|
highlighted_content_banner_short_description: form.highlighted_content_banner_short_description,
|
92
82
|
highlighted_content_banner_action_title: form.highlighted_content_banner_action_title,
|
@@ -105,9 +105,7 @@ module Decidim
|
|
105
105
|
# with true and false as values. If these values fit your filtering needs,
|
106
106
|
# you won't have to declare a `filters_with_values` method in your concern.
|
107
107
|
def filters_with_values
|
108
|
-
filters.
|
109
|
-
hash[filter] = [true, false]
|
110
|
-
end
|
108
|
+
filters.index_with { [true, false] }
|
111
109
|
end
|
112
110
|
|
113
111
|
# Plural model name. Used in search_field placeholder.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_support/concern"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
module ParticipatorySpacePrivateUsers
|
7
|
+
module Admin
|
8
|
+
module Filterable
|
9
|
+
extend ActiveSupport::Concern
|
10
|
+
|
11
|
+
included do
|
12
|
+
include Decidim::Admin::Filterable
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def base_query
|
17
|
+
collection
|
18
|
+
end
|
19
|
+
|
20
|
+
def filters
|
21
|
+
[
|
22
|
+
:user_invitation_sent_at_not_null,
|
23
|
+
:user_invitation_accepted_at_not_null
|
24
|
+
]
|
25
|
+
end
|
26
|
+
|
27
|
+
def search_field_predicate
|
28
|
+
:user_name_or_user_email_cont
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -13,8 +13,9 @@ module Decidim
|
|
13
13
|
extend ActiveSupport::Concern
|
14
14
|
|
15
15
|
included do
|
16
|
+
include Decidim::ParticipatorySpacePrivateUsers::Admin::Filterable
|
16
17
|
helper PaginateHelper
|
17
|
-
helper_method :privatable_to, :
|
18
|
+
helper_method :privatable_to, :participatory_space_private_users
|
18
19
|
|
19
20
|
def index
|
20
21
|
enforce_permission_to :read, :space_private_user
|
@@ -99,8 +100,10 @@ module Decidim
|
|
99
100
|
@collection ||= privatable_to
|
100
101
|
.participatory_space_private_users
|
101
102
|
.includes(:user).where.not("decidim_users.id" => nil)
|
102
|
-
|
103
|
-
|
103
|
+
end
|
104
|
+
|
105
|
+
def participatory_space_private_users
|
106
|
+
filtered_collection
|
104
107
|
end
|
105
108
|
end
|
106
109
|
end
|
@@ -5,6 +5,7 @@ module Decidim
|
|
5
5
|
# This controller allows admins to import resources from a file.
|
6
6
|
class ImportsController < Decidim::Admin::ApplicationController
|
7
7
|
include Decidim::ComponentPathHelper
|
8
|
+
helper UserGroupHelper
|
8
9
|
|
9
10
|
def new
|
10
11
|
enforce_permission_to :import, :component_data, component: current_component
|
@@ -32,12 +32,16 @@ module Decidim
|
|
32
32
|
private
|
33
33
|
|
34
34
|
def reportable
|
35
|
-
@reportable ||=
|
35
|
+
@reportable ||= base_query_finder.find(params[:id]).user
|
36
|
+
end
|
37
|
+
|
38
|
+
def base_query_finder
|
39
|
+
UserModeration.joins(:user).where(decidim_users: { decidim_organization_id: current_organization.id })
|
36
40
|
end
|
37
41
|
|
38
42
|
def collection
|
39
43
|
target_scope = params[:blocked] && params[:blocked] == "true" ? :blocked : :unblocked
|
40
|
-
|
44
|
+
base_query_finder.send(target_scope)
|
41
45
|
end
|
42
46
|
end
|
43
47
|
end
|
@@ -30,10 +30,20 @@ module Decidim
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def users
|
33
|
+
search(current_organization.users)
|
34
|
+
end
|
35
|
+
|
36
|
+
def user_entities
|
37
|
+
search(current_organization.user_entities)
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def search(relation)
|
33
43
|
respond_to do |format|
|
34
44
|
format.json do
|
35
45
|
if (term = params[:term].to_s).present?
|
36
|
-
query =
|
46
|
+
query = relation.order(name: :asc)
|
37
47
|
query = if term.start_with?("@")
|
38
48
|
query.where("nickname ILIKE ?", "#{term.delete("@")}%")
|
39
49
|
else
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Admin
|
5
|
+
class OrganizationExternalDomainWhitelistController < Decidim::Admin::ApplicationController
|
6
|
+
layout "decidim/admin/settings"
|
7
|
+
|
8
|
+
helper_method :blank_external_domain
|
9
|
+
|
10
|
+
def edit
|
11
|
+
enforce_permission_to :update, :organization, organization: current_organization
|
12
|
+
@form = form(OrganizationExternalDomainWhitelistForm).from_model(current_organization)
|
13
|
+
end
|
14
|
+
|
15
|
+
def update
|
16
|
+
enforce_permission_to :update, :organization, organization: current_organization
|
17
|
+
@form = form(OrganizationExternalDomainWhitelistForm).from_params(params)
|
18
|
+
|
19
|
+
UpdateExternalDomainWhitelist.call(@form, current_organization) do
|
20
|
+
on(:ok) do
|
21
|
+
flash[:notice] = t("domain_whitelist.update.success", scope: "decidim.admin")
|
22
|
+
redirect_to edit_organization_external_domain_whitelist_path
|
23
|
+
end
|
24
|
+
on(:invalid) do
|
25
|
+
flash[:notice] = t("domain_whitelist.update.error", scope: "decidim.admin")
|
26
|
+
render action: "edit"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def blank_external_domain
|
34
|
+
@blank_external_domain ||= Admin::ExternalDomainForm.new
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -5,9 +5,11 @@ module Decidim
|
|
5
5
|
# Controller that allows managing all admins at the admin panel.
|
6
6
|
#
|
7
7
|
class UsersController < Decidim::Admin::ApplicationController
|
8
|
+
include Decidim::Admin::Officializations::Filterable
|
9
|
+
|
8
10
|
def index
|
9
11
|
enforce_permission_to :read, :admin_user
|
10
|
-
@users =
|
12
|
+
@users = filtered_collection
|
11
13
|
end
|
12
14
|
|
13
15
|
def new
|
@@ -80,6 +82,10 @@ module Decidim
|
|
80
82
|
def collection
|
81
83
|
@collection ||= current_organization.admins.or(current_organization.users_with_any_role)
|
82
84
|
end
|
85
|
+
|
86
|
+
def filters
|
87
|
+
[:invitation_accepted_at_present, :last_sign_in_at_present]
|
88
|
+
end
|
83
89
|
end
|
84
90
|
end
|
85
91
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Admin
|
5
|
+
class ExternalDomainForm < Form
|
6
|
+
attribute :value, String
|
7
|
+
attribute :position, Integer
|
8
|
+
attribute :deleted, Boolean, default: false
|
9
|
+
|
10
|
+
validates :value, presence: true, unless: :deleted
|
11
|
+
|
12
|
+
def to_param
|
13
|
+
return id if id.present?
|
14
|
+
|
15
|
+
"external-domain-id"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -4,6 +4,7 @@ module Decidim
|
|
4
4
|
module Admin
|
5
5
|
class ImportForm < Form
|
6
6
|
ACCEPTED_MIME_TYPES = Decidim::Admin::Import::Readers::ACCEPTED_MIME_TYPES
|
7
|
+
include Decidim::HasUploadValidations
|
7
8
|
|
8
9
|
attribute :creator, String, default: ->(form, _attribute) { form.creators.first[:creator].to_s }
|
9
10
|
attribute :file
|
@@ -12,20 +12,20 @@ module Decidim
|
|
12
12
|
mimic :organization
|
13
13
|
|
14
14
|
attribute :logo
|
15
|
-
attribute :remove_logo
|
15
|
+
attribute :remove_logo, Boolean, default: false
|
16
16
|
attribute :favicon
|
17
|
-
attribute :remove_favicon
|
17
|
+
attribute :remove_favicon, Boolean, default: false
|
18
18
|
attribute :official_img_header
|
19
|
-
attribute :remove_official_img_header
|
19
|
+
attribute :remove_official_img_header, Boolean, default: false
|
20
20
|
attribute :official_img_footer
|
21
|
-
attribute :remove_official_img_footer
|
21
|
+
attribute :remove_official_img_footer, Boolean, default: false
|
22
22
|
attribute :official_url
|
23
23
|
attribute :header_snippets, String
|
24
24
|
attribute :cta_button_path, String
|
25
25
|
attribute :highlighted_content_banner_enabled, Boolean, default: false
|
26
26
|
attribute :highlighted_content_banner_action_url, String
|
27
27
|
attribute :highlighted_content_banner_image
|
28
|
-
attribute :remove_highlighted_content_banner_image
|
28
|
+
attribute :remove_highlighted_content_banner_image, Boolean, default: false
|
29
29
|
attribute :enable_omnipresent_banner, Boolean, default: false
|
30
30
|
attribute :omnipresent_banner_url, String
|
31
31
|
|
@@ -52,7 +52,7 @@ module Decidim
|
|
52
52
|
:logo,
|
53
53
|
passthru: { to: Decidim::Organization }
|
54
54
|
|
55
|
-
validates :highlighted_content_banner_action_url, presence: true, if: :highlighted_content_banner_enabled?
|
55
|
+
validates :highlighted_content_banner_action_url, url: true, presence: true, if: :highlighted_content_banner_enabled?
|
56
56
|
validates :highlighted_content_banner_image,
|
57
57
|
presence: true,
|
58
58
|
passthru: { to: Decidim::Organization },
|
@@ -70,7 +70,7 @@ module Decidim
|
|
70
70
|
translatable_presence: true,
|
71
71
|
if: :highlighted_content_banner_enabled?
|
72
72
|
|
73
|
-
validates :omnipresent_banner_url, presence: true, if: :enable_omnipresent_banner?
|
73
|
+
validates :omnipresent_banner_url, url: true, presence: true, if: :enable_omnipresent_banner?
|
74
74
|
validates :omnipresent_banner_title, translatable_presence: true, if: :enable_omnipresent_banner?
|
75
75
|
validates :omnipresent_banner_short_description, translatable_presence: true, if: :enable_omnipresent_banner?
|
76
76
|
|