decidim-admin 0.28.1 → 0.28.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/decidim/admin/authorization_workflows_controller.rb +3 -1
  3. data/app/controllers/decidim/admin/organization_controller.rb +7 -4
  4. data/app/packs/src/decidim/admin/application.js +6 -1
  5. data/app/packs/src/decidim/admin/choose_language.js +2 -0
  6. data/app/packs/src/decidim/admin/dynamic_fields.component.js +2 -1
  7. data/app/views/decidim/admin/shared/_js-callout.html.erb +2 -2
  8. data/app/views/layouts/decidim/admin/_sidebar_menu.html.erb +2 -2
  9. data/config/locales/ar.yml +1 -0
  10. data/config/locales/bg.yml +1000 -3
  11. data/config/locales/ca.yml +2 -0
  12. data/config/locales/cs.yml +2 -0
  13. data/config/locales/de.yml +10 -8
  14. data/config/locales/el.yml +1 -0
  15. data/config/locales/en.yml +2 -0
  16. data/config/locales/es-MX.yml +9 -7
  17. data/config/locales/es-PY.yml +9 -7
  18. data/config/locales/es.yml +18 -16
  19. data/config/locales/eu.yml +2 -0
  20. data/config/locales/fi-plain.yml +2 -0
  21. data/config/locales/fi.yml +2 -0
  22. data/config/locales/fr-CA.yml +2 -0
  23. data/config/locales/fr.yml +2 -0
  24. data/config/locales/ga-IE.yml +1 -0
  25. data/config/locales/gl.yml +1 -0
  26. data/config/locales/hu.yml +1 -0
  27. data/config/locales/id-ID.yml +1 -0
  28. data/config/locales/is-IS.yml +1 -0
  29. data/config/locales/it.yml +2 -0
  30. data/config/locales/ja.yml +2 -0
  31. data/config/locales/lb.yml +1 -0
  32. data/config/locales/lt.yml +2 -0
  33. data/config/locales/lv.yml +1 -0
  34. data/config/locales/nl.yml +1 -0
  35. data/config/locales/no.yml +1 -0
  36. data/config/locales/pl.yml +3 -0
  37. data/config/locales/pt-BR.yml +1 -0
  38. data/config/locales/pt.yml +1 -0
  39. data/config/locales/ro-RO.yml +1 -0
  40. data/config/locales/ru.yml +1 -0
  41. data/config/locales/sk.yml +1 -0
  42. data/config/locales/sl.yml +1 -0
  43. data/config/locales/sq-AL.yml +413 -0
  44. data/config/locales/sr-CS.yml +1 -0
  45. data/config/locales/sv.yml +1 -0
  46. data/config/locales/th-TH.yml +101 -0
  47. data/config/locales/tr-TR.yml +1 -0
  48. data/config/locales/uk.yml +1 -0
  49. data/config/locales/zh-CN.yml +1 -0
  50. data/config/locales/zh-TW.yml +2 -0
  51. data/lib/decidim/admin/test/admin_participatory_space_access_examples.rb +27 -0
  52. data/lib/decidim/admin/test/invite_participatory_space_admins_shared_examples.rb +180 -0
  53. data/lib/decidim/admin/test/invite_participatory_space_collaborators_shared_examples.rb +67 -0
  54. data/lib/decidim/admin/test/invite_participatory_space_moderators_shared_examples.rb +77 -0
  55. data/lib/decidim/admin/test/invite_participatory_space_users_shared_context.rb +33 -0
  56. data/lib/decidim/admin/test/manage_attachment_collections_examples.rb +12 -11
  57. data/lib/decidim/admin/test/manage_categories_examples.rb +11 -8
  58. data/lib/decidim/admin/test/manage_hide_content_examples.rb +4 -0
  59. data/lib/decidim/admin/test.rb +1 -0
  60. data/lib/decidim/admin/version.rb +1 -1
  61. metadata +16 -13
  62. 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: 5cf03aeb983e0ddb8c344dbe1f8b8d21f7fbdfbd2a0f0c75f2ca76010320dd77
