decidim-admin 0.27.2 → 0.27.4

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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/admin/block_user.rb +7 -2
  3. data/app/commands/decidim/admin/publish_component.rb +1 -1
  4. data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +42 -0
  5. data/app/controllers/decidim/admin/admin_terms_controller.rb +1 -1
  6. data/app/controllers/decidim/admin/application_controller.rb +1 -0
  7. data/app/controllers/decidim/admin/space_publications_controller.rb +63 -0
  8. data/app/controllers/decidim/admin/static_page_topics_controller.rb +1 -3
  9. data/app/packs/src/decidim/admin/draggable-list.js +1 -1
  10. data/app/permissions/decidim/admin/permissions.rb +14 -1
  11. data/app/views/decidim/admin/area_types/edit.html.erb +1 -0
  12. data/app/views/decidim/admin/area_types/index.html.erb +1 -0
  13. data/app/views/decidim/admin/area_types/new.html.erb +1 -0
  14. data/app/views/decidim/admin/areas/edit.html.erb +1 -0
  15. data/app/views/decidim/admin/areas/index.html.erb +1 -0
  16. data/app/views/decidim/admin/areas/new.html.erb +1 -0
  17. data/app/views/decidim/admin/attachment_collections/edit.html.erb +1 -0
  18. data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -0
  19. data/app/views/decidim/admin/attachment_collections/new.html.erb +1 -0
  20. data/app/views/decidim/admin/attachments/_form.html.erb +1 -1
  21. data/app/views/decidim/admin/attachments/edit.html.erb +1 -0
  22. data/app/views/decidim/admin/attachments/index.html.erb +1 -0
  23. data/app/views/decidim/admin/attachments/new.html.erb +1 -0
  24. data/app/views/decidim/admin/authorization_workflows/index.html.erb +1 -0
  25. data/app/views/decidim/admin/categories/edit.html.erb +1 -0
  26. data/app/views/decidim/admin/categories/index.html.erb +1 -0
  27. data/app/views/decidim/admin/categories/new.html.erb +1 -0
  28. data/app/views/decidim/admin/components/edit.html.erb +1 -0
  29. data/app/views/decidim/admin/components/index.html.erb +1 -0
  30. data/app/views/decidim/admin/components/new.html.erb +1 -1
  31. data/app/views/decidim/admin/conflicts/index.html.erb +1 -0
  32. data/app/views/decidim/admin/help_sections/show.erb +1 -0
  33. data/app/views/decidim/admin/impersonatable_users/index.html.erb +1 -0
  34. data/app/views/decidim/admin/impersonations/new.html.erb +1 -0
  35. data/app/views/decidim/admin/imports/new.html.erb +1 -1
  36. data/app/views/decidim/admin/logs/index.html.erb +1 -0
  37. data/app/views/decidim/admin/moderated_users/index.html.erb +1 -0
  38. data/app/views/decidim/admin/moderations/index.html.erb +1 -0
  39. data/app/views/decidim/admin/newsletter_templates/index.html.erb +1 -0
  40. data/app/views/decidim/admin/newsletter_templates/show.html.erb +1 -0
  41. data/app/views/decidim/admin/newsletters/index.html.erb +1 -0
  42. data/app/views/decidim/admin/newsletters/new.html.erb +1 -0
  43. data/app/views/decidim/admin/newsletters/show.html.erb +1 -0
  44. data/app/views/decidim/admin/officializations/index.html.erb +15 -10
  45. data/app/views/decidim/admin/officializations/new.html.erb +1 -0
  46. data/app/views/decidim/admin/organization/edit.html.erb +1 -0
  47. data/app/views/decidim/admin/organization_appearance/edit.html.erb +1 -0
  48. data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +1 -0
  49. data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +1 -1
  50. data/app/views/decidim/admin/scope_types/edit.html.erb +1 -0
  51. data/app/views/decidim/admin/scope_types/index.html.erb +1 -0
  52. data/app/views/decidim/admin/scope_types/new.html.erb +1 -0
  53. data/app/views/decidim/admin/scopes/edit.html.erb +1 -0
  54. data/app/views/decidim/admin/scopes/index.html.erb +1 -0
  55. data/app/views/decidim/admin/scopes/new.html.erb +1 -0
  56. data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +1 -0
  57. data/app/views/decidim/admin/static_page_topics/edit.html.erb +1 -0
  58. data/app/views/decidim/admin/static_page_topics/new.html.erb +1 -0
  59. data/app/views/decidim/admin/static_pages/_form.html.erb +1 -1
  60. data/app/views/decidim/admin/static_pages/edit.html.erb +1 -0
  61. data/app/views/decidim/admin/static_pages/index.html.erb +1 -0
  62. data/app/views/decidim/admin/static_pages/new.html.erb +1 -0
  63. data/app/views/decidim/admin/user_groups/index.html.erb +1 -0
  64. data/app/views/decidim/admin/user_groups_csv_verifications/new.html.erb +2 -1
  65. data/app/views/decidim/admin/users/index.html.erb +1 -0
  66. data/app/views/decidim/admin/users/new.html.erb +1 -0
  67. data/app/views/layouts/decidim/admin/global_moderations.html.erb +1 -0
  68. data/config/environment.rb +1 -0
  69. data/config/locales/ar.yml +10 -5
  70. data/config/locales/ca.yml +9 -6
  71. data/config/locales/cs.yml +5 -2
  72. data/config/locales/de.yml +18 -5
  73. data/config/locales/el.yml +78 -2
  74. data/config/locales/en.yml +6 -3
  75. data/config/locales/es-MX.yml +7 -4
  76. data/config/locales/es-PY.yml +7 -4
  77. data/config/locales/es.yml +8 -5
  78. data/config/locales/eu.yml +11 -13
  79. data/config/locales/fa-IR.yml +1 -0
  80. data/config/locales/fi-plain.yml +5 -2
  81. data/config/locales/fi.yml +8 -5
  82. data/config/locales/fr-CA.yml +6 -3
  83. data/config/locales/fr.yml +7 -4
  84. data/config/locales/gl.yml +0 -5
  85. data/config/locales/hu.yml +45 -22
  86. data/config/locales/id-ID.yml +0 -2
  87. data/config/locales/is-IS.yml +0 -2
  88. data/config/locales/it.yml +0 -5
  89. data/config/locales/ja.yml +13 -10
  90. data/config/locales/kaa.yml +203 -0
  91. data/config/locales/lb.yml +0 -5
  92. data/config/locales/lt.yml +0 -5
  93. data/config/locales/lv.yml +0 -4
  94. data/config/locales/nl.yml +0 -5
  95. data/config/locales/no.yml +0 -5
  96. data/config/locales/pl.yml +0 -5
  97. data/config/locales/pt-BR.yml +90 -3
  98. data/config/locales/pt.yml +0 -5
  99. data/config/locales/ro-RO.yml +11 -11
  100. data/config/locales/ru.yml +0 -2
  101. data/config/locales/sk.yml +0 -4
  102. data/config/locales/sr-CS.yml +0 -4
  103. data/config/locales/sv.yml +0 -6
  104. data/config/locales/tr-TR.yml +3 -5
  105. data/config/locales/uk.yml +0 -2
  106. data/config/locales/zh-CN.yml +0 -4
  107. data/config/locales/zh-TW.yml +1100 -0
  108. data/lib/decidim/admin/form_builder.rb +1 -2
  109. data/lib/decidim/admin/test/needs_admin_tos_accepted_examples.rb +9 -0
  110. data/lib/decidim/admin/test.rb +1 -0
  111. data/lib/decidim/admin/version.rb +1 -1
  112. metadata +18 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96f7bcf42a9c331fbef56cee041ad7950157b1f5d1a3080fdcb0c144e812608e
