activeadmin 4.0.0.beta15 → 4.0.0.beta17

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.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/UPGRADING.md +14 -5
  4. data/app/controllers/active_admin/resource_controller/data_access.rb +1 -1
  5. data/app/controllers/active_admin/resource_controller/streaming.rb +3 -3
  6. data/app/helpers/active_admin/form_helper.rb +1 -1
  7. data/app/views/active_admin/_flash_messages.html.erb +4 -4
  8. data/app/views/active_admin/_site_header.html.erb +4 -4
  9. data/app/views/active_admin/devise/confirmations/new.html.erb +1 -1
  10. data/app/views/active_admin/devise/passwords/edit.html.erb +1 -1
  11. data/app/views/active_admin/devise/passwords/new.html.erb +1 -1
  12. data/app/views/active_admin/devise/registrations/new.html.erb +1 -1
  13. data/app/views/active_admin/devise/sessions/new.html.erb +1 -1
  14. data/app/views/active_admin/devise/unlocks/new.html.erb +1 -1
  15. data/app/views/active_admin/kaminari/_gap.html.erb +1 -1
  16. data/app/views/active_admin/page/index.html.arb +1 -2
  17. data/app/views/active_admin/resource/_form.html.arb +0 -1
  18. data/app/views/active_admin/resource/_form_default.html.arb +0 -1
  19. data/app/views/active_admin/resource/_index_as_table_default.html.arb +0 -1
  20. data/app/views/active_admin/resource/_show_default.html.arb +0 -1
  21. data/app/views/active_admin/resource/edit.html.arb +0 -1
  22. data/app/views/active_admin/resource/index.html.arb +0 -1
  23. data/app/views/active_admin/resource/new.html.arb +0 -1
  24. data/app/views/active_admin/resource/show.html.arb +0 -1
  25. data/app/views/active_admin/shared/_resource_comments.html.erb +1 -1
  26. data/app/views/active_admin/shared/_sidebar_section.html.arb +0 -1
  27. data/app/views/layouts/active_admin.html.erb +1 -1
  28. data/config/importmap.rb +2 -2
  29. data/config/locales/ar.yml +135 -133
  30. data/config/locales/az.yml +103 -102
  31. data/config/locales/bg.yml +91 -90
  32. data/config/locales/bs.yml +95 -94
  33. data/config/locales/ca.yml +129 -128
  34. data/config/locales/cs.yml +82 -81
  35. data/config/locales/da.yml +102 -101
  36. data/config/locales/de.yml +130 -129
  37. data/config/locales/el.yml +94 -93
  38. data/config/locales/en-CA.yml +104 -103
  39. data/config/locales/en-GB.yml +104 -103
  40. data/config/locales/en.yml +134 -132
  41. data/config/locales/eo.yml +107 -106
  42. data/config/locales/es-MX.yml +70 -69
  43. data/config/locales/es.yml +129 -128
  44. data/config/locales/fa.yml +91 -90
  45. data/config/locales/fi.yml +84 -83
  46. data/config/locales/fr.yml +135 -124
  47. data/config/locales/he.yml +103 -102
  48. data/config/locales/hr.yml +95 -94
  49. data/config/locales/hu.yml +76 -75
  50. data/config/locales/id.yml +97 -96
  51. data/config/locales/it.yml +134 -132
  52. data/config/locales/ja.yml +109 -108
  53. data/config/locales/ko.yml +134 -132
  54. data/config/locales/lt.yml +106 -105
  55. data/config/locales/lv.yml +70 -69
  56. data/config/locales/mk.yml +100 -99
  57. data/config/locales/nb.yml +98 -97
  58. data/config/locales/nl.yml +113 -112
  59. data/config/locales/pl.yml +137 -136
  60. data/config/locales/pt-BR.yml +134 -105
  61. data/config/locales/pt-PT.yml +71 -70
  62. data/config/locales/ro.yml +74 -73
  63. data/config/locales/ru.yml +141 -140
  64. data/config/locales/sk.yml +131 -130
  65. data/config/locales/sv-SE.yml +126 -125
  66. data/config/locales/tr.yml +105 -104
  67. data/config/locales/uk.yml +140 -103
  68. data/config/locales/vi.yml +125 -124
  69. data/config/locales/zh-CN.yml +135 -133
  70. data/config/locales/zh-TW.yml +135 -133
  71. data/lib/active_admin/application.rb +2 -2
  72. data/lib/active_admin/batch_actions/resource_extension.rb +1 -1
  73. data/lib/active_admin/csv_builder.rb +1 -1
  74. data/lib/active_admin/dsl.rb +1 -1
  75. data/lib/active_admin/filters/active.rb +1 -1
  76. data/lib/active_admin/filters/active_filter.rb +1 -7
  77. data/lib/active_admin/filters/forms.rb +0 -3
  78. data/lib/active_admin/filters/resource_extension.rb +1 -1
  79. data/lib/active_admin/form_builder.rb +0 -4
  80. data/lib/active_admin/helpers/optional_display.rb +1 -1
  81. data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
  82. data/lib/active_admin/inputs/filters/select_input.rb +1 -3
  83. data/lib/active_admin/resource/action_items.rb +2 -2
  84. data/lib/active_admin/resource/belongs_to.rb +0 -1
  85. data/lib/active_admin/resource/naming.rb +1 -1
  86. data/lib/active_admin/resource.rb +1 -1
  87. data/lib/active_admin/resource_collection.rb +1 -1
  88. data/lib/active_admin/resource_dsl.rb +2 -2
  89. data/lib/active_admin/version.rb +1 -1
  90. data/lib/active_admin/view_helpers/method_or_proc_helper.rb +1 -1
  91. data/lib/active_admin/views/components/attributes_table.rb +8 -3
  92. data/lib/active_admin/views/components/table_for.rb +1 -1
  93. data/lib/active_admin/views/index_as_table.rb +7 -2
  94. data/plugin.js +46 -181
  95. data/vendor/javascript/flowbite.js +1 -1
  96. metadata +8 -12
  97. data/lib/active_admin/views/components/tabs.rb +0 -40
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c171428850e5fab8af1e553c56c973d18dab2b7f91e02c07e327f1a919fd09bb
4
- data.tar.gz: bde954565901b45c90a715451deb0c76c71e449d1cc72263ddbdb11be4de8665
3
+ metadata.gz: b1d53a8406a4e9dbe404b083ed90ee235be6620b0f5cf9d41366f64f2dccec89
4
+ data.tar.gz: ab337381ccd99bd305a5a0324102418be8a6fc5466f73053bbb3e0107df630b2
5
5
  SHA512:
