decidim-admin 0.23.1 → 0.24.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.

Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_admin_manifest.js +1 -0
  3. data/app/assets/javascripts/decidim/admin/application.js.es6 +2 -0
  4. data/app/assets/javascripts/decidim/admin/budget_rule_toggler.component.js.es6 +23 -20
  5. data/app/assets/javascripts/decidim/admin/bundle.js +10 -17
  6. data/app/assets/javascripts/decidim/admin/bundle.js.map +1 -1
  7. data/app/assets/javascripts/decidim/admin/form.js.es6 +1 -0
  8. data/app/assets/javascripts/decidim/admin/import_guidance.js.es6 +29 -0
  9. data/app/assets/javascripts/decidim/admin/moderations.js.es6 +24 -0
  10. data/app/assets/javascripts/decidim/admin/proposal_infinite_edit.js.es6 +20 -0
  11. data/app/assets/javascripts/decidim/admin/subform_multi_toggler.component.js.es6 +2 -2
  12. data/app/assets/javascripts/decidim/admin/subform_toggler.component.js.es6 +2 -2
  13. data/app/assets/javascripts/decidim/admin/user_moderations.js +2 -0
  14. data/app/assets/stylesheets/decidim/admin/_variables.scss +9 -0
  15. data/app/assets/stylesheets/decidim/admin/components/_dropdown-menu.scss +3 -0
  16. data/app/assets/stylesheets/decidim/admin/extra/_action-icon.scss +13 -0
  17. data/app/assets/stylesheets/decidim/admin/extra/_block_user.scss +5 -0
  18. data/app/assets/stylesheets/decidim/admin/extra/_title_bar.scss +1 -0
  19. data/app/assets/stylesheets/decidim/admin/modules/_buttons.scss +1 -0
  20. data/app/assets/stylesheets/decidim/admin/modules/_moderations.scss +39 -0
  21. data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +2 -0
  22. data/app/assets/stylesheets/decidim/admin/modules/_reveal.scss +5 -0
  23. data/app/assets/stylesheets/decidim/admin/modules/_secondary-nav.scss +6 -3
  24. data/app/assets/stylesheets/decidim/admin/modules/_user-login.scss +2 -2
  25. data/app/assets/stylesheets/decidim/admin/user_moderations.scss +3 -0
  26. data/app/assets/stylesheets/decidim/admin/utils/_settings.scss +1 -0
  27. data/app/cells/decidim/admin/content_block/show.erb +1 -1
  28. data/app/cells/decidim/admin/content_block_cell.rb +4 -0
  29. data/app/commands/decidim/admin/block_user.rb +70 -0
  30. data/app/commands/decidim/admin/create_import.rb +29 -0
  31. data/app/commands/decidim/admin/create_participatory_space_admin_user_actions.rb +98 -0
  32. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +1 -1
  33. data/app/commands/decidim/admin/create_static_page.rb +2 -1
  34. data/app/commands/decidim/admin/hide_resource.rb +21 -0
  35. data/app/commands/decidim/admin/impersonate_user.rb +17 -1
  36. data/app/commands/decidim/admin/promote_managed_user.rb +10 -0
  37. data/app/commands/decidim/admin/reorder_content_blocks.rb +6 -3
  38. data/app/commands/decidim/admin/transfer_user.rb +78 -0
  39. data/app/commands/decidim/admin/unblock_user.rb +48 -0
  40. data/app/commands/decidim/admin/unreport_user.rb +46 -0
  41. data/app/commands/decidim/admin/update_organization_appearance.rb +12 -4
  42. data/app/commands/decidim/admin/update_static_page.rb +2 -1
  43. data/app/commands/decidim/admin/verify_user_group.rb +1 -1
  44. data/app/controllers/concerns/decidim/admin/filterable.rb +1 -1
  45. data/app/controllers/concerns/decidim/admin/global_moderation_context.rb +51 -0
  46. data/app/controllers/concerns/decidim/admin/landing_page.rb +105 -0
  47. data/app/controllers/concerns/decidim/admin/landing_page_content_blocks.rb +118 -0
  48. data/app/controllers/concerns/decidim/moderations/admin/filterable.rb +54 -0
  49. data/app/controllers/decidim/admin/block_user_controller.rb +60 -0
  50. data/app/controllers/decidim/admin/components/base_controller.rb +1 -0
  51. data/app/controllers/decidim/admin/conflicts_controller.rb +46 -0
  52. data/app/controllers/decidim/admin/exports_controller.rb +1 -2
  53. data/app/controllers/decidim/admin/global_moderations/reports_controller.rb +18 -0
  54. data/app/controllers/decidim/admin/global_moderations_controller.rb +32 -0
  55. data/app/controllers/decidim/admin/impersonations_controller.rb +1 -1
  56. data/app/controllers/decidim/admin/imports_controller.rb +52 -0
  57. data/app/controllers/decidim/admin/moderated_users_controller.rb +44 -0
  58. data/app/controllers/decidim/admin/moderations/reports_controller.rb +39 -0
  59. data/app/controllers/decidim/admin/moderations_controller.rb +31 -7
  60. data/app/controllers/decidim/admin/officializations_controller.rb +3 -3
  61. data/app/controllers/decidim/admin/organization_homepage_controller.rb +6 -2
  62. data/app/controllers/decidim/admin/static_pages_controller.rb +7 -0
  63. data/app/events/decidim/resource_hidden_event.rb +37 -0
  64. data/app/forms/decidim/admin/block_user_form.rb +25 -0
  65. data/app/forms/decidim/admin/import_form.rb +85 -0
  66. data/app/forms/decidim/admin/organization_appearance_form.rb +1 -2
  67. data/app/forms/decidim/admin/participatory_space_private_user_csv_import_form.rb +4 -5
  68. data/app/forms/decidim/admin/participatory_space_private_user_form.rb +0 -5
  69. data/app/forms/decidim/admin/selective_newsletter_form.rb +6 -0
  70. data/app/forms/decidim/admin/static_page_form.rb +6 -1
  71. data/app/forms/decidim/admin/transfer_user_form.rb +19 -0
  72. data/app/helpers/decidim/admin/admin_terms_helper.rb +0 -7
  73. data/app/helpers/decidim/admin/application_helper.rb +5 -4
  74. data/app/helpers/decidim/admin/exports_helper.rb +2 -2
  75. data/app/helpers/decidim/admin/filterable_helper.rb +3 -2
  76. data/app/helpers/decidim/admin/imports_helper.rb +43 -0
  77. data/app/helpers/decidim/admin/menu_helper.rb +10 -0
  78. data/app/helpers/decidim/admin/moderations/reports_helper.rb +40 -0
  79. data/app/helpers/decidim/admin/moderations_helper.rb +36 -0
  80. data/app/helpers/decidim/admin/newsletters_helper.rb +4 -10
  81. data/app/helpers/decidim/admin/settings_helper.rb +2 -1
  82. data/app/helpers/decidim/admin/sidebar_menu_helper.rb +13 -0
  83. data/app/helpers/decidim/admin/user_moderations_helper.rb +6 -0
  84. data/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +1 -1
  85. data/app/jobs/decidim/admin/verify_user_group_from_csv_job.rb +1 -1
  86. data/app/permissions/decidim/admin/permissions.rb +7 -6
  87. data/app/presenters/decidim/admin/dashboard_metric_charts_presenter.rb +1 -1
  88. data/app/presenters/decidim/admin/secondary_menu_presenter.rb +26 -0
  89. data/app/queries/decidim/admin/active_users_counter.rb +1 -2
  90. data/app/queries/decidim/admin/newsletter_recipients.rb +0 -7
  91. data/app/queries/decidim/admin/user_filter.rb +1 -2
  92. data/app/views/decidim/admin/admin_terms/show.html.erb +1 -1
  93. data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -1
  94. data/app/views/decidim/admin/attachments/index.html.erb +1 -1
  95. data/app/views/decidim/admin/block_user/new.html.erb +22 -0
  96. data/app/views/decidim/admin/categories/index.html.erb +1 -1
  97. data/app/views/decidim/admin/components/_component.html.erb +12 -0
  98. data/app/views/decidim/admin/components/_form.html.erb +1 -1
  99. data/app/views/decidim/admin/conflicts/edit.html.erb +46 -0
  100. data/app/views/decidim/admin/conflicts/index.html.erb +34 -0
  101. data/app/views/decidim/admin/dashboard/show.html.erb +2 -1
  102. data/app/views/decidim/admin/exports/_dropdown.html.erb +1 -1
  103. data/app/views/decidim/admin/imports/_dropdown.html.erb +9 -0
  104. data/app/views/decidim/admin/imports/new.html.erb +57 -0
  105. data/app/views/decidim/admin/moderated_users/_report.html.erb +10 -0
  106. data/app/views/decidim/admin/moderated_users/index.html.erb +78 -0
  107. data/app/views/decidim/admin/moderations/_report.html.erb +1 -1
  108. data/app/views/decidim/admin/moderations/index.html.erb +27 -9
  109. data/app/views/decidim/admin/moderations/reports/index.html.erb +102 -0
  110. data/app/views/decidim/admin/moderations/reports/show.html.erb +62 -0
  111. data/app/views/decidim/admin/newsletters/index.html.erb +1 -1
  112. data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +2 -2
  113. data/app/views/decidim/admin/officializations/index.html.erb +13 -4
  114. data/app/views/decidim/admin/organization_appearance/_form.html.erb +0 -4
  115. data/app/views/decidim/admin/organization_appearance/form/_colors.html.erb +1 -1
  116. data/app/views/decidim/admin/organization_appearance/form/_images.html.erb +4 -4
  117. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +1 -1
  118. data/app/views/decidim/admin/shared/_gallery.html.erb +1 -1
  119. data/app/views/decidim/admin/shared/landing_page/edit.html.erb +47 -0
  120. data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +15 -0
  121. data/app/views/decidim/admin/static_pages/_form.html.erb +6 -0
  122. data/app/views/decidim/admin/users/index.html.erb +1 -1
  123. data/app/views/layouts/decidim/admin/_application.html.erb +5 -1
  124. data/app/views/layouts/decidim/admin/_title_bar.html.erb +2 -2
  125. data/app/views/layouts/decidim/admin/global_moderations.html.erb +7 -0
  126. data/app/views/layouts/decidim/admin/newsletters.erb +1 -1
  127. data/app/views/layouts/decidim/admin/settings.html.erb +2 -33
  128. data/app/views/layouts/decidim/admin/users.html.erb +11 -0
  129. data/config/locales/ar.yml +0 -9
  130. data/config/locales/bg.yml +0 -5
  131. data/config/locales/ca.yml +151 -8
  132. data/config/locales/cs.yml +194 -51
  133. data/config/locales/de.yml +172 -28
  134. data/config/locales/el.yml +62 -9
  135. data/config/locales/en.yml +152 -9
  136. data/config/locales/es-MX.yml +150 -7
  137. data/config/locales/es-PY.yml +150 -7
  138. data/config/locales/es.yml +150 -7
  139. data/config/locales/eu.yml +18 -21
  140. data/config/locales/fi-plain.yml +150 -7
  141. data/config/locales/fi.yml +150 -7
  142. data/config/locales/fr-CA.yml +141 -8
  143. data/config/locales/fr.yml +142 -9
  144. data/config/locales/gl.yml +225 -4
  145. data/config/locales/hu.yml +13 -9
  146. data/config/locales/id-ID.yml +0 -3
  147. data/config/locales/is-IS.yml +36 -6
  148. data/config/locales/it.yml +74 -9
  149. data/config/locales/ja.yml +43 -12
  150. data/config/locales/lv.yml +0 -9
  151. data/config/locales/nl.yml +120 -11
  152. data/config/locales/no.yml +16 -9
  153. data/config/locales/pl.yml +168 -24
  154. data/config/locales/pt-BR.yml +0 -3
  155. data/config/locales/pt.yml +0 -9
  156. data/config/locales/ro-RO.yml +21 -9
  157. data/config/locales/ru.yml +0 -7
  158. data/config/locales/si-LK.yml +1 -0
  159. data/config/locales/sk.yml +0 -9
  160. data/config/locales/sl.yml +0 -5
  161. data/config/locales/sr-CS.yml +0 -7
  162. data/config/locales/sv.yml +53 -9
  163. data/config/locales/sw-KE.yml +1 -0
  164. data/config/locales/tr-TR.yml +206 -11
  165. data/config/locales/uk.yml +0 -3
  166. data/config/locales/zh-CN.yml +0 -9
  167. data/config/routes.rb +21 -1
  168. data/lib/decidim/admin.rb +6 -0
  169. data/lib/decidim/admin/engine.rb +76 -1
  170. data/lib/decidim/admin/import.rb +12 -0
  171. data/lib/decidim/admin/import/creator.rb +82 -0
  172. data/lib/decidim/admin/import/importer.rb +82 -0
  173. data/lib/decidim/admin/import/importer_factory.rb +17 -0
  174. data/lib/decidim/admin/import/readers.rb +39 -0
  175. data/lib/decidim/admin/import/readers/base.rb +31 -0
  176. data/lib/decidim/admin/import/readers/csv.rb +23 -0
  177. data/lib/decidim/admin/import/readers/json.rb +25 -0
  178. data/lib/decidim/admin/import/readers/xls.rb +25 -0
  179. data/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +6 -6
  180. data/lib/decidim/admin/test/commands/create_category_examples.rb +6 -6
  181. data/lib/decidim/admin/test/filterable_examples.rb +1 -8
  182. data/lib/decidim/admin/test/manage_moderations_examples.rb +49 -4
  183. data/lib/decidim/admin/version.rb +1 -1
  184. metadata +78 -19
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Admin
5
+ module Import
6
+ module Readers
7
+ # Abstract class with a very naive default implementation. Each importable
8
+ # file type should have it's own reader.
9
+ class Base
10
+ def initialize(file)
11
+ @file = file
12
+ end
13
+
14
+ # The read_rows method should iterate over each row of the data and
15
+ # yield the data array of each row with the row's index.
16
+ # The first row yielded with index 0 needs to contain the data headers
17
+ # which can be later used to map the data to correct attributes.
18
+ #
19
+ # This needs to be implemented by the extending classes.
20
+ def read_rows
21
+ raise NotImplementedError
22
+ end
23
+
24
+ protected
25
+
26
+ attr_reader :file
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "csv"
4
+
5
+ module Decidim
6
+ module Admin
7
+ module Import
8
+ module Readers
9
+ # Imports any exported CSV file to local objects. It transforms the
10
+ # import data using the creator into the final target objects.
11
+ class CSV < Base
12
+ MIME_TYPE = "text/csv"
13
+
14
+ def read_rows
15
+ ::CSV.read(file, col_sep: ";").each_with_index do |row, index|
16
+ yield row, index
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module Decidim
6
+ module Admin
7
+ module Import
8
+ module Readers
9
+ # Imports any exported JSON file to local objects. It transforms the
10
+ # import data using the creator into the final target objects.
11
+ class JSON < Base
12
+ MIME_TYPE = "application/json"
13
+
14
+ def read_rows
15
+ json_string = File.read(file)
16
+ ::JSON.parse(json_string).each_with_index do |row, index|
17
+ yield row.keys, index if index.zero?
18
+ yield row.values, index + 1
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spreadsheet"
4
+
5
+ module Decidim
6
+ module Admin
7
+ module Import
8
+ module Readers
9
+ # Imports any exported XLS file to local objects. It transforms the
10
+ # import data using the creator into the final target objects.
11
+ class XLS < Base
12
+ MIME_TYPE = "application/vnd.ms-excel"
13
+
14
+ def read_rows
15
+ book = ::Spreadsheet.open(file)
16
+ sheet = book.worksheet(0)
17
+ sheet.each_with_index do |row, index|
18
+ yield row.to_a, index
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -10,12 +10,12 @@ module Decidim
10
10
  let(:form_params) do
