decidim-admin 0.28.0 → 0.28.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/admin/content_block_cell.rb +1 -1
- data/app/commands/decidim/admin/destroy_category.rb +1 -1
- data/app/controllers/decidim/admin/application_controller.rb +2 -1
- data/app/controllers/decidim/admin/area_types_controller.rb +1 -1
- data/app/controllers/decidim/admin/authorization_workflows_controller.rb +5 -1
- data/app/controllers/decidim/admin/conflicts_controller.rb +23 -0
- data/app/controllers/decidim/admin/impersonatable_users_controller.rb +3 -1
- data/app/controllers/decidim/admin/impersonations_controller.rb +1 -0
- data/app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb +2 -0
- data/app/controllers/decidim/admin/moderated_users_controller.rb +10 -0
- data/app/controllers/decidim/admin/moderations_controller.rb +10 -0
- data/app/controllers/decidim/admin/officializations_controller.rb +2 -0
- data/app/controllers/decidim/admin/organization_controller.rb +7 -4
- data/app/controllers/decidim/admin/scope_types_controller.rb +1 -1
- data/app/controllers/decidim/admin/static_page_topics_controller.rb +10 -0
- data/app/controllers/decidim/admin/user_groups_controller.rb +2 -0
- data/app/controllers/decidim/admin/users_controller.rb +2 -0
- data/app/events/decidim/resource_hidden_event.rb +5 -1
- data/app/helpers/decidim/admin/admin_terms_helper.rb +1 -1
- data/app/helpers/decidim/admin/filterable_helper.rb +1 -1
- data/app/packs/entrypoints/decidim_admin_overrides.scss +2 -0
- data/app/packs/images/decidim/admin/.keep +0 -0
- data/app/packs/src/decidim/admin/application.js +14 -1
- data/app/packs/src/decidim/admin/choose_language.js +2 -0
- data/app/packs/src/decidim/admin/dynamic_fields.component.js +2 -1
- data/app/packs/src/decidim/admin/participatory_space_search.js +1 -1
- data/app/packs/stylesheets/decidim/admin/_filters.scss +1 -1
- data/app/packs/stylesheets/decidim/admin/_legacy_foundation.scss +10 -0
- data/app/packs/stylesheets/decidim/admin/_sidebar-menu.scss +4 -4
- data/app/packs/stylesheets/decidim/admin/_tabs.scss +6 -0
- data/app/packs/stylesheets/decidim/admin/decidim_application.scss +5 -0
- data/app/views/decidim/admin/admin_terms/show.html.erb +2 -2
- data/app/views/decidim/admin/area_types/edit.html.erb +2 -2
- data/app/views/decidim/admin/area_types/index.html.erb +2 -2
- data/app/views/decidim/admin/area_types/new.html.erb +2 -2
- data/app/views/decidim/admin/areas/edit.html.erb +2 -2
- data/app/views/decidim/admin/areas/index.html.erb +2 -2
- data/app/views/decidim/admin/areas/new.html.erb +2 -2
- data/app/views/decidim/admin/attachment_collections/edit.html.erb +2 -2
- data/app/views/decidim/admin/attachment_collections/index.html.erb +2 -2
- data/app/views/decidim/admin/attachment_collections/new.html.erb +2 -2
- data/app/views/decidim/admin/attachments/edit.html.erb +2 -2
- data/app/views/decidim/admin/attachments/index.html.erb +2 -2
- data/app/views/decidim/admin/attachments/new.html.erb +2 -2
- data/app/views/decidim/admin/authorization_workflows/index.html.erb +2 -2
- data/app/views/decidim/admin/block_user/new.html.erb +3 -4
- data/app/views/decidim/admin/categories/edit.html.erb +2 -2
- data/app/views/decidim/admin/categories/index.html.erb +7 -3
- data/app/views/decidim/admin/categories/new.html.erb +2 -2
- data/app/views/decidim/admin/components/edit.html.erb +2 -2
- data/app/views/decidim/admin/components/index.html.erb +2 -2
- data/app/views/decidim/admin/components/new.html.erb +2 -2
- data/app/views/decidim/admin/conflicts/index.html.erb +2 -2
- data/app/views/decidim/admin/dashboard/show.html.erb +2 -2
- data/app/views/decidim/admin/help_sections/_form.html.erb +2 -2
- data/app/views/decidim/admin/impersonatable_users/index.html.erb +2 -2
- data/app/views/decidim/admin/impersonations/new.html.erb +2 -2
- data/app/views/decidim/admin/imports/new.html.erb +2 -2
- data/app/views/decidim/admin/managed_users/impersonation_logs/index.html.erb +2 -2
- data/app/views/decidim/admin/managed_users/promotions/new.html.erb +2 -2
- data/app/views/decidim/admin/moderated_users/index.html.erb +2 -2
- data/app/views/decidim/admin/moderations/index.html.erb +2 -2
- data/app/views/decidim/admin/moderations/reports/index.html.erb +2 -2
- data/app/views/decidim/admin/moderations/reports/show.html.erb +2 -2
- data/app/views/decidim/admin/newsletter_templates/index.html.erb +5 -6
- data/app/views/decidim/admin/newsletter_templates/show.html.erb +16 -12
- data/app/views/decidim/admin/newsletters/edit.html.erb +2 -2
- data/app/views/decidim/admin/newsletters/index.html.erb +2 -2
- data/app/views/decidim/admin/newsletters/new.html.erb +2 -2
- data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +13 -9
- data/app/views/decidim/admin/newsletters/show.html.erb +29 -26
- data/app/views/decidim/admin/officializations/index.html.erb +1 -1
- data/app/views/decidim/admin/officializations/new.html.erb +2 -2
- data/app/views/decidim/admin/organization/_form.html.erb +5 -3
- data/app/views/decidim/admin/organization/edit.html.erb +2 -2
- data/app/views/decidim/admin/organization_appearance/edit.html.erb +2 -2
- data/app/views/decidim/admin/organization_external_domain_whitelist/edit.html.erb +2 -2
- data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +2 -2
- data/app/views/decidim/admin/participatory_space_private_users/new.html.erb +2 -2
- data/app/views/decidim/admin/resource_permissions/edit.html.erb +2 -2
- data/app/views/decidim/admin/scope_types/edit.html.erb +2 -2
- data/app/views/decidim/admin/scope_types/index.html.erb +2 -2
- data/app/views/decidim/admin/scope_types/new.html.erb +2 -2
- data/app/views/decidim/admin/scopes/edit.html.erb +2 -2
- data/app/views/decidim/admin/scopes/index.html.erb +2 -2
- data/app/views/decidim/admin/scopes/new.html.erb +2 -2
- data/app/views/decidim/admin/shared/_filters.html.erb +1 -1
- data/app/views/decidim/admin/shared/_js-callout.html.erb +2 -2
- data/app/views/decidim/admin/shared/landing_page/_content_blocks.html.erb +2 -2
- data/app/views/decidim/admin/shared/landing_page_content_blocks/edit.html.erb +2 -2
- data/app/views/decidim/admin/static_page_topics/edit.html.erb +2 -2
- data/app/views/decidim/admin/static_page_topics/index.html.erb +2 -2
- data/app/views/decidim/admin/static_page_topics/new.html.erb +2 -2
- data/app/views/decidim/admin/static_pages/edit.html.erb +2 -2
- data/app/views/decidim/admin/static_pages/index.html.erb +2 -2
- data/app/views/decidim/admin/static_pages/new.html.erb +2 -2
- data/app/views/decidim/admin/user_groups/index.html.erb +2 -2
- data/app/views/decidim/admin/user_groups_csv_verifications/new.html.erb +2 -2
- data/app/views/decidim/admin/users/index.html.erb +2 -2
- data/app/views/decidim/admin/users/new.html.erb +2 -2
- data/app/views/layouts/decidim/admin/_breadcrumb.html.erb +1 -1
- data/app/views/layouts/decidim/admin/_header.html.erb +4 -0
- data/app/views/layouts/decidim/admin/_js_configuration.html.erb +1 -0
- data/app/views/layouts/decidim/admin/_sidebar_menu.html.erb +2 -2
- data/config/assets.rb +1 -0
- data/config/locales/ar.yml +11 -8
- data/config/locales/bg.yml +1025 -3
- data/config/locales/ca.yml +4 -1
- data/config/locales/cs.yml +6 -8
- data/config/locales/de.yml +15 -12
- data/config/locales/el.yml +2 -12
- data/config/locales/en.yml +4 -1
- data/config/locales/es-MX.yml +11 -8
- data/config/locales/es-PY.yml +11 -8
- data/config/locales/es.yml +20 -17
- data/config/locales/eu.yml +8 -5
- data/config/locales/fi-plain.yml +4 -1
- data/config/locales/fi.yml +6 -3
- data/config/locales/fr-CA.yml +5 -2
- data/config/locales/fr.yml +4 -1
- data/config/locales/ga-IE.yml +2 -4
- data/config/locales/gl.yml +8 -7
- data/config/locales/he-IL.yml +50 -0
- data/config/locales/hu.yml +36 -6
- data/config/locales/id-ID.yml +5 -0
- data/config/locales/is-IS.yml +5 -0
- data/config/locales/it.yml +8 -9
- data/config/locales/ja.yml +8 -4
- data/config/locales/ko.yml +774 -0
- data/config/locales/lb.yml +8 -10
- data/config/locales/lt.yml +3 -14
- data/config/locales/lv.yml +8 -0
- data/config/locales/nl.yml +7 -9
- data/config/locales/no.yml +20 -9
- data/config/locales/pl.yml +74 -4
- data/config/locales/pt-BR.yml +50 -12
- data/config/locales/pt.yml +8 -10
- data/config/locales/ro-RO.yml +2 -13
- data/config/locales/ru.yml +5 -0
- data/config/locales/sk.yml +5 -0
- data/config/locales/sl.yml +5 -0
- data/config/locales/sq-AL.yml +490 -0
- data/config/locales/sr-CS.yml +5 -0
- data/config/locales/sv.yml +7 -9
- data/config/locales/th-TH.yml +101 -0
- data/config/locales/tr-TR.yml +11 -0
- data/config/locales/uk.yml +5 -0
- data/config/locales/zh-CN.yml +5 -0
- data/config/locales/zh-TW.yml +3 -11
- data/decidim-admin.gemspec +43 -0
- data/lib/decidim/admin/engine.rb +1 -25
- data/lib/decidim/admin/menu.rb +13 -4
- data/lib/decidim/admin/test/admin_participatory_space_access_examples.rb +27 -0
- data/lib/decidim/admin/test/commands/destroy_category_examples.rb +9 -0
- data/lib/decidim/admin/test/invite_participatory_space_admins_shared_examples.rb +180 -0
- data/lib/decidim/admin/test/invite_participatory_space_collaborators_shared_examples.rb +67 -0
- data/lib/decidim/admin/test/invite_participatory_space_moderators_shared_examples.rb +77 -0
- data/lib/decidim/admin/test/invite_participatory_space_users_shared_context.rb +33 -0
- data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +12 -11
- data/lib/decidim/admin/test/manage_categories_examples.rb +11 -8
- data/lib/decidim/admin/test/manage_hide_content_examples.rb +4 -0
- data/lib/decidim/admin/test.rb +1 -0
- data/lib/decidim/admin/version.rb +1 -1
- metadata +20 -13
- data/app/mailers/decidim/admin/application_mailer.rb +0 -12
- data/config/environment.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75ccdc4a2f091d223bff9fa56f75347e91c6d8752bfba25eaf0a758191d705c0
|
4
|
+
data.tar.gz: f451da89da78adc0809dd9fee4af0f87761870f5cbb8eee8cc9c20868dc9b023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11998db7b9f88af5bef0396a5adb179a9495a8acb21e80b55f9a2e3257557356a5c414039016cf826e06a16e1e6fb5adcbe4e36830000beff84ee9c1abd41852
|
7
|
+
data.tar.gz: 5fbf7d4e81e2fd1a366310eb5dbfd1d6aad2473d3d54af70ef1e6a095739468c8c0cf6e17df1208d6829af345fe52b4aa713d5abb7443f8da15fb63ae44ba929
|
@@ -20,7 +20,7 @@ module Decidim
|
|
20
20
|
#
|
21
21
|
# Returns nothing.
|
22
22
|
def call
|
23
|
-
return broadcast(:invalid) if category.nil? || category.subcategories.any?
|
23
|
+
return broadcast(:invalid) if category.nil? || category.subcategories.any? || !category.unused?
|
24
24
|
|
25
25
|
destroy_category
|
26
26
|
broadcast(:ok)
|
@@ -34,7 +34,8 @@ module Decidim
|
|
34
34
|
helper Decidim::ComponentPathHelper
|
35
35
|
helper Decidim::SanitizeHelper
|
36
36
|
helper Decidim::BreadcrumbHelper
|
37
|
-
|
37
|
+
|
38
|
+
helper Decidim::Templates::Admin::ApplicationHelper if Decidim.module_installed?(:templates) && defined?(Decidim::Templates::Admin::ApplicationHelper)
|
38
39
|
|
39
40
|
default_form_builder Decidim::Admin::FormBuilder
|
40
41
|
|
@@ -5,10 +5,14 @@ module Decidim
|
|
5
5
|
class AuthorizationWorkflowsController < Decidim::Admin::ApplicationController
|
6
6
|
layout "decidim/admin/users"
|
7
7
|
|
8
|
+
add_breadcrumb_item_from_menu :admin_user_menu
|
9
|
+
|
8
10
|
def index
|
9
11
|
enforce_permission_to :index, :authorization_workflow
|
10
12
|
|
11
|
-
@workflows = Decidim::Verifications.admin_workflows
|
13
|
+
@workflows = Decidim::Verifications.admin_workflows.select do |manifest|
|
14
|
+
current_organization.available_authorizations.include?(manifest.name.to_s)
|
15
|
+
end
|
12
16
|
|
13
17
|
# Decidim::Verifications::Authorizations Query
|
14
18
|
@authorizations = Decidim::Verifications::Authorizations.new(
|
@@ -5,13 +5,21 @@ module Decidim
|
|
5
5
|
class ConflictsController < Decidim::Admin::ApplicationController
|
6
6
|
layout "decidim/admin/users"
|
7
7
|
|
8
|
+
helper_method :context_breadcrumb_items
|
9
|
+
|
10
|
+
add_breadcrumb_item_from_menu :impersonate_menu
|
11
|
+
|
8
12
|
def index
|
13
|
+
enforce_permission_to :index, :impersonatable_user
|
14
|
+
|
9
15
|
@conflicts = Decidim::Verifications::Conflict.joins(:current_user).where(
|
10
16
|
decidim_users: { decidim_organization_id: current_organization.id }
|
11
17
|
)
|
12
18
|
end
|
13
19
|
|
14
20
|
def edit
|
21
|
+
enforce_permission_to :index, :impersonatable_user
|
22
|
+
|
15
23
|
conflict = Decidim::Verifications::Conflict.find(params[:id])
|
16
24
|
|
17
25
|
@form = form(TransferUserForm).from_params(
|
@@ -22,6 +30,8 @@ module Decidim
|
|
22
30
|
end
|
23
31
|
|
24
32
|
def update
|
33
|
+
enforce_permission_to :index, :impersonatable_user
|
34
|
+
|
25
35
|
conflict = Decidim::Verifications::Conflict.find(params[:id])
|
26
36
|
|
27
37
|
@form = form(TransferUserForm).from_params(
|
@@ -43,6 +53,19 @@ module Decidim
|
|
43
53
|
end
|
44
54
|
end
|
45
55
|
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def context_breadcrumb_items
|
60
|
+
@context_breadcrumb_items ||= [impersonations_breadcrumb_item]
|
61
|
+
end
|
62
|
+
|
63
|
+
def impersonations_breadcrumb_item
|
64
|
+
{
|
65
|
+
label: I18n.t("menu.impersonations", scope: "decidim.admin"),
|
66
|
+
url: decidim_admin.impersonatable_users_path
|
67
|
+
}
|
68
|
+
end
|
46
69
|
end
|
47
70
|
end
|
48
71
|
end
|
@@ -12,6 +12,8 @@ module Decidim
|
|
12
12
|
|
13
13
|
helper_method :new_managed_user
|
14
14
|
|
15
|
+
add_breadcrumb_item_from_menu :admin_user_menu
|
16
|
+
|
15
17
|
def index
|
16
18
|
enforce_permission_to :index, :impersonatable_user
|
17
19
|
|
@@ -26,7 +28,7 @@ module Decidim
|
|
26
28
|
private
|
27
29
|
|
28
30
|
def collection
|
29
|
-
@collection ||= current_organization.users.where(admin: false, roles: []).order(created_at: :desc)
|
31
|
+
@collection ||= current_organization.users.not_deleted.not_blocked.where(admin: false, roles: []).order(created_at: :desc)
|
30
32
|
end
|
31
33
|
|
32
34
|
def new_managed_user
|
@@ -7,6 +7,8 @@ module Decidim
|
|
7
7
|
|
8
8
|
layout "decidim/admin/global_moderations"
|
9
9
|
|
10
|
+
before_action :set_moderation_breadcrumb_item
|
11
|
+
|
10
12
|
def index
|
11
13
|
enforce_permission_to :read, :moderate_users
|
12
14
|
|
@@ -46,6 +48,14 @@ module Decidim
|
|
46
48
|
base_query_finder.unblocked
|
47
49
|
end
|
48
50
|
end
|
51
|
+
|
52
|
+
def set_moderation_breadcrumb_item
|
53
|
+
controller_breadcrumb_items << {
|
54
|
+
label: I18n.t("menu.reported_users", scope: "decidim.admin"),
|
55
|
+
url: decidim_admin.moderated_users_path,
|
56
|
+
active: true
|
57
|
+
}
|
58
|
+
end
|
49
59
|
end
|
50
60
|
end
|
51
61
|
end
|
@@ -8,6 +8,8 @@ module Decidim
|
|
8
8
|
|
9
9
|
helper_method :moderations, :allowed_to?, :query, :permission_resource
|
10
10
|
|
11
|
+
before_action :set_moderation_breadcrumb_item
|
12
|
+
|
11
13
|
def index
|
12
14
|
enforce_permission_to :read, permission_resource
|
13
15
|
end
|
@@ -103,6 +105,14 @@ module Decidim
|
|
103
105
|
def permission_resource
|
104
106
|
:moderation
|
105
107
|
end
|
108
|
+
|
109
|
+
def set_moderation_breadcrumb_item
|
110
|
+
controller_breadcrumb_items << {
|
111
|
+
label: I18n.t("menu.content", scope: "decidim.admin"),
|
112
|
+
url: decidim_admin.moderations_path,
|
113
|
+
active: true
|
114
|
+
}
|
115
|
+
end
|
106
116
|
end
|
107
117
|
end
|
108
118
|
end
|
@@ -46,13 +46,16 @@ module Decidim
|
|
46
46
|
respond_to do |format|
|
47
47
|
format.json do
|
48
48
|
if (term = params[:term].to_s).present?
|
49
|
-
query = relation.order(name: :asc)
|
50
49
|
query = if term.start_with?("@")
|
51
|
-
|
50
|
+
nickname = term.delete("@")
|
51
|
+
relation.where("nickname ILIKE ?", "#{nickname}%")
|
52
|
+
.order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("similarity(nickname, '#{nickname}') DESC")))
|
52
53
|
else
|
53
|
-
|
54
|
-
|
54
|
+
relation.where("name ILIKE ?", "%#{term}%").or(
|
55
|
+
relation.where("email ILIKE ?", "%#{term}%")
|
55
56
|
)
|
57
|
+
.order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("GREATEST(similarity(name, '#{term}'), similarity(email, '#{term}')) DESC")))
|
58
|
+
.order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("(similarity(name, '#{term}') + similarity(email, '#{term}')) / 2 DESC")))
|
56
59
|
end
|
57
60
|
render json: query.all.collect { |u| { value: u.id, label: "#{u.name} (@#{u.nickname})" } }
|
58
61
|
else
|
@@ -5,6 +5,8 @@ module Decidim
|
|
5
5
|
class StaticPageTopicsController < Decidim::Admin::ApplicationController
|
6
6
|
include Decidim::Admin::Concerns::HasTabbedMenu
|
7
7
|
|
8
|
+
before_action :set_static_page_topics_breadcrumb_item
|
9
|
+
|
8
10
|
helper_method :topic, :topics
|
9
11
|
|
10
12
|
def index
|
@@ -68,6 +70,14 @@ module Decidim
|
|
68
70
|
|
69
71
|
private
|
70
72
|
|
73
|
+
def set_static_page_topics_breadcrumb_item
|
74
|
+
controller_breadcrumb_items << {
|
75
|
+
label: I18n.t("menu.static_page_topics", scope: "decidim.admin"),
|
76
|
+
url: decidim_admin.static_page_topics_path,
|
77
|
+
active: true
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
71
81
|
def tab_menu_name = :admin_static_pages_menu
|
72
82
|
|
73
83
|
def topic
|
@@ -7,6 +7,8 @@ module Decidim
|
|
7
7
|
class UsersController < Decidim::Admin::ApplicationController
|
8
8
|
include Decidim::Admin::Officializations::Filterable
|
9
9
|
|
10
|
+
add_breadcrumb_item_from_menu :admin_user_menu
|
11
|
+
|
10
12
|
def index
|
11
13
|
enforce_permission_to :read, :admin_user
|
12
14
|
@users = filtered_collection
|
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
class ResourceHiddenEvent < Decidim::Events::SimpleEvent
|
5
|
+
include Decidim::ApplicationHelper
|
6
|
+
|
5
7
|
i18n_attributes :resource_path, :report_reasons, :resource_type, :resource_content
|
6
8
|
|
7
9
|
def resource_path
|
@@ -23,7 +25,9 @@ module Decidim
|
|
23
25
|
end
|
24
26
|
|
25
27
|
def resource_content
|
26
|
-
translated_attribute(@resource[@resource.reported_attributes.first])
|
28
|
+
text = translated_attribute(@resource[@resource.reported_attributes.first])
|
29
|
+
|
30
|
+
decidim_sanitize(html_truncate(text, length: 100), strip_tags: true)
|
27
31
|
end
|
28
32
|
|
29
33
|
def resource_text
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
# This module includes helpers to show admin terms of service
|
6
6
|
module AdminTermsHelper
|
7
7
|
def admin_terms_of_service_body
|
8
|
-
current_organization.admin_terms_of_service_body.
|
8
|
+
decidim_sanitize_admin(translated_attribute(current_organization.admin_terms_of_service_body)).html_safe
|
9
9
|
end
|
10
10
|
|
11
11
|
def announcement_body
|
@@ -53,7 +53,7 @@ module Decidim
|
|
53
53
|
# Produces the html for the dropdown submenu from the options tree.
|
54
54
|
# Returns a ActiveSupport::SafeBuffer.
|
55
55
|
def dropdown_submenu(options)
|
56
|
-
content_tag(:ul, class: "vertical menu") do
|
56
|
+
content_tag(:ul, class: "vertical menu", "aria-hidden": true) do
|
57
57
|
options.map do |key, value|
|
58
58
|
if value.nil?
|
59
59
|
content_tag(:li, key)
|
File without changes
|
@@ -12,8 +12,21 @@ window.Decidim.managedUsersForm = managedUsersForm
|
|
12
12
|
window.Decidim.config = new Configuration()
|
13
13
|
window.Decidim.InputCharacterCounter = InputCharacterCounter;
|
14
14
|
|
15
|
+
// REDESIGN_PENDING: deprecated
|
16
|
+
window.initFoundation = (element) => {
|
17
|
+
$(element).foundation();
|
18
|
+
};
|
19
|
+
|
15
20
|
$(() => {
|
16
|
-
|
21
|
+
window.initFoundation(document);
|
22
|
+
|
23
|
+
$(document).on("show.zf.dropdownMenu", function(event, $element) {
|
24
|
+
$element.attr("aria-hidden", "false");
|
25
|
+
});
|
26
|
+
|
27
|
+
$(document).on("hide.zf.dropdownMenu", function(event, $element) {
|
28
|
+
$element.children(".is-dropdown-submenu").attr("aria-hidden", "true");
|
29
|
+
});
|
17
30
|
|
18
31
|
toggleNav();
|
19
32
|
|
@@ -7,7 +7,9 @@ export default function initLanguageChangeSelect(elements) {
|
|
7
7
|
let targetTabPaneSelector = select.value;
|
8
8
|
let tabsContent = select.parentElement.parentElement.nextElementSibling;
|
9
9
|
|
10
|
+
tabsContent.querySelector(".is-active").ariaHidden = "true";
|
10
11
|
tabsContent.querySelector(".is-active").classList.remove("is-active");
|
12
|
+
tabsContent.querySelector(targetTabPaneSelector).ariaHidden = "false";
|
11
13
|
tabsContent.querySelector(targetTabPaneSelector).classList.add("is-active");
|
12
14
|
})
|
13
15
|
});
|
@@ -10,7 +10,7 @@ import AutoComplete from "src/decidim/autocomplete";
|
|
10
10
|
*/
|
11
11
|
const apiRequest = (query) => {
|
12
12
|
return new Promise((resolve) => {
|
13
|
-
fetch("
|
13
|
+
fetch(window.Decidim.config.get("api_path"), {
|
14
14
|
method: "post",
|
15
15
|
headers: {
|
16
16
|
"Content-Type": "application/json"
|
@@ -32,6 +32,16 @@ li.opens-left > .is-dropdown-submenu {
|
|
32
32
|
display: none;
|
33
33
|
}
|
34
34
|
|
35
|
+
.dropdown.menu ul {
|
36
|
+
&[aria-hidden="true"] {
|
37
|
+
display: none;
|
38
|
+
}
|
39
|
+
|
40
|
+
&[aria-hidden="false"] {
|
41
|
+
display: block;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
35
45
|
.dropdown.menu .nested.is-dropdown-submenu {
|
36
46
|
margin-right: 0;
|
37
47
|
margin-left: 0;
|
@@ -24,16 +24,16 @@
|
|
24
24
|
@apply font-semibold;
|
25
25
|
}
|
26
26
|
|
27
|
+
& .component-counter {
|
28
|
+
@apply ml-auto inline-flex items-center justify-center w-5 h-5 text-xs font-semibold rounded-full bg-background-4 border-secondary;
|
29
|
+
}
|
30
|
+
|
27
31
|
ul {
|
28
32
|
@apply ml-10;
|
29
33
|
|
30
34
|
li {
|
31
35
|
a {
|
32
36
|
@apply px-2 py-1;
|
33
|
-
|
34
|
-
.component-counter {
|
35
|
-
@apply ml-auto inline-flex items-center justify-center w-5 h-5 text-xs font-semibold rounded-full bg-background-4 border-secondary;
|
36
|
-
}
|
37
37
|
}
|
38
38
|
|
39
39
|
&.is-active a {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= cell("decidim/announcement", announcement_body, callout_class: current_user.admin_terms_accepted? ? "success" : "warning" ) %>
|
2
2
|
|
3
3
|
<div class="item_show__header">
|
4
|
-
<
|
4
|
+
<h1 class="item_show__header-title">
|
5
5
|
<%= t("title", scope: "decidim.admin.admin_terms_of_service") %>
|
6
|
-
</
|
6
|
+
</h1>
|
7
7
|
</div>
|
8
8
|
|
9
9
|
<article class="card">
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="item_show__header">
|
3
|
-
<
|
3
|
+
<h1 class="item_show__header-title">
|
4
4
|
<%= t ".title" %>
|
5
|
-
</
|
5
|
+
</h1>
|
6
6
|
</div>
|
7
7
|
<div class="item__edit-form">
|
8
8
|
<%= decidim_form_for(@form, html: { class: "form-defaults form edit_area_type" }) do |f| %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% add_decidim_page_title(t("decidim.admin.titles.area_types")) %>
|
2
2
|
<div class="card" id="area-types">
|
3
3
|
<div class="item_show__header">
|
4
|
-
<
|
4
|
+
<h1 class="item_show__header-title">
|
5
5
|
<%= t "decidim.admin.titles.area_types" %>
|
6
6
|
<% if allowed_to? :create, :area_type %>
|
7
7
|
<%= link_to t("actions.add", scope: "decidim.admin"), [:new, :area_type], class: "button button__sm button__secondary new" %>
|
8
8
|
<% end %>
|
9
|
-
</
|
9
|
+
</h1>
|
10
10
|
</div>
|
11
11
|
<div class="table-scroll">
|
12
12
|
<table class="table-list">
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="item_show__header">
|
3
|
-
<
|
3
|
+
<h1 class="item_show__header-title">
|
4
4
|
<%= t ".title" %>
|
5
|
-
</
|
5
|
+
</h1>
|
6
6
|
</div>
|
7
7
|
<div class="item__edit-form">
|
8
8
|
<%= decidim_form_for(@form, html: { class: "form-defaults form new_area_type" }) do |f| %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="item_show__header">
|
3
|
-
<
|
3
|
+
<h1 class="item_show__header-title">
|
4
4
|
<%= t ".title" %>
|
5
|
-
</
|
5
|
+
</h1>
|
6
6
|
</div>
|
7
7
|
<div class="item__edit-form">
|
8
8
|
<%= decidim_form_for(@form, html: { class: "form-defaults form edit_area_" }) do |f| %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% add_decidim_page_title(t("areas", scope: "decidim.admin.titles")) %>
|
2
2
|
<div class="card" id="areas">
|
3
3
|
<div class="item_show__header">
|
4
|
-
<
|
4
|
+
<h1 class="item_show__header-title">
|
5
5
|
<%= t "decidim.admin.titles.areas" %>
|
6
6
|
<% if allowed_to? :create, :area %>
|
7
7
|
<%= link_to t("actions.add", scope: "decidim.admin"), new_area_path, class: "button button__sm button__secondary new" %>
|
8
8
|
<% end %>
|
9
|
-
</
|
9
|
+
</h1>
|
10
10
|
</div>
|
11
11
|
<% if @areas.any? %>
|
12
12
|
<div class="table-scroll">
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="item_show__header">
|
3
|
-
<
|
3
|
+
<h1 class="item_show__header-title">
|
4
4
|
<%= t ".title" %>
|
5
|
-
</
|
5
|
+
</h1>
|
6
6
|
</div>
|
7
7
|
<div class="item__edit-form">
|
8
8
|
<%= decidim_form_for(@form, url: areas_path, html: { class: "form-defaults form new_area_" }) do |f| %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% add_decidim_page_title(t("attachment_collections.edit.title", scope: "decidim.admin")) %>
|
2
2
|
|
3
3
|
<div class="item_show__header">
|
4
|
-
<
|
4
|
+
<h1 class="item_show__header-title">
|
5
5
|
<%= t("attachment_collections.edit.title", scope: "decidim.admin") %>
|
6
|
-
</
|
6
|
+
</h1>
|
7
7
|
</div>
|
8
8
|
|
9
9
|
<div class="item__edit item__edit-1col">
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% add_decidim_page_title(t("attachment_collections.index.attachment_collections_title", scope: "decidim.admin")) %>
|
2
2
|
<div class="card" id="attachment_collections">
|
3
3
|
<div class="item_show__header">
|
4
|
-
<
|
4
|
+
<h1 class="item_show__header-title">
|
5
5
|
<%= t("attachment_collections.index.attachment_collections_title", scope: "decidim.admin") %>
|
6
6
|
<% if allowed_to? :create, :attachment_collection %>
|
7
7
|
<%= link_to t("actions.attachment_collection.new", scope: "decidim.admin"), url_for(action: :new), class: "button button__sm button__secondary new" %>
|
8
8
|
<% end %>
|
9
|
-
</
|
9
|
+
</h1>
|
10
10
|
</div>
|
11
11
|
<% if collection_for.attachment_collections.any? %>
|
12
12
|
<div class="table-scroll">
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% add_decidim_page_title(t("attachment_collections.new.title", scope: "decidim.admin")) %>
|
2
2
|
<div class="item_show__header">
|
3
|
-
<
|
3
|
+
<h1 class="item_show__header-title">
|
4
4
|
<%= t("attachment_collections.new.title", scope: "decidim.admin") %>
|
5
|
-
</
|
5
|
+
</h1>
|
6
6
|
</div>
|
7
7
|
|
8
8
|
<div class="item__edit item__edit-1col">
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% add_decidim_page_title(t(".attachments_title")) %>
|
2
2
|
<div class="card" id="attachments">
|
3
3
|
<div class="item_show__header">
|
4
|
-
<
|
4
|
+
<h1 class="item_show__header-title">
|
5
5
|
<%= t(".attachments_title") %>
|
6
6
|
<% if allowed_to? :create, :attachment %>
|
7
7
|
<%= link_to t("actions.attachment.new", scope: "decidim.admin"), url_for(action: :new), class: "button button__sm button__secondary new" %>
|
8
8
|
<% end %>
|
9
|
-
</
|
9
|
+
</h1>
|
10
10
|
</div>
|
11
11
|
<%= cell("decidim/admin/attachments_privacy_warning", attached_to.attachments) %>
|
12
12
|
<% if attached_to.attachments.any? %>
|