decidim-admin 0.31.8 → 0.31.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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/admin/results_per_page_cell.rb +1 -1
  3. data/app/commands/decidim/admin/block_user.rb +2 -0
  4. data/app/commands/decidim/admin/bulk_block_users.rb +2 -0
  5. data/app/commands/decidim/admin/close_session_managed_user.rb +2 -0
  6. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +2 -2
  7. data/app/commands/decidim/admin/participatory_space/create_admin.rb +2 -0
  8. data/app/commands/decidim/admin/promote_managed_user.rb +1 -1
  9. data/app/commands/decidim/admin/reorder_taxonomies.rb +2 -2
  10. data/app/commands/decidim/admin/update_help_sections.rb +4 -0
  11. data/app/controllers/concerns/decidim/admin/component_taxonomies_helper.rb +1 -1
  12. data/app/controllers/concerns/decidim/admin/filterable.rb +1 -1
  13. data/app/controllers/decidim/admin/application_controller.rb +2 -0
  14. data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +1 -1
  15. data/app/controllers/decidim/admin/taxonomy_filters_controller.rb +1 -1
  16. data/app/controllers/decidim/admin/taxonomy_items_controller.rb +5 -2
  17. data/app/packs/src/decidim/admin/officializations.js +11 -2
  18. data/app/packs/stylesheets/decidim/admin/_proposal_status.scss +28 -0
  19. data/app/packs/stylesheets/decidim/admin/_select_picker.scss +1 -1
  20. data/app/views/layouts/decidim/admin/_js_configuration.html.erb +1 -0
  21. data/config/locales/sk.yml +17 -0
  22. data/config/routes.rb +0 -1
  23. data/lib/decidim/admin/import/readers.rb +5 -2
  24. data/lib/decidim/admin/menu.rb +0 -1
  25. data/lib/decidim/admin/version.rb +1 -1
  26. metadata +8 -9
  27. data/app/controllers/decidim/admin/organization_appearance_controller.rb +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b09d289923eeba25084f2ef02203d589e66d9f9112ab0c07663f5cabcc27fa6
4
- data.tar.gz: ac243685d31770727448e905d9cd8d92afc6681c2418f26c92336075d9c91df2
3
+ metadata.gz: 431487687e46389c6feffcf7be74e6ac45e601e3b12d75755857368db48a368f
4
+ data.tar.gz: 3690b60ce67c65b98f6b263839df3b41c65b1202300c2cda1aee773ee059cbf9
5
5
  SHA512:
6
- metadata.gz: 988427f2e29e0dc9d8ea2284421e014a690f65b90f0374a4c6acafaf5cbf0a566ea09c3678d420b0d24f6f2ac475f145f7a28dd84011bcf649f158c1527beec1
7
- data.tar.gz: ca646ce7ca7f693b7c37f164504c2c076cfcf1cf231ec8450c675b82b94c058a856cd76659c020cf74ebf10ffecde940448111c138fe5d2974663eb696114079
6
+ metadata.gz: 4d26c54ab7e0a610bbe5eee7dcbd34fb7bee44960c519a889e3399d18f46d9c216f0a3a3f02e4792858aec52a348902882bcb5063e1f5585591af0d3f68f8906
7
+ data.tar.gz: 07a8883c6685b5e14d0ec92dc4d5c25e192d0013522c4b54cf105e6a8ff4fb6a2066a06ceebddec49184a41bf1523207db573f789ec875891813fe85baa2c9bb
@@ -5,7 +5,7 @@ module Decidim
5
5
  class ResultsPerPageCell < Decidim::ViewModel
6
6
  property :per_page, :per_page_range
7
7
  def path_for_num_per_page(num_per_page = per_page_range.first)
8
- controller.url_for(params.to_unsafe_h.merge(per_page: num_per_page))
8
+ controller.url_for(decidim_url_params(params, per_page: num_per_page))
9
9
  end
10
10
  end
11
11
  end
@@ -45,7 +45,9 @@ module Decidim
45
45
  end
46
46
 
47
47
  def find_or_create_moderation!
48
+ # rubocop:disable Decidim/OrganizationScopedFinder -- form.user is scoped to the current organization
48
49
  Decidim::UserModeration.find_or_create_by!(user: form.user)