11
11
  {
12
12
  "attachment_collection" => {
13
- "name_en" => Decidim::Faker::Localized.sentence(3),
14
- "name_es" => Decidim::Faker::Localized.sentence(3),
15
- "name_ca" => Decidim::Faker::Localized.sentence(3),
16
- "description_en" => Decidim::Faker::Localized.paragraph(3),
17
- "description_es" => Decidim::Faker::Localized.paragraph(3),
18
- "description_ca" => Decidim::Faker::Localized.paragraph(3)
13
+ "name_en" => Decidim::Faker::Localized.sentence(word_count: 3),
14
+ "name_es" => Decidim::Faker::Localized.sentence(word_count: 3),
15
+ "name_ca" => Decidim::Faker::Localized.sentence(word_count: 3),
16
+ "description_en" => Decidim::Faker::Localized.paragraph(sentence_count: 3),
17
+ "description_es" => Decidim::Faker::Localized.paragraph(sentence_count: 3),
18
+ "description_ca" => Decidim::Faker::Localized.paragraph(sentence_count: 3)
19
19
  }
20
20
  }
21
21
  end
@@ -10,12 +10,12 @@ module Decidim
10
10
  let(:form_params) do
11
11
  {
12
12
  "category" => {
13
- "name_en" => Decidim::Faker::Localized.paragraph(3),
14
- "name_es" => Decidim::Faker::Localized.paragraph(3),
15
- "name_ca" => Decidim::Faker::Localized.paragraph(3),
16
- "description_en" => Decidim::Faker::Localized.paragraph(3),
17
- "description_es" => Decidim::Faker::Localized.paragraph(3),
18
- "description_ca" => Decidim::Faker::Localized.paragraph(3)
13
+ "name_en" => Decidim::Faker::Localized.paragraph(sentence_count: 3),
14
+ "name_es" => Decidim::Faker::Localized.paragraph(sentence_count: 3),
15
+ "name_ca" => Decidim::Faker::Localized.paragraph(sentence_count: 3),
16
+ "description_en" => Decidim::Faker::Localized.paragraph(sentence_count: 3),
17
+ "description_es" => Decidim::Faker::Localized.paragraph(sentence_count: 3),
18
+ "description_ca" => Decidim::Faker::Localized.paragraph(sentence_count: 3)
19
19
  }
20
20
  }
