decidim-admin 0.27.6 → 0.27.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/decidim/admin/authorization_workflows_controller.rb +3 -1
- data/app/controllers/decidim/admin/impersonations_controller.rb +1 -0
- data/app/controllers/decidim/admin/organization_controller.rb +7 -4
- data/config/locales/bg.yml +833 -3
- data/config/locales/de.yml +9 -9
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/es.yml +2 -2
- data/config/locales/pl.yml +1 -0
- data/config/locales/sq-AL.yml +412 -0
- data/config/locales/th-TH.yml +100 -0
- data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +15 -14
- data/lib/decidim/admin/test/manage_attachments_examples.rb +3 -3
- data/lib/decidim/admin/test/manage_categories_examples.rb +12 -9
- data/lib/decidim/admin/test/manage_moderations_examples.rb +0 -9
- data/lib/decidim/admin/version.rb +1 -1
- metadata +12 -13
- data/app/mailers/decidim/admin/application_mailer.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05b4e853053e19c294d34bac72798acf0348feebae52ec2955d373bc939ed911
|
4
|
+
data.tar.gz: b89597557e962de240a917069ac429743d7a4554e3585379d58be7458e700c66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a01b4503098fdcdf58c01614b1820bbd481078d8de1b1dc75f3e29bce3096434c06f78a790e26e2bdad821e4fdd0bc35f33d81c6ca93ea2fb5fb1ce2527b4cb
|
7
|
+
data.tar.gz: 96838c254ea3d1d73b5b8d7d89d60cd684783b4a839d4a090e0ed52e6cfa57ccf3e57ecc6d6bbf6e1ae9a14b4efc2dae0d5249da6a3527bc551a38efa82367c7
|
@@ -8,7 +8,9 @@ module Decidim
|
|
8
8
|
def index
|
9
9
|
enforce_permission_to :index, :authorization_workflow
|
10
10
|
|
11
|
-
@workflows = Decidim::Verifications.admin_workflows
|
11
|
+
@workflows = Decidim::Verifications.admin_workflows.select do |manifest|
|
12
|
+
current_organization.available_authorizations.include?(manifest.name.to_s)
|
13
|
+
end
|
12
14
|
|
13
15
|
# Decidim::Verifications::Authorizations Query
|
14
16
|
@authorizations = Decidim::Verifications::Authorizations.new(
|
@@ -44,13 +44,16 @@ module Decidim
|
|
44
44
|
respond_to do |format|
|
45
45
|
format.json do
|
46
46
|
if (term = params[:term].to_s).present?
|
47
|
-
query = relation.order(name: :asc)
|
48
47
|
query = if term.start_with?("@")
|
49
|
-
|
48
|
+
nickname = term.delete("@")
|
49
|
+
relation.where("nickname ILIKE ?", "#{nickname}%")
|
50
|
+
.order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("similarity(nickname, '#{nickname}') DESC")))
|
50
51
|
else
|
51
|
-
|
52
|
-
|
52
|
+
relation.where("name ILIKE ?", "%#{term}%").or(
|
53
|
+
relation.where("email ILIKE ?", "%#{term}%")
|
53
54
|
)
|
55
|
+
.order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("GREATEST(similarity(name, '#{term}'), similarity(email, '#{term}')) DESC")))
|
56
|
+
.order(Arel.sql(ActiveRecord::Base.sanitize_sql_array("(similarity(name, '#{term}') + similarity(email, '#{term}')) / 2 DESC")))
|
54
57
|
end
|
55
58
|
render json: query.all.collect { |u| { value: u.id, label: "#{u.name} (@#{u.nickname})" } }
|
56
59
|
else
|