activeadmin 4.0.0.beta2 → 4.0.0.beta22

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 (151) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -2
  3. data/CONTRIBUTING.md +13 -13
  4. data/README.md +4 -4
  5. data/UPGRADING.md +274 -0
  6. data/app/controllers/active_admin/base_controller/authorization.rb +1 -1
  7. data/app/controllers/active_admin/base_controller/menu.rb +2 -2
  8. data/app/controllers/active_admin/resource_controller/data_access.rb +9 -4
  9. data/app/controllers/active_admin/resource_controller/decorators.rb +1 -1
  10. data/app/controllers/active_admin/resource_controller/streaming.rb +3 -3
  11. data/app/controllers/active_admin/resource_controller.rb +1 -1
  12. data/app/helpers/active_admin/display_helper.rb +3 -3
  13. data/app/helpers/active_admin/form_helper.rb +1 -1
  14. data/app/helpers/active_admin/layout_helper.rb +2 -2
  15. data/app/javascript/active_admin/features/batch_actions.js +10 -4
  16. data/app/javascript/active_admin/features/main_menu.js +3 -2
  17. data/app/views/active_admin/_flash_messages.html.erb +4 -4
  18. data/app/views/active_admin/_main_navigation.html.erb +28 -11
  19. data/app/views/active_admin/_page_header.html.erb +2 -2
  20. data/app/views/active_admin/_site_footer.html.erb +1 -1
  21. data/app/views/active_admin/_site_header.html.erb +7 -7
  22. data/app/views/active_admin/devise/confirmations/new.html.erb +1 -1
  23. data/app/views/active_admin/devise/passwords/edit.html.erb +1 -1
  24. data/app/views/active_admin/devise/passwords/new.html.erb +1 -1
  25. data/app/views/active_admin/devise/registrations/new.html.erb +1 -1
  26. data/app/views/active_admin/devise/sessions/new.html.erb +1 -1
  27. data/app/views/active_admin/devise/unlocks/new.html.erb +1 -1
  28. data/app/views/active_admin/kaminari/_gap.html.erb +1 -1
  29. data/app/views/active_admin/kaminari/_next_page.html.erb +1 -1
  30. data/app/views/active_admin/kaminari/_prev_page.html.erb +1 -1
  31. data/app/views/active_admin/page/index.html.arb +1 -2
  32. data/app/views/active_admin/resource/_form.html.arb +0 -1
  33. data/app/views/active_admin/resource/_form_default.html.arb +0 -1
  34. data/app/views/active_admin/resource/_index_as_table_default.html.arb +0 -1
  35. data/app/views/active_admin/resource/_show_default.html.arb +0 -1
  36. data/app/views/active_admin/resource/edit.html.arb +0 -1
  37. data/app/views/active_admin/resource/index.html.arb +1 -2
  38. data/app/views/active_admin/resource/new.html.arb +0 -1
  39. data/app/views/active_admin/resource/show.html.arb +0 -1
  40. data/app/views/active_admin/shared/_resource_comments.html.erb +7 -7
  41. data/app/views/active_admin/shared/_sidebar_section.html.arb +0 -1
  42. data/app/views/layouts/active_admin.html.erb +1 -1
  43. data/config/importmap.rb +5 -0
  44. data/config/locales/ar.yml +136 -100
  45. data/config/locales/az.yml +103 -102
  46. data/config/locales/bg.yml +91 -90
  47. data/config/locales/bs.yml +95 -94
  48. data/config/locales/ca.yml +131 -77
  49. data/config/locales/cs.yml +82 -81
  50. data/config/locales/da.yml +102 -101
  51. data/config/locales/de.yml +130 -125
  52. data/config/locales/el.yml +94 -93
  53. data/config/locales/en-CA.yml +104 -103
  54. data/config/locales/en-GB.yml +104 -103
  55. data/config/locales/en.yml +134 -130
  56. data/config/locales/eo.yml +107 -106
  57. data/config/locales/es-MX.yml +70 -69
  58. data/config/locales/es.yml +129 -122
  59. data/config/locales/fa.yml +91 -90
  60. data/config/locales/fi.yml +84 -83
  61. data/config/locales/fr.yml +135 -126
  62. data/config/locales/he.yml +103 -102
  63. data/config/locales/hr.yml +95 -94
  64. data/config/locales/hu.yml +76 -75
  65. data/config/locales/id.yml +97 -96
  66. data/config/locales/it.yml +134 -124
  67. data/config/locales/ja.yml +109 -104
  68. data/config/locales/ko.yml +136 -92
  69. data/config/locales/lt.yml +106 -105
  70. data/config/locales/lv.yml +70 -69
  71. data/config/locales/mk.yml +100 -99
  72. data/config/locales/nb.yml +98 -97
  73. data/config/locales/nl.yml +113 -114
  74. data/config/locales/pl.yml +137 -130
  75. data/config/locales/pt-BR.yml +134 -105
  76. data/config/locales/pt-PT.yml +71 -70
  77. data/config/locales/ro.yml +74 -73
  78. data/config/locales/ru.yml +142 -106
  79. data/config/locales/sk.yml +131 -130
  80. data/config/locales/sv-SE.yml +126 -125
  81. data/config/locales/tr.yml +105 -104
  82. data/config/locales/uk.yml +140 -103
  83. data/config/locales/vi.yml +125 -124
  84. data/config/locales/zh-CN.yml +135 -125
  85. data/config/locales/zh-TW.yml +136 -100
  86. data/lib/active_admin/application.rb +5 -5
  87. data/lib/active_admin/application_settings.rb +1 -1
  88. data/lib/active_admin/async_count.rb +21 -0
  89. data/lib/active_admin/batch_actions/resource_extension.rb +2 -2
  90. data/lib/active_admin/batch_actions/views/batch_action_form.rb +1 -1
  91. data/lib/active_admin/batch_actions/views/selection_cells.rb +1 -1
  92. data/lib/active_admin/batch_actions.rb +4 -4
  93. data/lib/active_admin/collection_decorator.rb +1 -1
  94. data/lib/active_admin/csv_builder.rb +1 -1
  95. data/lib/active_admin/dependency.rb +1 -1
  96. data/lib/active_admin/dsl.rb +2 -2
  97. data/lib/active_admin/dynamic_settings_node.rb +2 -2
  98. data/lib/active_admin/engine.rb +5 -2
  99. data/lib/active_admin/filters/active.rb +2 -2
  100. data/lib/active_admin/filters/active_filter.rb +1 -7
  101. data/lib/active_admin/filters/forms.rb +0 -3
  102. data/lib/active_admin/filters/resource_extension.rb +2 -2
  103. data/lib/active_admin/filters.rb +5 -5
  104. data/lib/active_admin/form_builder.rb +4 -9
  105. data/lib/active_admin/helpers/optional_display.rb +1 -1
  106. data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
  107. data/lib/active_admin/inputs/filters/select_input.rb +1 -3
  108. data/lib/active_admin/localizers.rb +1 -1
  109. data/lib/active_admin/menu.rb +2 -2
  110. data/lib/active_admin/menu_item.rb +1 -1
  111. data/lib/active_admin/namespace.rb +1 -1
  112. data/lib/active_admin/namespace_settings.rb +1 -1
  113. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +1 -1
  114. data/lib/active_admin/orm/active_record/comments/views.rb +2 -2
  115. data/lib/active_admin/orm/active_record/comments.rb +7 -7
  116. data/lib/active_admin/orm/active_record.rb +1 -1
  117. data/lib/active_admin/pundit_adapter.rb +4 -4
  118. data/lib/active_admin/resource/action_items.rb +3 -3
  119. data/lib/active_admin/resource/attributes.rb +8 -1
  120. data/lib/active_admin/resource/belongs_to.rb +0 -1
  121. data/lib/active_admin/resource/naming.rb +1 -1
  122. data/lib/active_admin/resource/page_presenters.rb +2 -2
  123. data/lib/active_admin/resource/sidebars.rb +1 -1
  124. data/lib/active_admin/resource.rb +21 -19
  125. data/lib/active_admin/resource_collection.rb +1 -1
  126. data/lib/active_admin/resource_dsl.rb +2 -2
  127. data/lib/active_admin/router.rb +5 -5
  128. data/lib/active_admin/scope.rb +10 -0
  129. data/lib/active_admin/version.rb +1 -1
  130. data/lib/active_admin/view_helpers/method_or_proc_helper.rb +1 -1
  131. data/lib/active_admin/views/components/active_admin_form.rb +2 -2
  132. data/lib/active_admin/views/components/attributes_table.rb +10 -4
  133. data/lib/active_admin/views/components/paginated_collection.rb +4 -1
  134. data/lib/active_admin/views/components/panel.rb +1 -1
  135. data/lib/active_admin/views/components/scopes.rb +26 -4
  136. data/lib/active_admin/views/components/table_for.rb +7 -2
  137. data/lib/active_admin/views/index_as_table.rb +22 -6
  138. data/lib/active_admin.rb +11 -6
  139. data/lib/activeadmin.rb +1 -1
  140. data/lib/generators/active_admin/assets/templates/active_admin.css +3 -3
  141. data/lib/generators/active_admin/assets/templates/tailwind.config.js +9 -5
  142. data/lib/generators/active_admin/devise/devise_generator.rb +2 -2
  143. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +1 -1
  144. data/lib/generators/active_admin/resource/resource_generator.rb +6 -2
  145. data/lib/generators/active_admin/resource/templates/resource.rb.erb +2 -2
  146. data/plugin.js +424 -0
  147. data/vendor/javascript/flowbite.js +1 -2
  148. data/vendor/javascript/rails_ujs_esm.js +1 -0
  149. metadata +35 -20
  150. data/config/locales/de-CH.yml +0 -84
  151. data/lib/active_admin/views/components/tabs.rb +0 -40
