decidim-admin 0.28.0 → 0.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/admin/content_block_cell.rb +1 -1
  3. data/app/commands/decidim/admin/destroy_category.rb +1 -1
  4. data/app/controllers/decidim/admin/application_controller.rb +2 -1
  5. data/app/controllers/decidim/admin/area_types_controller.rb +1 -1
  6. data/app/controllers/decidim/admin/authorization_workflows_controller.rb +2 -0
  7. data/app/controllers/decidim/admin/conflicts_controller.rb +23 -0
  8. data/app/controllers/decidim/admin/impersonatable_users_controller.rb +3 -1
  9. data/app/controllers/decidim/admin/impersonations_controller.rb +1 -0
  10. data/app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb +2 -0
  11. data/app/controllers/decidim/admin/moderated_users_controller.rb +10 -0
  12. data/app/controllers/decidim/admin/moderations_controller.rb +10 -0
  13. data/app/controllers/decidim/admin/officializations_controller.rb +2 -0
  14. data/app/controllers/decidim/admin/scope_types_controller.rb +1 -1
  15. data/app/controllers/decidim/admin/static_page_topics_controller.rb +10 -0
  16. data/app/controllers/decidim/admin/user_groups_controller.rb +2 -0
  17. data/app/controllers/decidim/admin/users_controller.rb +2 -0
  18. data/app/events/decidim/resource_hidden_event.rb +5 -1
  19. data/app/helpers/decidim/admin/admin_terms_helper.rb +1 -1
  20. data/app/helpers/decidim/admin/filterable_helper.rb +1 -1
  21. data/app/packs/entrypoints/decidim_admin_overrides.scss +2 -0
  22. data/app/packs/images/decidim/admin/.keep +0 -0
  23. data/app/packs/src/decidim/admin/application.js +8 -0
  24. data/app/packs/src/decidim/admin/participatory_space_search.js +1 -1
  25. data/app/packs/stylesheets/decidim/admin/_filters.scss +1 -1
  26. data/app/packs/stylesheets/decidim/admin/_legacy_foundation.scss +10 -0
  27. data/app/packs/stylesheets/decidim/admin/_sidebar-menu.scss +4 -4
  28. data/app/packs/stylesheets/decidim/admin/_tabs.scss +6 -0
  29. data/app/packs/stylesheets/decidim/admin/decidim_application.scss +5 -0
  30. data/app/views/decidim/admin/admin_terms/show.html.erb +2 -2
  31. data/app/views/decidim/admin/area_types/edit.html.erb +2 -2
  32. data/app/views/decidim/admin/area_types/index.html.erb +2 -2
  33. data/app/views/decidim/admin/area_types/new.html.erb +2 -2
  34. data/app/views/decidim/admin/areas/edit.html.erb +2 -2
  35. data/app/views/decidim/admin/areas/index.html.erb +2 -2
  36. data/app/views/decidim/admin/areas/new.html.erb +2 -2
  37. data/app/views/decidim/admin/attachment_collections/edit.html.erb +2 -2
  38. data/app/views/decidim/admin/attachment_collections/index.html.erb +2 -2
  39. data/app/views/decidim/admin/attachment_collections/new.html.erb +2 -2
  40. data/app/views/decidim/admin/attachments/edit.html.erb +2 -2
  41. data/app/views/decidim/admin/attachments/index.html.erb +2 -2
  42. data/app/views/decidim/admin/attachments/new.html.erb +2 -2
  43. data/app/views/decidim/admin/authorization_workflows/index.html.erb +2 -2
  44. data/app/views/decidim/admin/block_user/new.html.erb +3 -4
  45. data/app/views/decidim/admin/categories/edit.html.erb +2 -2
  46. data/app/views/decidim/admin/categories/index.html.erb +7 -3
  47. data/app/views/decidim/admin/categories/new.html.erb +2 -2
  48. data/app/views/decidim/admin/components/edit.html.erb +2 -2
  49. data/app/views/decidim/admin/components/index.html.erb +2 -2
  50. data/app/views/decidim/admin/components/new.html.erb +2 -2
  51. data/app/views/decidim/admin/conflicts/index.html.erb +2 -2
  52. data/app/views/decidim/admin/dashboard/show.html.erb +2 -2
  53. data/app/views/decidim/admin/help_sections/_form.html.erb +2 -2
  54. data/app/views/decidim/admin/impersonatable_users/index.html.erb +2 -2
  55. data/app/views/decidim/admin/impersonations/new.html.erb +2 -2
  56. data/app/views/decidim/admin/imports/new.html.erb +2 -2
  57. data/app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb +2 -2
  58. data/app/views/decidim/admin/managed_users/promotions/new.html.erb +2 -2
  59. data/app/views/decidim/admin/moderated_users/index.html.erb +2 -2
  60. data/app/views/decidim/admin/moderations/index.html.erb +2 -2
  61. data/app/views/decidim/admin/moderations/reports/index.html.erb +2 -2
  62. data/app/views/decidim/admin/moderations/reports/show.html.erb +2 -2
  63. data/app/views/decidim/admin/newsletter_templates/index.html.erb +5 -6
  64. data/app/views/decidim/admin/newsletter_templates/show.html.erb +16 -12
  65. data/app/views/decidim/admin/newsletters/edit.html.erb +2 -2
  66. data/app/views/decidim/admin/newsletters/index.html.erb +2 -2
  67. data/app/views/decidim/admin/newsletters/new.html.erb +2 -2
  68. data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +13 -9
  69. data/app/views/decidim/admin/newsletters/show.html.erb +29 -26
  70. data/app/views/decidim/admin/officializations/index.html.erb +1 -1
  71. data/app/views/decidim/admin/officializations/new.html.erb +2 -2
  72. data/app/views/decidim/admin/organization/_form.html.erb +5 -3
  73. data/app/views/decidim/admin/organization/edit.html.erb +2 -2
  74. data/app/views/decidim/admin/organization_appearance/edit.html.erb +2 -2
  75. data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +2 -2
  76. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +2 -2
  77. data/app/views/decidim/admin/participatory_space_private_users/new.html.erb +2 -2
  78. data/app/views/decidim/admin/resource_permissions/edit.html.erb +2 -2
  79. data/app/views/decidim/admin/scope_types/edit.html.erb +2 -2
  80. data/app/views/decidim/admin/scope_types/index.html.erb +2 -2
  81. data/app/views/decidim/admin/scope_types/new.html.erb +2 -2
  82. data/app/views/decidim/admin/scopes/edit.html.erb +2 -2
  83. data/app/views/decidim/admin/scopes/index.html.erb +2 -2
  84. data/app/views/decidim/admin/scopes/new.html.erb +2 -2
  85. data/app/views/decidim/admin/shared/_filters.html.erb +1 -1
  86. data/app/views/decidim/admin/shared/landing_page/_content_blocks.html.erb +2 -2
  87. data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +2 -2
  88. data/app/views/decidim/admin/static_page_topics/edit.html.erb +2 -2
  89. data/app/views/decidim/admin/static_page_topics/index.html.erb +2 -2
  90. data/app/views/decidim/admin/static_page_topics/new.html.erb +2 -2
  91. data/app/views/decidim/admin/static_pages/edit.html.erb +2 -2
  92. data/app/views/decidim/admin/static_pages/index.html.erb +2 -2
  93. data/app/views/decidim/admin/static_pages/new.html.erb +2 -2
  94. data/app/views/decidim/admin/user_groups/index.html.erb +2 -2
  95. data/app/views/decidim/admin/user_groups_csv_verifications/new.html.erb +2 -2
  96. data/app/views/decidim/admin/users/index.html.erb +2 -2
  97. data/app/views/decidim/admin/users/new.html.erb +2 -2
  98. data/app/views/layouts/decidim/admin/_breadcrumb.html.erb +1 -1
  99. data/app/views/layouts/decidim/admin/_header.html.erb +4 -0
  100. data/app/views/layouts/decidim/admin/_js_configuration.html.erb +1 -0
  101. data/config/assets.rb +1 -0
  102. data/config/locales/ar.yml +10 -8
  103. data/config/locales/bg.yml +25 -0
  104. data/config/locales/ca.yml +2 -1
  105. data/config/locales/cs.yml +4 -8
  106. data/config/locales/de.yml +5 -4
  107. data/config/locales/el.yml +1 -12
  108. data/config/locales/en.yml +2 -1
  109. data/config/locales/es-MX.yml +3 -2
  110. data/config/locales/es-PY.yml +3 -2
  111. data/config/locales/es.yml +3 -2
  112. data/config/locales/eu.yml +6 -5
  113. data/config/locales/fi-plain.yml +2 -1
  114. data/config/locales/fi.yml +4 -3
  115. data/config/locales/fr-CA.yml +3 -2
  116. data/config/locales/fr.yml +2 -1
  117. data/config/locales/ga-IE.yml +1 -4
  118. data/config/locales/gl.yml +7 -7
  119. data/config/locales/he-IL.yml +50 -0
  120. data/config/locales/hu.yml +35 -6
  121. data/config/locales/id-ID.yml +4 -0
  122. data/config/locales/is-IS.yml +4 -0
  123. data/config/locales/it.yml +6 -9
  124. data/config/locales/ja.yml +6 -4
  125. data/config/locales/ko.yml +774 -0
  126. data/config/locales/lb.yml +7 -10
  127. data/config/locales/lt.yml +1 -14
  128. data/config/locales/lv.yml +7 -0
  129. data/config/locales/nl.yml +6 -9
  130. data/config/locales/no.yml +19 -9
  131. data/config/locales/pl.yml +71 -4
  132. data/config/locales/pt-BR.yml +49 -12
  133. data/config/locales/pt.yml +7 -10
  134. data/config/locales/ro-RO.yml +1 -13
  135. data/config/locales/ru.yml +4 -0
  136. data/config/locales/sk.yml +4 -0
  137. data/config/locales/sl.yml +4 -0
  138. data/config/locales/sq-AL.yml +77 -0
  139. data/config/locales/sr-CS.yml +4 -0
  140. data/config/locales/sv.yml +6 -9
  141. data/config/locales/tr-TR.yml +10 -0
  142. data/config/locales/uk.yml +4 -0
  143. data/config/locales/zh-CN.yml +4 -0
  144. data/config/locales/zh-TW.yml +1 -11
  145. data/decidim-admin.gemspec +43 -0
  146. data/lib/decidim/admin/engine.rb +1 -25
  147. data/lib/decidim/admin/menu.rb +13 -4
  148. data/lib/decidim/admin/test/commands/destroy_category_examples.rb +9 -0
  149. data/lib/decidim/admin/version.rb +1 -1
  150. metadata +19 -15
  151. data/config/environment.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40ed6d9572b43902816815e55d3bdabfb7e16d319ab328cc705f753aa053a5e8