21
21
  end
@@ -2,16 +2,9 @@
2
2
 
3
3
  shared_context "with filterable context" do
4
4
  let(:factory_name) { model_name.singular_route_key }
5
- let(:module_name) { model_name.route_key.camelize }
6
- let(:filterable_concern) { "Decidim::#{module_name}::Admin::Filterable".constantize }
7
-
8
- let(:filterable_fake_controller) do
9
- FILTERABLE_CONCERN ||= filterable_concern
10
- class FilterableFakeController < Decidim::ApplicationController; include FILTERABLE_CONCERN; end
11
- end
12
5
 
13
6
  def filterable_method(method_name)
14
- (@controller ||= filterable_fake_controller.new).send(method_name)
7
+ resource_controller.new.send(method_name)
15
8
  end
16
9
 
17
10
  def apply_filter(options, filter)
@@ -3,7 +3,7 @@
3
3
  shared_examples "manage moderations" do
4
4
  let!(:moderations) do
5
5
  reportables.first(reportables.length - 1).map do |reportable|
6
- moderation = create(:moderation, reportable: reportable, report_count: 1)
6
+ moderation = create(:moderation, reportable: reportable, report_count: 1, reported_content: reportable.reported_searchable_content_text)
7
7
  create(:report, moderation: moderation)
