decidim-admin 0.28.0 → 0.28.1
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_cell.rb +1 -1
- data/app/commands/decidim/admin/destroy_category.rb +1 -1
- data/app/controllers/decidim/admin/application_controller.rb +2 -1
- data/app/controllers/decidim/admin/area_types_controller.rb +1 -1
- data/app/controllers/decidim/admin/authorization_workflows_controller.rb +2 -0
- data/app/controllers/decidim/admin/conflicts_controller.rb +23 -0
- data/app/controllers/decidim/admin/impersonatable_users_controller.rb +3 -1
- data/app/controllers/decidim/admin/impersonations_controller.rb +1 -0
- data/app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb +2 -0
- data/app/controllers/decidim/admin/moderated_users_controller.rb +10 -0
- data/app/controllers/decidim/admin/moderations_controller.rb +10 -0
- data/app/controllers/decidim/admin/officializations_controller.rb +2 -0
- data/app/controllers/decidim/admin/scope_types_controller.rb +1 -1
- data/app/controllers/decidim/admin/static_page_topics_controller.rb +10 -0
- data/app/controllers/decidim/admin/user_groups_controller.rb +2 -0
- data/app/controllers/decidim/admin/users_controller.rb +2 -0
- data/app/events/decidim/resource_hidden_event.rb +5 -1
- data/app/helpers/decidim/admin/admin_terms_helper.rb +1 -1
- data/app/helpers/decidim/admin/filterable_helper.rb +1 -1
- data/app/packs/entrypoints/decidim_admin_overrides.scss +2 -0
- data/app/packs/images/decidim/admin/.keep +0 -0
- data/app/packs/src/decidim/admin/application.js +8 -0
- data/app/packs/src/decidim/admin/participatory_space_search.js +1 -1
- data/app/packs/stylesheets/decidim/admin/_filters.scss +1 -1
- data/app/packs/stylesheets/decidim/admin/_legacy_foundation.scss +10 -0
- data/app/packs/stylesheets/decidim/admin/_sidebar-menu.scss +4 -4
- data/app/packs/stylesheets/decidim/admin/_tabs.scss +6 -0
- data/app/packs/stylesheets/decidim/admin/decidim_application.scss +5 -0
- data/app/views/decidim/admin/admin_terms/show.html.erb +2 -2
- data/app/views/decidim/admin/area_types/edit.html.erb +2 -2
- data/app/views/decidim/admin/area_types/index.html.erb +2 -2
- data/app/views/decidim/admin/area_types/new.html.erb +2 -2
- data/app/views/decidim/admin/areas/edit.html.erb +2 -2
- data/app/views/decidim/admin/areas/index.html.erb +2 -2
- data/app/views/decidim/admin/areas/new.html.erb +2 -2
- data/app/views/decidim/admin/attachment_collections/edit.html.erb +2 -2
- data/app/views/decidim/admin/attachment_collections/index.html.erb +2 -2
- data/app/views/decidim/admin/attachment_collections/new.html.erb +2 -2
- data/app/views/decidim/admin/attachments/edit.html.erb +2 -2
- data/app/views/decidim/admin/attachments/index.html.erb +2 -2
- data/app/views/decidim/admin/attachments/new.html.erb +2 -2
- data/app/views/decidim/admin/authorization_workflows/index.html.erb +2 -2
- data/app/views/decidim/admin/block_user/new.html.erb +3 -4
- data/app/views/decidim/admin/categories/edit.html.erb +2 -2
- data/app/views/decidim/admin/categories/index.html.erb +7 -3
- data/app/views/decidim/admin/categories/new.html.erb +2 -2
- data/app/views/decidim/admin/components/edit.html.erb +2 -2
- data/app/views/decidim/admin/components/index.html.erb +2 -2
- data/app/views/decidim/admin/components/new.html.erb +2 -2
- data/app/views/decidim/admin/conflicts/index.html.erb +2 -2
- data/app/views/decidim/admin/dashboard/show.html.erb +2 -2
- data/app/views/decidim/admin/help_sections/_form.html.erb +2 -2
- data/app/views/decidim/admin/impersonatable_users/index.html.erb +2 -2
- data/app/views/decidim/admin/impersonations/new.html.erb +2 -2
- data/app/views/decidim/admin/imports/new.html.erb +2 -2
- data/app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb +2 -2
- data/app/views/decidim/admin/managed_users/promotions/new.html.erb +2 -2
- data/app/views/decidim/admin/moderated_users/index.html.erb +2 -2
- data/app/views/decidim/admin/moderations/index.html.erb +2 -2
- data/app/views/decidim/admin/moderations/reports/index.html.erb +2 -2
- data/app/views/decidim/admin/moderations/reports/show.html.erb +2 -2
- data/app/views/decidim/admin/newsletter_templates/index.html.erb +5 -6
- data/app/views/decidim/admin/newsletter_templates/show.html.erb +16 -12
- data/app/views/decidim/admin/newsletters/edit.html.erb +2 -2
- data/app/views/decidim/admin/newsletters/index.html.erb +2 -2
- data/app/views/decidim/admin/newsletters/new.html.erb +2 -2
- data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +13 -9
- data/app/views/decidim/admin/newsletters/show.html.erb +29 -26
- data/app/views/decidim/admin/officializations/index.html.erb +1 -1
- data/app/views/decidim/admin/officializations/new.html.erb +2 -2
- data/app/views/decidim/admin/organization/_form.html.erb +5 -3
- data/app/views/decidim/admin/organization/edit.html.erb +2 -2
- data/app/views/decidim/admin/organization_appearance/edit.html.erb +2 -2
- data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +2 -2
- data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +2 -2
- data/app/views/decidim/admin/participatory_space_private_users/new.html.erb +2 -2
- data/app/views/decidim/admin/resource_permissions/edit.html.erb +2 -2
- data/app/views/decidim/admin/scope_types/edit.html.erb +2 -2
- data/app/views/decidim/admin/scope_types/index.html.erb +2 -2
- data/app/views/decidim/admin/scope_types/new.html.erb +2 -2
- data/app/views/decidim/admin/scopes/edit.html.erb +2 -2
- data/app/views/decidim/admin/scopes/index.html.erb +2 -2
- data/app/views/decidim/admin/scopes/new.html.erb +2 -2
- data/app/views/decidim/admin/shared/_filters.html.erb +1 -1
- data/app/views/decidim/admin/shared/landing_page/_content_blocks.html.erb +2 -2
- data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +2 -2
- data/app/views/decidim/admin/static_page_topics/edit.html.erb +2 -2
- data/app/views/decidim/admin/static_page_topics/index.html.erb +2 -2
- data/app/views/decidim/admin/static_page_topics/new.html.erb +2 -2
- data/app/views/decidim/admin/static_pages/edit.html.erb +2 -2
- data/app/views/decidim/admin/static_pages/index.html.erb +2 -2
- data/app/views/decidim/admin/static_pages/new.html.erb +2 -2
- data/app/views/decidim/admin/user_groups/index.html.erb +2 -2
- data/app/views/decidim/admin/user_groups_csv_verifications/new.html.erb +2 -2
- data/app/views/decidim/admin/users/index.html.erb +2 -2
- data/app/views/decidim/admin/users/new.html.erb +2 -2
- data/app/views/layouts/decidim/admin/_breadcrumb.html.erb +1 -1
- data/app/views/layouts/decidim/admin/_header.html.erb +4 -0
- data/app/views/layouts/decidim/admin/_js_configuration.html.erb +1 -0
- data/config/assets.rb +1 -0
- data/config/locales/ar.yml +10 -8
- data/config/locales/bg.yml +25 -0
- data/config/locales/ca.yml +2 -1
- data/config/locales/cs.yml +4 -8
- data/config/locales/de.yml +5 -4
- data/config/locales/el.yml +1 -12
- data/config/locales/en.yml +2 -1
- data/config/locales/es-MX.yml +3 -2
- data/config/locales/es-PY.yml +3 -2
- data/config/locales/es.yml +3 -2
- data/config/locales/eu.yml +6 -5
- data/config/locales/fi-plain.yml +2 -1
- data/config/locales/fi.yml +4 -3
- data/config/locales/fr-CA.yml +3 -2
- data/config/locales/fr.yml +2 -1
- data/config/locales/ga-IE.yml +1 -4
- data/config/locales/gl.yml +7 -7
- data/config/locales/he-IL.yml +50 -0
- data/config/locales/hu.yml +35 -6
- data/config/locales/id-ID.yml +4 -0
- data/config/locales/is-IS.yml +4 -0
- data/config/locales/it.yml +6 -9
- data/config/locales/ja.yml +6 -4
- data/config/locales/ko.yml +774 -0
- data/config/locales/lb.yml +7 -10
- data/config/locales/lt.yml +1 -14
- data/config/locales/lv.yml +7 -0
- data/config/locales/nl.yml +6 -9
- data/config/locales/no.yml +19 -9
- data/config/locales/pl.yml +71 -4
- data/config/locales/pt-BR.yml +49 -12
- data/config/locales/pt.yml +7 -10
- data/config/locales/ro-RO.yml +1 -13
- data/config/locales/ru.yml +4 -0
- data/config/locales/sk.yml +4 -0
- data/config/locales/sl.yml +4 -0
- data/config/locales/sq-AL.yml +77 -0
- data/config/locales/sr-CS.yml +4 -0
- data/config/locales/sv.yml +6 -9
- data/config/locales/tr-TR.yml +10 -0
- data/config/locales/uk.yml +4 -0
- data/config/locales/zh-CN.yml +4 -0
- data/config/locales/zh-TW.yml +1 -11
- data/decidim-admin.gemspec +43 -0
- data/lib/decidim/admin/engine.rb +1 -25
- data/lib/decidim/admin/menu.rb +13 -4
- data/lib/decidim/admin/test/commands/destroy_category_examples.rb +9 -0
- data/lib/decidim/admin/version.rb +1 -1
- metadata +19 -15
- data/config/environment.rb +0 -3
data/lib/decidim/admin/engine.rb
CHANGED
@@ -57,39 +57,15 @@ module Decidim
|
|
57
57
|
Mime::Type.register Decidim::Admin::Import::Readers::XLSX::MIME_TYPE, :xlsx
|
58
58
|
end
|
59
59
|
|
60
|
-
initializer "decidim_admin.
|
60
|
+
initializer "decidim_admin.menu" do
|
61
61
|
Decidim::Admin::Menu.register_admin_global_moderation_menu!
|
62
|
-
end
|
63
|
-
|
64
|
-
initializer "decidim_admin.workflows_menu" do
|
65
62
|
Decidim::Admin::Menu.register_workflows_menu!
|
66
|
-
end
|
67
|
-
|
68
|
-
initializer "decidim_admin.impersonate_menu" do
|
69
63
|
Decidim::Admin::Menu.register_impersonate_menu!
|
70
|
-
end
|
71
|
-
|
72
|
-
initializer "decidim_admin.static_pages_menu" do
|
73
64
|
Decidim::Admin::Menu.register_admin_static_pages_menu!
|
74
|
-
end
|
75
|
-
|
76
|
-
initializer "decidim_admin.user_menu" do
|
77
65
|
Decidim::Admin::Menu.register_admin_user_menu!
|
78
|
-
end
|
79
|
-
|
80
|
-
initializer "decidim_admin.scopes_menu" do
|
81
66
|
Decidim::Admin::Menu.register_admin_scopes_menu!
|
82
|
-
end
|
83
|
-
|
84
|
-
initializer "decidim_admin.areas_menu" do
|
85
67
|
Decidim::Admin::Menu.register_admin_areas_menu!
|
86
|
-
end
|
87
|
-
|
88
|
-
initializer "decidim_admin.settings_menu" do
|
89
68
|
Decidim::Admin::Menu.register_admin_settings_menu!
|
90
|
-
end
|
91
|
-
|
92
|
-
initializer "decidim_admin.menu" do
|
93
69
|
Decidim::Admin::Menu.register_admin_menu!
|
94
70
|
end
|
95
71
|
|
data/lib/decidim/admin/menu.rb
CHANGED
@@ -8,7 +8,7 @@ module Decidim
|
|
8
8
|
moderations_count = Decidim::Admin::ModerationStats.new(current_user).count_content_moderations
|
9
9
|
|
10
10
|
caption = I18n.t("menu.content", scope: "decidim.admin")
|
11
|
-
caption += content_tag(:span, moderations_count, class:
|
11
|
+
caption += content_tag(:span, moderations_count, class: "component-counter")
|
12
12
|
|
13
13
|
menu.add_item :moderations,
|
14
14
|
caption.html_safe,
|
@@ -20,7 +20,7 @@ module Decidim
|
|
20
20
|
user_reports = Decidim::Admin::ModerationStats.new(current_user).count_user_pending_reports
|
21
21
|
|
22
22
|
caption = I18n.t("menu.reported_users", scope: "decidim.admin")
|
23
|
-
caption += content_tag(:span, user_reports, class:
|
23
|
+
caption += content_tag(:span, user_reports, class: "component-counter")
|
24
24
|
|
25
25
|
menu.add_item :moderated_users,
|
26
26
|
caption.html_safe,
|
@@ -168,13 +168,22 @@ module Decidim
|
|
168
168
|
decidim_admin.scopes_path,
|
169
169
|
icon_name: "price-tag-3-line",
|
170
170
|
position: 1.3,
|
171
|
-
if: allowed_to?(:read, :scope)
|
171
|
+
if: allowed_to?(:read, :scope),
|
172
|
+
active: [%w(
|
173
|
+
decidim/admin/scopes
|
174
|
+
decidim/admin/scope_types
|
175
|
+
), []]
|
176
|
+
|
172
177
|
menu.add_item :areas,
|
173
178
|
I18n.t("menu.areas", scope: "decidim.admin"),
|
174
179
|
decidim_admin.areas_path,
|
175
180
|
icon_name: "layout-masonry-line",
|
176
181
|
position: 1.5,
|
177
|
-
if: allowed_to?(:read, :area)
|
182
|
+
if: allowed_to?(:read, :area),
|
183
|
+
active: [%w(
|
184
|
+
decidim/admin/areas
|
185
|
+
decidim/admin/area_types
|
186
|
+
), []]
|
178
187
|
|
179
188
|
menu.add_item :help_sections,
|
180
189
|
I18n.t("menu.help_sections", scope: "decidim.admin"),
|
@@ -19,6 +19,15 @@ module Decidim
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
context "when the category is being used by a resource" do
|
23
|
+
let(:component) { create(:dummy_component, participatory_space:) }
|
24
|
+
let!(:resource) { create(:dummy_resource, component:, category:) }
|
25
|
+
|
26
|
+
it "broadcasts invalid" do
|
27
|
+
expect { command.call }.to broadcast(:invalid)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
22
31
|
context "when the category is not empty" do
|
23
32
|
let!(:subcategory) { create :subcategory, parent: category }
|
24
33
|
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.28.
|
4
|
+
version: 0.28.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
8
8
|
- Marc Riera Casals
|
9
9
|
- Oriol Gual Oliva
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: active_link_to
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.28.
|
35
|
+
version: 0.28.1
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.28.
|
42
|
+
version: 0.28.1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: devise
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,28 +94,28 @@ dependencies:
|
|
94
94
|
requirements:
|
95
95
|
- - '='
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.28.
|
97
|
+
version: 0.28.1
|
98
98
|
type: :development
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - '='
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.28.
|
104
|
+
version: 0.28.1
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: decidim-participatory_processes
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - '='
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.28.
|
111
|
+
version: 0.28.1
|
112
112
|
type: :development
|
113
113
|
prerelease: false
|
114
114
|
version_requirements: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - '='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.28.
|
118
|
+
version: 0.28.1
|
119
119
|
description: Organization administration to manage a single organization.
|
120
120
|
email:
|
121
121
|
- josepjaume@gmail.com
|
@@ -351,6 +351,8 @@ files:
|
|
351
351
|
- app/models/decidim/admin/fake_newsletter.rb
|
352
352
|
- app/packs/entrypoints/decidim_admin.js
|
353
353
|
- app/packs/entrypoints/decidim_admin.scss
|
354
|
+
- app/packs/entrypoints/decidim_admin_overrides.scss
|
355
|
+
- app/packs/images/decidim/admin/.keep
|
354
356
|
- app/packs/src/decidim/admin/admin_autocomplete.js
|
355
357
|
- app/packs/src/decidim/admin/application.js
|
356
358
|
- app/packs/src/decidim/admin/auto_buttons_by_position.component.js
|
@@ -402,6 +404,7 @@ files:
|
|
402
404
|
- app/packs/stylesheets/decidim/admin/_title-bar.scss
|
403
405
|
- app/packs/stylesheets/decidim/admin/_user-login.scss
|
404
406
|
- app/packs/stylesheets/decidim/admin/application.scss
|
407
|
+
- app/packs/stylesheets/decidim/admin/decidim_application.scss
|
405
408
|
- app/permissions/decidim/admin/permissions.rb
|
406
409
|
- app/permissions/decidim/admin/user_manager_permissions.rb
|
407
410
|
- app/presenters/decidim/admin/aside_menu_presenter.rb
|
@@ -554,7 +557,6 @@ files:
|
|
554
557
|
- app/views/layouts/decidim/admin/users.html.erb
|
555
558
|
- config/assets.rb
|
556
559
|
- config/brakeman.ignore
|
557
|
-
- config/environment.rb
|
558
560
|
- config/locales/am-ET.yml
|
559
561
|
- config/locales/ar-SA.yml
|
560
562
|
- config/locales/ar.yml
|
@@ -587,6 +589,7 @@ files:
|
|
587
589
|
- config/locales/ga-IE.yml
|
588
590
|
- config/locales/gl.yml
|
589
591
|
- config/locales/gn-PY.yml
|
592
|
+
- config/locales/he-IL.yml
|
590
593
|
- config/locales/hr-HR.yml
|
591
594
|
- config/locales/hr.yml
|
592
595
|
- config/locales/hu.yml
|
@@ -640,6 +643,7 @@ files:
|
|
640
643
|
- db/migrate/20171219154507_add_officialization_to_users.rb
|
641
644
|
- db/migrate/20180413233318_add_reason_to_decidim_impersonation_logs.rb
|
642
645
|
- db/migrate/20191118112040_add_accepted_admin_terms_at_field_to_users.rb
|
646
|
+
- decidim-admin.gemspec
|
643
647
|
- lib/decidim/admin.rb
|
644
648
|
- lib/decidim/admin/components.rb
|
645
649
|
- lib/decidim/admin/custom_import.rb
|
@@ -691,23 +695,23 @@ metadata:
|
|
691
695
|
funding_uri: https://opencollective.com/decidim
|
692
696
|
homepage_uri: https://decidim.org
|
693
697
|
source_code_uri: https://github.com/decidim/decidim
|
694
|
-
post_install_message:
|
698
|
+
post_install_message:
|
695
699
|
rdoc_options: []
|
696
700
|
require_paths:
|
697
701
|
- lib
|
698
702
|
required_ruby_version: !ruby/object:Gem::Requirement
|
699
703
|
requirements:
|
700
|
-
- - "
|
704
|
+
- - "~>"
|
701
705
|
- !ruby/object:Gem::Version
|
702
|
-
version:
|
706
|
+
version: 3.1.0
|
703
707
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
704
708
|
requirements:
|
705
709
|
- - ">="
|
706
710
|
- !ruby/object:Gem::Version
|
707
711
|
version: '0'
|
708
712
|
requirements: []
|
709
|
-
rubygems_version: 3.
|
710
|
-
signing_key:
|
713
|
+
rubygems_version: 3.5.9
|
714
|
+
signing_key:
|
711
715
|
specification_version: 4
|
712
716
|
summary: Decidim organization administration
|
713
717
|
test_files: []
|
data/config/environment.rb
DELETED