4
- data.tar.gz: 91db438a29f5e05315b436f3b1cf96d0d0b2ad6fa03f4ec5955f30605fd99f12
3
+ metadata.gz: 75ccdc4a2f091d223bff9fa56f75347e91c6d8752bfba25eaf0a758191d705c0
4
+ data.tar.gz: f451da89da78adc0809dd9fee4af0f87761870f5cbb8eee8cc9c20868dc9b023
5
5
  SHA512:
6
- metadata.gz: 8fa198551d57ea25461ecd2e86a0f7aae31f4b3e67151ed8e952ed4e91bcfb088c460ebde206520b83c7d13e5ab478b510d5eb6b9fe8e870ef1df2fe92f14cb4
7
- data.tar.gz: cb21f050e6fa924f96579bd440058c7290d2ca29a6a4501e22a3b10c6b5199aa39b686e153e03a32aef78c80cc4c0d9c07746d00bc67656aeb56ba862e3a29c7
6
+ metadata.gz: 11998db7b9f88af5bef0396a5adb179a9495a8acb21e80b55f9a2e3257557356a5c414039016cf826e06a16e1e6fb5adcbe4e36830000beff84ee9c1abd41852
7
+ data.tar.gz: 5fbf7d4e81e2fd1a366310eb5dbfd1d6aad2473d3d54af70ef1e6a095739468c8c0cf6e17df1208d6829af345fe52b4aa713d5abb7443f8da15fb63ae44ba929
@@ -10,7 +10,9 @@ module Decidim
10
10
  def index
11
11
  enforce_permission_to :index, :authorization_workflow
12
12
 
13
- @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
14
16
 
15
17
  # Decidim::Verifications::Authorizations Query
16
18
  @authorizations = Decidim::Verifications::Authorizations.new(
@@ -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
- query.where("nickname ILIKE ?", "#{term.delete("@")}%")
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
- query.where("name ILIKE ?", "%#{term}%").or(
54
- query.where("email ILIKE ?", "%#{term}%")
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
@@ -12,8 +12,13 @@ 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
- $(document).foundation();
21
+ window.initFoundation(document);
17
22
 
18
23
  $(document).on("show.zf.dropdownMenu", function(event, $element) {
19
24
  $element.attr("aria-hidden", "false");
@@ -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
  });
@@ -159,7 +159,8 @@ class DynamicFieldsComponent {
159
159
  $newField.appendTo($container);
160
160
  }
161
161
 
162
- $newField.foundation();
162
+ // REDESIGN_PENDING: deprecated
163
+ window.initFoundation($newField);
163
164
 
164
165
  if (this.onAddField) {
165
166
  this.onAddField($newField);
@@ -1,7 +1,7 @@
1
1
  <div class="flash <%= css %>" data-closable>
2
- <span class="flash__message">
2
+ <div class="flash__message">
3
3
  <%= text %>
4
- </span>
4
+ </div>
5
5
  <button class="close-button" type="button" data-close="">
6
6
  <span aria-hidden="true">×</span>
7
7
  </button>
@@ -5,13 +5,13 @@
5
5
  <div class="hidden md:block">
6
6
  <%= sidebar_menu(secondary_root_menu).render %>
7
7
  </div>
8
- <button data-component="dropdown" data-target="dropdown-menu-sidebar" data-auto-close="true" data-disabled-md="true" data-scroll-to-menu="true">
8
+ <button data-component="dropdown" data-target="dropdown-menu-sidebar" data-auto-close="true" data-scroll-to-menu="true">
9
9
  <span><%= t("menu", scope: "decidim.admin.titles") %></span>
10
10
  <%= icon "arrow-down-s-line" %>
11
11
  <%= icon "arrow-up-s-line" %>
12
12
  </button>
13
13
 
14
- <ul id="dropdown-menu-sidebar" class="md:hidden">
14
+ <ul id="dropdown-menu-sidebar" class="md:hidden" aria-hidden="true">
15
15
  <%= sidebar_menu(secondary_root_menu).render %>
16
16
  </ul>
17
17
  </div>
@@ -150,6 +150,7 @@ ar:
150
150
  new: فئة جديدة
151
151
  export: تصدير الكل
152
152
  import: استيراد
153
+ manage: تدبير
153
154
  newsletter:
154
155
  new: رسالة إخبارية جديدة
155
156
  per_page: في كل صفحة