8
8
  moderation
9
9
  end
@@ -11,15 +11,16 @@ shared_examples "manage moderations" do
11
11
  let!(:moderation) { moderations.first }
12
12
  let!(:hidden_moderations) do
13
13
  reportables.last(1).map do |reportable|
14
- moderation = create(:moderation, reportable: reportable, report_count: 3, hidden_at: Time.current)
14
+ moderation = create(:moderation, reportable: reportable, report_count: 3, reported_content: reportable.reported_searchable_content_text, hidden_at: Time.current)
15
15
  create_list(:report, 3, moderation: moderation, reason: :spam)
16
16
  moderation
17
17
  end
18
18
  end
19
+ let(:moderations_link_text) { "Moderations" }
19
20
 
20
21
  before do
21
22
  visit participatory_space_path
22
- click_link "Moderations"
23
+ click_link moderations_link_text
23
24
  end
24
25
 
25
26
  context "when listing moderations" do
@@ -48,11 +49,55 @@ shared_examples "manage moderations" do
48
49
  expect(page).to have_admin_callout("Resource successfully hidden")
49
50
  expect(page).to have_no_content(moderation.reportable.reported_content_url)
50
51
  end
52
+
53
+ it "user can sort by report count" do
54
+ moderations.each_with_index { |moderation, index| moderation.update(report_count: index + 1) }
55
+ moderations_ordered_by_report_count_asc = moderations.sort_by(&:report_count)
56
+
57
+ within "table" do
58
+ click_link "Count"
59
+
60
+ all("tbody tr").each_with_index do |row, index|
61
+ reportable_id = moderations_ordered_by_report_count_asc[index].reportable.id
62
+ expect(row.find("td:first-child")).to have_content(reportable_id)
63
+ end
64
+ end
65
+ end
66
+
67
+ it "user can filter by reportable type" do
68
+ reportable_type = moderation.reportable.class.name.demodulize
69
+ within ".filters__section" do
70
+ find(:xpath, "//a[contains(text(), 'Filter')]").hover
71
+ find(:xpath, "//a[contains(text(), 'Type')]").hover
72
+ click_link reportable_type
73
+ end
74
+ expect(page).to have_selector("tbody tr", count: moderations.length)
75
+ end
76
+
77
+ it "user can filter by reported content" do
78
+ search = moderation.reportable.id
79
+ within ".filters__section" do
80
+ fill_in("Search Moderation by reportable id or content.", with: search)
81
+ find(:xpath, "//button[@type='submit']").click
82
+ end
83
+ expect(page).to have_selector("tbody tr", count: 1)
84
+ end
85
+
86
+ it "user can see moderation details" do
87
+ within "tr[data-id=\"#{moderation.id}\"]" do
88
+ click_link "Expand"
89
+ end
90
+
91
+ reported_content_slice = moderation.reportable.reported_searchable_content_text.split("\n").first
92
+ expect(page).to have_content(reported_content_slice)
93
+ end
51
94
  end
