decidim-admin 0.26.7 → 0.26.9

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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/admin/block_user.rb +7 -2
  3. data/app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb +78 -0
  4. data/app/controllers/concerns/decidim/moderations/admin/filterable.rb +4 -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/static_page_topics_controller.rb +1 -3
  8. data/app/packs/src/decidim/admin/autocomplete.component.js +11 -13
  9. data/app/views/decidim/admin/area_types/edit.html.erb +1 -0
  10. data/app/views/decidim/admin/area_types/index.html.erb +1 -0
  11. data/app/views/decidim/admin/area_types/new.html.erb +1 -0
  12. data/app/views/decidim/admin/areas/edit.html.erb +1 -0
  13. data/app/views/decidim/admin/areas/index.html.erb +1 -0
  14. data/app/views/decidim/admin/areas/new.html.erb +1 -0
  15. data/app/views/decidim/admin/attachment_collections/edit.html.erb +1 -0
  16. data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -0
  17. data/app/views/decidim/admin/attachment_collections/new.html.erb +1 -0
  18. data/app/views/decidim/admin/attachments/edit.html.erb +1 -0
  19. data/app/views/decidim/admin/attachments/index.html.erb +1 -0
  20. data/app/views/decidim/admin/attachments/new.html.erb +1 -0
  21. data/app/views/decidim/admin/authorization_workflows/index.html.erb +1 -0
  22. data/app/views/decidim/admin/categories/edit.html.erb +1 -0
  23. data/app/views/decidim/admin/categories/index.html.erb +1 -0
  24. data/app/views/decidim/admin/categories/new.html.erb +1 -0
  25. data/app/views/decidim/admin/components/_actions.html.erb +43 -0
  26. data/app/views/decidim/admin/components/_component.html.erb +3 -41
  27. data/app/views/decidim/admin/components/edit.html.erb +1 -0
  28. data/app/views/decidim/admin/components/index.html.erb +1 -0
  29. data/app/views/decidim/admin/components/new.html.erb +1 -1
  30. data/app/views/decidim/admin/conflicts/index.html.erb +1 -0
  31. data/app/views/decidim/admin/help_sections/show.erb +1 -0
  32. data/app/views/decidim/admin/impersonatable_users/index.html.erb +1 -0
  33. data/app/views/decidim/admin/impersonations/new.html.erb +1 -0
  34. data/app/views/decidim/admin/logs/index.html.erb +1 -0
  35. data/app/views/decidim/admin/moderated_users/index.html.erb +1 -0
  36. data/app/views/decidim/admin/moderations/index.html.erb +1 -0
  37. data/app/views/decidim/admin/newsletter_templates/index.html.erb +1 -0
  38. data/app/views/decidim/admin/newsletter_templates/show.html.erb +1 -0
  39. data/app/views/decidim/admin/newsletters/index.html.erb +1 -0
  40. data/app/views/decidim/admin/newsletters/new.html.erb +1 -0
  41. data/app/views/decidim/admin/newsletters/show.html.erb +1 -0
  42. data/app/views/decidim/admin/officializations/index.html.erb +1 -0
  43. data/app/views/decidim/admin/officializations/new.html.erb +1 -0
  44. data/app/views/decidim/admin/organization/edit.html.erb +1 -0
  45. data/app/views/decidim/admin/organization_appearance/edit.html.erb +1 -0
  46. data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +1 -0
  47. data/app/views/decidim/admin/scope_types/edit.html.erb +1 -0
  48. data/app/views/decidim/admin/scope_types/index.html.erb +1 -0
  49. data/app/views/decidim/admin/scope_types/new.html.erb +1 -0
  50. data/app/views/decidim/admin/scopes/edit.html.erb +1 -0
  51. data/app/views/decidim/admin/scopes/index.html.erb +1 -0
  52. data/app/views/decidim/admin/scopes/new.html.erb +1 -0
  53. data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +1 -0
  54. data/app/views/decidim/admin/static_page_topics/edit.html.erb +1 -0
  55. data/app/views/decidim/admin/static_page_topics/new.html.erb +1 -0
  56. data/app/views/decidim/admin/static_pages/edit.html.erb +1 -0
  57. data/app/views/decidim/admin/static_pages/index.html.erb +1 -0
  58. data/app/views/decidim/admin/static_pages/new.html.erb +1 -0
  59. data/app/views/decidim/admin/user_groups/index.html.erb +1 -0
  60. data/app/views/decidim/admin/user_groups_csv_verifications/new.html.erb +1 -0
  61. data/app/views/decidim/admin/users/index.html.erb +1 -0
  62. data/app/views/decidim/admin/users/new.html.erb +1 -0
  63. data/app/views/layouts/decidim/admin/global_moderations.html.erb +1 -0
  64. data/config/environment.rb +3 -0
  65. data/config/locales/ar.yml +7 -11
  66. data/config/locales/ca.yml +10 -7
  67. data/config/locales/cs.yml +7 -4
  68. data/config/locales/de.yml +32 -25
  69. data/config/locales/el.yml +63 -10
  70. data/config/locales/en.yml +4 -1
  71. data/config/locales/es-MX.yml +10 -7
  72. data/config/locales/es-PY.yml +10 -7
  73. data/config/locales/es.yml +10 -7
  74. data/config/locales/eu.yml +301 -285
  75. data/config/locales/fi-plain.yml +6 -3
  76. data/config/locales/fi.yml +7 -4
  77. data/config/locales/fr-CA.yml +10 -7
  78. data/config/locales/fr.yml +13 -10
  79. data/config/locales/gl.yml +2 -11
  80. data/config/locales/hu.yml +2 -10
  81. data/config/locales/id-ID.yml +3 -6
  82. data/config/locales/is-IS.yml +1 -1
  83. data/config/locales/it.yml +0 -9
  84. data/config/locales/ja.yml +11 -8
  85. data/config/locales/kaa.yml +213 -0
  86. data/config/locales/lb.yml +2 -11
  87. data/config/locales/lt.yml +23 -11
  88. data/config/locales/lv.yml +0 -9
  89. data/config/locales/nl.yml +2 -11
  90. data/config/locales/no.yml +0 -9
  91. data/config/locales/pl.yml +20 -4
  92. data/config/locales/pt-BR.yml +81 -10
  93. data/config/locales/pt.yml +3 -12
  94. data/config/locales/ro-RO.yml +2 -11
  95. data/config/locales/ru.yml +3 -7
  96. data/config/locales/sk.yml +0 -9
  97. data/config/locales/sq-AL.yml +65 -0
  98. data/config/locales/sr-CS.yml +10 -4
  99. data/config/locales/sv.yml +1 -9
  100. data/config/locales/th-TH.yml +1 -0
  101. data/config/locales/tr-TR.yml +6 -12
  102. data/config/locales/uk.yml +1 -7
  103. data/config/locales/zh-CN.yml +0 -9
  104. data/config/locales/zh-TW.yml +0 -9
  105. data/config/routes.rb +2 -0
  106. data/lib/decidim/admin/form_builder.rb +1 -2
  107. data/lib/decidim/admin/test/admin_participatory_space_access_examples.rb +49 -0
  108. data/lib/decidim/admin/test/needs_admin_tos_accepted_examples.rb +9 -0
  109. data/lib/decidim/admin/test.rb +1 -0
  110. data/lib/decidim/admin/version.rb +1 -1
  111. metadata +21 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d10899e9c95c132fe275efe626ba406c9ff091236048fb5f41d0286a32fdab0