@@ -1,26 +1,43 @@
1
- <div id="main-menu" class="fixed top-0 xl:top-16 bottom-0 start-0 z-40 w-72 xl:w-60 p-4 overflow-y-auto transition-transform duration-200 -translate-x-full xl:translate-x-0 bg-white dark:bg-gray-950 xl:border-e xl:border-gray-200 xl:dark:border-white/10" tabindex="-1" aria-labelledby="drawer-navigation-label">
1
+ <div id="main-menu" class="fixed top-0 xl:top-16 bottom-0 inset-s-0 z-40 w-72 xl:w-60 p-4 overflow-y-auto transition-transform duration-200 -translate-x-full xl:translate-x-0 bg-white dark:bg-gray-950 xl:border-e xl:border-gray-200 xl:dark:border-white/10" tabindex="-1">
2
2
  <ul role="list" class="flex flex-1 flex-col space-y-1.5">
3
3
  <% current_menu.items(self).each do |item| %>
4
4
  <% children = item.items(self).presence %>
5
+ <% url = item.url(self) %>
6
+ <% label = capture do %>
7
+ <% if url.present? %>
8
+ <%= link_to item.label(self), url, item.html_options.merge(class: "text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center w-full rounded-md p-2 gap-x-2 text-sm no-underline #{(current_menu_item?(item, children: false) ? "bg-gray-100 dark:bg-white/5 text-gray-900 dark:text-white selected" : "")}") %>
9
+ <% else %>
10
+ <%= item.label(self) %>
11
+ <% end %>
12
+ <% end %>
5
13
  <li <%= current_menu_item?(item) && "data-open" %> class="group" data-item-id="<%= item.id %>">
