decidim-admin 0.27.6 → 0.27.7
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: 89af8ec67ceb6341a006d36411a053aeb1ddfe47cf8b87dfa01fa06d61c34305
|
4
|
+
data.tar.gz: 3c780a0d891e04f13f982a08ef8681506337333c863f9f4fdbac5a88097cff49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36629e02f1ddaa454e8e5c0ee531a3067782c4f90c21d00b981ff4a81a27c633a09c88b98a6ac89d4e69837b3f59a7d76a44c1c5295f74ce11870be5162d57f3
|
7
|
+
data.tar.gz: dd3651f270e9db52fb99a06d2a288cab0fb330ed1a860e722f5f3070e264f7f48a077d5a2d37fb15e8b7daefa5199e62e5e424e54ebf5299d41f23746f6abd9c
|
@@ -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
|