4
- data.tar.gz: 98476b2e39ac843d547b06c8a13727f1b2a3b53b7cca810aeab9a288ae5b9c19
3
+ metadata.gz: 2b6d361bf34645d19fff1ed2b9d2dfc9bd21d9d5f59205009c6a98aa768aa104
4
+ data.tar.gz: d6afb23b3c6d259f9c1ec1380746a90ab72c16451598e3bdba0d6e4f014d5c05
5
5
  SHA512:
6
- metadata.gz: d1b7a5302a53fc2ae93cd6ed4c47665b317f8ff8ad049057d8df7c15574ed6e9ac6af8d16356cb8c31611532c46352b69d2e4c4efa1c1551b11f7f1a8a8f567d
7
- data.tar.gz: 86b7067f4605ba15733b3c29873563c94d2c51023d92c309119c73a9a50acb5cdebbc9277c0927616250c3a54b1fc293aed8c3d0d33e4f58d2bcf5f43742a79f
6
+ metadata.gz: 13c4b9f5db82ec0b5575c185f2b18b1b3bf9b11066612167c03d5f91edf47a9c824e99b60bbe3fd19289401d668526befcd6b394893a8b8932c1d1cf012dbf61
7
+ data.tar.gz: 1a12690709937d82651c02a0cab87db70a8b8c62fa8b4cd8779261ff9729961517131007ff8300d131d375ff755195fa207b4a999d621c87722b4ef322c4beb5
@@ -20,8 +20,9 @@ module Decidim
20
20
  return broadcast(:invalid) unless form.valid?