4
- data.tar.gz: 73e23f6a91596b65503a49bda5397bf843da48175f48f696fc527dcc95951822
3
+ metadata.gz: 5cf03aeb983e0ddb8c344dbe1f8b8d21f7fbdfbd2a0f0c75f2ca76010320dd77
4
+ data.tar.gz: 91db438a29f5e05315b436f3b1cf96d0d0b2ad6fa03f4ec5955f30605fd99f12
5
5
  SHA512:
6
- metadata.gz: 7ea41cc7a5afa9e4c4ead314708c89187da26170c96f21a9817d2d9591e2e1dd4d8e682991724e2b8b89bdf1d90d6df14cb84e5fcfb8c823b59f8a17c3e77177
7
- data.tar.gz: b881939bb98f615689a21e0f5396fed9b8f63e781fdf10659e6a21858a42623c6697466bcd3d5255a6f586bd0e64af1d7c9eccb935081987ec1952045eb19840
6
+ metadata.gz: 8fa198551d57ea25461ecd2e86a0f7aae31f4b3e67151ed8e952ed4e91bcfb088c460ebde206520b83c7d13e5ab478b510d5eb6b9fe8e870ef1df2fe92f14cb4
7
+ data.tar.gz: cb21f050e6fa924f96579bd440058c7290d2ca29a6a4501e22a3b10c6b5199aa39b686e153e03a32aef78c80cc4c0d9c07746d00bc67656aeb56ba862e3a29c7
@@ -30,7 +30,7 @@ module Decidim
30
30
  def name