50
+ # rubocop:enable Decidim/OrganizationScopedFinder
49
51
  end
50
52
 
51
53
  def register_justification!
@@ -49,7 +49,9 @@ module Decidim
49
49
  def block_all_users!
50
50
  form.users.each do |user|
51
51
  transaction do
52
+ # rubocop:disable Decidim/OrganizationScopedFinder -- form.users is scoped to the current organization
52
53
  Decidim::UserModeration.find_or_create_by!(user:)
54
+ # rubocop:enable Decidim/OrganizationScopedFinder
53
55
 
54
56
  @current_blocking = UserBlock.create!(
55
57
  justification: form.justification,
@@ -32,7 +32,9 @@ module Decidim
32
32
  private
33
33
 
34
34
  def impersonation_log
35
+ # rubocop:disable Decidim/OrganizationScopedFinder -- admin and user are the current session users
35
36
  @impersonation_log ||= Decidim::ImpersonationLog.where(admin: current_user, user:).active.first
37
+ # rubocop:enable Decidim/OrganizationScopedFinder
36
38
  end
37
39
 
38
40
  def close_session
@@ -51,7 +51,7 @@ module Decidim
51
51
  title: user.name
52
52
  }
53
53
  ) do
54
- Decidim::ParticipatorySpacePrivateUser.find_or_create_by!(
54
+ Decidim::ParticipatorySpacePrivateUser.find_or_create_by!( # rubocop:disable Decidim/OrganizationScopedFinder -- user and participatory_space are scoped to the current invitation
55
55
  user:,
56
56
  privatable_to: @private_user_to,
57
57
  role: form.role,
@@ -63,7 +63,7 @@ module Decidim
63
63
  def existing_user
64
64
  return @existing_user if defined?(@existing_user)
65
65
 
66
- @existing_user = User.find_by(
66
+ @existing_user = User.find_by( # rubocop:disable Decidim/OrganizationScopedFinder -- user and participatory_space are scoped to the current invitation
67
67
  email: form.email.downcase,
68
68
  organization: private_user_to.organization
69
69
  )
@@ -120,7 +120,9 @@ module Decidim
120
120
  def existing_user
121
121
  return @existing_user if defined?(@existing_user)
122
122
 
123
+ # rubocop:disable Decidim/OrganizationScopedFinder -- organization is the participatory space's organization
123
124
  @existing_user = User.find_by(email: form.email, organization: participatory_space.organization)
125
+ # rubocop:enable Decidim/OrganizationScopedFinder
124
126
 
125
127
  InviteUserAgain.call(@existing_user, invitation_instructions) if @existing_user&.invitation_pending?
126
128
 
@@ -49,7 +49,7 @@ module Decidim
49
49
  end
50
50
 
51
51
  def email_already_exists?
52
- Decidim::User.where(email: form.email.downcase).any?
52
+ form.current_organization.users.where(email: form.email.downcase).any?
53
53
  end
54
54
 
55
55
  def create_action_log
@@ -65,11 +65,11 @@ module Decidim
65
65
  end
66
66
 
67
67
  def collection
68
- @collection ||= Decidim::Taxonomy.where(organization:, parent_id: first_item.parent_id)
68
+ @collection ||= organization.taxonomies.where(parent_id: first_item.parent_id)
69
69
  end
70
70
 
71
71
  def first_item
72
- @first_item ||= Decidim::Taxonomy.where(organization:).find(order.first)
72
+ @first_item ||= organization.taxonomies.find(order.first)
73
73
  end
74
74
  end
75
75
  end
@@ -21,7 +21,9 @@ module Decidim
21
21
 
22
22
  Decidim.traceability.perform_action!("update", ContextualHelpSection, current_user, { "resource" => { "title" => section.id.humanize } }) do
23
23
  ContextualHelpSection.set_content(@organization, section.id, section.content)
24
+ # rubocop:disable Decidim/OrganizationScopedFinder -- scoped to the given organization and section
24
25
  ContextualHelpSection.find_by(organization: @organization, section_id: section.id)
26
+ # rubocop:enable Decidim/OrganizationScopedFinder
25
27
  end
26
28
  end
27
29
  end
@@ -34,7 +36,9 @@ module Decidim
34
36
  attr_reader :form
35
37
 
36
38
  def content_has_changed?(section)
39
+ # rubocop:disable Decidim/OrganizationScopedFinder -- scoped to the given organization and section
37
40
  return if ContextualHelpSection.find_by(organization: @organization, section_id: section.id).nil? && section.content.compact_blank.blank?
41
+ # rubocop:enable Decidim/OrganizationScopedFinder
38
42
 
39
43
  section.content != ContextualHelpSection.find_content(@organization, section.id).except("machine_translations")
40
44
  end
@@ -10,7 +10,7 @@ module Decidim
10
10
  end
11
11
 
12
12
  def current_component_taxonomy_filters
13
- @current_component_taxonomy_filters ||= TaxonomyFilter.for(current_organization) # rubocop:disable Decidim/OrganizationScopedFinder -- .for scopes by decidim_organization_id internally
13
+ @current_component_taxonomy_filters ||= TaxonomyFilter.for(current_organization)
14
14
  .for_manifest(current_participatory_space.manifest.name)
15
15
  .where(id: current_component.settings.taxonomy_filters)
16
16
  end
@@ -195,7 +195,7 @@ module Decidim
195
195
 
196
196
  # A tree of Taxonomy IDs. Leaves are `nil`.
197
197
  def taxonomy_ids_hash(taxonomies)
198
- filtered_taxonomies = taxonomies.roots.or(taxonomies.where(id: available_taxonomy_ids))
198
+ filtered_taxonomies = taxonomies.roots.or(taxonomies.where(id: available_taxonomy_ids)) # rubocop:disable Decidim/OrganizationScopedFinder -- taxonomies is scoped to current_organization through available_root_taxonomies
199
199
  return nil if filtered_taxonomies.blank?
200
200
 
201
201
  filtered_taxonomies.each_with_object({}) do |taxonomy, hash|
@@ -19,6 +19,7 @@ module Decidim
19
19
  include DisableRedirectionToExternalHost
20
20
  include Decidim::Admin::Concerns::HasBreadcrumbItems
21
21
  include ActiveStorage::SetCurrent
22
+ include Decidim::UrlHelper
22
23
 
23
24
  helper Decidim::Admin::ApplicationHelper
24
25
  helper Decidim::Admin::AttributesDisplayHelper
@@ -34,6 +35,7 @@ module Decidim
34
35
  helper Decidim::ComponentPathHelper
35
36
  helper Decidim::SanitizeHelper
36
37
  helper Decidim::BreadcrumbHelper
38
+ helper Decidim::UrlHelper
37
39
 
38
40
  helper Decidim::Templates::Admin::ApplicationHelper if Decidim.module_installed?(:templates) && defined?(Decidim::Templates::Admin::ApplicationHelper)
39
41
 
@@ -41,7 +41,7 @@ module Decidim
41
41
 
42
42
  def destroy_all
43
43
  enforce_permission_to :csv_import, :space_private_user
44
- Decidim::ParticipatorySpacePrivateUser.by_participatory_space(privatable_to).delete_all
44
+ Decidim::ParticipatorySpacePrivateUser.by_participatory_space(privatable_to).delete_all # rubocop:disable Decidim/OrganizationScopedFinder -- by_participatory_space scopes to the current participatory space
45
45
  redirect_to new_participatory_space_private_users_csv_imports_path
46
46
  end
47
47
 
@@ -88,7 +88,7 @@ module Decidim
88
88
  end
89
89
 
90
90
  def root_taxonomy
91
- @root_taxonomy ||= Taxonomy.for(current_organization).roots.find(params.require(:taxonomy_id)) # rubocop:disable Decidim/OrganizationScopedFinder -- .for(current_organization) scopes to current org
91
+ @root_taxonomy ||= current_organization.taxonomies.roots.find(params[:taxonomy_id])
92
92
  end
93
93
 
94
94
  def taxonomy_filter
@@ -6,6 +6,7 @@ module Decidim
6
6
  layout false
7
7
 
8
8
  helper_method :taxonomy, :taxonomy_item, :parent_options, :selected_parent_id
9
+ before_action :taxonomy
9
10
  before_action do
10
11
  if taxonomy_item && taxonomy_item.parent_ids.exclude?(taxonomy.id)
11
12
  flash[:alert] = I18n.t("update.invalid", scope: "decidim.admin.taxonomies")
@@ -58,11 +59,13 @@ module Decidim
58
59
  private
59
60
 
60
61
  def taxonomy
61
- @taxonomy ||= Decidim::Taxonomy.find_by(organization: current_organization, id: params[:taxonomy_id])
62
+ @taxonomy ||= current_organization.taxonomies.find(params[:taxonomy_id])
62
63
  end
63
64
 
64
65
  def taxonomy_item
65
- @taxonomy_item ||= Decidim::Taxonomy.find_by(organization: current_organization, id: params[:id])
66
+ return if params[:id].blank?
67
+
68
+ @taxonomy_item ||= current_organization.taxonomies.find(params[:id])
66
69
  end
67
70
 
68
71
  def selected_parent_id
@@ -1,3 +1,5 @@
1
+ import { getMessages } from "src/decidim/refactor/moved/i18n";
2
+
1
3
  document.addEventListener("turbo:load", () => {
2
4
  const $modal = $("#show-email-modal");
3
5
 
@@ -20,11 +22,18 @@ document.addEventListener("turbo:load", () => {
20
22
 
21
23
  /* eslint-disable */
22
24
  async function getUserEmail(url) {
23
- let response = await fetch(url);
24
- if (response.ok) {
25
+ let response = await fetch(url, { redirect: "manual" });
26
+ if (response.type === "opaqueredirect") {
27
+ response = { redirectError: true };
28
+ }
29
+
30
+ if (response && response.ok) {
25
31
  let userEmail = await response.text();
26
32
  $("#user_email").html(userEmail);
27
33
  $button.hide()
34
+ } else if (response && response.redirectError) {
35
+ const message = getMessages().unauthorized || "Unauthorized.";
36
+ $("#user_email").text(message);
28
37
  } else {
29
38
  console.log(`Error-HTTP: " + ${response.status}`);
30
39
  }
@@ -2,4 +2,32 @@
2
2
  label {
3
3
  @apply sr-only;
4
4
  }
5
+
6
+ &-input {
7
+ -webkit-appearance: none;
8
+ appearance: none;
9
+ width: 1rem;
10
+ height: 1rem;
11
+ border-radius: 50%;
12
+ background-color: var(--proposal-status-bg);
13
+ box-shadow: 0 0 0 1.5px var(--proposal-status-fg),
14
+ 0 0 0 6px var(--proposal-status-bg);
15
+
16
+ @media (forced-colors: active) {
17
+ -webkit-appearance: auto;
18
+ appearance: auto;
19
+ background-color: Canvas;
20
+ background-image: none;
21
+ box-shadow: none;
22
+ }
23
+
24
+ &:checked {
25
+ background-image: radial-gradient(
26
+ circle closest-side,
27
+ var(--proposal-status-fg) 0 40%,
28
+ transparent 45%
29
+ );
30
+ box-shadow: 0 0 0 6px var(--proposal-status-fg);
31
+ }
32
+ }
5
33
  }
@@ -1,4 +1,4 @@
1
- @use "tom-select/dist/scss/tom-select";
1
+ @use "tom-select/dist/css/tom-select";
2
2
 
3
3
  /* overwrite tom-select defaults */
4
4
  .ts {
@@ -4,6 +4,7 @@ js_configs = {
4
4
  icons_path: Decidim.cors_enabled ? "" : asset_pack_path("media/images/remixicon.symbol.svg"),
5
5
  messages: {
6
6
  "selfxssWarning": t("decidim.security.selfxss_warning"),
7
+ unauthorized: t("actions.unauthorized", scope: "decidim.core"),
7
8
  editor: t("editor"),
8
9
  date: t("date"),
9
10
  time: t("time"),
@@ -12,6 +12,7 @@ sk:
12
12
  plural: Množné číslo
13
13
  attachment:
14
14
  attachment_collection_id: Priečinok
15
+ attachments: Prílohy
15
16
  description: Popis
16
17
  file: Súbor
17
18
  title: Názov prílohy alebo obrázka
@@ -45,6 +46,7 @@ sk:
45
46
  alert_color: Upozornenie
46
47
  available_authorizations: Dostupné autorizácie
47
48
  badges_enabled: Povoliť odznaky
49
+ comments_max_length: Maximálny počet znakov na komentár (ponechajte 0 pre predvolenú hodnotu)
48
50
  customize_welcome_notification: Prispôsobte uvítanie
49
51
  default_locale: Predvolený jazyk
50
52
  description: Popis
@@ -843,6 +845,7 @@ sk:
843
845
  officializations:
844
846
  block:
845
847
  error: Pri blokovaní účastníka sa vyskytol problém.
848
+ no_user: Nenašiel sa žiadny používateľ
846
849
  success: Účastník bol úspešne zablokovaný.
847
850
  bulk_action:
848
851
  block:
@@ -852,6 +855,7 @@ sk:
852
855
  invalid: Pri odblokovaní účastníkov sa vyskytol problém.
853
856
  success: Účastníci boli úspešne odblokovaní.
854
857
  create:
858
+ no_user_found: Účastník sa nenašiel.
855
859
  success: Účastník bol úspešne oficionalizovaný.
856
860
  destroy:
857
861
  success: Oficionalizácia účastníka bola úspešne zrušená.
@@ -876,6 +880,8 @@ sk:
876
880
  badge: Odznak oficializácie
877
881
  officialize: Oficializovať
878
882
  title: Oficializovať účastníka "%{name}"
883
+ show_email:
884
+ no_user: Nenašiel sa žiadny používateľ
879
885
  show_email_modal:
880
886
  description: Ak potrebujete kontaktovať účastníka priamo, môžete kliknúť na tlačidlo Zobraziť a uvidíte jeho e-mailovú adresu. Táto akcia bude zaznamenaná.
881
887
  email_address: E-mailová adresa
@@ -909,6 +915,10 @@ sk:
909
915
  logos:
910
916
  organization_logos: Logá organizácie
911
917
  preview: Náhľad
918
+ machine_translation_display_priority:
919
+ options:
920
+ original: Systém zobrazuje informácie v jazyku, ktorý použil autor. Obsah vytvorený v administrácii s manuálnymi prekladmi zobrazí hodnoty preložené administrátorom.
921
+ translation: Systém zobrazí preklad, ak je k dispozícii, v opačnom prípade sa použije pôvodný jazyk.
912
922
  rich_text_editor_in_public_views_help: V niektorých textových oknách budú účastníci môcť vkladať niektoré HTML tagy pomocou pokročilého textového editoru.
913
923
  social_handlers: Sociálne
914
924
  twitter: X
@@ -1080,6 +1090,8 @@ sk:
1080
1090
  previous_title: Predchádzajúca položka
1081
1091
  attachments:
1082
1092
  add_attachments: Nové prílohy
1093
+ attachment_legend: Pridať galériu príloh (voliteľné)
1094
+ edit_attachments: Upraviť prílohy
1083
1095
  static_page_topics:
1084
1096
  create:
1085
1097
  error: Pri tvorbe novej témy nastala chyba.
@@ -1296,6 +1308,11 @@ sk:
1296
1308
  errors:
1297
1309
  impersonate_user:
1298
1310
  reason: Pri správe nespravovaného účastníka musíte uviesť dôvod.
1311
+ file_help:
1312
+ attachment:
1313
+ explanation: 'Pokyny pre súbor:'
1314
+ message_1: Podporované sú súbory CSV, JSON a Excel (.xlsx)
1315
+ message_2: Pre súbory CSV musí byť oddeľovačom stĺpcov bodkočiarka (";")
1299
1316
  moderations:
1300
1317
  actions:
1301
1318
  expand: Rozbaliť
data/config/routes.rb CHANGED
@@ -3,7 +3,6 @@
3
3
  Decidim::Admin::Engine.routes.draw do
4
4
  constraints(->(request) { Decidim::Admin::OrganizationDashboardConstraint.new(request).matches? }) do
5
5
  resource :organization, only: [:edit, :update], controller: "organization" do
6
- resource :appearance, only: [:edit, :update], controller: "organization_appearance"
7
6
  resource :homepage, only: [:edit, :update], controller: "organization_homepage" do
8
7
  resources :content_blocks, only: [:edit, :update, :destroy, :create], controller: "organization_homepage_content_blocks"
9
8
  end
@@ -34,10 +34,13 @@ module Decidim
34
34
  nil
35
35
  end
36
36
 
37
+ # File extensions are matched case-insensitively, as the same file can be
38
+ # named with any casing (e.g. "training.csv" or "TRAINING.CSV").
37
39
  def self.search_by_file_extension(extension)
38
- return unless ACCEPTED_MIME_TYPES.has_key?(extension.to_sym)
40
+ key = extension.to_s.downcase.to_sym
41
+ return unless ACCEPTED_MIME_TYPES.has_key?(key)
39
42
 
40
- search_by_mime_type(ACCEPTED_MIME_TYPES[extension.to_sym])
43
+ search_by_mime_type(ACCEPTED_MIME_TYPES[key])
41
44
  end
42
45
  end
43
46
  end
@@ -270,7 +270,6 @@ module Decidim
270
270
  active: [
271
271
  %w(
272
272
  decidim/admin/organization
273
- decidim/admin/organization_appearance
274
273
  decidim/admin/organization_homepage
275
274
  decidim/admin/organization_homepage_content_blocks
276
275
  decidim/admin/taxonomies
@@ -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.31.8"
7
+ "0.31.9"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.8
4
+ version: 0.31.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2026-10-22 00:00:00.000000000 Z
13
+ date: 2026-11-23 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.31.8
35
+ version: 0.31.9
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.31.8
42
+ version: 0.31.9
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: devise
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -94,28 +94,28 @@ dependencies:
94
94
  requirements:
95
95
  - - '='
96
96
  - !ruby/object:Gem::Version
97
- version: 0.31.8
97
+ version: 0.31.9
98
98
  type: :development
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 0.31.8
104
+ version: 0.31.9
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: decidim-participatory_processes
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.31.8
111
+ version: 0.31.9
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 0.31.8
118
+ version: 0.31.9
119
119
  description: Organization administration to manage a single organization.
120
120
  email:
121
121
  - josepjaume@gmail.com
@@ -268,7 +268,6 @@ files:
268
268
  - app/controllers/decidim/admin/newsletter_templates_controller.rb
269
269
  - app/controllers/decidim/admin/newsletters_controller.rb
270
270
  - app/controllers/decidim/admin/officializations_controller.rb
271
- - app/controllers/decidim/admin/organization_appearance_controller.rb
272
271
  - app/controllers/decidim/admin/organization_controller.rb
273
272
  - app/controllers/decidim/admin/organization_external_domain_allowlist_controller.rb
274
273
  - app/controllers/decidim/admin/organization_homepage_content_blocks_controller.rb
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Admin
5
- # Controller that allows managing the appearance of the organization.
6
- class OrganizationAppearanceController < Decidim::Admin::ApplicationController
7
- layout "decidim/admin/settings"
8
-
9
- add_breadcrumb_item_from_menu :admin_settings_menu
10
-
11
- def edit
12
- enforce_permission_to :update, :organization, organization: current_organization
13
- @form = form(OrganizationAppearanceForm).from_model(current_organization)
14
- end
15
-
16
- def update
17
- enforce_permission_to :update, :organization, organization: current_organization
18
- @form = form(OrganizationAppearanceForm).from_params(params)
19
-
20
- UpdateOrganizationAppearance.call(@form, current_organization) do
21
- on(:ok) do
22
- flash[:notice] = I18n.t("organization.update.success", scope: "decidim.admin")
23
- redirect_to edit_organization_appearance_path
24
- end
25
-
26
- on(:invalid) do
27
- flash.now[:alert] = I18n.t("organization.update.error", scope: "decidim.admin")
28
- render :edit, status: :unprocessable_entity
29
- end
30
- end
31
- end
32
- end
33
- end
34
- end