21
21
 
22
22
  transaction do
23
- block!
23
+ find_or_create_moderation!
24
24
  register_justification!
25
+ block!
25
26
  notify_user!
26
27
  end
27
28
 
@@ -32,6 +33,10 @@ module Decidim
32
33
 
33
34
  attr_reader :form
34
35
 
36
+ def find_or_create_moderation!
37
+ Decidim::UserModeration.create_or_find_by!(user: form.user)
38
+ end
39
+
35
40
  def register_justification!
36
41
  @current_blocking = UserBlock.create!(
37
42
  justification: form.justification,
@@ -65,7 +70,7 @@ module Decidim
65
70
  ) do
66
71
  form.user.blocked = true
67
72
  form.user.blocked_at = Time.current
68
- form.user.blocking = @current_blocking
73
+ form.user.block_id = @current_blocking.id
69
74
  form.user.extended_data["user_name"] = form.user.name
70
75
  form.user.name = "Blocked user"
71
76
  form.user.save!
@@ -18,7 +18,7 @@ module Decidim
18
18
  # Broadcasts :ok if published, :invalid otherwise.
19
19
  def call
20
20
  publish_component
21
- publish_event
21
+ publish_event unless component.previously_published?
22
22
 
23
23
  broadcast(:ok)
24
24
  end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Admin
5
+ # Shared behaviour for signed_in admins that require the latest TOS accepted
6
+ module NeedsAdminTosAccepted
7
+ extend ActiveSupport::Concern
8
+
9
+ included do
10
+ before_action :tos_accepted_by_admin
11
+ end
12
+
13
+ private
14
+
15
+ def tos_accepted_by_admin
16
+ return unless request.format.html?
17
+ return unless current_user
18
+ return if current_user.admin_terms_accepted?
19
+ return if permitted_paths?
20
+
21
+ store_location_for(
22
+ current_user,
23
+ request.path
24
+ )
25
+ redirect_to admin_tos_path
26
+ end
27
+
28
+ def permitted_paths?
29
+ # ensure that path with or without query string pass
30
+ permitted_paths.find { |el| el.split("?").first == request.path }
31
+ end
32
+
33
+ def permitted_paths
34
+ [admin_tos_path, decidim_admin.admin_terms_accept_path]
35
+ end
36
+
37
+ def admin_tos_path
38
+ decidim_admin.admin_terms_show_path
39
+ end
40
+ end
41
+ end
42
+ end
@@ -9,7 +9,7 @@ module Decidim
9
9
  current_user.admin_terms_accepted_at = Time.current