6
14
  <% if children %>
7
- <button data-menu-button class="text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center w-full rounded-md p-2 gap-x-2 text-sm">
8
- <%= item.label(self) %>
9
- <svg class="group-data-[open]:rotate-90 group-data-[open]:rtl:-rotate-90 ms-auto h-5 w-5 shrink-0 rtl:-scale-x-100" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
10
- <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
11
- </svg>
12
- </button>
13
- <ul role="list" class="mt-1 space-y-1 hidden group-data-[open]:block">
15
+ <% if url.present? && url == "#" %>
16
+ <button data-menu-button class="text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center w-full rounded-md p-2 gap-x-2 text-sm" aria-label="<%= t('active_admin.toggle_section') %>">
17
+ <%= item.label(self) %>
18
+ <svg class="group-data-open:rotate-90 group-data-open:rtl:-rotate-90 ms-auto h-5 w-5 shrink-0 rtl:-scale-x-100" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
19
+ <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
20
+ </svg>
21
+ </button>
22
+ <% elsif url.present? && url != "#" %>
23
+ <div data-parent-id="<%= item.id %>" data-menu-button class="flex">
24
+ <%= label %>
25
+ <button class="text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center p-2 text-sm" aria-label="<%= t('active_admin.toggle_section') %>">
26
+ <svg class="group-data-open:rotate-90 group-data-open:rtl:-rotate-90 ms-auto h-5 w-5 shrink-0 rtl:-scale-x-100" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
27
+ <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
28
+ </svg>
29
+ </button>
30
+ </div>
31
+ <% end %>
32
+ <ul role="list" class="mt-1 space-y-1 hidden group-data-open:block ms-1 ps-2 border-s-2 border-gray-100 dark:border-white/5">
14
33
  <% children.each do |j| %>