6
- metadata.gz: 7a6fb3316ae2c992190d4af4b760cc4fe58a02370346eb75e31457fa597effea6fff4193c57e129393d214cb9345646236fa619eb8f541138dd754fe7927d9cb
7
- data.tar.gz: c91b6faf65562a1157fc208e115a94968aa23e1998366cdd940656ff1e2dfac4f4b352c560764d3a38b8349bc02ec7c4e5ab888b2a2d3c608a63b82c88ede8ff
6
+ metadata.gz: 29c1dd8f8d79b25e9bda233a6592fd12fdc5a7456482ef819c145ef2c13aff3f9b3220d3d9cb56c397800b558e5e4361e43b3e6e07dd5ebb068a2a0c1a3770c6
7
+ data.tar.gz: 840e5a7548b7d299c61406573f16e44b51cedb4e79157a2ed85731b16118a759db12466cdaa9a35f315a6dc9fc5343652d79a9f55429bbcd44310dcc32925c42
data/README.md CHANGED
@@ -55,7 +55,7 @@ We try not to reinvent the wheel, so Active Admin is built with other open sourc
55
55
  * [Inherited Resources]
56
56
  * [Kaminari]
57
57
  * [Ransack]
58
- * [TailwindCSS](https://tailwindcss.com)
58
+ * [Tailwind CSS](https://tailwindcss.com)
59
59
 
60
60
  ## Security contact information
61
61
 
data/UPGRADING.md CHANGED
@@ -2,20 +2,19 @@
2
2
 
3
3
  ## From v3 to v4 (beta)
4
4
 
5
- ActiveAdmin v4 uses TailwindCSS. It has **mobile web, dark mode and RTL support** with a default theme that can be customized through partials and CSS. This release assumes `cssbundling-rails` and `importmap-rails` is installed and configured in the host app. Partials can be modified to include a different asset library, e.g. shakapacker.
6
-
5
+ ActiveAdmin v4 uses Tailwind CSS v3 (with an upgrade to v4 coming soon). It has **mobile web, dark mode and RTL support** with a default theme that can be customized through partials and CSS. This release assumes `cssbundling-rails` and `importmap-rails` is installed and configured in the host app. Partials can be modified to include a different asset library, e.g. shakapacker.
7
6
  **IMPORTANT**: there is **no sortable functionality for has-many forms** in this release so if needed, **do not upgrade**. We are [open to community proposals](https://github.com/activeadmin/activeadmin/discussions/new?category=ideas). The add/remove functionality for has-many forms remains supported.
8
7
 
9
8
  These instructions assume the `cssbundling-rails` and `importmap-rails` gems are already installed and you have run their install commands in your app. If you haven't done so, please do before continuing.
10
9
 
11
- Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta15"` and then run `gem install activeadmin --pre`.
10
+ Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta17"` and then run `gem install activeadmin --pre`.
12
11
 
13
12
  Now, run `rails generate active_admin:assets` to replace the old assets with the new files.
14
13
 
15
14
  Then add the npm package and update the `build:css` script.
16
15
 
17
16
  ```
18
- yarn add @activeadmin/activeadmin@4.0.0-beta15
17
+ yarn add @activeadmin/activeadmin@4.0.0-beta17
19
18
  npm pkg set scripts.build:css="tailwindcss -i ./app/assets/stylesheets/active_admin.css -o ./app/assets/builds/active_admin.css --minify -c tailwind-active_admin.config.js"
20
19
  ```
21
20
 
@@ -47,6 +46,13 @@ Note that the templates can and will change across releases. There are additiona
47
46
 
48
47
  With the setup complete, please review the Breaking Changes section and resolve any that may or may not impact your integration.
49
48
 
49
+ **Important template change in 4.0.0.beta16:**
50
+
51
+ - The `_site_header.html.erb` partial has changed its main container class from `sticky` to `fixed`.
52
+ - The main layout for `active_admin.html.erb` now includes the `pt-16` utility class.
53
+
54
+ See [PR #8727](https://github.com/activeadmin/activeadmin/pull/8727) for more details.
55
+
50
56
  ### Breaking Changes
51
57
  - jQuery and jQuery UI have been removed.
52
58
  - The `columns` component has been removed. Use `div`'s with Tailwind classes for modern, responsive layout.
@@ -75,6 +81,7 @@ With the setup complete, please review the Breaking Changes section and resolve
75
81
  Using Tailwind modifiers you can further customize the number of columns for responsive/mobile support.
76
82
  </details>
77
83
 
84
+ - The `tabs` component has been removed. Use a CSS based or third party alternative.
78
85
  - Replace `default_main_content` with `render "show_default"`.
79
86
 
80
87
  <details>
@@ -151,6 +158,7 @@ With the setup complete, please review the Breaking Changes section and resolve
151
158
  end
152
159
  ```
153
160
  </details>
161
+ - Using `row 'name'` in an `attributes_table` block, now prints the header text as is. For a localized lookup of the header with titlized fallback, use `row :name` instead. This matches the `column 'name'` behavior of index tables (`TableFor`).
154
162
 
155
163
  #### Resource named methods
156
164
 
@@ -188,7 +196,7 @@ Note that `@post` can also be used here but make sure to call `authorize!` on it
188
196
 
189
197
  ### Localization Updates
190
198
 
191
- This release includes several locale changes. Please [reivew the en.yml locale](https://github.com/activeadmin/activeadmin/blob/master/config/locales/en.yml) for the latest translations.
199
+ This release includes several locale changes. Please [review the en.yml locale](https://github.com/activeadmin/activeadmin/blob/master/config/locales/en.yml) for the latest translations.
192
200
 
193
201
  - The `dashboard_welcome`, `dropdown_actions`, `main_content` and `unsupported_browser` keys have been removed.
194
202
  - The `active_admin.pagination` keys have been rewritten to be less verbose and include new entries: next and previous.
@@ -225,3 +233,4 @@ This release includes several locale changes. Please [reivew the en.yml locale](
225
233
  - The `comments.delete_confirmation` text has been fixed to use singular form.
226
234
  - Inconsistent use of login/sign-in related terms so text now uses "Sign in", Sign out", and "Sign up" throughout.
227
235
  - The `toggle_dark_mode`, `toggle_main_navigation_menu`, `toggle_section`, and `toggle_user_menu` keys have been added.
236
+ - The `batch_actions.succesfully_destroyed` key has been renamed to `batch_actions.successfully_destroyed` to fix a typo.
@@ -236,7 +236,7 @@ module ActiveAdmin
236
236
 
237
237
  def apply_includes(chain)
238
238
  if active_admin_config.includes.any?
239
- chain.includes *active_admin_config.includes
239
+ chain.includes(*active_admin_config.includes)
240
240
  else
241
241
  chain
242
242
  end
@@ -26,18 +26,18 @@ module ActiveAdmin
26
26
  if ActiveAdmin.application.disable_streaming_in.include? Rails.env
27
27
  self.response_body = block[String.new] # rubocop:disable Performance/UnfreezeString to preserve encoding
28
28
  else
29
- self.response_body = Enumerator.new &block
29
+ self.response_body = Enumerator.new(&block)
30
30
  end
31
31
  end
32
32
 
33
33
  def csv_filename
34
- "#{resource_collection_name.to_s.tr('_', '-')}-#{Time.zone.now.to_date.to_s}.csv"
34
+ "#{resource_collection_name.to_s.tr('_', '-')}-#{Time.zone.now.to_date}.csv"
35
35
  end
36
36
 
37
37
  def stream_csv
38
38
  headers["Content-Type"] = "text/csv; charset=utf-8" # In Rails 5 it's set to HTML??
39
39
  headers["Content-Disposition"] = %{attachment; filename="#{csv_filename}"}
40
- stream_resource &active_admin_config.csv_builder.method(:build).to_proc.curry[self]
40
+ stream_resource(&active_admin_config.csv_builder.method(:build).to_proc.curry[self])
41
41
  end
42
42
 
43
43
  end
@@ -29,7 +29,7 @@ module ActiveAdmin
29
29
  #
30
30
  def fields_for_params(params, options = {})
31
31
  namespace = options[:namespace]
32
- except = Array.wrap(options[:except]).map &:to_s
32
+ except = Array.wrap(options[:except]).map(&:to_s)
33
33
 
34
34
  params.flat_map do |k, v|
35
35
  next if namespace.nil? && RESERVED_PARAMS.include?(k.to_s)
@@ -3,17 +3,17 @@
3
3
  <% flash_messages.each do |type, message| %>
4
4
  <% if type == "error" %>
5
5
  <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-red-50 text-red-800 dark:bg-red-800 dark:text-red-300">
6
- <svg class="w-5 h-5 shrink-0" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/></svg>
6
+ <svg class="w-5 h-5 shrink-0 text-red-400 dark:text-red-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/></svg>
7
7
  <%= message %>
8
8
  </div>
9
9
  <% elsif type == "alert" %>
10
10
  <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-yellow-50 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-300">
11
- <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/></svg>
11
+ <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100 text-yellow-400 dark:text-yellow-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/></svg>
12
12
  <%= message %>
13
13
  </div>
14
14
  <% elsif type == "notice" %>
15
- <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-green-50 text-green-800 dark:bg-green-800 dark:text-green-400">
16
- <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"/></svg>
15
+ <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-green-50 text-green-800 dark:bg-green-800 dark:text-green-300">
16
+ <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100 text-green-400 dark:text-green-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"/></svg>
17
17
  <%= message %>
18
18
  </div>
19
19
  <% end %>
@@ -1,4 +1,4 @@
1
- <div class="border-b border-gray-200 dark:border-white/10 dark:bg-gray-950/75 px-4 py-2 flex items-center sticky top-0 z-20 h-16 w-full backdrop-blur-md">
1
+ <div class="border-b border-gray-200 dark:border-white/10 dark:bg-gray-950/75 px-4 py-2 flex items-center fixed top-0 z-20 h-16 w-full backdrop-blur-md">
2
2
  <button class="xl:hidden pe-3 inline-flex items-center w-8 h-8 justify-center text-sm text-gray-500 dark:text-gray-400 focus-visible:outline-none focus-visible:ring-ring focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0" data-drawer-target="main-menu" data-drawer-show="main-menu" aria-controls="main-menu" aria-label="<%= t('active_admin.toggle_main_navigation_menu') %>">
3
3
  <svg class="w-5 h-5 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"/></svg>
4
4
  </button>
@@ -18,11 +18,11 @@
18
18
  <svg class="w-7 h-7" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"/></svg>
19
19
  </button>
20
20
 
21
- <div id="user-menu" class="z-50 hidden min-w-max bg-white rounded shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-700 py-1 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="user-menu-button">
21
+ <div id="user-menu" class="z-50 hidden min-w-max rounded shadow-lg outline outline-1 outline-black/5 dark:-outline-offset-1 dark:outline-white/10 focus:outline-none py-1 text-sm bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300" aria-labelledby="user-menu-button">
22
22
  <ul>
23
23
  <% if current_active_admin_user? %>
24
- <li><%= auto_link current_active_admin_user, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white" %></li>
25
- <li><%= link_to I18n.t("active_admin.logout"), auto_logout_link_path, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white", data: { method: :delete } %></li>
24
+ <li><%= auto_link current_active_admin_user, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white" %></li>
25
+ <li><%= link_to I18n.t("active_admin.logout"), auto_logout_link_path, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white", data: { method: :delete } %></li>
26
26
  <% end %>
27
27
  </ul>
28
28
  </div>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.resend_confirmation_instructions.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.change_password.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.reset_password.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.sign_up.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= site_title %> <%= set_page_title t('active_admin.devise.login.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= site_title %> <%= set_page_title t('active_admin.devise.unlock.title') %>
4
4
  </h2>
@@ -6,5 +6,5 @@
6
6
  remote: data-remote
7
7
  -%>
8
8
  <span class="flex items-center justify-center px-2.5 py-3 h-8 leading-tight text-gray-500 dark:text-gray-400">
9
- <%= t('views.pagination.truncate').html_safe %>
9
+ <%= t('active_admin.pagination.truncate').html_safe %>
10
10
  </span>
@@ -1,6 +1,5 @@
1
- # frozen_string_literal: true
2
1
  div class: "main-content-container" do
3
2
  if page_presenter.block
4
- instance_exec &page_presenter.block
3
+ instance_exec(&page_presenter.block)
5
4
  end
6
5
  end
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  div class: "main-content-container" do
3
2
  if page_presenter.block
4
3
  options = {
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  options = {
3
2
  url: resource.persisted? ? resource_path(resource) : collection_path,
4
3
  as: active_admin_config.param_key
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  insert_tag(ActiveAdmin::Views::IndexAsTable::IndexTableFor, collection, table_options) do |t|
3
2
  selectable_column
4
3
  id_column if resource_class.primary_key
@@ -1,3 +1,2 @@
1
- # frozen_string_literal: true
2
1
  attributes_table_for(resource, *active_admin_config.resource_columns)
3
2
  active_admin_comments_for(resource) if active_admin_config.comments?
@@ -1,2 +1 @@
1
- # frozen_string_literal: true
2
1
  render "form"
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  def wrap_with_batch_action_form(&block)
3
2
  if active_admin_config.batch_actions.any?
4
3
  insert_tag(ActiveAdmin::BatchActions::BatchActionForm, &block)
@@ -1,2 +1 @@
1
- # frozen_string_literal: true
2
1
  render "form"
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  def attributes_table(*args, &block)
3
2
  attributes_table_for resource, *args, &block
4
3
  end
@@ -25,7 +25,7 @@
25
25
  <span class="font-semibold">
26
26
  <%= comment.author ? auto_link(comment.author) : I18n.t("active_admin.comments.author_missing") %>
27
27
  </span>
28
- <span class="text-xs text-gray-400">
28
+ <span class="text-xs text-gray-500 dark:text-gray-400">
29
29
  <%= pretty_format comment.created_at %>
30
30
  </span>
31
31
  </div>
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  if section.block
3
2
  result = instance_exec(&section.block)
4
3
  text_node result unless result.is_a?(Arbre::Element)
@@ -6,7 +6,7 @@
6
6
  </head>
7
7
  <body class="bg-white dark:bg-gray-950/95 text-gray-950 dark:text-gray-100 antialiased">
8
8
  <%= render "active_admin/site_header", title: site_title %>
9
- <div class="xl:ms-60">
9
+ <div class="xl:ms-60 pt-16">
10
10
  <%= render "active_admin/main_navigation" %>
11
11
  <%= render "active_admin/page_header", title: @page_title || page_title %>
12
12
  <%= render "active_admin/flash_messages" %>
data/config/importmap.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- pin "flowbite", preload: true # downloaded from https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.2.1/flowbite.min.js
3
- pin "@rails/ujs", to: "rails_ujs_esm.js", preload: true # downloaded from https://cdn.jsdelivr.net/npm/@rails/ujs@7.1.400/+esm
2
+ pin "flowbite", preload: true # downloaded from https://cdn.jsdelivr.net/npm/flowbite@3.1.2/dist/flowbite.min.js
3
+ pin "@rails/ujs", to: "rails_ujs_esm.js", preload: true # downloaded from https://cdn.jsdelivr.net/npm/@rails/ujs@7.1.501/+esm
4
4
  pin "active_admin", to: "active_admin.js", preload: true
5
5
  pin_all_from File.expand_path("../app/javascript/active_admin", __dir__), under: "active_admin", preload: true
@@ -1,146 +1,148 @@
1
+ ---
1
2
  ar:
2
- activerecord:
3
- models:
4
- comment:
5
- one: "تعليق"
6
- other: "تعليقات"
7
- active_admin/comment:
8
- one: "تعليق"
9
- other: "تعليقات"
10
- attributes:
11
- active_admin/comment:
12
- author_type: "نوع الكاتب"
13
- body: "المحتوى"
14
- created_at: "وقت الإنشاء"
15
- namespace: "النطاق"
16
- resource_type: "نوع المصدر"
17
- updated_at: "وقت التعديل"
18
3
  active_admin:
19
- dashboard: "لوحة التحكم"
20
- view: "عرض"
21
- edit: "تعديل"
22
- delete: "حذف"
23
- delete_confirmation: "هل تريد تأكيد الحذف؟"
24
- create_another: "انشاء %{model} آخر"
25
- new_model: "%{model} جديد"
26
- edit_model: "تعديل %{model}"
27
- delete_model: "حذف %{model}"
28
- details: "تفاصيل %{model}"
29
- cancel: "إلغاء"
30
- empty: "فارغ"
31
- previous: "السابق"
32
- next: "التالي"
33
- download: "تحميل"
34
- has_many_new: "إضافة %{model} جديد"
35
- has_many_delete: "حذف"
36
- has_many_remove: "إزالة"
37
- move: "نقل"
38
- filters:
39
- buttons:
40
- filter: "فرز"
41
- clear: "إلغاء الفرز"
42
- predicates:
43
- from: "من"
44
- to: "إلى"
45
- scopes:
46
- all: "الكل"
47
- search_status:
48
- title: "الفرز الحالي"
49
- title_with_scope: "الفرز الحالي لـ %{name}"
50
- no_current_filters: "بدون فرز"
51
- status_tag:
52
- "yes": "نعم"
53
- "no": "لا"
54
- "unset": "غير محدد"
55
- toggle_dark_mode: "تبديل الوضع الليلي"
56
- toggle_main_navigation_menu: "عرض القائمة الرئيسية"
57
- toggle_section: "عرض القسم"
58
- toggle_user_menu: "عرض قائمة المستخدم"
59
- logout: "تسجيل الخروج"
60
- powered_by: "بواسطة %{active_admin} %{version}"
61
- sidebars:
62
- filters: "المُرشحات"
63
- search_status: "حالة البحث"
64
- pagination:
65
- empty: "لا يوجد %{model}"
66
- one: "عرض <b>1</b> من <b>1</b>"
67
- one_page: "عرض <b>كل %{n}</b>"
68
- multiple: "عرض <b>%{from}-%{to}</b> من <b>%{total}</b>"
69
- multiple_without_total: "عرض <b>%{from}-%{to}</b>"
70
- per_page: "لكل صفحة "
71
- previous: "السابق"
72
- next: "التالي"
73
- entry:
74
- one: "مدخل"
75
- other: "مدخلات"
76
- any: "أي"
77
- blank_slate:
78
- content: "لا يوجد %{resource_name}"
79
- link: "إنشاء"
4
+ access_denied:
5
+ message: غير مصرح لك تنفيذ هذا الإجراء.
6
+ any: أي
80
7
  batch_actions:
81
- button_label: "إجراء جماعي"
82
- default_confirmation: "هل أنت متأكّد؟"
83
- delete_confirmation: "هل أنت متأكّد من حذف هذه %{plural_model}؟"
84
- succesfully_destroyed:
85
- one: "حُذف بنجاح %{model}"
86
- other: "حُذف بنجاح %{count} %{plural_model}"
87
- selection_toggle_explanation: "(تبديل التحديد)"
88
- action_label: "اُختير %{title}"
8
+ action_label: اُختير %{title}
9
+ button_label: إجراء جماعي
10
+ default_confirmation: هل أنت متأكّد؟
11
+ delete_confirmation: هل أنت متأكّد من حذف هذه %{plural_model}؟
89
12
  labels:
90
- destroy: "حذف"
13
+ destroy: حذف
14
+ selection_toggle_explanation: "(تبديل التحديد)"
15
+ successfully_destroyed:
16
+ one: حُذف بنجاح %{model}
17
+ other: حُذف بنجاح %{count} %{plural_model}
18
+ blank_slate:
19
+ content: لا يوجد %{resource_name}
20
+ link: إنشاء
21
+ cancel: إلغاء
91
22
  comments:
92
- created_at: "أُنشئ"
93
- resource_type: "نوع المصدر"
94
- author_type: "نوع الؤلّف"
95
- body: "المحتوى"
96
- author: "مؤلّف"
97
- add: "إضافة تعليق"
98
- delete: "حذف تعليق"
99
- delete_confirmation: "هل أنت متأكّد من حذف التعليق؟"
100
- resource: "مدخل"
101
- no_comments_yet: "لا يوجد تعليقات."
102
- author_missing: "المؤلف مجهول"
103
- title_content: "التعليقات (%{count})"
23
+ add: إضافة تعليق
24
+ author: مؤلّف
25
+ author_missing: المؤلف مجهول
26
+ author_type: نوع الؤلّف
27
+ body: المحتوى
28
+ created_at: أُنشئ
29
+ delete: حذف تعليق
30
+ delete_confirmation: هل أنت متأكّد من حذف التعليق؟
104
31
  errors:
105
- empty_text: "لم يُحفظ التعليق، النص فارغ."
32
+ empty_text: لم يُحفظ التعليق، النص فارغ.
33
+ no_comments_yet: لا يوجد تعليقات.
34
+ resource: مدخل
35
+ resource_type: نوع المصدر
36
+ title_content: التعليقات (%{count})
37
+ create_another: انشاء %{model} آخر
38
+ dashboard: لوحة التحكم
39
+ delete: حذف
40
+ delete_confirmation: هل تريد تأكيد الحذف؟
41
+ delete_model: حذف %{model}
42
+ details: تفاصيل %{model}
106
43
  devise:
107
- username:
108
- title: "اسم المستخدم"
44
+ change_password:
45
+ submit: تغير كلمة المرور
46
+ title: تغير كلمة المرور
109
47
  email:
110
- title: "البريد الإلكترونيّ"
111
- subdomain:
112
- title: "النطاق الفرعي"
48
+ title: البريد الإلكترونيّ
49
+ links:
50
+ forgot_your_password: هل نسيت كلمة المرور؟
51
+ resend_confirmation_instructions: إعادة إرسال تعليمات تأكيد البريد الإلكتروني
52
+ resend_unlock_instructions: إعادة إرسال تعليمات تنشيط الحساب
53
+ sign_in: تسجيل الدخول
54
+ sign_in_with_omniauth_provider: تسجيل الدخول بـ %{provider}
55
+ sign_up: التسجيل
56
+ login:
57
+ remember_me: تذكرني
58
+ submit: تسجيل الدخول
59
+ title: تسجيل الدخول
113
60
  password:
114
- title: "كلمة المرور"
61
+ title: كلمة المرور
115
62
  password_confirmation:
116
- title: "تأكيد كلمة المرور"
117
- sign_up:
118
- title: "التسجيل"
119
- submit: "تسجيل"
120
- login:
121
- title: "تسجيل الدخول"
122
- remember_me: "تذكرني"
123
- submit: "تسجيل الدخول"
63
+ title: تأكيد كلمة المرور
64
+ resend_confirmation_instructions:
65
+ submit: إعادة ارسال تعليمات تأكيد البريد الإلكتروني
66
+ title: إعادة ارسال تعليمات تأكيد البريد الإلكتروني
124
67
  reset_password:
125
- title: "هل نسيت كلمة المرور؟"
126
- submit: "استرجاع كلمة المرور"
127
- change_password:
128
- title: "تغير كلمة المرور"
129
- submit: "تغير كلمة المرور"
68
+ submit: استرجاع كلمة المرور
69
+ title: هل نسيت كلمة المرور؟
70
+ sign_up:
71
+ submit: تسجيل
72
+ title: التسجيل
73
+ subdomain:
74
+ title: النطاق الفرعي
130
75
  unlock:
131
- title: "إعادة إرسال تعليمات تنشيط الحساب"
132
- submit: "إعادة إرسال تعليمات تنشيط الحساب"
133
- resend_confirmation_instructions:
134
- title: "إعادة ارسال تعليمات تأكيد البريد الإلكتروني"
135
- submit: "إعادة ارسال تعليمات تأكيد البريد الإلكتروني"
136
- links:
137
- sign_up: "التسجيل"
138
- sign_in: "تسجيل الدخول"
139
- forgot_your_password: "هل نسيت كلمة المرور؟"
140
- sign_in_with_omniauth_provider: "تسجيل الدخول بـ %{provider}"
141
- resend_unlock_instructions: "إعادة إرسال تعليمات تنشيط الحساب"
142
- resend_confirmation_instructions: "إعادة إرسال تعليمات تأكيد البريد الإلكتروني"
143
- access_denied:
144
- message: "غير مصرح لك تنفيذ هذا الإجراء."
76
+ submit: إعادة إرسال تعليمات تنشيط الحساب
77
+ title: إعادة إرسال تعليمات تنشيط الحساب
78
+ username:
79
+ title: اسم المستخدم
80
+ download: تحميل
81
+ edit: تعديل
82
+ edit_model: تعديل %{model}
83
+ empty: فارغ
84
+ filters:
85
+ buttons:
86
+ clear: إلغاء الفرز
87
+ filter: فرز
88
+ predicates:
89
+ from: من
90
+ to: إلى
91
+ has_many_delete: حذف
92
+ has_many_new: إضافة %{model} جديد
93
+ has_many_remove: إزالة
145
94
  index_list:
146
- table: "جدول"
95
+ table: جدول
96
+ logout: تسجيل الخروج
97
+ move: نقل
98
+ new_model: "%{model} جديد"
99
+ next: التالي
100
+ pagination:
101
+ empty: لا يوجد %{model}
102
+ entry:
103
+ one: مدخل
104
+ other: مدخلات
105
+ multiple: عرض <b>%{from}-%{to}</b> من <b>%{total}</b>
106
+ multiple_without_total: عرض <b>%{from}-%{to}</b>
107
+ next: التالي
108
+ one: عرض <b>1</b> من <b>1</b>
109
+ one_page: عرض <b>كل %{n}</b>
110
+ per_page: 'لكل صفحة '
111
+ previous: السابق
112
+ truncate: "&hellip;"
113
+ powered_by: بواسطة %{active_admin} %{version}
114
+ previous: السابق
115
+ scopes:
116
+ all: الكل
117
+ search_status:
118
+ no_current_filters: بدون فرز
119
+ title: الفرز الحالي
120
+ title_with_scope: الفرز الحالي لـ %{name}
121
+ sidebars:
122
+ filters: المُرشحات
123
+ search_status: حالة البحث
124
+ status_tag:
125
+ 'no': لا
126
+ unset: غير محدد
127
+ 'yes': نعم
128
+ toggle_dark_mode: تبديل الوضع الليلي
129
+ toggle_main_navigation_menu: عرض القائمة الرئيسية
130
+ toggle_section: عرض القسم
131
+ toggle_user_menu: عرض قائمة المستخدم
132
+ view: عرض
133
+ activerecord:
134
+ attributes:
135
+ active_admin/comment:
136
+ author_type: نوع الكاتب
137
+ body: المحتوى
138
+ created_at: وقت الإنشاء
139
+ namespace: النطاق
140
+ resource_type: نوع المصدر
141
+ updated_at: وقت التعديل
142
+ models:
143
+ active_admin/comment:
144
+ one: تعليق
145
+ other: تعليقات
146
+ comment:
147
+ one: تعليق
148
+ other: تعليقات