4
- data.tar.gz: b8ca0d051c4cd3860b4d44a9a47c6d1025ddb4cbc86aa0629826e4b10c91b256
3
+ metadata.gz: 509031ee8d76a518423f29ea4b45b9ea580e539989cfab08750c9d422bb6bb9e
4
+ data.tar.gz: f475e7bd65b45f8375e63735b884fe39850614029679f85c1cfba2d4c6f4d37d
5
5
  SHA512:
6
- metadata.gz: 327d80ce55828c1869071bde249b40eaaa079ecd4df8a89e9032e821338956150bca5de3a84b22a3b986132e3f972a9bdd1f82ae6b3f64c46a89a6cdd1b902b4
7
- data.tar.gz: 45e8569f02f96450c6cafb872d83e5a44c2824c0ddc3b0cf777d2f06fe8b7d1b3470b4c9dc1b5e61dcdf092fec9aa28e93d055ac29e4fd22c0a7768eefd64e3e
6
+ metadata.gz: 4d599f92d96851fd7bef16df5bee367ab141dcfba575cf9cd1166fcff003f00cd3ce5f4364b8e4e74231946df472c1da77e574c1b6eac23af60069a37208e1a3
7
+ data.tar.gz: 8249837a53e098229068578ef1df4bf8f899646cff0f658f82455e4343acc8df8c4961a5e7b5e3539de6007920121cca9655bfc2ba02722cccc99cb5cd7b35e0
@@ -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!
@@ -0,0 +1,78 @@
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 unless user_has_any_role?
19
+ return if current_user.admin_terms_accepted?
20
+ return if permitted_paths?
21
+
22
+ store_location_for(
23
+ current_user,
24
+ request.path
25
+ )
26
+ redirect_to admin_tos_path
27
+ end
28
+
29
+ def permitted_paths?
30
+ # ensure that path with or without query string pass
31
+ permitted_paths.find { |el| el.split("?").first == request.path }
32
+ end
33
+
34
+ def permitted_paths
35
+ [admin_tos_path, decidim_admin.admin_terms_accept_path]
36
+ end
37
+
38
+ def admin_tos_path
39
+ decidim_admin.admin_terms_show_path
40
+ end
41
+
42
+ def user_has_any_role?
43
+ return true if current_user.admin
44
+ return true if current_user.roles.any?
45
+ return true if participatory_process_user_role?
46
+ return true if assembly_user_role?
47
+ return true if conference_user_role?
48
+ return true if voting_monitoring_commitee_member?
49
+
50
+ false
51
+ end
52
+
53
+ def participatory_process_user_role?
54
+ return false unless Decidim.module_installed?(:participatory_processes)
55
+
56
+ true if Decidim::ParticipatoryProcessUserRole.exists?(user: current_user)
57
+ end
58
+
59
+ def assembly_user_role?
60
+ return false unless Decidim.module_installed?(:assemblies)
61
+
62
+ true if Decidim::AssemblyUserRole.exists?(user: current_user)
63
+ end
64
+
65
+ def conference_user_role?
66
+ return false unless Decidim.module_installed?(:conferences)
67
+
68
+ true if Decidim::ConferenceUserRole.exists?(user: current_user)
69
+ end
70
+
71
+ def voting_monitoring_commitee_member?
72
+ return false unless Decidim.module_installed?(:elections)
73
+
74
+ true if Decidim::Votings::MonitoringCommitteeMember.exists?(user: current_user)
75
+ end
76
+ end
77
+ end
78
+ end
@@ -47,6 +47,10 @@ module Decidim
47
47
  def reportable_types