15
34
  <li data-item-id="<%= j.id %>">
16
35
  <%= link_to j.label(self), j.url(self), j.html_options.merge(class: "text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white block rounded-md py-1.5 px-2 text-sm no-underline #{(current_menu_item?(j) ? "bg-gray-100 dark:bg-white/5 text-gray-900 dark:text-white selected" : "")}") %>
17
36
  </li>
18
37
  <% end %>
19
38
  </ul>
20
- <% elsif url = item.url(self) %>
21
- <%= link_to item.label(self), url, item.html_options.merge(class: "text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center w-full rounded-md p-2 gap-x-2 text-sm no-underline #{(current_menu_item?(item) ? "bg-gray-100 dark:bg-white/5 text-gray-900 dark:text-white selected" : "")}") %>
22
39
  <% else %>
23
- <%= item.label(self) %>
40
+ <%= label %>
24
41
  <% end %>
25
42
  </li>
26
43
  <% end %>
@@ -1,4 +1,4 @@
1
- <div data-test-page-header class="bg-gray-50 border-b p-4 mb-8 flex flex-col gap-4 md:flex-row md:items-center justify-between dark:border-gray-800/50 dark:bg-inherit">
1
+ <div data-test-page-header class="bg-gray-50 border-b border-gray-200 p-4 mb-8 flex flex-col gap-4 md:flex-row md:items-center justify-between dark:border-gray-800/50 dark:bg-inherit">
2
2
  <div class="flex flex-col gap-3 pt-1">
3
3
  <% breadcrumb_links = build_breadcrumb_links(request.path, class: "text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 no-underline") %>
4
4
  <% if breadcrumb_links.present? %>
@@ -7,7 +7,7 @@
7
7
  <% breadcrumb_links.each_with_index do |link, index| %>
8
8
  <li class="inline-flex items-center h-5 gap-1">
9
9
  <% if index > 0 %>
10
- <svg class="h-5 w-5 text-gray-300 dark:text-gray-700 flex-shrink-0 rtl:rotate-180" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
10
+ <svg class="h-5 w-5 text-gray-300 dark:text-gray-700 shrink-0 rtl:rotate-180" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
11
11
  <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd"/>
12
12
  </svg>
13
13
  <% end %>