10
10
  if current_user.save!
11
11
  flash[:notice] = t("accept.success", scope: "decidim.admin.admin_terms_of_use")
12
- redirect_to decidim_admin.root_path
12
+ redirect_to stored_location_for(current_user) || decidim_admin.root_path
13
13
  else
14
14
  flash[:alert] = t("accept.error", scope: "decidim.admin.admin_terms_of_use")
15
15
  redirect_to decidim_admin.admin_terms_show_path
@@ -8,6 +8,7 @@ module Decidim
8
8
  include NeedsPermission
9
9
  include NeedsPasswordChange
10
10
  include NeedsSnippets
11
+ include NeedsAdminTosAccepted
11
12
  include FormFactory
12
13
  include LocaleSwitcher
13
14
  include UseOrganizationTimeZone
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Admin
5
+ # Base controller that can be inherited by other spaces to publish and unpublish the Space
6
+ #
7
+ class SpacePublicationsController < Decidim::Assemblies::Admin::ApplicationController
8
+ def create
9
+ enforce_permission_to_publish
10
+
11
+ publish_command.call(current_assembly, current_user) do
12
+ on(:ok) do
13
+ flash[:notice] = I18n.t("create.success", scope: i18n_scope)
14
+ end
15
+
16
+ on(:invalid) do
17
+ flash.now[:alert] = I18n.t("create.error", scope: i18n_scope)
18
+ end
19
+
20
+ redirect_back(fallback_location: assemblies_path)
21
+ end
22
+ end
23
+
24
+ def destroy
25
+ enforce_permission_to_publish
26
+
27
+ unpublish_command.call(current_assembly, current_user) do
28
+ on(:ok) do
29
+ flash[:notice] = I18n.t("destroy.success", scope: i18n_scope)
30
+ end
31
+
32
+ on(:invalid) do
33
+ flash.now[:alert] = I18n.t("destroy.error", scope: i18n_scope)
34
+ end
35
+
36
+ redirect_back(fallback_location: assemblies_path)
37
+ end
38
+ end
39
+
40
+ private
41
+
42
+ def current_participatory_space
43
+ raise "Not implemented"
44
+ end
45
+
46
+ def enforce_permission_to_publish
47
+ raise "Not implemented"
48
+ end
49
+
50
+ def publish_command
51
+ raise "Not implemented"
52
+ end
53
+
54
+ def unpublish_command
55
+ raise "Not implemented"
56
+ end
57
+
58
+ def i18n_scope
59
+ raise "Not implemented"
60
+ end
61
+ end
62
+ end
63
+ end
@@ -64,9 +64,7 @@ module Decidim
64
64
  private
65
65
 
66
66
  def topic
67
- @topic ||= StaticPageTopic.where(
68
- organization: current_organization
69
- ).find(params[:id])
67
+ @topic ||= current_organization.static_page_topics.find(params[:id])
70
68
  end
71
69
  end
72
70
  end
@@ -5,7 +5,7 @@ export default function createSortableList(lists) {
5
5
  createSortList(lists, {
6
6
  handle: "li",
7
7
  forcePlaceholderSize: true,
8
- connectWith: ".js-connect"
8
+ acceptFrom: ".js-connect"
9
9
  })
10
10
  }
11
11
 
@@ -39,10 +39,10 @@ module Decidim
39
39
  allow! if templates_action?
40
40
  allow! if organization_action?
41
41
  allow! if user_action?
42
+ allow! if admin_user_action?
42
43
 
43
44
  allow! if permission_action.subject == :category
44
45
  allow! if permission_action.subject == :component
45
- allow! if permission_action.subject == :admin_user
46
46
  allow! if permission_action.subject == :attachment