52
95
 
53
96
  context "when listing hidden resources" do
54
97
  it "user can review them" do
55
- click_link "Hidden"
98
+ within ".card-title" do
99
+ click_link "Hidden"
100
+ end
56
101
 
57
102
  hidden_moderations.each do |moderation|
58
103
  within "tr[data-id=\"#{moderation.id}\"]" do
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-admin version.
5
5
  module Admin
6
6
  def self.version
7
- "0.23.1"
7
+ "0.24.0.rc2"
8
8
  end
9
9
  end
10
10
  end
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.23.1
4
+ version: 0.24.0.rc2
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: 2020-11-12 00:00:00.000000000 Z
13
+ date: 2021-03-10 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.23.1
35
+ version: 0.24.0.rc2
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.23.1
42
+ version: 0.24.0.rc2
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: devise
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -88,28 +88,28 @@ dependencies:
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '4.3'
91
+ version: '4.4'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: '4.3'
98
+ version: '4.4'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: sassc
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: 2.3.0
105
+ version: 2.4.0
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: 2.3.0
112
+ version: 2.4.0
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: sassc-rails
115
115
  requirement: !ruby/object:Gem::Requirement
@@ -130,28 +130,28 @@ dependencies:
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.23.1
133
+ version: 0.24.0.rc2
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - '='
139
139
  - !ruby/object:Gem::Version
140
- version: 0.23.1
140
+ version: 0.24.0.rc2
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: decidim-participatory_processes
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '='
146
146
  - !ruby/object:Gem::Version
147
- version: 0.23.1
147
+ version: 0.24.0.rc2
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - '='
153
153
  - !ruby/object:Gem::Version
154
- version: 0.23.1
154
+ version: 0.24.0.rc2
155
155
  description: Organization administration to manage a single organization.
156
156
  email:
157
157
  - josepjaume@gmail.com
@@ -176,9 +176,12 @@ files:
176
176
  - app/assets/javascripts/decidim/admin/field_dependent_inputs.component.js.es6
177
177
  - app/assets/javascripts/decidim/admin/form.js.es6
178
178
  - app/assets/javascripts/decidim/admin/gallery.js.es6
179
+ - app/assets/javascripts/decidim/admin/import_guidance.js.es6
179
180
  - app/assets/javascripts/decidim/admin/managed_users.js.es6
181
+ - app/assets/javascripts/decidim/admin/moderations.js.es6
180
182
  - app/assets/javascripts/decidim/admin/newsletters.js.es6
181
183
  - app/assets/javascripts/decidim/admin/officializations.js.es6
184
+ - app/assets/javascripts/decidim/admin/proposal_infinite_edit.js.es6
182
185
  - app/assets/javascripts/decidim/admin/resources_permissions.js.es6
183
186
  - app/assets/javascripts/decidim/admin/scope_picker_enabler.component.js.es6
184
187
  - app/assets/javascripts/decidim/admin/sort_list.component.js.es6
@@ -187,6 +190,7 @@ files:
187
190
  - app/assets/javascripts/decidim/admin/subform_toggler.component.js.es6
188
191
  - app/assets/javascripts/decidim/admin/tab_focus.js.es6
189
192
  - app/assets/javascripts/decidim/admin/toggle_nav.js.es6
193
+ - app/assets/javascripts/decidim/admin/user_moderations.js
190
194
  - app/assets/javascripts/decidim/admin/welcome_notification.js.es6
191
195
  - app/assets/stylesheets/decidim/admin/_decidim.scss
192
196
  - app/assets/stylesheets/decidim/admin/_variables.scss
@@ -194,8 +198,10 @@ files:
194
198
  - app/assets/stylesheets/decidim/admin/bundle.scss
195
199
  - app/assets/stylesheets/decidim/admin/components/_accordion.scss
196
200
  - app/assets/stylesheets/decidim/admin/components/_autocomplete_select.component.scss
201
+ - app/assets/stylesheets/decidim/admin/components/_dropdown-menu.scss
197
202
  - app/assets/stylesheets/decidim/admin/components/_sortable.scss
198
203
  - app/assets/stylesheets/decidim/admin/extra/_action-icon.scss
204
+ - app/assets/stylesheets/decidim/admin/extra/_block_user.scss
199
205
  - app/assets/stylesheets/decidim/admin/extra/_cards.scss
200
206
  - app/assets/stylesheets/decidim/admin/extra/_categories.scss
201
207
  - app/assets/stylesheets/decidim/admin/extra/_dropdown_inverted.scss
@@ -228,9 +234,11 @@ files:
228
234
  - app/assets/stylesheets/decidim/admin/modules/_layout.scss
229
235
  - app/assets/stylesheets/decidim/admin/modules/_loading-spinner.scss
230
236
  - app/assets/stylesheets/decidim/admin/modules/_main-nav.scss
237
+ - app/assets/stylesheets/decidim/admin/modules/_moderations.scss
231
238
  - app/assets/stylesheets/decidim/admin/modules/_modules.scss
232
239
  - app/assets/stylesheets/decidim/admin/modules/_pics.scss
233
240
  - app/assets/stylesheets/decidim/admin/modules/_process-header.scss
241
+ - app/assets/stylesheets/decidim/admin/modules/_reveal.scss
234
242
  - app/assets/stylesheets/decidim/admin/modules/_secondary-nav.scss