31
31
  return I18n.t(public_name_key) if component.blank?
32
32
 
33
- "#{I18n.t(public_name_key)} (#{translated_attribute(component&.name)})"
33
+ "#{I18n.t(public_name_key)} (#{decidim_escape_translated(component&.name)})"
34
34
  end
35
35
  end
36
36
  end
@@ -20,7 +20,7 @@ module Decidim
20
20
  #
21
21
  # Returns nothing.
22
22
  def call
23
- return broadcast(:invalid) if category.nil? || category.subcategories.any?
23
+ return broadcast(:invalid) if category.nil? || category.subcategories.any? || !category.unused?
24
24
 
25
25
  destroy_category
26
26
  broadcast(:ok)
@@ -34,7 +34,8 @@ module Decidim
34
34
  helper Decidim::ComponentPathHelper
35
35
  helper Decidim::SanitizeHelper
36
36
  helper Decidim::BreadcrumbHelper
37
- helper Decidim::Templates::Admin::ApplicationHelper if Decidim.module_installed?(:templates)
37
+
38
+ helper Decidim::Templates::Admin::ApplicationHelper if Decidim.module_installed?(:templates) && defined?(Decidim::Templates::Admin::ApplicationHelper)
38
39
 
39
40
  default_form_builder Decidim::Admin::FormBuilder
