decidim-admin 0.24.0 → 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/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 +2 -1
- data/app/views/layouts/decidim/admin/_header.html.erb +2 -3
- data/app/views/layouts/decidim/admin/_js_configuration.html.erb +27 -0
- 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 +37 -6
- data/config/locales/cs.yml +52 -9
- data/config/locales/de.yml +18 -6
- data/config/locales/el.yml +0 -4
- data/config/locales/en.yml +59 -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 +49 -6
- data/config/locales/fi.yml +49 -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 +77 -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 +160 -5
- data/config/locales/lb-LU.yml +1 -0
- data/config/locales/lv.yml +0 -4
- data/config/locales/nl.yml +20 -6
- data/config/locales/no.yml +8 -6
- 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 +325 -121
- 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 +144 -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 +143 -181
- data/app/assets/config/decidim_admin_manifest.js +0 -8
- data/app/assets/javascripts/decidim/admin/application.js.es6 +0 -77
- 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
@@ -0,0 +1,21 @@
|
|
1
|
+
// Returns the factorial of a non-negative integer.
|
2
|
+
// @param {Number} $x A non-negative integer.
|
3
|
+
// @return {Number}
|
4
|
+
// @example
|
5
|
+
// fact(0) // 1
|
6
|
+
// fact(8) // 40320
|
7
|
+
@function fact ($x){
|
8
|
+
@if $x < 0 or $x != floor($x){
|
9
|
+
@warn "Argument for `fact()` must be a positive integer.";
|
10
|
+
|
11
|
+
@return null;
|
12
|
+
}
|
13
|
+
$ret: 1;
|
14
|
+
|
15
|
+
@while $x > 0{
|
16
|
+
$ret: $ret * $x;
|
17
|
+
$x: $x - 1;
|
18
|
+
}
|
19
|
+
|
20
|
+
@return $ret;
|
21
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// Returns a two-element list containing the normalized fraction and exponent of number.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @return {List} fraction, exponent
|
4
|
+
@function frexp ($x){
|
5
|
+
$exp: 0;
|
6
|
+
|
7
|
+
@if $x < 0{
|
8
|
+
$x: $x * -1;
|
9
|
+
}
|
10
|
+
|
11
|
+
@if $x < .5{
|
12
|
+
@while $x < .5{
|
13
|
+
$x: $x * 2;
|
14
|
+
$exp: $exp - 1;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
@else if $x >= 1{
|
18
|
+
@while $x >= 1{
|
19
|
+
$x: $x * .5;
|
20
|
+
$exp: $exp + 1;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
@return $x, $exp;
|
25
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// Returns $x * 2^$exp
|
2
|
+
// @param {Number} $x
|
3
|
+
// @param {Number} $exp
|
4
|
+
@function ldexp ($x, $exp){
|
5
|
+
$b: if($exp >= 0, 2, 1 * .5);
|
6
|
+
|
7
|
+
@if $exp < 0{
|
8
|
+
$exp: $exp * -1;
|
9
|
+
}
|
10
|
+
|
11
|
+
@while $exp > 0{
|
12
|
+
@if $exp % 2 == 1{
|
13
|
+
$x: $x * $b;
|
14
|
+
}
|
15
|
+
$b: $b * $b;
|
16
|
+
$exp: floor($exp * .5);
|
17
|
+
}
|
18
|
+
|
19
|
+
@return $x;
|
20
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// Returns the natural logarithm of a number.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @param {Number} $b The base number
|
4
|
+
// @example
|
5
|
+
// log(2) // 0.69315
|
6
|
+
// log(10) // 2.30259
|
7
|
+
// log(2, 10) // 0.30103
|
8
|
+
@use "sass:math";
|
9
|
+
|
10
|
+
@function log ($x, $b: null){
|
11
|
+
@if $b == null{
|
12
|
+
@return _log($x);
|
13
|
+
}
|
14
|
+
@else{
|
15
|
+
@return math.div(_log($x), _log($b));
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
@function _log ($x){
|
20
|
+
@if $x <= 0{
|
21
|
+
@return math.div(0, 0);
|
22
|
+
}
|
23
|
+
$k: nth(frexp(math.div($x, $SQRT2)), 2);
|
24
|
+
$x: math.div($x, ldexp(1, $k));
|
25
|
+
$x: math.div($x - 1, $x + 1);
|
26
|
+
$x2: $x * $x;
|
27
|
+
$i: 1;
|
28
|
+
$s: $x;
|
29
|
+
$sp: null;
|
30
|
+
|
31
|
+
@while $sp != $s{
|
32
|
+
$x: $x * $x2;
|
33
|
+
$i: $i + 2;
|
34
|
+
$sp: $s;
|
35
|
+
$s: $s + math.div($x, $i);
|
36
|
+
}
|
37
|
+
|
38
|
+
@return $LN2 * $k + 2 * $s;
|
39
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Returns base to the exponent power.
|
2
|
+
// @param {Number} $base The base number
|
3
|
+
// @param {Number} $exp The exponent to which to raise base
|
4
|
+
// @return {Number}
|
5
|
+
// @example
|
6
|
+
// pow(4, 2) // 16
|
7
|
+
// pow(4, -2) // 0.0625
|
8
|
+
// pow(4, 0.2) // 1.31951
|
9
|
+
@use "sass:math";
|
10
|
+
|
11
|
+
@function pow ($base, $exp){
|
12
|
+
@if $exp == floor($exp){
|
13
|
+
$r: 1;
|
14
|
+
$s: 0;
|
15
|
+
|
16
|
+
@if $exp < 0{
|
17
|
+
$exp: $exp * -1;
|
18
|
+
$s: 1;
|
19
|
+
}
|
20
|
+
|
21
|
+
@while $exp > 0{
|
22
|
+
@if $exp % 2 == 1{
|
23
|
+
$r: $r * $base;
|
24
|
+
}
|
25
|
+
$exp: floor($exp * .5);
|
26
|
+
$base: $base * $base;
|
27
|
+
}
|
28
|
+
|
29
|
+
@return if($s != 0, math.div(1, $r), $r);
|
30
|
+
}
|
31
|
+
@else{
|
32
|
+
@return exp(log($base) * $exp);
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// Returns the square root of a number.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @example
|
4
|
+
// sqrt(2) // 1.41421
|
5
|
+
// sqrt(5) // 2.23607
|
6
|
+
@use "sass:math";
|
7
|
+
|
8
|
+
@function sqrt ($x){
|
9
|
+
@if $x < 0{
|
10
|
+
@warn "Argument for `sqrt()` must be a positive number.";
|
11
|
+
|
12
|
+
@return null;
|
13
|
+
}
|
14
|
+
$ret: 1;
|
15
|
+
|
16
|
+
@for $i from 1 through 24{
|
17
|
+
$ret: $ret - math.div(pow($ret, 2) - $x, 2 * $ret);
|
18
|
+
}
|
19
|
+
|
20
|
+
@return $ret;
|
21
|
+
}
|
@@ -3,7 +3,10 @@
|
|
3
3
|
// @example
|
4
4
|
// tan(0.5236) // 0.57735
|
5
5
|
// tan(30deg) // 0.57735
|
6
|
-
@
|
7
|
-
|
8
|
-
|
6
|
+
@use "sass:math";
|
7
|
+
|
8
|
+
@function tan ($x){
|
9
|
+
$x: unitless-rad($x);
|
10
|
+
|
11
|
+
@return math.div(sin($x), cos($x));
|
9
12
|
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Convert to unitless rad
|
2
|
+
@use "sass:math";
|
3
|
+
|
4
|
+
@function unitless-rad ($angle){
|
5
|
+
@if unitless($angle){
|
6
|
+
@return $angle;
|
7
|
+
}
|
8
|
+
@else if unit($angle) == rad{
|
9
|
+
@return math.div($angle, 1rad);
|
10
|
+
}
|
11
|
+
@else if unit($angle) == deg{
|
12
|
+
@return deg-to-rad($angle, false);
|
13
|
+
}
|
14
|
+
@else if type-of($angle) != number or not unitless($angle){
|
15
|
+
@warn "#{ $angle } is not a valid number.";
|
16
|
+
|
17
|
+
@return $angle;
|
18
|
+
}
|
19
|
+
}
|
@@ -21,7 +21,9 @@ module Decidim
|
|
21
21
|
|
22
22
|
def query
|
23
23
|
recipients = Decidim::User.where(organization: @form.current_organization)
|
24
|
-
.where.not(newsletter_notifications_at: nil
|
24
|
+
.where.not(newsletter_notifications_at: nil)
|
25
|
+
.where.not(email: nil)
|
26
|
+
.where.not(confirmed_at: nil)
|
25
27
|
.not_deleted
|
26
28
|
|
27
29
|
recipients = recipients.interested_in_scopes(@form.scope_ids) if @form.scope_ids.present?
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h2 class="card-title">
|
4
4
|
<%= t "decidim.admin.titles.area_types" %>
|
5
5
|
<% if allowed_to? :create, :area_type %>
|
6
|
-
<%= link_to t("actions.add", scope: "decidim.admin"), [
|
6
|
+
<%= link_to t("actions.add", scope: "decidim.admin"), [:new, :area_type], class: "button tiny button--title new" %>
|
7
7
|
<% end %>
|
8
8
|
</h2>
|
9
9
|
</div>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
</td>
|
29
29
|
<td class="table-list__actions">
|
30
30
|
<% if allowed_to? :update, :area_type, area_type: area_type %>
|
31
|
-
<%= icon_link_to "pencil", [
|
31
|
+
<%= icon_link_to "pencil", [:edit, area_type], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
|
32
32
|
<% end %>
|
33
33
|
|
34
34
|
<% if allowed_to? :destroy, :area_type, area_type: area_type %>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
</td>
|
30
30
|
<td class="table-list__actions">
|
31
31
|
<% if allowed_to? :update, :area, area: area %>
|
32
|
-
<%= icon_link_to "pencil", [
|
32
|
+
<%= icon_link_to "pencil", [:edit, area], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
|
33
33
|
<% end %>
|
34
34
|
|
35
35
|
<% if allowed_to? :destroy, :area, area: area %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<%= icon_link_to "circle-x", polymorphic_path([collection_for, attachment_collection]), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
35
35
|
<% else %>
|
36
36
|
<span class="action-icon" title="<%= t("attachment_collections.index.attachment_collection_used", scope: "decidim.admin") %>" data-tooltip="true" data-disable-hover="false">
|
37
|
-
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img" %>
|
37
|
+
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %>
|
38
38
|
</span>
|
39
39
|
<% end %>
|
40
40
|
<% end %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<%= icon_link_to "circle-x", category_path(current_participatory_space, category), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
35
35
|
<% else %>
|
36
36
|
<span class="action-icon" title="<%= t("categories.index.category_used", scope: "decidim.admin") %>" data-tooltip="true" data-disable-hover="false">
|
37
|
-
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img" %>
|
37
|
+
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %>
|
38
38
|
</span>
|
39
39
|
<% end %>
|
40
40
|
<% end %>
|
@@ -19,13 +19,7 @@
|
|
19
19
|
</div>
|
20
20
|
<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
|
21
21
|
<div class="field">
|
22
|
-
<%=
|
23
|
-
form.select(
|
24
|
-
:user_group_id,
|
25
|
-
user_groups.map { |g| [g.name, g.id] },
|
26
|
-
include_blank: current_user.name
|
27
|
-
)
|
28
|
-
%>
|
22
|
+
<%= user_group_select_field form, :user_group_id %>
|
29
23
|
</div>
|
30
24
|
<% end %>
|
31
25
|
<div class="grid-x">
|
@@ -53,5 +47,3 @@
|
|
53
47
|
<%= form.submit t(".import") %>
|
54
48
|
</div>
|
55
49
|
<% end -%>
|
56
|
-
|
57
|
-
<%= javascript_include_tag "decidim/admin/import_guidance" %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<strong class="subscribed_title"><%= t("newsletters.index.subscribed_count", scope: "decidim.admin") %></strong>
|
9
9
|
<span class="subscribed_count"><%= recipients_count_query %></span>
|
10
10
|
<% if allowed_to? :create, :newsletter %>
|
11
|
-
<%= link_to t("actions.newsletter.new", scope: "decidim.admin"), [
|
11
|
+
<%= link_to t("actions.newsletter.new", scope: "decidim.admin"), [:newsletter_templates], class: "button tiny button--title new" %>
|
12
12
|
<% end %>
|
13
13
|
</div>
|
14
14
|
</div>
|
@@ -65,7 +65,7 @@
|
|
65
65
|
|
66
66
|
<div class="button--double form-general-submit">
|
67
67
|
<% if allowed_to?(:update, :newsletter, newsletter: @newsletter) && !@newsletter.sent? %>
|
68
|
-
<%= link_to t("actions.edit", scope: "decidim.admin"), [
|
68
|
+
<%= link_to t("actions.edit", scope: "decidim.admin"), [:edit, @newsletter], class: "button" %>
|
69
69
|
<% end %>
|
70
70
|
<% unless @newsletter.sent? %>
|
71
71
|
<%= f.submit t(".deliver"), class: "button alert", data: { confirm: t(".confirm_deliver") } %>
|
@@ -74,5 +74,3 @@
|
|
74
74
|
</div>
|
75
75
|
</div>
|
76
76
|
<% end %>
|
77
|
-
|
78
|
-
<%= javascript_include_tag "decidim/admin/newsletters" %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div class="button--double form-general-submit">
|
18
18
|
<% if allowed_to?(:update, :newsletter, newsletter: @newsletter) %>
|
19
19
|
<% if !@newsletter.sent? %>
|
20
|
-
<%= link_to t("actions.edit", scope: "decidim.admin"), [
|
20
|
+
<%= link_to t("actions.edit", scope: "decidim.admin"), [:edit, @newsletter], class: "button" %>
|
21
21
|
<% end %>
|
22
22
|
<% unless @newsletter.sent? %>
|
23
23
|
<%= link_to t(".select_recipients_to_deliver"), select_recipients_to_deliver_newsletter_path(@newsletter), class: "button alert" %>
|
@@ -45,13 +45,13 @@
|
|
45
45
|
<% end %>
|
46
46
|
<%= icon_link_to "envelope-closed", current_or_new_conversation_path_with(user), t("decidim.contact"), class:"action-icon--new" %>
|
47
47
|
<% if user.officialized? %>
|
48
|
-
<%= icon "circle-check", class: "action-icon action-icon--disabled", role: "img" %>
|
48
|
+
<%= icon "circle-check", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".officialize") %>
|
49
49
|
<%= icon_link_to "pencil", new_officialization_path(user_id: user.id), t(".reofficialize"), class: "action-icon--new" %>
|
50
50
|
<%= icon_link_to "circle-x", officialization_path(user.id), t(".unofficialize"), method: :delete, class: "action-icon--reject" %>
|
51
51
|
<% else %>
|
52
52
|
<%= icon_link_to "circle-check", new_officialization_path(user_id: user.id), t(".officialize"), class: "action-icon--verify" %>
|
53
|
-
<%= icon "pencil", class: "action-icon action-icon--disabled", role: "img" %>
|
54
|
-
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img" %>
|
53
|
+
<%= icon "pencil", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".reofficialize") %>
|
54
|
+
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".unofficialize") %>
|
55
55
|
<% end %>
|
56
56
|
</td>
|
57
57
|
</tr>
|
@@ -54,6 +54,12 @@
|
|
54
54
|
</div>
|
55
55
|
</div>
|
56
56
|
|
57
|
+
<div class="row">
|
58
|
+
<div class="columns xlarge-6">
|
59
|
+
<%= form.check_box :enable_participatory_space_filters %>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
|
57
63
|
<% if Decidim.config.enable_machine_translations %>
|
58
64
|
<div class="row">
|
59
65
|
<div class="columns xlarge-6">
|
@@ -100,5 +106,3 @@
|
|
100
106
|
<%= form.translated :editor, :admin_terms_of_use_body %>
|
101
107
|
</div>
|
102
108
|
</div>
|
103
|
-
|
104
|
-
<%= javascript_include_tag "decidim/admin/welcome_notification.js" %>
|