47
47
  allow! if permission_action.subject == :editor_image
48
48
  allow! if permission_action.subject == :attachment_collection
@@ -201,6 +201,19 @@ module Decidim
201
201
  end
202
202
  end
203
203
 
204
+ def admin_user_action?
205
+ return unless permission_action.subject == :admin_user
206
+
207
+ target_user = context.fetch(:user, nil)
208
+
209
+ case permission_action.action
210
+ when :destroy, :block
211
+ target_user != user
212
+ else
213
+ true
214
+ end
215
+ end
216
+
204
217
  def organization
205
218
  @organization ||= context.fetch(:organization, nil) || context.fetch(:current_organization, nil)
206
219
  end
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("decidim.admin.titles.area_types")) %>
1
2
  <div class="card" id="area-types">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("areas", scope: "decidim.admin.titles")) %>
1
2
  <div class="card" id="areas">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, url: areas_path) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("attachment_collections.edit.title", scope: "decidim.admin")) %>
1
2
  <%= decidim_form_for(@form, url: url_for([@attachment_collection.collection_for, @attachment_collection]), html: { class: "form edit_attachment_collection" }) do |f| %>
2
3
  <%= render partial: "decidim/admin/attachment_collections/form", object: f, locals: { title: t("attachment_collections.edit.title", scope: "decidim.admin") } %>
3
4
 
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("attachment_collections.index.attachment_collections_title", scope: "decidim.admin")) %>
1
2
  <div class="card" id="attachment_collections">
2
3
  <div class="card-divider">
3
4
  <h2 class='card-title'>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("attachment_collections.new.title", scope: "decidim.admin")) %>
1
2
  <%= decidim_form_for(@form, url: url_for([collection_for, @form]), html: { class: "form new_attachment_collection" }) do |f| %>
2
3
  <%= render partial: "decidim/admin/attachment_collections/form", object: f, locals: { title: t("attachment_collections.new.title", scope: "decidim.admin") } %>
3
4
 
@@ -23,7 +23,7 @@
23
23
  </div>
24
24
 
25
25
  <div class="row column">
26
- <%= form.upload :file, optional: false %>
26
+ <%= form.upload :file, required: true %>
27
27
  </div>
28
28
  </div>
29
29
  </div>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, url: url_for([@attachment.attached_to, @attachment]), html: { class: "form edit_attachment" }) do |f| %>
2
3
  <%= render partial: "decidim/admin/attachments/form", object: f, locals: { title: t(".title") } %>
3
4
 
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".attachments_title")) %>
1
2
  <div class='card' id="attachments">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, url: url_for([attached_to, @form]), html: { class: "form new_attachment" }) do |f| %>
2
3
  <%= render partial: "decidim/admin/attachments/form", object: f, locals: { title: t(".title") } %>
3
4
 
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("authorization_workflows", scope: "decidim.admin.titles")) %>
1
2
  <div class="card">
2
3
  <%= cell("decidim/verifications/revocations", @authorizations) %>
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, url: category_path(@category.participatory_space, @category), html: { class: "form edit_category" }) do |f| %>
2
3
  <%= render partial: "form", object: f, locals: { title: t(".title") } %>
3
4
 
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("categories.index.categories_title", scope: "decidim.admin")) %>
1
2
  <div class="card" id="categories">
2
3
  <div class="card-divider">
3
4
  <h2 class='card-title'>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("categories.new.title", scope: "decidim.admin")) %>
1
2
  <%= decidim_form_for(@form, url: categories_path(current_participatory_space), html: { class: "form new_category" }) do |f| %>
2
3
  <%= render partial: "form", object: f, locals: { title: t("categories.new.title", scope: "decidim.admin") } %>
3
4
 
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title", name: t("#{@component.manifest.name}.name", scope: "decidim.components"))) %>
1
2
  <%= decidim_form_for([current_participatory_space, @form], url: component_path(current_participatory_space, @component), method: "put", html: { class: "form edit_component" }) do |form| %>
