decidim-admin 0.24.3 → 0.25.0.rc1
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/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/select_recipients_to_deliver.html.erb +0 -2
- 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 +2 -2
- 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/user_groups/index.html.erb +2 -2
- data/app/views/decidim/admin/users/index.html.erb +8 -7
- 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 +2 -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/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 +18 -6
- data/config/locales/es-PY.yml +18 -6
- data/config/locales/es.yml +18 -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 +46 -6
- data/config/locales/fr-LU.yml +1029 -0
- data/config/locales/fr.yml +46 -6
- data/config/locales/gl.yml +39 -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 +150 -10
- data/config/locales/ja.yml +139 -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 +2 -12
- data/config/locales/pl.yml +36 -16
- data/config/locales/pt-BR.yml +346 -4
- data/config/locales/pt.yml +6 -4
- data/config/locales/ro-RO.yml +46 -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.rb +3 -3
- data/lib/decidim/admin/import/readers/xlsx.rb +25 -0
- data/lib/decidim/admin/test.rb +1 -0
- 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/version.rb +1 -1
- metadata +142 -181
- 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
data/config/locales/zh-CN.yml
CHANGED
@@ -24,7 +24,6 @@ zh-CN:
|
|
24
24
|
component:
|
25
25
|
name: 名称
|
26
26
|
published_at: 发布于
|
27
|
-
weight: 权重
|
28
27
|
id: ID
|
29
28
|
newsletter:
|
30
29
|
body: 正文内容
|
@@ -97,12 +96,10 @@ zh-CN:
|
|
97
96
|
show_in_footer: 在页脚显示
|
98
97
|
slug: URL 名称
|
99
98
|
title: 标题
|
100
|
-
weight: 权重
|
101
99
|
static_page_topic:
|
102
100
|
description: 描述
|
103
101
|
show_in_footer: 在页脚显示
|
104
102
|
title: 标题
|
105
|
-
weight: 权重
|
106
103
|
user_group_csv_verification:
|
107
104
|
file: 文件
|
108
105
|
errors:
|
@@ -132,7 +129,6 @@ zh-CN:
|
|
132
129
|
actions:
|
133
130
|
add: 添加
|
134
131
|
browse: 浏览
|
135
|
-
export: 导出
|
136
132
|
manage: 管理
|
137
133
|
new: 新建 %{name}
|
138
134
|
per_page: 每页
|
data/config/routes.rb
CHANGED
@@ -7,9 +7,11 @@ Decidim::Admin::Engine.routes.draw do
|
|
7
7
|
resource :homepage, only: [:edit, :update], controller: "organization_homepage" do
|
8
8
|
resources :content_blocks, only: [:edit, :update], controller: "organization_homepage_content_blocks"
|
9
9
|
end
|
10
|
+
resource :external_domain_whitelist, only: [:edit, :update], controller: "organization_external_domain_whitelist"
|
10
11
|
|
11
12
|
member do
|
12
13
|
get :users
|
14
|
+
get :user_entities
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
data/lib/decidim/admin/engine.rb
CHANGED
@@ -6,11 +6,7 @@ require "active_support/all"
|
|
6
6
|
require "devise"
|
7
7
|
require "devise-i18n"
|
8
8
|
require "decidim/core"
|
9
|
-
require "jquery-rails"
|
10
|
-
require "sassc-rails"
|
11
|
-
require "foundation-rails"
|
12
9
|
require "foundation_rails_helper"
|
13
|
-
require "autoprefixer-rails"
|
14
10
|
require "rectify"
|
15
11
|
require "doorkeeper"
|
16
12
|
require "doorkeeper-i18n"
|
@@ -28,151 +24,228 @@ module Decidim
|
|
28
24
|
end
|
29
25
|
end
|
30
26
|
|
31
|
-
initializer "decidim_admin.assets" do |app|
|
32
|
-
app.config.assets.precompile += %w(decidim_admin_manifest.js)
|
33
|
-
end
|
34
|
-
|
35
27
|
initializer "decidim_admin.global_moderation_menu" do
|
36
28
|
Decidim.menu :admin_global_moderation_menu do |menu|
|
37
|
-
menu.
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
29
|
+
menu.add_item :moderations,
|
30
|
+
I18n.t("actions.not_hidden", scope: "decidim.moderations"),
|
31
|
+
decidim_admin.moderations_path,
|
32
|
+
position: 1,
|
33
|
+
active: params[:hidden].blank?
|
34
|
+
|
35
|
+
menu.add_item :hidden_moderations,
|
36
|
+
I18n.t("actions.hidden", scope: "decidim.moderations"),
|
37
|
+
decidim_admin.moderations_path(hidden: true),
|
38
|
+
position: 2,
|
39
|
+
active: params[:hidden].present?
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
initializer "decidim_admin.workflows_menu" do
|
44
|
+
Decidim.menu :workflows_menu do |menu|
|
45
|
+
Decidim::Verifications.admin_workflows.each do |manifest|
|
46
|
+
next unless current_organization.available_authorizations.include?(manifest.name.to_s)
|
47
|
+
|
48
|
+
workflow = Decidim::Verifications::Adapter.new(manifest)
|
49
|
+
|
50
|
+
menu.add_item manifest.name.to_s,
|
51
|
+
workflow.fullname,
|
52
|
+
workflow.admin_root_path,
|
53
|
+
active: is_active_link?(workflow.admin_root_path)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
initializer "decidim_admin.impersonate_menu" do
|
59
|
+
Decidim.menu :impersonate_menu do |menu|
|
60
|
+
menu.add_item :conflicts,
|
61
|
+
I18n.t("title", scope: "decidim.admin.conflicts"),
|
62
|
+
decidim_admin.conflicts_path,
|
63
|
+
active: is_active_link?(decidim_admin.conflicts_path),
|
64
|
+
if: allowed_to?(:index, :impersonatable_user)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
initializer "decidim_admin.admin_user_menu" do
|
69
|
+
Decidim.menu :admin_user_menu do |menu|
|
70
|
+
menu.add_item :users,
|
71
|
+
I18n.t("menu.admins", scope: "decidim.admin"), decidim_admin.users_path,
|
72
|
+
active: is_active_link?(decidim_admin.users_path),
|
73
|
+
if: allowed_to?(:read, :admin_user)
|
74
|
+
menu.add_item :user_groups,
|
75
|
+
I18n.t("menu.user_groups", scope: "decidim.admin"), decidim_admin.user_groups_path,
|
76
|
+
active: is_active_link?(decidim_admin.user_groups_path),
|
77
|
+
if: current_organization.user_groups_enabled? && allowed_to?(:index, :user_group)
|
78
|
+
menu.add_item :officializations,
|
79
|
+
I18n.t("menu.participants", scope: "decidim.admin"), decidim_admin.officializations_path,
|
80
|
+
active: is_active_link?(decidim_admin.officializations_path),
|
81
|
+
if: allowed_to?(:index, :officialization)
|
82
|
+
menu.add_item :impersonatable_users,
|
83
|
+
I18n.t("menu.impersonations", scope: "decidim.admin"), decidim_admin.impersonatable_users_path,
|
84
|
+
active: is_active_link?(decidim_admin.impersonatable_users_path),
|
85
|
+
if: allowed_to?(:index, :impersonatable_user),
|
86
|
+
submenu: { target_menu: :impersonate_menu }
|
87
|
+
|
88
|
+
menu.add_item :moderated_users,
|
89
|
+
I18n.t("menu.reported_users", scope: "decidim.admin"), decidim_admin.moderated_users_path,
|
90
|
+
active: is_active_link?(decidim_admin.moderated_users_path),
|
91
|
+
if: allowed_to?(:index, :moderate_users)
|
92
|
+
menu.add_item :authorization_workflows,
|
93
|
+
I18n.t("menu.authorization_workflows", scope: "decidim.admin"), decidim_admin.authorization_workflows_path,
|
94
|
+
active: is_active_link?(decidim_admin.authorization_workflows_path),
|
95
|
+
if: allowed_to?(:index, :authorization),
|
96
|
+
submenu: { target_menu: :workflows_menu }
|
46
97
|
end
|
47
98
|
end
|
48
99
|
|
49
100
|
initializer "decidim_admin.admin_settings_menu" do
|
50
101
|
Decidim.menu :admin_settings_menu do |menu|
|
51
|
-
menu.
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
menu.
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
102
|
+
menu.add_item :edit_organization,
|
103
|
+
I18n.t("menu.configuration", scope: "decidim.admin"),
|
104
|
+
decidim_admin.edit_organization_path,
|
105
|
+
position: 1.0,
|
106
|
+
if: allowed_to?(:update, :organization, organization: current_organization),
|
107
|
+
active: is_active_link?(decidim_admin.edit_organization_path)
|
108
|
+
|
109
|
+
menu.add_item :edit_organization_appearance,
|
110
|
+
I18n.t("menu.appearance", scope: "decidim.admin"),
|
111
|
+
decidim_admin.edit_organization_appearance_path,
|
112
|
+
position: 1.1,
|
113
|
+
if: allowed_to?(:update, :organization, organization: current_organization),
|
114
|
+
active: is_active_link?(decidim_admin.edit_organization_appearance_path)
|
115
|
+
|
116
|
+
menu.add_item :edit_organization_homepage,
|
117
|
+
I18n.t("menu.homepage", scope: "decidim.admin"),
|
118
|
+
decidim_admin.edit_organization_homepage_path,
|
119
|
+
position: 1.2,
|
120
|
+
if: allowed_to?(:update, :organization, organization: current_organization),
|
121
|
+
active: is_active_link?(decidim_admin.edit_organization_homepage_path, %r{^/admin/organization/homepage})
|
122
|
+
|
123
|
+
menu.add_item :scopes,
|
124
|
+
I18n.t("menu.scopes", scope: "decidim.admin"),
|
125
|
+
decidim_admin.scopes_path,
|
126
|
+
position: 1.3,
|
127
|
+
if: allowed_to?(:read, :scope),
|
128
|
+
active: is_active_link?(decidim_admin.scopes_path)
|
129
|
+
menu.add_item :scope_types,
|
130
|
+
I18n.t("menu.scope_types", scope: "decidim.admin"),
|
131
|
+
decidim_admin.scope_types_path,
|
132
|
+
position: 1.4,
|
133
|
+
if: allowed_to?(:read, :scope_type),
|
134
|
+
active: is_active_link?(decidim_admin.scope_types_path)
|
135
|
+
menu.add_item :areas,
|
136
|
+
I18n.t("menu.areas", scope: "decidim.admin"),
|
137
|
+
decidim_admin.areas_path,
|
138
|
+
position: 1.5,
|
139
|
+
if: allowed_to?(:read, :area),
|
140
|
+
active: is_active_link?(decidim_admin.areas_path)
|
141
|
+
|
142
|
+
menu.add_item :area_types,
|
143
|
+
I18n.t("menu.area_types", scope: "decidim.admin"),
|
144
|
+
decidim_admin.area_types_path,
|
145
|
+
position: 1.6,
|
146
|
+
if: allowed_to?(:read, :area_type),
|
147
|
+
active: is_active_link?(decidim_admin.area_types_path)
|
148
|
+
|
149
|
+
menu.add_item :help_sections,
|
150
|
+
I18n.t("menu.help_sections", scope: "decidim.admin"),
|
151
|
+
decidim_admin.help_sections_path,
|
152
|
+
position: 1.6,
|
153
|
+
if: allowed_to?(:update, :help_sections),
|
154
|
+
active: is_active_link?(decidim_admin.help_sections_path)
|
155
|
+
|
156
|
+
menu.add_item :external_domain_whitelist,
|
157
|
+
I18n.t("menu.external_domain_whitelist", scope: "decidim.admin"),
|
158
|
+
decidim_admin.edit_organization_external_domain_whitelist_path,
|
159
|
+
position: 1.7,
|
160
|
+
if: allowed_to?(:update, :organization, organization: current_organization),
|
161
|
+
active: is_active_link?(decidim_admin.edit_organization_external_domain_whitelist_path)
|
96
162
|
end
|
97
163
|
end
|
98
164
|
|
99
165
|
initializer "decidim_admin.menu" do
|
100
166
|
Decidim.menu :admin_menu do |menu|
|
101
|
-
menu.
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
decidim
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
167
|
+
menu.add_item :dashboard,
|
168
|
+
I18n.t("menu.dashboard", scope: "decidim.admin"),
|
169
|
+
decidim_admin.root_path,
|
170
|
+
icon_name: "dashboard",
|
171
|
+
position: 1,
|
172
|
+
active: ["decidim/admin/dashboard" => :show]
|
173
|
+
|
174
|
+
menu.add_item :moderations,
|
175
|
+
I18n.t("menu.moderation", scope: "decidim.admin"),
|
176
|
+
decidim_admin.moderations_path,
|
177
|
+
icon_name: "flag",
|
178
|
+
position: 4,
|
179
|
+
active: [%w(
|
180
|
+
decidim/admin/global_moderations
|
181
|
+
decidim/admin/global_moderations/reports
|
182
|
+
), []],
|
183
|
+
if: allowed_to?(:read, :global_moderation)
|
184
|
+
|
185
|
+
menu.add_item :static_pages,
|
186
|
+
I18n.t("menu.static_pages", scope: "decidim.admin"),
|
187
|
+
decidim_admin.static_pages_path,
|
188
|
+
icon_name: "book",
|
189
|
+
position: 4.5,
|
190
|
+
active: [%w(
|
191
|
+
decidim/admin/static_pages
|
192
|
+
decidim/admin/static_page_topics
|
193
|
+
), []],
|
194
|
+
if: allowed_to?(:read, :static_page)
|
195
|
+
|
196
|
+
menu.add_item :impersonatable_users,
|
197
|
+
I18n.t("menu.users", scope: "decidim.admin"),
|
198
|
+
allowed_to?(:read, :admin_user) ? decidim_admin.users_path : decidim_admin.impersonatable_users_path,
|
199
|
+
icon_name: "person",
|
200
|
+
position: 5,
|
201
|
+
active: [%w(
|
202
|
+
decidim/admin/users
|
203
|
+
decidim/admin/user_groups
|
204
|
+
decidim/admin/user_groups_csv_verifications
|
205
|
+
decidim/admin/officializations
|
206
|
+
decidim/admin/impersonatable_users
|
207
|
+
decidim/admin/moderated_users
|
208
|
+
decidim/admin/managed_users/impersonation_logs
|
209
|
+
decidim/admin/managed_users/promotions
|
210
|
+
decidim/admin/authorization_workflows
|
211
|
+
), []],
|
212
|
+
if: allowed_to?(:read, :admin_user) || allowed_to?(:read, :managed_user)
|
213
|
+
|
214
|
+
menu.add_item :newsletters,
|
215
|
+
I18n.t("menu.newsletters", scope: "decidim.admin"),
|
216
|
+
decidim_admin.newsletters_path,
|
217
|
+
icon_name: "envelope-closed",
|
218
|
+
position: 6,
|
219
|
+
active: is_active_link?(decidim_admin.newsletters_path, :inclusive) ||
|
220
|
+
is_active_link?(decidim_admin.newsletter_templates_path, :inclusive),
|
221
|
+
if: allowed_to?(:index, :newsletter)
|
222
|
+
|
223
|
+
menu.add_item :edit_organization,
|
224
|
+
I18n.t("menu.settings", scope: "decidim.admin"),
|
225
|
+
decidim_admin.edit_organization_path,
|
226
|
+
icon_name: "wrench",
|
227
|
+
position: 7,
|
228
|
+
active: [
|
229
|
+
%w(
|
230
|
+
decidim/admin/organization
|
231
|
+
decidim/admin/organization_appearance
|
232
|
+
decidim/admin/organization_homepage
|
233
|
+
decidim/admin/organization_homepage_content_blocks
|
234
|
+
decidim/admin/scopes
|
235
|
+
decidim/admin/scope_types
|
236
|
+
decidim/admin/areas decidim/admin/area_types
|
237
|
+
),
|
238
|
+
[]
|
239
|
+
],
|
240
|
+
if: allowed_to?(:update, :organization, organization: current_organization)
|
241
|
+
|
242
|
+
menu.add_item :logs,
|
243
|
+
I18n.t("menu.admin_log", scope: "decidim.admin"),
|
244
|
+
decidim_admin.logs_path,
|
245
|
+
icon_name: "dashboard",
|
246
|
+
position: 10,
|
247
|
+
active: [%w(decidim/admin/logs), []],
|
248
|
+
if: allowed_to?(:read, :admin_log)
|
176
249
|
end
|
177
250
|
end
|
178
251
|
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
autoload :Base, "decidim/admin/import/readers/base"
|
8
8
|
autoload :CSV, "decidim/admin/import/readers/csv"
|
9
9
|
autoload :JSON, "decidim/admin/import/readers/json"
|
10
|
-
autoload :
|
10
|
+
autoload :XLSX, "decidim/admin/import/readers/xlsx"
|
11
11
|
|
12
12
|
# Accepted mime types
|
13
13
|
# keys: are used for dynamic help text on admin form.
|
@@ -15,14 +15,14 @@ module Decidim
|
|
15
15
|
ACCEPTED_MIME_TYPES = {
|
16
16
|
json: Readers::JSON::MIME_TYPE,
|
17
17
|
csv: Readers::CSV::MIME_TYPE,
|
18
|
-
|
18
|
+
xlsx: Readers::XLSX::MIME_TYPE
|
19
19
|
}.freeze
|
20
20
|
|
21
21
|
def self.all
|
22
22
|
[
|
23
23
|
Readers::CSV,
|
24
24
|
Readers::JSON,
|
25
|
-
Readers::
|
25
|
+
Readers::XLSX
|
26
26
|
]
|
27
27
|
end
|
28
28
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubyXL"
|
4
|
+
|
5
|
+
module Decidim
|
6
|
+
module Admin
|
7
|
+
module Import
|
8
|
+
module Readers
|
9
|
+
# Imports any exported XLSX file to local objects. It transforms the
|
10
|
+
# import data using the creator into the final target objects.
|
11
|
+
class XLSX < Base
|
12
|
+
MIME_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
13
|
+
|
14
|
+
def read_rows
|
15
|
+
workbook = RubyXL::Parser.parse(file)
|
16
|
+
sheet = workbook.worksheets[0]
|
17
|
+
sheet.each_with_index do |row, index|
|
18
|
+
yield row.cells.map(&:value), index
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|