@@ -1,4 +1,4 @@
1
- <div class="text-sm text-center mt-16 mx-8 pt-9 pb-12 text-gray-500 border-t dark:border-gray-800">
1
+ <div class="text-sm text-center mt-16 mx-8 pt-9 pb-12 text-gray-500 border-t border-gray-200 dark:border-gray-800">
2
2
  <%= I18n.t(
3
3
  "active_admin.powered_by",
4
4
  active_admin: link_to("Active Admin", "https://activeadmin.info", class: "text-gray-500 dark:text-gray-500 hover:text-gray-900 dark:hover:text-gray-400 no-underline"),
@@ -1,5 +1,5 @@
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">
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="drawer-navigation">
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
+ <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-hidden 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>
5
5
 
@@ -9,20 +9,20 @@
9
9
  </h1>
10
10
  </div>
11
11
 
12
- <button type="button" class="dark-mode-toggle flex items-center w-9 h-9 justify-center me-1 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 focus:outline-none text-sm">
12
+ <button type="button" class="dark-mode-toggle flex items-center w-9 h-9 justify-center me-1 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 focus:outline-hidden text-sm" aria-label="<%= t('active_admin.toggle_dark_mode') %>">
13
13
  <svg class="hidden dark:block w-5 h-5 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.509 5.75c0-1.493.394-2.96 1.144-4.25h-.081a8.5 8.5 0 1 0 7.356 12.746A8.5 8.5 0 0 1 8.509 5.75Z"/></svg>
14
14
  <svg class="dark:hidden w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 3V1m0 18v-2M5.05 5.05 3.636 3.636m12.728 12.728L14.95 14.95M3 10H1m18 0h-2M5.05 14.95l-1.414 1.414M16.364 3.636 14.95 5.05M14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/></svg>
15
15
  </button>
16
16
 
17
- <button id="user-menu-button" class="flex items-center w-9 h-9 justify-center text-sm text-gray-500 focus:outline-none dark:text-gray-200" data-dropdown-toggle="user-menu" data-dropdown-offset-distance="3" data-dropdown-placement="bottom-end">
17
+ <button id="user-menu-button" class="flex items-center w-9 h-9 justify-center text-sm text-gray-500 focus:outline-hidden dark:text-gray-200" data-dropdown-toggle="user-menu" data-dropdown-offset-distance="3" data-dropdown-placement="bottom-end" aria-label="<%= t('active_admin.toggle_user_menu') %>">
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-black/5 dark:-outline-offset-1 dark:outline-white/10 focus:outline-hidden 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>
@@ -8,7 +8,7 @@
8
8
  -%>
9
9
  <% unless current_page.last? %>
10
10
  <%= link_to url, rel: 'next', remote: remote, class: "flex items-center justify-center px-2.5 py-3 h-8 leading-tight text-gray-500 dark:text-gray-400 hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-800 dark:hover:text-white rounded no-underline" do %>
11
- <span class="sr-only"><%= t('views.pagination.next').html_safe %></span>
11
+ <span class="sr-only"><%= t('active_admin.pagination.next') %></span>
12
12
  <svg class="w-2.5 h-2.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
13
13
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
14
14
  </svg>
@@ -8,7 +8,7 @@
8
8
  -%>
9
9
  <% unless current_page.first? %>
10
10
  <%= link_to url, rel: 'prev', remote: remote, class: "flex items-center justify-center px-2.5 py-3 h-8 leading-tight text-gray-500 dark:text-gray-400 hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-800 dark:hover:text-white rounded no-underline" do %>
11
- <span class="sr-only"><%= t('views.pagination.previous').html_safe %></span>
11
+ <span class="sr-only"><%= t('active_admin.pagination.previous') %></span>
12
12
  <svg class="w-2.5 h-2.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
13
13
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 1 1 5l4 4"/>
14
14
  </svg>
@@ -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)
@@ -58,7 +57,7 @@ def build_index_list
58
57
  end
59
58
  end
60
59
 
61
- # Returns the actual class for renderering the main content on the index
60
+ # Returns the actual class for rendering the main content on the index
62
61
  # page. To set this, use the :as option in the page_presenter block.
63
62
  def find_index_renderer_class(klass)
64
63
  if klass.is_a?(Class)
@@ -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
@@ -1,5 +1,5 @@
1
- <div class="max-w-[700px]">
2
- <div class="font-bold py-3 border-b dark:border-gray-600">
1
+ <div id="active-admin-comments-form" class="max-w-[700px]">
2
+ <div class="font-bold py-3 border-b border-gray-200 dark:border-gray-600">
3
3
  <%= ActiveAdmin::Comment.model_name.human(count: 2.1) %>
4
4
  </div>
5
5
  <% if authorized?(ActiveAdmin::Auth::NEW, ActiveAdmin::Comment) %>
@@ -15,17 +15,17 @@
15
15
  end
16
16
  %>
17
17
  <% end %>