2
3
  <%= render partial: "form", object: form, locals: { component: @component, title: t(".title", name: t("#{@component.manifest.name}.name", scope: "decidim.components")) } %>
3
4
 
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("components.title", scope: "decidim.admin")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,4 +1,4 @@
1
-
1
+ <% add_decidim_page_title(t(".title", name: t("#{manifest.name}.name", scope: "decidim.components"))) %>
2
2
  <%= decidim_form_for([current_participatory_space, @form], url: components_path(type: params[:type]), method: "post", html: { class: "form new_component" }) do |form| %>
3
3
  <%= render partial: "form", object: form, locals: { component: @component, title: t(".title", name: t("#{manifest.name}.name", scope: "decidim.components")) } %>
4
4
 
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("title", scope: "decidim.admin.conflicts")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1 +1,2 @@
1
+ <% add_decidim_page_title(t("help_sections", scope: "decidim.admin.menu")) %>
1
2
  <%= render partial: "form", object: @form %>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("impersonatable_users", scope: "decidim.admin.titles")) %>
1
2
  <% if current_organization.available_authorizations.empty? %>
2
3
  <div class="section">
3
4
  <div class="callout warning">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("impersonate_new_managed_user", scope: "decidim.admin.impersonations.new")) %>
1
2
  <h2 class="process-title-summary">
2
3
  <% if creating_managed_user? %>
3
4
  <%= t(".impersonate_new_managed_user") %>
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  </legend>
40
40
  <div class="row column">
41
- <%= form.upload :file, optional: false, help_i18n_scope: "decidim.admin.forms.file_help.import" %>
41
+ <%= form.upload :file, required: true, help_i18n_scope: "decidim.admin.forms.file_help.import" %>
42
42
  </div>
43
43
  </fieldset>
44
44
  </div>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("admin_log", scope: "decidim.admin.titles")) %>
1
2
  <div class="content">
2
3
  <div class="row">
3
4
  <%= render partial: "decidim/admin/logs/logs_list", locals: { logs: logs } %>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <div class="card with-overflow">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".preview", template_name: t(template_manifest.public_name_key))) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title"><%= t ".preview", template_name: t(template_manifest.public_name_key) %></h2>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form new_newsletter" }, url: newsletter_template_newsletters_path(newsletter_template_id: params[:newsletter_template_id])) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".preview")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title"><%= t ".preview" %></h2>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("decidim.admin.titles.participants")) %>
1
2
  <div class="card with-overflow" id='user-groups'>
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title"><%= t "decidim.admin.titles.participants" %></h2>
@@ -33,7 +34,7 @@
33
34
  <td><%= user.report_count %></td>
34
35
 
35
36
  <td class="table-list__actions">
36
- <% if allowed_to?(:block, :admin_user) %>
37
+ <% if allowed_to?(:block, :admin_user, user: user) %>
37
38
  <% if user.blocked? %>
38
39
  <%= icon_link_to "ban", user_block_path(user_id: user.id), t(".unblock"), class: "action-icon action-icon--disabled", method: :delete %>
39
40
  <% else %>
@@ -43,15 +44,19 @@
43
44
  <% if allowed_to? :show_email, :user, user: user %>
44
45
  <%= icon_link_to "envelope-open", show_email_officialization_path(user_id: user.id), t(".show_email"), class: "action-icon action-icon--show-email", data: { full_name: user.name, toggle: "show-email-modal" } %>
45
46
  <% end %>