235
243
  - app/assets/stylesheets/decidim/admin/modules/_table-list.scss
236
244
  - app/assets/stylesheets/decidim/admin/modules/_tabs.scss
@@ -239,6 +247,7 @@ files:
239
247
  - app/assets/stylesheets/decidim/admin/modules/_user-login.scss
240
248
  - app/assets/stylesheets/decidim/admin/modules/_users_statistics.scss
241
249
  - app/assets/stylesheets/decidim/admin/plugins/_foundation-datepicker.scss
250
+ - app/assets/stylesheets/decidim/admin/user_moderations.scss
242
251
  - app/assets/stylesheets/decidim/admin/utils/_flex.scss
243
252
  - app/assets/stylesheets/decidim/admin/utils/_fontface.scss
244
253
  - app/assets/stylesheets/decidim/admin/utils/_helpers.scss
@@ -273,6 +282,7 @@ files:
273
282
  - app/cells/decidim/admin/content_block_cell.rb
274
283
  - app/cells/decidim/admin/results_per_page/show.erb
275
284
  - app/cells/decidim/admin/results_per_page_cell.rb
285
+ - app/commands/decidim/admin/block_user.rb
276
286
  - app/commands/decidim/admin/close_session_managed_user.rb
277
287
  - app/commands/decidim/admin/create_area.rb
278
288
  - app/commands/decidim/admin/create_area_type.rb
@@ -280,7 +290,9 @@ files:
280
290
  - app/commands/decidim/admin/create_attachment_collection.rb
281
291
  - app/commands/decidim/admin/create_category.rb
282
292
  - app/commands/decidim/admin/create_component.rb
293
+ - app/commands/decidim/admin/create_import.rb
283
294
  - app/commands/decidim/admin/create_newsletter.rb
295
+ - app/commands/decidim/admin/create_participatory_space_admin_user_actions.rb
284
296
  - app/commands/decidim/admin/create_participatory_space_private_user.rb
285
297
  - app/commands/decidim/admin/create_scope.rb
286
298
  - app/commands/decidim/admin/create_scope_type.rb
@@ -307,10 +319,13 @@ files:
307
319
  - app/commands/decidim/admin/reject_user_group.rb
308
320
  - app/commands/decidim/admin/remove_admin.rb
309
321
  - app/commands/decidim/admin/reorder_content_blocks.rb
322
+ - app/commands/decidim/admin/transfer_user.rb
323
+ - app/commands/decidim/admin/unblock_user.rb
310
324
  - app/commands/decidim/admin/unhide_resource.rb
311
325
  - app/commands/decidim/admin/unofficialize_user.rb
312
326
  - app/commands/decidim/admin/unpublish_component.rb
313
327
  - app/commands/decidim/admin/unreport_resource.rb
328
+ - app/commands/decidim/admin/unreport_user.rb
314
329
  - app/commands/decidim/admin/update_area.rb
315
330
  - app/commands/decidim/admin/update_area_type.rb
316
331
  - app/commands/decidim/admin/update_attachment.rb
@@ -333,16 +348,21 @@ files:
333
348
  - app/commands/decidim/admin/verify_user_group.rb
334
349
  - app/constraints/decidim/admin/organization_dashboard_constraint.rb
335
350
  - app/controllers/concerns/decidim/admin/filterable.rb
351
+ - app/controllers/concerns/decidim/admin/global_moderation_context.rb
352
+ - app/controllers/concerns/decidim/admin/landing_page.rb
353
+ - app/controllers/concerns/decidim/admin/landing_page_content_blocks.rb
336
354
  - app/controllers/concerns/decidim/admin/officializations/filterable.rb
337
355
  - app/controllers/concerns/decidim/admin/paginable.rb
338
356
  - app/controllers/concerns/decidim/admin/participatory_space_admin_context.rb
339
357
  - app/controllers/concerns/decidim/admin/participatory_space_export.rb
340
358
  - app/controllers/concerns/decidim/admin/user_groups.rb
359
+ - app/controllers/concerns/decidim/moderations/admin/filterable.rb
341
360
  - app/controllers/decidim/admin/admin_terms_controller.rb
342
361
  - app/controllers/decidim/admin/application_controller.rb
343
362
  - app/controllers/decidim/admin/area_types_controller.rb
344
363
  - app/controllers/decidim/admin/areas_controller.rb
345
364
  - app/controllers/decidim/admin/authorization_workflows_controller.rb
365
+ - app/controllers/decidim/admin/block_user_controller.rb
346
366
  - app/controllers/decidim/admin/categories_controller.rb
347
367
  - app/controllers/decidim/admin/component_permissions_controller.rb
348
368
  - app/controllers/decidim/admin/components/base_controller.rb
@@ -351,15 +371,21 @@ files:
351
371
  - app/controllers/decidim/admin/concerns/has_attachments.rb
352
372
  - app/controllers/decidim/admin/concerns/has_private_users.rb
353
373
  - app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb
374
+ - app/controllers/decidim/admin/conflicts_controller.rb
354
375
  - app/controllers/decidim/admin/dashboard_controller.rb
355
376
  - app/controllers/decidim/admin/exports_controller.rb
377
+ - app/controllers/decidim/admin/global_moderations/reports_controller.rb
378
+ - app/controllers/decidim/admin/global_moderations_controller.rb
356
379
  - app/controllers/decidim/admin/help_sections_controller.rb
357
380
  - app/controllers/decidim/admin/impersonatable_users_controller.rb
358
381
  - app/controllers/decidim/admin/impersonations_controller.rb
382
+ - app/controllers/decidim/admin/imports_controller.rb
359
383
  - app/controllers/decidim/admin/logs_controller.rb