48
48
  collection.pluck(:decidim_reportable_type).uniq.sort
49
49
  end
50
+
51
+ def extra_allowed_params
52
+ [:hidden]
53
+ end
50
54
  end
51
55
  end
52
56
  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
@@ -7,6 +7,7 @@ module Decidim
7
7
  include NeedsOrganization
8
8
  include NeedsPermission
9
9
  include NeedsSnippets
10
+ include NeedsAdminTosAccepted
10
11
  include FormFactory
11
12
  include LocaleSwitcher
12
13
  include UseOrganizationTimeZone
@@ -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
@@ -16,29 +16,27 @@ export class Autocomplete extends React.Component {
16
16
  this.handleChange = (selectedOption) => {
17
17
  this.setState({ selectedOption });
18
18
  if (this.props.changeURL) {
19
- axios.get(this.props.changeURL, {
20
- headers: {
21
- Accept: "text/javascript"
22
- },
23
- withCredentials: true,
24
- params: {
25
- id: selectedOption.value
26
- }
27
- }).
28
- then((response) => {
19
+ Rails.ajax({
20
+ url: this.props.changeURL,
21
+ type: "GET",
22
+ data: new URLSearchParams({
23
+ "id": selectedOption.value
24
+ }),
25
+ success: (response) => {
29
26
  const script = document.createElement("script");
30
27
  script.type = "text/javascript";
31
28
  script.innerHTML = response.data;
32
29
  document.getElementsByTagName("head")[0].appendChild(script);
33
- }).
34
- catch((error) => {
30
+ },
31
+ error: (error) => {
35
32
  if (axios.isCancel(error)) {
36
33
  // console.log("Request canceled", error.message);
37
34
  }
38
35
  else {
39
36
  //
40
37
  }
41
- });
38
+ }
39
+ })
42
40
  }
43
41
  };
44
42
 
@@ -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
 
@@ -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
 
@@ -0,0 +1,43 @@
1
+ <% if component.manifest.admin_engine %>
2
+ <%= icon_link_to "pencil", manage_component_path(component), t("actions.manage", scope: "decidim.admin"), class: "action-icon--manage" %>
3
+ <% else %>
4
+ <span class="action-space icon"></span>
5
+ <% end %>
6
+
7
+ <% if allowed_to?(:update, :component, component: component) %>
8
+ <% if component.published? %>
9
+ <%= icon_link_to "x", url_for(action: :unpublish, id: component, controller: "components"), t("actions.unpublish", scope: "decidim.admin"), class: "action-icon--unpublish", method: :put %>
10
+ <% else %>
11
+ <%= icon_link_to "check", url_for(action: :publish, id: component, controller: "components"), t("actions.publish", scope: "decidim.admin"), class: "action-icon--publish", method: :put %>
12
+ <% end %>
13
+ <% else %>
14
+ <span class="action-space icon"></span>
15
+ <% end %>
16
+
17
+ <% if allowed_to? :update, :component, component: component %>
18
+ <%= icon_link_to "cog", url_for(action: :edit, id: component, controller: "components"), t("actions.configure", scope: "decidim.admin"), class: "action-icon--configure" %>
19
+ <% else %>
20
+ <span class="action-space icon"></span>
21
+ <% end %>
22
+
23
+ <% if allowed_to? :update, :component, component: component %>
24
+ <% if component.manifest.actions.empty? %>
25
+ <%= icon "key", class: "action-icon action-icon--disabled" %>
26
+ <% else %>
27
+ <%= icon_link_to "key", url_for(action: :edit, component_id: component, controller: "component_permissions"), t("actions.permissions", scope: "decidim.admin"), class: "action-icon--permissions" %>
28
+ <% end %>
29
+ <% else %>
30
+ <span class="action-space icon"></span>
31
+ <% end %>
32
+
33
+ <% if allowed_to? :share, :component, component: component %>
34
+ <%= icon_link_to "share", url_for(action: :share, id: component, controller: "components"), t("actions.share", scope: "decidim.admin"), class: "action-icon--share", target: "_blank" %>
35
+ <% else %>
36
+ <span class="action-space icon"></span>
37
+ <% end %>
38
+
39
+ <% if allowed_to? :destroy, :component, component: component %>
40
+ <%= icon_link_to "circle-x", url_for(action: :destroy, id: component, controller: "components"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %>
41
+ <% else %>
42
+ <span class="action-space icon"></span>
43
+ <% end %>
@@ -10,48 +10,10 @@
10
10
  </td>
11
11
  <%= td_resource_scope_for(component.scope) %>
12
12
  <td class="table-list__actions">
13
- <% if component.manifest.admin_engine %>
14
- <%= icon_link_to "pencil", manage_component_path(component), t("actions.manage", scope: "decidim.admin"), class: "action-icon--manage" %>
13
+ <% if lookup_context.find_all("decidim/#{component.manifest_name}/admin/component/_actions").any? %>
14
+ <%= render partial: "decidim/#{component.manifest_name}/admin/component/actions", locals: { component: component } %>
15
15
  <% else %>
16
- <span class="action-space icon"></span>
17
- <% end %>
18
-
19
- <% if allowed_to?(:update, :component, component: component) %>
20
- <% if component.published? %>
21
- <%= icon_link_to "x", url_for(action: :unpublish, id: component, controller: "components"), t("actions.unpublish", scope: "decidim.admin"), class: "action-icon--unpublish", method: :put %>
22
- <% else %>
23
- <%= icon_link_to "check", url_for(action: :publish, id: component, controller: "components"), t("actions.publish", scope: "decidim.admin"), class: "action-icon--publish", method: :put %>
24
- <% end %>
25
- <% else %>
26
- <span class="action-space icon"></span>
27
- <% end %>
28
-
29
- <% if allowed_to? :update, :component, component: component %>
30
- <%= icon_link_to "cog", url_for(action: :edit, id: component, controller: "components"), t("actions.configure", scope: "decidim.admin"), class: "action-icon--configure" %>
31
- <% else %>
32
- <span class="action-space icon"></span>
33
- <% end %>
34
-
35
- <% if allowed_to? :update, :component, component: component %>
36
- <% if component.manifest.actions.empty? %>
37
- <%= icon "key", class: "action-icon action-icon--disabled" %>
38
- <% else %>
39
- <%= icon_link_to "key", url_for(action: :edit, component_id: component, controller: "component_permissions"), t("actions.permissions", scope: "decidim.admin"), class: "action-icon--permissions" %>
40
- <% end %>
41
- <% else %>
42
- <span class="action-space icon"></span>
43
- <% end %>
44
-
45
- <% if allowed_to? :share, :component, component: component %>
46
- <%= icon_link_to "share", url_for(action: :share, id: component, controller: "components"), t("actions.share", scope: "decidim.admin"), class: "action-icon--share", target: "_blank" %>
47
- <% else %>
48
- <span class="action-space icon"></span>
49
- <% end %>
50
-
51
- <% if allowed_to? :destroy, :component, component: component %>
52
- <%= icon_link_to "circle-x", url_for(action: :destroy, id: component, controller: "components"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %>
53
- <% else %>
54
- <span class="action-space icon"></span>
16
+ <%= render partial: "actions", locals: { component: component } %>
55
17
  <% end %>
56
18
  </td>
57
19
  </tr>
@@ -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") %>
@@ -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>
@@ -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">
@@ -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">
@@ -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">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <div class="card" id='user-groups'>
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">