decidim-admin 0.32.2 → 0.32.3
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.
- checksums.yaml +4 -4
- data/app/cells/decidim/admin/results_per_page_cell.rb +1 -1
- data/app/commands/decidim/admin/block_user.rb +1 -1
- data/app/commands/decidim/admin/bulk_block_users.rb +1 -1
- data/app/commands/decidim/admin/close_session_managed_user.rb +1 -1
- data/app/commands/decidim/admin/participatory_space/create_admin.rb +1 -1
- data/app/commands/decidim/admin/participatory_space/create_member.rb +2 -2
- data/app/commands/decidim/admin/promote_managed_user.rb +1 -1
- data/app/commands/decidim/admin/reorder_taxonomies.rb +2 -2
- data/app/commands/decidim/admin/update_help_sections.rb +2 -2
- data/app/controllers/concerns/decidim/admin/component_taxonomies_helper.rb +1 -1
- data/app/controllers/concerns/decidim/admin/filterable.rb +2 -0
- data/app/controllers/decidim/admin/application_controller.rb +2 -0
- data/app/controllers/decidim/admin/participatory_space/concerns/has_members_csv_import.rb +2 -0
- data/app/controllers/decidim/admin/taxonomy_filters_controller.rb +1 -1
- data/app/controllers/decidim/admin/taxonomy_items_controller.rb +5 -2
- data/app/helpers/decidim/admin/search_form_helper.rb +2 -2
- data/app/packs/src/decidim/admin/officializations.js +11 -2
- data/app/packs/stylesheets/decidim/admin/_proposal_status.scss +28 -0
- data/app/packs/stylesheets/decidim/admin/_select_picker.scss +1 -1
- data/app/views/layouts/decidim/admin/_js_configuration.html.erb +1 -0
- data/config/locales/sk.yml +16 -0
- data/config/routes.rb +0 -1
- data/decidim-admin.gemspec +1 -1
- data/lib/decidim/admin/import/readers.rb +5 -2
- data/lib/decidim/admin/menu.rb +0 -1
- data/lib/decidim/admin/version.rb +1 -1
- metadata +7 -8
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df67bc80dec1db89cad13df7a602640a4736b88f71f2665ba2c95ec20f4aa7dc
|
|
4
|
+
data.tar.gz: bec7f7c5099b309760b5d513e2cce94779a0406490dccd9088a0f9fe876acec1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82db9865de6bee8c2a79c5092695ed0f2f2d0388a48e26b8a8339fc435a904910f6c57ddcf207ee9d4ace2360b260f4e1658317bb59cc472f6b787ddc3546fc9
|
|
7
|
+
data.tar.gz: 8179e898ee956b8426a8e82c5a2957eb5779886a341e7a19e7754a11e4ce49ee8a4f07d606ee1286b4e99ce032a3d8041e2b6d41241d74a058dc57ed0a967d05
|
|
@@ -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
|
|
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,7 @@ module Decidim
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def find_or_create_moderation!
|
|
48
|
-
Decidim::UserModeration.find_or_create_by!(user: form.user)
|
|
48
|
+
Decidim::UserModeration.find_or_create_by!(user: form.user) # rubocop:disable Decidim/OrganizationScopedFinder -- form.user is scoped to the current organization
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def register_justification!
|
|
@@ -49,7 +49,7 @@ module Decidim
|
|
|
49
49
|
def block_all_users!
|
|
50
50
|
form.users.each do |user|
|
|
51
51
|
transaction do
|
|
52
|
-
Decidim::UserModeration.find_or_create_by!(user:)
|
|
52
|
+
Decidim::UserModeration.find_or_create_by!(user:) # rubocop:disable Decidim/OrganizationScopedFinder -- form.users is scoped to the current organization
|
|
53
53
|
|
|
54
54
|
@current_blocking = UserBlock.create!(
|
|
55
55
|
justification: form.justification,
|
|
@@ -32,7 +32,7 @@ module Decidim
|
|
|
32
32
|
private
|
|
33
33
|
|
|
34
34
|
def impersonation_log
|
|
35
|
-
@impersonation_log ||= Decidim::ImpersonationLog.where(admin: current_user, user:).active.first
|
|
35
|
+
@impersonation_log ||= Decidim::ImpersonationLog.where(admin: current_user, user:).active.first # rubocop:disable Decidim/OrganizationScopedFinder -- admin and user are the current session users
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def close_session
|
|
@@ -120,7 +120,7 @@ module Decidim
|
|
|
120
120
|
def existing_user
|
|
121
121
|
return @existing_user if defined?(@existing_user)
|
|
122
122
|
|
|
123
|
-
@existing_user = User.find_by(email: form.email, organization: participatory_space.organization)
|
|
123
|
+
@existing_user = User.find_by(email: form.email, organization: participatory_space.organization) # rubocop:disable Decidim/OrganizationScopedFinder -- organization is the participatory space's organization
|
|
124
124
|
|
|
125
125
|
InviteUserAgain.call(@existing_user, invitation_instructions) if @existing_user&.invitation_pending?
|
|
126
126
|
|
|
@@ -53,7 +53,7 @@ module Decidim
|
|
|
53
53
|
title: user.name
|
|
54
54
|
}
|
|
55
55
|
) do
|
|
56
|
-
member = Decidim::ParticipatorySpace::Member.where(user:, participatory_space: @member_to).first_or_initialize
|
|
56
|
+
member = Decidim::ParticipatorySpace::Member.where(user:, participatory_space: @member_to).first_or_initialize # rubocop:disable Decidim/OrganizationScopedFinder -- user and participatory_space are scoped to the current invitation
|
|
57
57
|
member.role = form.role
|
|
58
58
|
member.published = form.published
|
|
59
59
|
member.save!
|
|
@@ -62,7 +62,7 @@ module Decidim
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def existing_user
|
|
65
|
-
@existing_user ||= User.find_by(
|
|
65
|
+
@existing_user ||= User.find_by( # rubocop:disable Decidim/OrganizationScopedFinder -- organization is the member's participatory space organization
|
|
66
66
|
email: form.email.downcase,
|
|
67
67
|
organization: member_to.organization
|
|
68
68
|
)
|
|
@@ -65,11 +65,11 @@ module Decidim
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def collection
|
|
68
|
-
@collection ||=
|
|
68
|
+
@collection ||= organization.taxonomies.where(parent_id: first_item.parent_id)
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def first_item
|
|
72
|
-
@first_item ||=
|
|
72
|
+
@first_item ||= organization.taxonomies.find(order.first)
|
|
73
73
|
end
|
|
74
74
|
end
|
|
75
75
|
end
|
|
@@ -21,7 +21,7 @@ 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
|
-
ContextualHelpSection.find_by(organization: @organization, section_id: section.id)
|
|
24
|
+
ContextualHelpSection.find_by(organization: @organization, section_id: section.id) # rubocop:disable Decidim/OrganizationScopedFinder -- scoped to the given organization and section
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
end
|
|
@@ -34,7 +34,7 @@ module Decidim
|
|
|
34
34
|
attr_reader :form
|
|
35
35
|
|
|
36
36
|
def content_has_changed?(section)
|
|
37
|
-
return if ContextualHelpSection.find_by(organization: @organization, section_id: section.id).nil? && section.content.compact_blank.blank?
|
|
37
|
+
return if ContextualHelpSection.find_by(organization: @organization, section_id: section.id).nil? && section.content.compact_blank.blank? # rubocop:disable Decidim/OrganizationScopedFinder -- scoped to the given organization and section
|
|
38
38
|
|
|
39
39
|
section.content != ContextualHelpSection.find_content(@organization, section.id).except("machine_translations")
|
|
40
40
|
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)
|
|
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,9 @@ module Decidim
|
|
|
195
195
|
|
|
196
196
|
# A tree of Taxonomy IDs. Leaves are `nil`.
|
|
197
197
|
def taxonomy_ids_hash(taxonomies)
|
|
198
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- taxonomies is scoped to current_organization through available_root_taxonomies
|
|
198
199
|
filtered_taxonomies = taxonomies.roots.or(taxonomies.where(id: available_taxonomy_ids))
|
|
200
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
199
201
|
return nil if filtered_taxonomies.blank?
|
|
200
202
|
|
|
201
203
|
filtered_taxonomies.to_h do |taxonomy|
|
|
@@ -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
|
|
|
@@ -42,7 +42,9 @@ module Decidim
|
|
|
42
42
|
|
|
43
43
|
def destroy_all
|
|
44
44
|
enforce_permission_to :csv_import, :space_member
|
|
45
|
+
# rubocop:disable Decidim/OrganizationScopedFinder -- by_participatory_space scopes to the current participatory space
|
|
45
46
|
Decidim::ParticipatorySpace::Member.by_participatory_space(participatory_space).delete_all
|
|
47
|
+
# rubocop:enable Decidim/OrganizationScopedFinder
|
|
46
48
|
redirect_to new_members_csv_imports_path
|
|
47
49
|
end
|
|
48
50
|
|
|
@@ -88,7 +88,7 @@ module Decidim
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def root_taxonomy
|
|
91
|
-
@root_taxonomy ||=
|
|
91
|
+
@root_taxonomy ||= current_organization.taxonomies.roots.find(params.expect(: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 ||=
|
|
62
|
+
@taxonomy ||= current_organization.taxonomies.find(params.expect(:taxonomy_id))
|
|
62
63
|
end
|
|
63
64
|
|
|
64
65
|
def taxonomy_item
|
|
65
|
-
|
|
66
|
+
return if params[:id].blank?
|
|
67
|
+
|
|
68
|
+
@taxonomy_item ||= current_organization.taxonomies.find(params.expect(:id))
|
|
66
69
|
end
|
|
67
70
|
|
|
68
71
|
def selected_parent_id
|
|
@@ -11,7 +11,7 @@ module Decidim
|
|
|
11
11
|
# as datetime pickers.
|
|
12
12
|
def search_form_for(record, options = {}, &)
|
|
13
13
|
options[:builder] ||= SearchFormBuilder
|
|
14
|
-
options[:url] = url_for(params
|
|
14
|
+
options[:url] = url_for(decidim_url_params(params, locale: nil)) if options[:url].blank?
|
|
15
15
|
|
|
16
16
|
super
|
|
17
17
|
end
|
|
@@ -27,7 +27,7 @@ module Decidim
|
|
|
27
27
|
private
|
|
28
28
|
|
|
29
29
|
def sort_link_params
|
|
30
|
-
request_params = params
|
|
30
|
+
request_params = decidim_url_params(params, locale: nil)
|
|
31
31
|
request_params["q"] = request_params["q"].except("s", :s) if request_params["q"].is_a?(Hash)
|
|
32
32
|
request_params
|
|
33
33
|
end
|
|
@@ -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.
|
|
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
|
}
|
|
@@ -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"),
|
data/config/locales/sk.yml
CHANGED
|
@@ -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
|
|
@@ -50,6 +51,7 @@ sk:
|
|
|
50
51
|
alert_color: Upozornenie
|
|
51
52
|
available_authorizations: Dostupné autorizácie
|
|
52
53
|
badges_enabled: Povoliť odznaky
|
|
54
|
+
comments_max_length: Maximálny počet znakov na komentár (ponechajte 0 pre predvolenú hodnotu)
|
|
53
55
|
customize_welcome_notification: Prispôsobte uvítanie
|
|
54
56
|
default_locale: Predvolený jazyk
|
|
55
57
|
description: Popis
|
|
@@ -909,6 +911,7 @@ sk:
|
|
|
909
911
|
officializations:
|
|
910
912
|
block:
|
|
911
913
|
error: Pri blokovaní účastníka sa vyskytol problém.
|
|
914
|
+
no_user: Nenašiel sa žiadny používateľ
|
|
912
915
|
success: Účastník bol úspešne zablokovaný.
|
|
913
916
|
bulk_action:
|
|
914
917
|
block:
|
|
@@ -918,6 +921,7 @@ sk:
|
|
|
918
921
|
invalid: Pri odblokovaní účastníkov sa vyskytol problém.
|
|
919
922
|
success: Účastníci boli úspešne odblokovaní.
|
|
920
923
|
create:
|
|
924
|
+
no_user_found: Účastník sa nenašiel.
|
|
921
925
|
success: Účastník bol úspešne oficionalizovaný.
|
|
922
926
|
destroy:
|
|
923
927
|
success: Oficionalizácia účastníka bola úspešne zrušená.
|
|
@@ -944,6 +948,7 @@ sk:
|
|
|
944
948
|
officialize: Oficializovať
|
|
945
949
|
title: Oficializovať účastníka "%{name}"
|
|
946
950
|
show_email:
|
|
951
|
+
no_user: Nenašiel sa žiadny používateľ
|
|
947
952
|
title: Zobraziť e-mail
|
|
948
953
|
show_email_modal:
|
|
949
954
|
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á.
|
|
@@ -978,6 +983,10 @@ sk:
|
|
|
978
983
|
logos:
|
|
979
984
|
organization_logos: Logá organizácie
|
|
980
985
|
preview: Náhľad
|
|
986
|
+
machine_translation_display_priority:
|
|
987
|
+
options:
|
|
988
|
+
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.
|
|
989
|
+
translation: Systém zobrazí preklad, ak je k dispozícii, v opačnom prípade sa použije pôvodný jazyk.
|
|
981
990
|
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.
|
|
982
991
|
social_handlers: Sociálne
|
|
983
992
|
twitter: X
|
|
@@ -1107,6 +1116,8 @@ sk:
|
|
|
1107
1116
|
previous_title: Predchádzajúca položka
|
|
1108
1117
|
attachments:
|
|
1109
1118
|
add_attachments: Nové prílohy
|
|
1119
|
+
attachment_legend: Pridať galériu príloh (voliteľné)
|
|
1120
|
+
edit_attachments: Upraviť prílohy
|
|
1110
1121
|
static_page_topics:
|
|
1111
1122
|
create:
|
|
1112
1123
|
error: Pri tvorbe novej témy nastala chyba.
|
|
@@ -1324,6 +1335,11 @@ sk:
|
|
|
1324
1335
|
errors:
|
|
1325
1336
|
impersonate_user:
|
|
1326
1337
|
reason: Pri správe nespravovaného účastníka musíte uviesť dôvod.
|
|
1338
|
+
file_help:
|
|
1339
|
+
attachment:
|
|
1340
|
+
explanation: 'Pokyny pre súbor:'
|
|
1341
|
+
message_1: Podporované sú súbory CSV, JSON a Excel (.xlsx)
|
|
1342
|
+
message_2: Pre súbory CSV musí byť oddeľovačom stĺpcov bodkočiarka (";")
|
|
1327
1343
|
moderations:
|
|
1328
1344
|
actions:
|
|
1329
1345
|
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
|
data/decidim-admin.gemspec
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
|
-
version = "0.32.
|
|
6
|
+
version = "0.32.3"
|
|
7
7
|
s.version = version
|
|
8
8
|
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
|
9
9
|
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
|
@@ -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
|
-
|
|
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[
|
|
43
|
+
search_by_mime_type(ACCEPTED_MIME_TYPES[key])
|
|
41
44
|
end
|
|
42
45
|
end
|
|
43
46
|
end
|
data/lib/decidim/admin/menu.rb
CHANGED
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.32.
|
|
4
|
+
version: 0.32.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -31,14 +31,14 @@ dependencies:
|
|
|
31
31
|
requirements:
|
|
32
32
|
- - '='
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 0.32.
|
|
34
|
+
version: 0.32.3
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - '='
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 0.32.
|
|
41
|
+
version: 0.32.3
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: devise
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -99,28 +99,28 @@ dependencies:
|
|
|
99
99
|
requirements:
|
|
100
100
|
- - '='
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 0.32.
|
|
102
|
+
version: 0.32.3
|
|
103
103
|
type: :development
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - '='
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 0.32.
|
|
109
|
+
version: 0.32.3
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
111
|
name: decidim-participatory_processes
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - '='
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: 0.32.
|
|
116
|
+
version: 0.32.3
|
|
117
117
|
type: :development
|
|
118
118
|
prerelease: false
|
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
121
|
- - '='
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: 0.32.
|
|
123
|
+
version: 0.32.3
|
|
124
124
|
description: Organization administration to manage a single organization.
|
|
125
125
|
email:
|
|
126
126
|
- josepjaume@gmail.com
|
|
@@ -270,7 +270,6 @@ files:
|
|
|
270
270
|
- app/controllers/decidim/admin/newsletter_templates_controller.rb
|
|
271
271
|
- app/controllers/decidim/admin/newsletters_controller.rb
|
|
272
272
|
- app/controllers/decidim/admin/officializations_controller.rb
|
|
273
|
-
- app/controllers/decidim/admin/organization_appearance_controller.rb
|
|
274
273
|
- app/controllers/decidim/admin/organization_controller.rb
|
|
275
274
|
- app/controllers/decidim/admin/organization_external_domain_allowlist_controller.rb
|
|
276
275
|
- 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_content
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|