360
384
  - app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb
361
385
  - app/controllers/decidim/admin/managed_users/promotions_controller.rb
362
386
  - app/controllers/decidim/admin/metrics_controller.rb
387
+ - app/controllers/decidim/admin/moderated_users_controller.rb
388
+ - app/controllers/decidim/admin/moderations/reports_controller.rb
363
389
  - app/controllers/decidim/admin/moderations_controller.rb
364
390
  - app/controllers/decidim/admin/newsletter_templates_controller.rb
365
391
  - app/controllers/decidim/admin/newsletters_controller.rb
@@ -379,16 +405,19 @@ files:
379
405
  - app/controllers/decidim/admin/users_controller.rb
380
406
  - app/events/decidim/attachment_created_event.rb
381
407
  - app/events/decidim/component_published_event.rb
408
+ - app/events/decidim/resource_hidden_event.rb
382
409
  - app/forms/decidim/admin/area_form.rb
383
410
  - app/forms/decidim/admin/area_type_form.rb
384
411
  - app/forms/decidim/admin/attachment_collection_form.rb
385
412
  - app/forms/decidim/admin/attachment_form.rb
413
+ - app/forms/decidim/admin/block_user_form.rb
386
414
  - app/forms/decidim/admin/category_form.rb
387
415
  - app/forms/decidim/admin/component_form.rb
388
416
  - app/forms/decidim/admin/content_block_form.rb
389
417
  - app/forms/decidim/admin/help_section_form.rb
390
418
  - app/forms/decidim/admin/help_sections_form.rb
391
419
  - app/forms/decidim/admin/impersonate_user_form.rb
420
+ - app/forms/decidim/admin/import_form.rb
392
421
  - app/forms/decidim/admin/managed_user_promotion_form.rb
393
422
  - app/forms/decidim/admin/newsletter_form.rb
394
423
  - app/forms/decidim/admin/officialization_form.rb
@@ -404,6 +433,7 @@ files:
404
433
  - app/forms/decidim/admin/selective_newsletter_participatory_space_type_form.rb
405
434
  - app/forms/decidim/admin/static_page_form.rb
406
435
  - app/forms/decidim/admin/static_page_topic_form.rb
436
+ - app/forms/decidim/admin/transfer_user_form.rb
407
437
  - app/forms/decidim/admin/user_group_csv_verification_form.rb
408
438
  - app/frontend/components/autocomplete.component.test.tsx
409
439
  - app/frontend/components/autocomplete.component.tsx
@@ -418,15 +448,20 @@ files:
418
448
  - app/helpers/decidim/admin/exports_helper.rb
419
449
  - app/helpers/decidim/admin/filterable_helper.rb
420
450
  - app/helpers/decidim/admin/icon_link_helper.rb
451
+ - app/helpers/decidim/admin/imports_helper.rb
421
452
  - app/helpers/decidim/admin/log_render_helper.rb
422
453
  - app/helpers/decidim/admin/menu_helper.rb
454
+ - app/helpers/decidim/admin/moderations/reports_helper.rb
455
+ - app/helpers/decidim/admin/moderations_helper.rb
423
456
  - app/helpers/decidim/admin/newsletters_helper.rb
424
457
  - app/helpers/decidim/admin/paginable/per_page_helper.rb
425
458
  - app/helpers/decidim/admin/resource_permissions_helper.rb
426
459
  - app/helpers/decidim/admin/resource_scope_helper.rb
427
460
  - app/helpers/decidim/admin/scopes_helper.rb
428
461
  - app/helpers/decidim/admin/settings_helper.rb
462
+ - app/helpers/decidim/admin/sidebar_menu_helper.rb
429
463
  - app/helpers/decidim/admin/uploader_image_dimensions_helper.rb
464
+ - app/helpers/decidim/admin/user_moderations_helper.rb
430
465
  - app/helpers/decidim/admin/user_roles_helper.rb
431
466
  - app/jobs/decidim/admin/application_job.rb
432
467
  - app/jobs/decidim/admin/expire_impersonation_job.rb
@@ -439,6 +474,7 @@ files:
439
474
  - app/permissions/decidim/admin/permissions.rb
440
475
  - app/permissions/decidim/admin/user_manager_permissions.rb
441
476
  - app/presenters/decidim/admin/dashboard_metric_charts_presenter.rb
477
+ - app/presenters/decidim/admin/secondary_menu_presenter.rb
442
478
  - app/queries/decidim/admin/active_users_counter.rb
443
479
  - app/queries/decidim/admin/newsletter_recipients.rb
444
480
  - app/queries/decidim/admin/user_filter.rb
@@ -463,6 +499,7 @@ files:
463
499
  - app/views/decidim/admin/attachments/new.html.erb
464
500
  - app/views/decidim/admin/attachments/show.html.erb
465
501
  - app/views/decidim/admin/authorization_workflows/index.html.erb
502
+ - app/views/decidim/admin/block_user/new.html.erb
466
503
  - app/views/decidim/admin/categories/_form.html.erb
467
504
  - app/views/decidim/admin/categories/edit.html.erb
468
505
  - app/views/decidim/admin/categories/index.html.erb
@@ -474,6 +511,8 @@ files:
474
511
  - app/views/decidim/admin/components/edit.html.erb
475
512
  - app/views/decidim/admin/components/index.html.erb
476
513
  - app/views/decidim/admin/components/new.html.erb
514
+ - app/views/decidim/admin/conflicts/edit.html.erb
515
+ - app/views/decidim/admin/conflicts/index.html.erb
477
516
  - app/views/decidim/admin/dashboard/show.html.erb