40
41
 
@@ -9,7 +9,7 @@ module Decidim
9
9
 
10
10
  layout "decidim/admin/settings"
11
11
 
12
- add_breadcrumb_item_from_menu :admin_settings_menu
12
+ add_breadcrumb_item_from_menu :admin_areas_menu
13
13
 
14
14
  helper_method :area_types
15
15
 
@@ -5,6 +5,8 @@ module Decidim
5
5
  class AuthorizationWorkflowsController < Decidim::Admin::ApplicationController
6
6
  layout "decidim/admin/users"
7
7
 
8
+ add_breadcrumb_item_from_menu :admin_user_menu
9
+
8
10
  def index
9
11
  enforce_permission_to :index, :authorization_workflow
10
12
 
@@ -5,13 +5,21 @@ module Decidim
5
5
  class ConflictsController < Decidim::Admin::ApplicationController
6
6
  layout "decidim/admin/users"
7
7
 
8
+ helper_method :context_breadcrumb_items
9
+
10
+ add_breadcrumb_item_from_menu :impersonate_menu
11
+
8
12
  def index
13
+ enforce_permission_to :index, :impersonatable_user
14
+
9
15
  @conflicts = Decidim::Verifications::Conflict.joins(:current_user).where(
10
16
  decidim_users: { decidim_organization_id: current_organization.id }
11
17
  )
12
18
  end
13
19
 
14
20
  def edit
21
+ enforce_permission_to :index, :impersonatable_user
22
+
15
23
  conflict = Decidim::Verifications::Conflict.find(params[:id])
16
24
 