46
- <%= icon_link_to "envelope-closed", current_or_new_conversation_path_with(user), t("decidim.contact"), class:"action-icon--new" %>
47
- <% if user.officialized? %>
48
- <%= icon "circle-check", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".officialize") %>
49
- <%= icon_link_to "pencil", new_officialization_path(user_id: user.id), t(".reofficialize"), class: "action-icon--new" %>
50
- <%= icon_link_to "circle-x", officialization_path(user.id), t(".unofficialize"), method: :delete, class: "action-icon--reject" %>
51
- <% else %>
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", aria_label: t(".reofficialize") %>
54
- <%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".unofficialize") %>
47
+ <% unless user.blocked? %>
48
+ <% unless current_user == user %>
49
+ <%= icon_link_to "envelope-closed", current_or_new_conversation_path_with(user), t("decidim.contact"), class:"action-icon--new" %>
50
+ <% end %>
51
+ <% if user.officialized? %>
52
+ <%= icon "circle-check", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".officialize") %>
53
+ <%= icon_link_to "pencil", new_officialization_path(user_id: user.id), t(".reofficialize"), class: "action-icon--new" %>
54
+ <%= icon_link_to "circle-x", officialization_path(user.id), t(".unofficialize"), method: :delete, class: "action-icon--reject" %>
55
+ <% else %>
56
+ <%= icon_link_to "circle-check", new_officialization_path(user_id: user.id), t(".officialize"), class: "action-icon--verify" %>
57
+ <%= icon "pencil", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".reofficialize") %>
58
+ <%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t(".unofficialize") %>
59
+ <% end %>
55
60
  <% end %>
56
61
  </td>
57
62
  </tr>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title", name: user.name)) %>
1
2
  <h2 class="process-title-summary">
2
3
  <%= t(".title", name: user.name) %>
3
4
  </h2>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form edit_organization" }, url: organization_path) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("edit_organization_appearance", scope: "decidim.admin.titles")) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form edit_organization_appearance" }, url: organization_appearance_path, method: :put) do |f| %>
2
3
  <%= render partial: "form", object: f %>
3
4
  <div class="button--double form-general-submit">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("edit_external_domains", scope: "decidim.admin.titles")) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form edit_organization_external_domain_whitelist" }, url: organization_external_domain_whitelist_path, method: :patch) do |f| %>
2
3
  <%= render partial: "form", object: f %>
3
4
  <div class="button--double form-general-submit">
@@ -27,7 +27,7 @@
27
27
  <%= decidim_form_for(@form, url: participatory_space_private_users_csv_imports_path, html: { class: "form" }) do |form| %>
28
28
  <p><%= t(".explanation") %></p>
29
29
  <div class="row column">
30
- <%= form.upload :file, optional: false %>
30
+ <%= form.upload :file, required: true %>
31
31
  </div>
32
32
 
33
33
  <div class="button--double form-general-submit">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("decidim.admin.titles.scope_types")) %>
1
2
  <div class="card" id="scope-types">
2
3
  <div class="card-divider">
3
4
  <% if allowed_to? :creste, :scope_type %>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("decidim.admin.titles.scopes")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, url: current_scopes_path) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(content_block.public_name_key)) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form edit_content_block" }, url: resource_landing_page_content_block_path) do |form| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form edit_static_page_topic" }) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form new_static_page_topic" }) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -10,7 +10,7 @@
10
10
  <% end %>
11
11
 
12
12
  <div class="row column">
13
- <%= form.translated :editor, :content, toolbar: :full, lines: 25 %>
13
+ <%= form.translated :editor, :content %>
14
14
  </div>
15
15
 
16
16
  <div class="row column">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title t(".title") %>
1
2
  <%= decidim_form_for(@form, html: { class: "form edit_static_page" }) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("pages", scope: "decidim.admin.titles")) %>
1
2
  <% @topics.each do |topic| %>
2
3
  <%= render partial: "topic", locals: { pages: topic.pages, topic: topic } %>
3
4
  <% end %>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <%= decidim_form_for(@form, html: { class: "form new_static_page" }) do |f| %>
2
3
  <div class="card">
3
4
  <div class="card-divider">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("decidim.admin.titles.user_groups")) %>
1
2
  <div class="card" id='user-groups'>
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">