478
517
  - app/views/decidim/admin/devise/mailers/password_change.html.erb
479
518
  - app/views/decidim/admin/devise/mailers/reset_password_instructions.html.erb
@@ -485,6 +524,8 @@ files:
485
524
  - app/views/decidim/admin/impersonations/_form.html.erb
486
525
  - app/views/decidim/admin/impersonations/_handler_form.html.erb
487
526
  - app/views/decidim/admin/impersonations/new.html.erb
527
+ - app/views/decidim/admin/imports/_dropdown.html.erb
528
+ - app/views/decidim/admin/imports/new.html.erb
488
529
  - app/views/decidim/admin/logs/_logs_list.html.erb
489
530
  - app/views/decidim/admin/logs/index.html.erb
490
531
  - app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb
@@ -492,8 +533,12 @@ files:
492
533
  - app/views/decidim/admin/managed_users/promotions/new.html.erb
493
534
  - app/views/decidim/admin/metrics/_metrics.html.erb
494
535
  - app/views/decidim/admin/metrics/index.html.erb
536
+ - app/views/decidim/admin/moderated_users/_report.html.erb
537
+ - app/views/decidim/admin/moderated_users/index.html.erb
495
538
  - app/views/decidim/admin/moderations/_report.html.erb
496
539
  - app/views/decidim/admin/moderations/index.html.erb
540
+ - app/views/decidim/admin/moderations/reports/index.html.erb
541
+ - app/views/decidim/admin/moderations/reports/show.html.erb
497
542
  - app/views/decidim/admin/newsletter_templates/index.html.erb
498
543
  - app/views/decidim/admin/newsletter_templates/show.html.erb
499
544
  - app/views/decidim/admin/newsletters/_form.html.erb
@@ -532,6 +577,8 @@ files:
532
577
  - app/views/decidim/admin/share_tokens/_share_tokens.html.erb
533
578
  - app/views/decidim/admin/shared/_filters.html.erb
534
579
  - app/views/decidim/admin/shared/_gallery.html.erb
580
+ - app/views/decidim/admin/shared/landing_page/edit.html.erb
581
+ - app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb
535
582
  - app/views/decidim/admin/static_page_topics/_form.html.erb
536
583
  - app/views/decidim/admin/static_page_topics/edit.html.erb
537
584
  - app/views/decidim/admin/static_page_topics/new.html.erb
@@ -555,6 +602,7 @@ files:
555
602
  - app/views/layouts/decidim/admin/_template_top.html.erb
556
603
  - app/views/layouts/decidim/admin/_title_bar.html.erb
557
604
  - app/views/layouts/decidim/admin/application.html.erb
605
+ - app/views/layouts/decidim/admin/global_moderations.html.erb
558
606
  - app/views/layouts/decidim/admin/login.html.erb
559
607
  - app/views/layouts/decidim/admin/newsletters.erb
560
608
  - app/views/layouts/decidim/admin/pages.html.erb
@@ -613,12 +661,14 @@ files:
613
661
  - config/locales/pt.yml
614
662
  - config/locales/ro-RO.yml
615
663
  - config/locales/ru.yml
664
+ - config/locales/si-LK.yml
616
665
  - config/locales/sk-SK.yml
617
666
  - config/locales/sk.yml
618
667
  - config/locales/sl.yml
619
668
  - config/locales/so-SO.yml
620
669
  - config/locales/sr-CS.yml
621
670
  - config/locales/sv.yml
671
+ - config/locales/sw-KE.yml
622
672
  - config/locales/ti-ER.yml
623
673
  - config/locales/tr-TR.yml
624
674
  - config/locales/uk.yml
@@ -636,6 +686,15 @@ files:
636
686
  - lib/decidim/admin/components.rb
637
687
  - lib/decidim/admin/engine.rb
638
688
  - lib/decidim/admin/form_builder.rb
689
+ - lib/decidim/admin/import.rb
690
+ - lib/decidim/admin/import/creator.rb
691
+ - lib/decidim/admin/import/importer.rb
692
+ - lib/decidim/admin/import/importer_factory.rb
693
+ - lib/decidim/admin/import/readers.rb
694
+ - lib/decidim/admin/import/readers/base.rb
695
+ - lib/decidim/admin/import/readers/csv.rb
696
+ - lib/decidim/admin/import/readers/json.rb
697
+ - lib/decidim/admin/import/readers/xls.rb
639
698
  - lib/decidim/admin/test.rb
640
699
  - lib/decidim/admin/test/commands/create_attachment_collection_examples.rb
641
700
  - lib/decidim/admin/test/commands/create_category_examples.rb
@@ -662,7 +721,7 @@ homepage: https://github.com/decidim/decidim
662
721
  licenses:
663
722
  - AGPL-3.0
664
723
  metadata: {}
665
- post_install_message:
724
+ post_install_message:
666
725
  rdoc_options: []
667
726
  require_paths:
668
727
  - lib
@@ -670,15 +729,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
670
729
  requirements:
671
730
  - - ">="
672
731
  - !ruby/object:Gem::Version
673
- version: '2.6'
732
+ version: '2.7'
674
733
  required_rubygems_version: !ruby/object:Gem::Requirement
675
734
  requirements:
676
- - - ">="
735
+ - - ">"
677
736
  - !ruby/object:Gem::Version
678
- version: '0'
737
+ version: 1.3.1
679
738
  requirements: []
680
- rubygems_version: 3.0.3
681
- signing_key:
739
+ rubygems_version: 3.1.2
740
+ signing_key:
682
741
  specification_version: 4
683
742
  summary: Decidim organization administration
684
743
  test_files: []