17
25
  @form = form(TransferUserForm).from_params(
@@ -22,6 +30,8 @@ module Decidim
22
30
  end
23
31
 
24
32
  def update
33
+ enforce_permission_to :index, :impersonatable_user
34
+
25
35
  conflict = Decidim::Verifications::Conflict.find(params[:id])
26
36
 
27
37
  @form = form(TransferUserForm).from_params(
@@ -43,6 +53,19 @@ module Decidim
43
53
  end
44
54
  end
45
55
  end
56
+
57
+ private
58
+
59
+ def context_breadcrumb_items
60
+ @context_breadcrumb_items ||= [impersonations_breadcrumb_item]
61
+ end
62
+
63
+ def impersonations_breadcrumb_item
64
+ {
65
+ label: I18n.t("menu.impersonations", scope: "decidim.admin"),
66
+ url: decidim_admin.impersonatable_users_path
67
+ }
68
+ end
46
69
  end
47
70
  end
48
71
  end
@@ -12,6 +12,8 @@ module Decidim
12
12
 
13
13
  helper_method :new_managed_user
14
14
 
15
+ add_breadcrumb_item_from_menu :admin_user_menu
16
+
15
17
  def index
16
18
  enforce_permission_to :index, :impersonatable_user
17
19
 
@@ -26,7 +28,7 @@ module Decidim
26
28
  private
27
29
 
28
30
  def collection
29
- @collection ||= current_organization.users.where(admin: false, roles: []).order(created_at: :desc)
31
+ @collection ||= current_organization.users.not_deleted.not_blocked.where(admin: false, roles: []).order(created_at: :desc)
30
32
  end
31
33
 
32
34
  def new_managed_user
@@ -82,6 +82,7 @@ module Decidim
82
82
  return nil unless handler.unique_id
83
83
 
84
84
  existing_authorization = Authorization.find_by(
85
+ user: User.where(organization: current_organization),
85
86
  name: handler_name,
86
87
  unique_id: handler.unique_id
87
88
  )
@@ -9,6 +9,8 @@ module Decidim
9
9
  layout "decidim/admin/users"
10
10
 
11
11
  def index
12
+ enforce_permission_to :index, :impersonatable_user
13
+
12
14
  @impersonation_logs = Decidim::ImpersonationLog.where(user:).order(started_at: :desc).page(params[:page]).per(15)
13
15
  end
14
16
 
@@ -7,6 +7,8 @@ module Decidim
7
7
 
8
8
  layout "decidim/admin/global_moderations"
9
9
 
10
+ before_action :set_moderation_breadcrumb_item
11
+
10
12
  def index
11
13
  enforce_permission_to :read, :moderate_users
12
14
 
@@ -46,6 +48,14 @@ module Decidim
46
48
  base_query_finder.unblocked
47
49
  end
48
50
  end
51
+
52
+ def set_moderation_breadcrumb_item
53
+ controller_breadcrumb_items << {
54
+ label: I18n.t("menu.reported_users", scope: "decidim.admin"),
55
+ url: decidim_admin.moderated_users_path,
56
+ active: true
57
+ }
58
+ end
49
59
  end
50
60
  end
51
61
  end
@@ -8,6 +8,8 @@ module Decidim
8
8
 
9
9
  helper_method :moderations, :allowed_to?, :query, :permission_resource
10
10
 
11
+ before_action :set_moderation_breadcrumb_item
12
+
11
13
  def index
12
14
  enforce_permission_to :read, permission_resource
13
15
  end
@@ -103,6 +105,14 @@ module Decidim
103
105
  def permission_resource
104
106
  :moderation
105
107
  end
108
+
109
+ def set_moderation_breadcrumb_item
110
+ controller_breadcrumb_items << {
111
+ label: I18n.t("menu.content", scope: "decidim.admin"),
112
+ url: decidim_admin.moderations_path,
113
+ active: true
114
+ }
115
+ end
106
116
  end
107
117
  end
108
118
  end
@@ -12,6 +12,8 @@ module Decidim
12
12
  helper_method :user
13
13
  helper Decidim::Messaging::ConversationHelper
14
14
 
15
+ add_breadcrumb_item_from_menu :admin_user_menu
16
+
15
17
  def index
16
18
  enforce_permission_to :read, :officialization
17
19
  @users = filtered_collection
@@ -9,7 +9,7 @@ module Decidim
9
9
 
10
10
  layout "decidim/admin/settings"
11
11
 
12
- add_breadcrumb_item_from_menu :admin_settings_menu
12
+ add_breadcrumb_item_from_menu :admin_scopes_menu
13
13
 
14
14
  helper_method :scope_types
15
15
 
@@ -5,6 +5,8 @@ module Decidim
5
5
  class StaticPageTopicsController < Decidim::Admin::ApplicationController
6
6
  include Decidim::Admin::Concerns::HasTabbedMenu
7
7
 
8
+ before_action :set_static_page_topics_breadcrumb_item
9
+
8
10
  helper_method :topic, :topics
9
11
 
10
12
  def index
@@ -68,6 +70,14 @@ module Decidim
68
70
 
69
71
  private
70
72
 
73
+ def set_static_page_topics_breadcrumb_item
74
+ controller_breadcrumb_items << {
75
+ label: I18n.t("menu.static_page_topics", scope: "decidim.admin"),
76
+ url: decidim_admin.static_page_topics_path,
77
+ active: true
78
+ }
79
+ end
80
+
71
81
  def tab_menu_name = :admin_static_pages_menu
72
82
 
73
83
  def topic
@@ -12,6 +12,8 @@ module Decidim
12
12
 
13
13
  layout "decidim/admin/users"
14
14
 
15
+ add_breadcrumb_item_from_menu :admin_user_menu
16
+
15
17
  def index
16
18
  enforce_permission_to :index, :user_group
17
19
 
@@ -7,6 +7,8 @@ module Decidim
7
7
  class UsersController < Decidim::Admin::ApplicationController
8
8
  include Decidim::Admin::Officializations::Filterable
9
9
 
10
+ add_breadcrumb_item_from_menu :admin_user_menu
11
+
10
12
  def index
11
13
  enforce_permission_to :read, :admin_user
12
14
  @users = filtered_collection
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Decidim
4
4
  class ResourceHiddenEvent < Decidim::Events::SimpleEvent
5
+ include Decidim::ApplicationHelper
6
+
5
7
  i18n_attributes :resource_path, :report_reasons, :resource_type, :resource_content
6
8
 
7
9
  def resource_path
@@ -23,7 +25,9 @@ module Decidim
23
25
  end
24
26
 
25
27
  def resource_content
26
- translated_attribute(@resource[@resource.reported_attributes.first]).truncate(100, separator: " ")
28
+ text = translated_attribute(@resource[@resource.reported_attributes.first])
29
+
30
+ decidim_sanitize(html_truncate(text, length: 100), strip_tags: true)
27
31
  end
28
32
 
29
33
  def resource_text
@@ -5,7 +5,7 @@ module Decidim
5
5
  # This module includes helpers to show admin terms of service
6
6
  module AdminTermsHelper
7
7
  def admin_terms_of_service_body
8
- current_organization.admin_terms_of_service_body.symbolize_keys[I18n.locale].html_safe
8
+ decidim_sanitize_admin(translated_attribute(current_organization.admin_terms_of_service_body)).html_safe
9
9
  end
10
10
 
11
11
  def announcement_body
@@ -53,7 +53,7 @@ module Decidim
53
53
  # Produces the html for the dropdown submenu from the options tree.
54
54
  # Returns a ActiveSupport::SafeBuffer.
55
55
  def dropdown_submenu(options)
56
- content_tag(:ul, class: "vertical menu") do
56
+ content_tag(:ul, class: "vertical menu", "aria-hidden": true) do
57
57
  options.map do |key, value|
58
58
  if value.nil?
59
59
  content_tag(:li, key)
@@ -0,0 +1,2 @@
1
+ // Application specific styles: https://docs.decidim.org/en/customize/styles/
2
+ @import "stylesheets/decidim/admin/decidim_application";
File without changes
@@ -15,6 +15,14 @@ window.Decidim.InputCharacterCounter = InputCharacterCounter;
15
15
  $(() => {
16
16
  $(document).foundation();
17
17
 
18
+ $(document).on("show.zf.dropdownMenu", function(event, $element) {
19
+ $element.attr("aria-hidden", "false");
20
+ });
21
+
22
+ $(document).on("hide.zf.dropdownMenu", function(event, $element) {
23
+ $element.children(".is-dropdown-submenu").attr("aria-hidden", "true");
24
+ });
25
+
18
26
  toggleNav();
19
27
 
20
28
  createSortList("#steps tbody", {
@@ -10,7 +10,7 @@ import AutoComplete from "src/decidim/autocomplete";
10
10
  */
11
11
  const apiRequest = (query) => {
12
12
  return new Promise((resolve) => {
13
- fetch("/api", {
13
+ fetch(window.Decidim.config.get("api_path"), {
14
14
  method: "post",
15
15
  headers: {
16
16
  "Content-Type": "application/json"
@@ -16,7 +16,7 @@
16
16
  }
17
17
 
18
18
  .dropdown {
19
- @apply relative p-0 bg-transparent border-0;
19
+ @apply relative p-0 border-0;
20
20
  }
21
21
 
22
22
  .button,
@@ -32,6 +32,16 @@ li.opens-left > .is-dropdown-submenu {
32
32
  display: none;
33
33
  }
34
34
 
35
+ .dropdown.menu ul {
36
+ &[aria-hidden="true"] {
37
+ display: none;
38
+ }
39
+
40
+ &[aria-hidden="false"] {
41
+ display: block;
42
+ }
43
+ }
44
+
35
45
  .dropdown.menu .nested.is-dropdown-submenu {
36
46
  margin-right: 0;
37
47
  margin-left: 0;
@@ -24,16 +24,16 @@
24
24
  @apply font-semibold;
25
25
  }
26
26
 
27
+ & .component-counter {
28
+ @apply ml-auto inline-flex items-center justify-center w-5 h-5 text-xs font-semibold rounded-full bg-background-4 border-secondary;
29
+ }
30
+
27
31
  ul {
28
32
  @apply ml-10;
29
33
 
30
34
  li {
31
35
  a {
32
36
  @apply px-2 py-1;
33
-
34
- .component-counter {
35
- @apply ml-auto inline-flex items-center justify-center w-5 h-5 text-xs font-semibold rounded-full bg-background-4 border-secondary;
36
- }
37
37
  }
38
38
 
39
39
  &.is-active a {
@@ -55,6 +55,12 @@
55
55
  @apply hidden;
56
56
  }
57
57
 
58
+ .form-defaults {
59
+ .language-change:not(.reset-defaults) {
60
+ @apply pt-1;
61
+ }
62
+ }
63
+
58
64
  .form {
59
65
  .language-change {
60
66
  @apply h-8 mb-4;
@@ -0,0 +1,5 @@
1
+ // This is a file that can be overridden by the application in order to override styles
2
+ // Notice that this file is included at the very end of the stylesheets packs to have
3
+ // more priority
4
+ //
5
+ // By default this is empty.
@@ -1,9 +1,9 @@
1
1
  <%= cell("decidim/announcement", announcement_body, callout_class: current_user.admin_terms_accepted? ? "success" : "warning" ) %>
2
2
 
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t("title", scope: "decidim.admin.admin_terms_of_service") %>
6
- </h2>
6
+ </h1>
7
7
  </div>
8
8
 
9
9
  <article class="card">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t ".title" %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
  <div class="item__edit-form">
8
8
  <%= decidim_form_for(@form, html: { class: "form-defaults form edit_area_type" }) do |f| %>
@@ -1,12 +1,12 @@
1
1
  <% add_decidim_page_title(t("decidim.admin.titles.area_types")) %>
2
2
  <div class="card" id="area-types">
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t "decidim.admin.titles.area_types" %>
6
6
  <% if allowed_to? :create, :area_type %>
7
7
  <%= link_to t("actions.add", scope: "decidim.admin"), [:new, :area_type], class: "button button__sm button__secondary new" %>
8
8
  <% end %>
9
- </h2>
9
+ </h1>
10
10
  </div>
11
11
  <div class="table-scroll">
12
12
  <table class="table-list">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t ".title" %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
  <div class="item__edit-form">
8
8
  <%= decidim_form_for(@form, html: { class: "form-defaults form new_area_type" }) do |f| %>
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t ".title" %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
  <div class="item__edit-form">
8
8
  <%= decidim_form_for(@form, html: { class: "form-defaults form edit_area_" }) do |f| %>
@@ -1,12 +1,12 @@
1
1
  <% add_decidim_page_title(t("areas", scope: "decidim.admin.titles")) %>
2
2
  <div class="card" id="areas">
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t "decidim.admin.titles.areas" %>
6
6
  <% if allowed_to? :create, :area %>
7
7
  <%= link_to t("actions.add", scope: "decidim.admin"), new_area_path, class: "button button__sm button__secondary new" %>
8
8
  <% end %>
9
- </h2>
9
+ </h1>
10
10
  </div>
11
11
  <% if @areas.any? %>
12
12
  <div class="table-scroll">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t ".title" %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
  <div class="item__edit-form">
8
8
  <%= decidim_form_for(@form, url: areas_path, html: { class: "form-defaults form new_area_" }) do |f| %>
@@ -1,9 +1,9 @@
1
1
  <% add_decidim_page_title(t("attachment_collections.edit.title", scope: "decidim.admin")) %>
2
2
 
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t("attachment_collections.edit.title", scope: "decidim.admin") %>
6
- </h2>
6
+ </h1>
7
7
  </div>
8
8
 
9
9
  <div class="item__edit item__edit-1col">
@@ -1,12 +1,12 @@
1
1
  <% add_decidim_page_title(t("attachment_collections.index.attachment_collections_title", scope: "decidim.admin")) %>
2
2
  <div class="card" id="attachment_collections">
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t("attachment_collections.index.attachment_collections_title", scope: "decidim.admin") %>
6
6
  <% if allowed_to? :create, :attachment_collection %>
7
7
  <%= link_to t("actions.attachment_collection.new", scope: "decidim.admin"), url_for(action: :new), class: "button button__sm button__secondary new" %>
8
8
  <% end %>
9
- </h2>
9
+ </h1>
10
10
  </div>
11
11
  <% if collection_for.attachment_collections.any? %>
12
12
  <div class="table-scroll">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t("attachment_collections.new.title", scope: "decidim.admin")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t("attachment_collections.new.title", scope: "decidim.admin") %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
 
8
8
  <div class="item__edit item__edit-1col">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t(".title") %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
 
8
8
  <div class="item__edit item__edit-1col">
@@ -1,12 +1,12 @@
1
1
  <% add_decidim_page_title(t(".attachments_title")) %>
2
2
  <div class="card" id="attachments">
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t(".attachments_title") %>
6
6
  <% if allowed_to? :create, :attachment %>
7
7
  <%= link_to t("actions.attachment.new", scope: "decidim.admin"), url_for(action: :new), class: "button button__sm button__secondary new" %>
8
8
  <% end %>
9
- </h2>
9
+ </h1>
10
10
  </div>
11
11
  <%= cell("decidim/admin/attachments_privacy_warning", attached_to.attachments) %>
12
12
  <% if attached_to.attachments.any? %>
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t(".title") %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
 
8
8
  <div class="item__edit item__edit-1col">
@@ -1,9 +1,9 @@
1
1
  <% add_decidim_page_title(t("authorization_workflows", scope: "decidim.admin.titles")) %>
2
2
 
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t("authorization_workflows", scope: "decidim.admin.titles") %>
6
- </h2>
6
+ </h1>
7
7
  </div>
8
8
 
9
9
  <div class="card">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title", name: user.name)) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t(".title", name: user.name) %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
 
8
8
  <div class="item__edit item__edit-1col">
@@ -16,8 +16,7 @@
16
16
  </div>
17
17
 
18
18
  <% if @form.hide %>
19
- <% announcement_message = t(".already_reported_html", link: new_user_block_path(user_id: user.id)) %>
20
- <%= cell("decidim/announcement", announcement_message, callout_class: "alert" ) %>
19
+ <%= cell("decidim/announcement", t(".already_reported_html"), callout_class: "alert" ) %>
21
20
  <% end %>
22
21
 
23
22
  <% if defined?(Decidim::Templates) %>
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t("categories.edit.title", scope: "decidim.admin") %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
 
8
8
  <div class="item__edit item__edit-1col">