18
- <div class="font-bold py-3 border-b dark:border-gray-600">
18
+ <div class="font-bold py-3 border-b border-gray-200 dark:border-gray-600">
19
19
  <%= I18n.t "active_admin.comments.title_content", count: comments.total_count %>
20
20
  </div>
21
21
  <% if comments.any? %>
22
22
  <% comments.each do |comment| %>
23
- <div class="border-b dark:border-gray-600 py-6 max-w-[700px]" id="<%= dom_id(comment, :active_admin) %>" data-test-comment-container>
23
+ <div class="border-b border-gray-200 dark:border-gray-600 py-6 max-w-[700px]" id="<%= dom_id(comment, :active_admin) %>" data-test-comment-container>
24
24
  <div class="flex gap-4 items-end mb-2">
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>
@@ -37,14 +37,14 @@
37
37
  <% end %>
38
38
  </div>
39
39
  <% end %>
40
- <div class="p-2 lg:p-4 flex flex-col-reverse lg:flex-row gap-4 items-center justify-between">
40
+ <div class="py-2 lg:py-4 flex flex-col-reverse lg:flex-row gap-4 items-center justify-between">
41
41
  <div>
42
42
  <%= page_entries_info(comments).html_safe %>
43
43
  </div>
44
44
  <%= paginate(comments, views_prefix: :active_admin, outer_window: 1, window: 2) %>
45
45
  </div>
46
46
  <% else %>
47
- <div class="p-8 text-center">
47
+ <div class="py-8 text-center">
48
48
  <%= I18n.t("active_admin.comments.no_comments_yet") %>
49
49
  </div>
50
50
  <% end %>
@@ -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" %>
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
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
+ pin "active_admin", to: "active_admin.js", preload: true
5
+ pin_all_from File.expand_path("../app/javascript/active_admin", __dir__), under: "active_admin", preload: true
@@ -1,112 +1,148 @@
1
+ ---
1
2
  ar:
2
3
  active_admin:
3
- dashboard: "لوحة تحكم"
4
- view: "عرض"
5
- edit: "تعديل"
6
- delete: "حذف"
7
- delete_confirmation: "هل تريد تأكيد الحذف؟"
8
- new_model: "%{model} جديد"
9
- edit_model: "تعديل %{model}"
10
- delete_model: "حذف %{model}"
11
- details: "تفاصيل %{model}"
12
- cancel: "إلغاء"
13
- empty: "فارغ"
14
- previous: "السابق"
15
- next: "التالي"
16
- download: "تحميل"
17
- has_many_new: "إضافة %{model} جديد"
18
- has_many_delete: "حذف"
19
- has_many_remove: "إزالة"
20
- filters:
21
- buttons:
22
- filter: "تصفية"
23
- clear: "تفريغ التصفية"
24
- search_status:
25
- no_current_filters: "بدون"
26
- status_tag:
27
- "yes": "نعم"
28
- "no": "لا"
29
- "unset": "لا"
30
- logout: "تسجيل الخروج"
31
- powered_by: "تنفيذ %{active_admin} %{version}"
32
- sidebars:
33
- filters: "المُرشحات"
34
- search_status: "حالات البحث"
35
- pagination:
36
- empty: "لا يوجد %{model} "
37
- one: "عرض <b>1</b> %{model}"
38
- one_page: "عرض <b>all %{n}</b> %{model}"
39
- multiple: "عرض %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> من <b>%{total}</b> بالمجمل"
40
- multiple_without_total: "عرض %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
41
- entry:
42
- one: "مدخل"
43
- other: "مدخلات"
44
- any: "أي"
45
- blank_slate:
46
- content: "لايوجد %{resource_name} بعد."
47
- link: "إنشاء"
4
+ access_denied:
5
+ message: غير مصرح لك تنفيذ هذا الإجراء.
6
+ any: أي
48
7
  batch_actions:
49
- button_label: "إجراءات متعددة"
50
- default_confirmation: "هل أنت متأكّد؟"
51
- delete_confirmation: "هل أنت متأكّد من حذف هذه %{plural_model}؟"
52
- succesfully_destroyed:
53
- one: "حُذف بنجاح 1 %{model}"
54
- other: "حُذف بنجاح %{count} %{plural_model}"
55
- selection_toggle_explanation: "(تتبيث الخيار)"
56
- action_label: "اُختير %{title}"
8
+ action_label: اُختير %{title}
9
+ button_label: إجراء جماعي
10
+ default_confirmation: هل أنت متأكّد؟
11
+ delete_confirmation: هل أنت متأكّد من حذف هذه %{plural_model}؟
57
12
  labels:
58
- 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: إلغاء
59
22
  comments:
60
- resource_type: "نوع المصدر"
61
- author_type: "نوع الؤلّف"
62
- body: "هيكل"
63
- author: "مؤلّف"
64
- add: "إضافة تعليق"
65
- resource: "مصدر"
66
- no_comments_yet: "لا يوجد تعليقات بعد."
67
- author_missing: "مجهول"
68
- title_content: "تعليقات (%{count})"
23
+ add: إضافة تعليق
24
+ author: مؤلّف
25
+ author_missing: المؤلف مجهول
26
+ author_type: نوع الؤلّف
27
+ body: المحتوى
28
+ created_at: أُنشئ
29
+ delete: حذف تعليق
30
+ delete_confirmation: هل أنت متأكّد من حذف التعليق؟
69
31
  errors:
70
- empty_text: "لم يُحفظ التعليق، النص فارغ."
71
- created_at: "أُنشئ"
72
- delete: "حذف تعليق"
73
- delete_confirmation: "هل أنت متأكّد من حذف هذه التعليقات؟"
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}
74
43
  devise:
75
- username:
76
- title: "اسم المستخدم"
44
+ change_password:
45
+ submit: تغير كلمة المرور
46
+ title: تغير كلمة المرور
77
47
  email:
78
- title: "البريد الإلكترونيّ"
79
- subdomain:
80
- title: "مجال فرعي"
81
- password:
82
- title: "كلمة المرور"
83
- sign_up:
84
- title: "تسجيل"
85
- submit: "تسجيل"
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: التسجيل
86
56
  login:
87
- title: "تسجيل الدخول"
88
- remember_me: "تذكرني"
89
- submit: "تسجيل الدخول"
57
+ remember_me: تذكرني
58
+ submit: تسجيل الدخول
59
+ title: تسجيل الدخول
60
+ password:
61
+ title: كلمة المرور
62
+ password_confirmation:
63
+ title: تأكيد كلمة المرور
64
+ resend_confirmation_instructions:
65
+ submit: إعادة ارسال تعليمات تأكيد البريد الإلكتروني
66
+ title: إعادة ارسال تعليمات تأكيد البريد الإلكتروني
90
67
  reset_password:
91
- title: "هل نسيت كلمة المرور؟"
92
- submit: "استرجاع كلمة المرور"
93
- change_password:
94
- title: "تغير كلمة المرور خاصتك"
95
- submit: "تغير كلمة المرور خاصتي"
68
+ submit: استرجاع كلمة المرور
69
+ title: هل نسيت كلمة المرور؟
70
+ sign_up:
71
+ submit: تسجيل
72
+ title: التسجيل
73
+ subdomain:
74
+ title: النطاق الفرعي
96
75
  unlock:
97
- title: "إعادة إرسال تعليمات فك الحظر"
98
- submit: "إعادة إرسال تعليمات فك الحظر"
99
- resend_confirmation_instructions:
100
- title: "إعادة ارسال تعليمات التأكيد"
101
- submit: "إعادة ارسال تعليمات التأكيد"
102
- links:
103
- sign_up: "التسجيل"
104
- sign_in: "تسجيل الدخول"
105
- forgot_your_password: "هل نسيت كلمة المرور؟"
106
- sign_in_with_omniauth_provider: "تسجيل الدخول بـ %{provider}"
107
- resend_unlock_instructions: "إعادة إرسال تعليمات تنشيط الحساب"
108
- resend_confirmation_instructions: "إعادة إرسال تعليمات تأكيد الحساب"
109
- access_denied:
110
- 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: إزالة
111
94
  index_list:
112
- 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: تعليقات