activeadmin 3.2.4 → 4.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activeadmin might be problematic. Click here for more details.

Files changed (339) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +2 -69
  3. data/CONTRIBUTING.md +25 -108
  4. data/README.md +19 -32
  5. data/app/assets/config/active_admin_manifest.js +2 -0
  6. data/app/controllers/active_admin/base_controller/menu.rb +39 -0
  7. data/{lib → app/controllers}/active_admin/base_controller.rb +46 -18
  8. data/{lib → app/controllers}/active_admin/page_controller.rb +0 -4
  9. data/{lib → app/controllers}/active_admin/resource_controller/action_builder.rb +1 -1
  10. data/{lib → app/controllers}/active_admin/resource_controller/data_access.rb +2 -2
  11. data/{lib → app/controllers}/active_admin/resource_controller/scoping.rb +1 -1
  12. data/{lib → app/controllers}/active_admin/resource_controller/streaming.rb +2 -2
  13. data/app/controllers/active_admin/resource_controller.rb +102 -0
  14. data/app/helpers/active_admin/auto_link_helper.rb +66 -0
  15. data/app/helpers/active_admin/breadcrumb_helper.rb +41 -0
  16. data/app/helpers/active_admin/display_helper.rb +117 -0
  17. data/app/helpers/active_admin/form_helper.rb +95 -0
  18. data/app/helpers/active_admin/index_helper.rb +40 -0
  19. data/app/helpers/active_admin/layout_helper.rb +63 -0
  20. data/app/javascript/active_admin/features/batch_actions.js +89 -0
  21. data/app/javascript/active_admin/features/dark_mode_toggle.js +37 -0
  22. data/app/javascript/active_admin/features/filters.js +34 -0
  23. data/app/javascript/active_admin/features/has_many.js +28 -0
  24. data/app/javascript/active_admin/features/main_menu.js +12 -0
  25. data/app/javascript/active_admin/features/per_page.js +9 -0
  26. data/app/javascript/active_admin/utils/dom.js +17 -0
  27. data/app/javascript/active_admin.js +10 -0
  28. data/app/views/active_admin/_flash_messages.html.erb +22 -0
  29. data/app/views/active_admin/_html_head.html.erb +13 -0
  30. data/app/views/active_admin/_main_navigation.html.erb +28 -0
  31. data/app/views/active_admin/_page_header.html.erb +27 -0
  32. data/app/views/active_admin/_sidebar.html.erb +5 -0
  33. data/app/views/active_admin/_site_footer.html.erb +7 -0
  34. data/app/views/active_admin/_site_header.html.erb +30 -0
  35. data/app/views/active_admin/devise/confirmations/new.html.erb +5 -3
  36. data/app/views/active_admin/devise/passwords/edit.html.erb +5 -3
  37. data/app/views/active_admin/devise/passwords/new.html.erb +5 -4
  38. data/app/views/active_admin/devise/registrations/new.html.erb +6 -4
  39. data/app/views/active_admin/devise/sessions/new.html.erb +6 -4
  40. data/app/views/active_admin/devise/shared/_links.erb +3 -1
  41. data/app/views/active_admin/devise/unlocks/new.html.erb +6 -4
  42. data/app/views/{kaminari/active_admin_countless → active_admin/kaminari}/_gap.html.erb +3 -1
  43. data/app/views/active_admin/kaminari/_next_page.html.erb +16 -0
  44. data/app/views/active_admin/kaminari/_page.html.erb +14 -0
  45. data/app/views/{kaminari/active_admin_countless → active_admin/kaminari}/_paginator.html.erb +1 -2
  46. data/app/views/active_admin/kaminari/_prev_page.html.erb +16 -0
  47. data/app/views/active_admin/page/index.html.arb +5 -1
  48. data/app/views/active_admin/resource/_active_filters.html.erb +32 -0
  49. data/app/views/active_admin/resource/_batch_actions_dropdown.html.erb +19 -0
  50. data/app/views/active_admin/resource/_form.html.arb +16 -0
  51. data/app/views/active_admin/resource/_form_default.html.arb +12 -0
  52. data/app/views/active_admin/resource/_index_as_table_default.html.arb +9 -0
  53. data/app/views/active_admin/resource/_index_blank_slate.html.erb +14 -0
  54. data/app/views/active_admin/resource/_index_empty_results.html.erb +5 -0
  55. data/app/views/active_admin/resource/_index_table_actions_default.html.erb +9 -0
  56. data/app/views/active_admin/resource/_show_default.html.arb +3 -0
  57. data/app/views/active_admin/resource/edit.html.arb +1 -1
  58. data/app/views/active_admin/resource/index.html.arb +94 -1
  59. data/app/views/active_admin/resource/new.html.arb +1 -1
  60. data/app/views/active_admin/resource/show.html.arb +12 -1
  61. data/app/views/active_admin/shared/_action_items.html.erb +3 -0
  62. data/app/views/active_admin/shared/_download_format_links.html.erb +7 -0
  63. data/app/views/active_admin/shared/_resource_comments.html.erb +51 -0
  64. data/app/views/active_admin/shared/_sidebar_section.html.arb +7 -0
  65. data/app/views/active_admin/shared/_sidebar_sections.html.erb +5 -0
  66. data/app/views/layouts/active_admin.html.erb +20 -0
  67. data/app/views/layouts/active_admin_logged_out.html.erb +8 -45
  68. data/config/locales/ar.yml +0 -16
  69. data/config/locales/az.yml +0 -16
  70. data/config/locales/bg.yml +0 -9
  71. data/config/locales/bs.yml +0 -7
  72. data/config/locales/ca.yml +0 -9
  73. data/config/locales/cs.yml +0 -9
  74. data/config/locales/da.yml +0 -16
  75. data/config/locales/de-CH.yml +0 -10
  76. data/config/locales/de.yml +0 -16
  77. data/config/locales/el.yml +0 -13
  78. data/config/locales/en-CA.yml +0 -16
  79. data/config/locales/en-GB.yml +0 -16
  80. data/config/locales/en.yml +18 -28
  81. data/config/locales/eo.yml +0 -17
  82. data/config/locales/es-MX.yml +0 -9
  83. data/config/locales/es.yml +0 -16
  84. data/config/locales/fa.yml +0 -9
  85. data/config/locales/fi.yml +0 -9
  86. data/config/locales/fr.yml +32 -26
  87. data/config/locales/he.yml +0 -16
  88. data/config/locales/hr.yml +0 -9
  89. data/config/locales/hu.yml +0 -6
  90. data/config/locales/id.yml +0 -16
  91. data/config/locales/it.yml +0 -16
  92. data/config/locales/ja.yml +0 -16
  93. data/config/locales/ko.yml +0 -9
  94. data/config/locales/lt.yml +0 -16
  95. data/config/locales/lv.yml +0 -6
  96. data/config/locales/mk.yml +0 -15
  97. data/config/locales/nb.yml +0 -12
  98. data/config/locales/nl.yml +21 -29
  99. data/config/locales/pl.yml +0 -16
  100. data/config/locales/pt-BR.yml +0 -16
  101. data/config/locales/pt-PT.yml +0 -6
  102. data/config/locales/ro.yml +0 -6
  103. data/config/locales/ru.yml +0 -16
  104. data/config/locales/sk.yml +0 -16
  105. data/config/locales/sv-SE.yml +0 -16
  106. data/config/locales/tr.yml +0 -16
  107. data/config/locales/uk.yml +0 -16
  108. data/config/locales/vi.yml +0 -16
  109. data/config/locales/zh-CN.yml +0 -16
  110. data/config/locales/zh-TW.yml +0 -16
  111. data/lib/active_admin/application.rb +1 -9
  112. data/lib/active_admin/batch_actions/controller.rb +1 -4
  113. data/lib/active_admin/batch_actions/resource_extension.rb +6 -13
  114. data/lib/active_admin/batch_actions/views/batch_action_form.rb +0 -6
  115. data/lib/active_admin/batch_actions/views/selection_cells.rb +2 -2
  116. data/lib/active_admin/batch_actions.rb +0 -5
  117. data/lib/active_admin/callbacks.rb +6 -4
  118. data/lib/active_admin/component.rb +0 -1
  119. data/lib/active_admin/csv_builder.rb +1 -1
  120. data/lib/active_admin/devise.rb +3 -3
  121. data/lib/active_admin/dsl.rb +2 -2
  122. data/lib/active_admin/dynamic_settings_node.rb +4 -4
  123. data/lib/active_admin/engine.rb +19 -6
  124. data/lib/active_admin/filters/active.rb +6 -4
  125. data/lib/active_admin/filters/active_filter.rb +1 -3
  126. data/lib/active_admin/filters/forms.rb +1 -42
  127. data/lib/active_admin/filters/resource_extension.rb +17 -9
  128. data/lib/active_admin/filters.rb +0 -2
  129. data/lib/active_admin/form_builder.rb +15 -14
  130. data/lib/active_admin/inputs/filters/base/search_method_select.rb +8 -10
  131. data/lib/active_admin/inputs/filters/base.rb +1 -1
  132. data/lib/active_admin/inputs/filters/check_boxes_input.rb +1 -6
  133. data/lib/active_admin/inputs/filters/date_range_input.rb +4 -2
  134. data/lib/active_admin/inputs.rb +0 -3
  135. data/lib/active_admin/menu.rb +10 -7
  136. data/lib/active_admin/menu_collection.rb +1 -1
  137. data/lib/active_admin/menu_item.rb +24 -3
  138. data/lib/active_admin/namespace.rb +2 -44
  139. data/lib/active_admin/namespace_settings.rb +2 -35
  140. data/lib/active_admin/order_clause.rb +4 -1
  141. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +3 -75
  142. data/lib/active_admin/orm/active_record/comments.rb +10 -5
  143. data/lib/active_admin/pundit_adapter.rb +1 -1
  144. data/lib/active_admin/resource/action_items.rb +15 -20
  145. data/lib/active_admin/resource/attributes.rb +1 -8
  146. data/lib/active_admin/resource/naming.rb +1 -2
  147. data/lib/active_admin/resource.rb +1 -0
  148. data/lib/active_admin/resource_dsl.rb +1 -1
  149. data/lib/active_admin/scope.rb +1 -1
  150. data/lib/active_admin/settings_node.rb +1 -1
  151. data/lib/active_admin/sidebar_section.rb +0 -5
  152. data/lib/active_admin/version.rb +1 -1
  153. data/lib/active_admin/view_helpers.rb +0 -12
  154. data/lib/active_admin/views/components/active_admin_form.rb +21 -29
  155. data/lib/active_admin/views/components/attributes_table.rb +4 -12
  156. data/lib/active_admin/views/components/index_list.rb +10 -23
  157. data/lib/active_admin/views/components/paginated_collection.rb +34 -39
  158. data/lib/active_admin/views/components/panel.rb +2 -10
  159. data/lib/active_admin/views/components/scopes.rb +12 -21
  160. data/lib/active_admin/views/components/status_tag.rb +22 -19
  161. data/lib/active_admin/views/components/table_for.rb +19 -24
  162. data/lib/active_admin/views/components/tabs.rb +10 -11
  163. data/lib/active_admin/views/index_as_table.rb +24 -97
  164. data/lib/active_admin.rb +7 -11
  165. data/lib/generators/active_admin/assets/assets_generator.rb +4 -4
  166. data/lib/generators/active_admin/assets/templates/active_admin.css +3 -0
  167. data/lib/generators/active_admin/assets/templates/tailwind.config.js +18 -0
  168. data/lib/generators/active_admin/install/install_generator.rb +2 -8
  169. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +10 -87
  170. data/lib/generators/active_admin/install/templates/dashboard.rb +8 -25
  171. data/lib/generators/active_admin/page/page_generator.rb +0 -1
  172. data/lib/generators/active_admin/resource/resource_generator.rb +46 -7
  173. data/lib/generators/active_admin/resource/templates/resource.rb.erb +42 -0
  174. data/lib/generators/active_admin/views_generator.rb +18 -0
  175. metadata +67 -214
  176. data/app/assets/javascripts/active_admin/base.js +0 -521
  177. data/app/assets/stylesheets/active_admin/_base.scss +0 -57
  178. data/app/assets/stylesheets/active_admin/_forms.scss +0 -315
  179. data/app/assets/stylesheets/active_admin/_header.scss +0 -188
  180. data/app/assets/stylesheets/active_admin/_mixins.scss +0 -1
  181. data/app/assets/stylesheets/active_admin/_normalize.scss +0 -349
  182. data/app/assets/stylesheets/active_admin/_print.scss +0 -287
  183. data/app/assets/stylesheets/active_admin/_typography.scss +0 -100
  184. data/app/assets/stylesheets/active_admin/components/_batch_actions.scss +0 -6
  185. data/app/assets/stylesheets/active_admin/components/_blank_slates.scss +0 -30
  186. data/app/assets/stylesheets/active_admin/components/_breadcrumbs.scss +0 -20
  187. data/app/assets/stylesheets/active_admin/components/_buttons.scss +0 -6
  188. data/app/assets/stylesheets/active_admin/components/_columns.scss +0 -3
  189. data/app/assets/stylesheets/active_admin/components/_comments.scss +0 -41
  190. data/app/assets/stylesheets/active_admin/components/_date_picker.scss +0 -148
  191. data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +0 -154
  192. data/app/assets/stylesheets/active_admin/components/_flash_messages.scss +0 -37
  193. data/app/assets/stylesheets/active_admin/components/_grid.scss +0 -9
  194. data/app/assets/stylesheets/active_admin/components/_index_list.scss +0 -12
  195. data/app/assets/stylesheets/active_admin/components/_links.scss +0 -5
  196. data/app/assets/stylesheets/active_admin/components/_modal_dialog.scss +0 -34
  197. data/app/assets/stylesheets/active_admin/components/_pagination.scss +0 -58
  198. data/app/assets/stylesheets/active_admin/components/_panels.scss +0 -6
  199. data/app/assets/stylesheets/active_admin/components/_scopes.scss +0 -13
  200. data/app/assets/stylesheets/active_admin/components/_status_tags.scss +0 -12
  201. data/app/assets/stylesheets/active_admin/components/_table_tools.scss +0 -70
  202. data/app/assets/stylesheets/active_admin/components/_tables.scss +0 -112
  203. data/app/assets/stylesheets/active_admin/components/_tabs.scss +0 -68
  204. data/app/assets/stylesheets/active_admin/components/_unsupported_browser.scss +0 -16
  205. data/app/assets/stylesheets/active_admin/mixins/_all.scss +0 -8
  206. data/app/assets/stylesheets/active_admin/mixins/_buttons.scss +0 -65
  207. data/app/assets/stylesheets/active_admin/mixins/_gradients.scss +0 -28
  208. data/app/assets/stylesheets/active_admin/mixins/_rounded.scss +0 -22
  209. data/app/assets/stylesheets/active_admin/mixins/_sections.scss +0 -41
  210. data/app/assets/stylesheets/active_admin/mixins/_shadows.scss +0 -15
  211. data/app/assets/stylesheets/active_admin/mixins/_typography.scss +0 -3
  212. data/app/assets/stylesheets/active_admin/mixins/_utilities.scss +0 -17
  213. data/app/assets/stylesheets/active_admin/mixins/_variables.scss +0 -51
  214. data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +0 -44
  215. data/app/assets/stylesheets/active_admin/structure/_footer.scss +0 -19
  216. data/app/assets/stylesheets/active_admin/structure/_main_structure.scss +0 -29
  217. data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +0 -43
  218. data/app/javascript/active_admin/base.js +0 -28
  219. data/app/javascript/active_admin/ext/jquery-ui.js +0 -7
  220. data/app/javascript/active_admin/ext/jquery.js +0 -9
  221. data/app/javascript/active_admin/initializers/batch-actions.js +0 -61
  222. data/app/javascript/active_admin/initializers/checkbox-toggler.js +0 -3
  223. data/app/javascript/active_admin/initializers/datepicker.js +0 -16
  224. data/app/javascript/active_admin/initializers/dropdown-menu.js +0 -9
  225. data/app/javascript/active_admin/initializers/filters.js +0 -10
  226. data/app/javascript/active_admin/initializers/has-many.js +0 -98
  227. data/app/javascript/active_admin/initializers/per-page.js +0 -13
  228. data/app/javascript/active_admin/initializers/table-checkbox-toggler.js +0 -3
  229. data/app/javascript/active_admin/initializers/tabs.js +0 -6
  230. data/app/javascript/active_admin/lib/checkbox-toggler.js +0 -49
  231. data/app/javascript/active_admin/lib/dropdown-menu.js +0 -116
  232. data/app/javascript/active_admin/lib/filters.js +0 -39
  233. data/app/javascript/active_admin/lib/modal-dialog.js +0 -63
  234. data/app/javascript/active_admin/lib/per-page.js +0 -38
  235. data/app/javascript/active_admin/lib/table-checkbox-toggler.js +0 -38
  236. data/app/javascript/active_admin/lib/utils.js +0 -40
  237. data/app/views/kaminari/active_admin/_first_page.html.erb +0 -11
  238. data/app/views/kaminari/active_admin/_gap.html.erb +0 -8
  239. data/app/views/kaminari/active_admin/_last_page.html.erb +0 -11
  240. data/app/views/kaminari/active_admin/_next_page.html.erb +0 -11
  241. data/app/views/kaminari/active_admin/_page.html.erb +0 -12
  242. data/app/views/kaminari/active_admin/_paginator.html.erb +0 -25
  243. data/app/views/kaminari/active_admin/_prev_page.html.erb +0 -11
  244. data/app/views/kaminari/active_admin_countless/_first_page.html.erb +0 -11
  245. data/app/views/kaminari/active_admin_countless/_next_page.html.erb +0 -11
  246. data/app/views/kaminari/active_admin_countless/_page.html.erb +0 -12
  247. data/app/views/kaminari/active_admin_countless/_prev_page.html.erb +0 -11
  248. data/app/views/layouts/active_admin.html.arb +0 -2
  249. data/lib/active_admin/abstract_view_factory.rb +0 -48
  250. data/lib/active_admin/asset_registration.rb +0 -30
  251. data/lib/active_admin/base_controller/menu.rb +0 -35
  252. data/lib/active_admin/batch_actions/views/batch_action_selector.rb +0 -59
  253. data/lib/active_admin/filters/active_sidebar.rb +0 -28
  254. data/lib/active_admin/generators/boilerplate.rb +0 -54
  255. data/lib/active_admin/helpers/collection.rb +0 -21
  256. data/lib/active_admin/helpers/i18n.rb +0 -8
  257. data/lib/active_admin/inputs/datepicker_input.rb +0 -28
  258. data/lib/active_admin/inputs/filters/date_picker_input.rb +0 -14
  259. data/lib/active_admin/orm/active_record/comments/show_page_helper.rb +0 -24
  260. data/lib/active_admin/orm/mongoid.rb +0 -2
  261. data/lib/active_admin/resource_controller/sidebars.rb +0 -19
  262. data/lib/active_admin/resource_controller.rb +0 -68
  263. data/lib/active_admin/view_factory.rb +0 -28
  264. data/lib/active_admin/view_helpers/active_admin_application_helper.rb +0 -13
  265. data/lib/active_admin/view_helpers/auto_link_helper.rb +0 -46
  266. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +0 -34
  267. data/lib/active_admin/view_helpers/display_helper.rb +0 -119
  268. data/lib/active_admin/view_helpers/download_format_links_helper.rb +0 -60
  269. data/lib/active_admin/view_helpers/fields_for.rb +0 -51
  270. data/lib/active_admin/view_helpers/flash_helper.rb +0 -15
  271. data/lib/active_admin/view_helpers/form_helper.rb +0 -21
  272. data/lib/active_admin/view_helpers/scope_name_helper.rb +0 -17
  273. data/lib/active_admin/view_helpers/sidebar_helper.rb +0 -16
  274. data/lib/active_admin/view_helpers/title_helper.rb +0 -12
  275. data/lib/active_admin/view_helpers/view_factory_helper.rb +0 -12
  276. data/lib/active_admin/views/action_items.rb +0 -18
  277. data/lib/active_admin/views/components/active_filters_sidebar_content.rb +0 -59
  278. data/lib/active_admin/views/components/blank_slate.rb +0 -18
  279. data/lib/active_admin/views/components/columns.rb +0 -162
  280. data/lib/active_admin/views/components/dropdown_menu.rb +0 -69
  281. data/lib/active_admin/views/components/menu.rb +0 -33
  282. data/lib/active_admin/views/components/menu_item.rb +0 -59
  283. data/lib/active_admin/views/components/sidebar.rb +0 -14
  284. data/lib/active_admin/views/components/sidebar_section.rb +0 -35
  285. data/lib/active_admin/views/components/site_title.rb +0 -55
  286. data/lib/active_admin/views/components/unsupported_browser.rb +0 -12
  287. data/lib/active_admin/views/footer.rb +0 -32
  288. data/lib/active_admin/views/header.rb +0 -20
  289. data/lib/active_admin/views/index_as_block.rb +0 -37
  290. data/lib/active_admin/views/index_as_blog.rb +0 -156
  291. data/lib/active_admin/views/index_as_grid.rb +0 -81
  292. data/lib/active_admin/views/pages/base.rb +0 -134
  293. data/lib/active_admin/views/pages/form.rb +0 -65
  294. data/lib/active_admin/views/pages/index.rb +0 -166
  295. data/lib/active_admin/views/pages/layout.rb +0 -27
  296. data/lib/active_admin/views/pages/page.rb +0 -31
  297. data/lib/active_admin/views/pages/show.rb +0 -60
  298. data/lib/active_admin/views/tabbed_navigation.rb +0 -12
  299. data/lib/active_admin/views/title_bar.rb +0 -56
  300. data/lib/generators/active_admin/assets/templates/active_admin.js +0 -1
  301. data/lib/generators/active_admin/assets/templates/active_admin.scss +0 -17
  302. data/lib/generators/active_admin/resource/templates/admin.rb.erb +0 -46
  303. data/lib/generators/active_admin/webpacker/plugins/jquery.js +0 -7
  304. data/lib/generators/active_admin/webpacker/templates/active_admin.js +0 -5
  305. data/lib/generators/active_admin/webpacker/templates/active_admin.scss +0 -17
  306. data/lib/generators/active_admin/webpacker/templates/print.scss +0 -2
  307. data/lib/generators/active_admin/webpacker/webpacker_generator.rb +0 -27
  308. data/vendor/assets/javascripts/jquery-ui/data.js +0 -45
  309. data/vendor/assets/javascripts/jquery-ui/disable-selection.js +0 -51
  310. data/vendor/assets/javascripts/jquery-ui/focusable.js +0 -89
  311. data/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +0 -83
  312. data/vendor/assets/javascripts/jquery-ui/form.js +0 -25
  313. data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
  314. data/vendor/assets/javascripts/jquery-ui/keycode.js +0 -51
  315. data/vendor/assets/javascripts/jquery-ui/labels.js +0 -71
  316. data/vendor/assets/javascripts/jquery-ui/plugin.js +0 -49
  317. data/vendor/assets/javascripts/jquery-ui/position.js +0 -513
  318. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
  319. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
  320. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +0 -50
  321. data/vendor/assets/javascripts/jquery-ui/tabbable.js +0 -41
  322. data/vendor/assets/javascripts/jquery-ui/unique-id.js +0 -54
  323. data/vendor/assets/javascripts/jquery-ui/version.js +0 -20
  324. data/vendor/assets/javascripts/jquery-ui/widget.js +0 -758
  325. data/vendor/assets/javascripts/jquery-ui/widgets/button.js +0 -454
  326. data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +0 -294
  327. data/vendor/assets/javascripts/jquery-ui/widgets/controlgroup.js +0 -304
  328. data/vendor/assets/javascripts/jquery-ui/widgets/datepicker.js +0 -2243
  329. data/vendor/assets/javascripts/jquery-ui/widgets/dialog.js +0 -971
  330. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +0 -1268
  331. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +0 -241
  332. data/vendor/assets/javascripts/jquery-ui/widgets/resizable.js +0 -1228
  333. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +0 -1622
  334. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +0 -931
  335. /data/{lib → app/controllers}/active_admin/base_controller/authorization.rb +0 -0
  336. /data/{lib → app/controllers}/active_admin/resource_controller/decorators.rb +0 -0
  337. /data/{lib → app/controllers}/active_admin/resource_controller/polymorphic_routes.rb +0 -0
  338. /data/{lib → app/controllers}/active_admin/resource_controller/resource_class_methods.rb +0 -0
  339. /data/lib/{active_admin/orm/mongoid/.gitkeep → generators/active_admin/assets/templates/builds/.keep} +0 -0
@@ -1,9 +1,6 @@
1
1
  ru:
2
2
  active_admin:
3
3
  dashboard: "Панель управления"
4
- dashboard_welcome:
5
- welcome: "Добро пожаловать в Active Admin. Это стандартная страница управления сайтом."
6
- call_to_action: "Чтобы добавить сюда что-нибудь загляните в 'app/admin/dashboard.rb'"
7
4
  view: "Открыть"
8
5
  edit: "Изменить"
9
6
  delete: "Удалить"
@@ -28,15 +25,11 @@ ru:
28
25
  from: "От"
29
26
  to: "До"
30
27
  search_status:
31
- headline: "Статус поиска:"
32
- current_scope: "Область:"
33
- current_filters: "Текущий фильтр:"
34
28
  no_current_filters: "Ни один"
35
29
  status_tag:
36
30
  "yes": "Да"
37
31
  "no": "Нет"
38
32
  "unset": "Нет"
39
- main_content: "Создайте %{model}#main_content для отображения содержимого."
40
33
  logout: "Выйти"
41
34
  powered_by: "Работает на %{active_admin} %{version}"
42
35
  sidebars:
@@ -57,8 +50,6 @@ ru:
57
50
  blank_slate:
58
51
  content: "Пока нет %{resource_name}."
59
52
  link: "Создать"
60
- dropdown_actions:
61
- button_label: "Oперации"
62
53
  batch_actions:
63
54
  button_label: "Групповые операции"
64
55
  default_confirmation: "Вы уверены, что вы хотите это сделать?"
@@ -122,14 +113,7 @@ ru:
122
113
  sign_in_with_omniauth_provider: "Войти с помощью %{provider}"
123
114
  resend_unlock_instructions: "Повторная отправка инструкций разблокировки"
124
115
  resend_confirmation_instructions: "Повторная отправка инструкций подтверждения"
125
- unsupported_browser:
126
- headline: "Пожалуйста, обратите внимание, что Active Admin больше не поддерживает старые версии Internet Explorer начиная с версии IE 8"
127
- recommendation: "Мы рекомендуем обновить версию вашего браузера (<a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, или <a href=\"https://mozilla.org/firefox/\">Firefox</a>)."
128
- turn_off_compatibility_view: "Если вы используете IE 9 или новее, убедитесь, что <a href=\"https://support.microsoft.com/ru-ru/help/17471\">вы выключили опцию \"Просмотр в режиме совместимости\"</a>."
129
116
  access_denied:
130
117
  message: "Вы не авторизованы для выполнения данного действия."
131
118
  index_list:
132
119
  table: "Таблица"
133
- block: "Список"
134
- grid: "Сетка"
135
- blog: "Блог"
@@ -21,9 +21,6 @@ sk:
21
21
  updated_at: "Upravený"
22
22
  active_admin:
23
23
  dashboard: Úvod
24
- dashboard_welcome:
25
- welcome: "Vitajte v Active Admin. Toto je nástenka."
26
- call_to_action: "Pre pridanie sekcie na nástenku se pozrite do súboru 'app/admin/dashboard.rb'"
27
24
  view: "Zobraziť"
28
25
  edit: "Upraviť"
29
26
  delete: "Zmazať"
@@ -52,15 +49,11 @@ sk:
52
49
  scopes:
53
50
  all: "Všetko"
54
51
  search_status:
55
- headline: "Stav vyhľadávania:"
56
- current_scope: "Scope:"
57
- current_filters: "Filtre:"
58
52
  no_current_filters: "Žiadne"
59
53
  status_tag:
60
54
  "yes": "Áno"
61
55
  "no": "Nie"
62
56
  "unset": "Nie"
63
- main_content: "Implementujte prosím %{model}#main_content pre zobrazenie obsahu."
64
57
  logout: "Odhlásiť"
65
58
  powered_by: "%{active_admin} %{version}"
66
59
  sidebars:
@@ -80,8 +73,6 @@ sk:
80
73
  blank_slate:
81
74
  content: "Zatiaľ tu nie je žiadny obsah."
82
75
  link: "Vytvoriť"
83
- dropdown_actions:
84
- button_label: "Akcie"
85
76
  batch_actions:
86
77
  button_label: "Hromadné akcie"
87
78
  default_confirmation: "Ste si istí, že to chcete spraviť?"
@@ -147,14 +138,7 @@ sk:
147
138
  sign_in_with_omniauth_provider: "Prihlásiť sa cez %{provider}"
148
139
  resend_unlock_instructions: "Poslať znovu inštrukcie na odomknutie účtu"
149
140
  resend_confirmation_instructions: "Preposlať potvrdzovacie inštrukcie"
150
- unsupported_browser:
151
- headline: "ActiveAdmin nepodporuje Internet Explorer vo verzii <= 8."
152
- recommendation: "Odporúčame <a href=\"http://browsehappy.com/\">aktualizovať Váš prehliadač</a>."
153
- turn_off_compatibility_view: "Ak používate Internet Explorer vo verzii >= 9, uistite sa, že <a href=\"https://support.microsoft.com/en-us/help/17471\">\"režim kompatibility\" je vypnutý</a>"
154
141
  access_denied:
155
142
  message: "Nemáte oprávnenie k vykonaniu tejto akcie."
156
143
  index_list:
157
144
  table: "Tabuľka"
158
- block: "Zoznam"
159
- grid: "Tabuľka"
160
- blog: "Blog"
@@ -17,9 +17,6 @@
17
17
  updated_at: "Aktualiserad"
18
18
  active_admin:
19
19
  dashboard: Skrivbord
20
- dashboard_welcome:
21
- welcome: "Välkommen till Active Admin. Detta är ditt standardskrivbord."
22
- call_to_action: "För att lägga till sektioner, gå till 'app/admin/dashboard.rb'"
23
20
  view: "Visa"
24
21
  edit: "Redigera"
25
22
  delete: "Ta bort"
@@ -48,15 +45,11 @@
48
45
  scopes:
49
46
  all: "Alla"
50
47
  search_status:
51
- headline: "Sökstatus:"
52
- current_scope: "Omfattning:"
53
- current_filters: "Aktiva filter:"
54
48
  no_current_filters: "Inga"
55
49
  status_tag:
56
50
  "yes": "Ja"
57
51
  "no": "Nej"
58
52
  "unset": "Nej"
59
- main_content: "Implementera %{model}#main_content för att visa innehåll."
60
53
  logout: "Logga ut"
61
54
  powered_by: "Powered by %{active_admin} %{version}"
62
55
  sidebars:
@@ -76,8 +69,6 @@
76
69
  blank_slate:
77
70
  content: "Det finns inga %{resource_name} än."
78
71
  link: "Skapa en"
79
- dropdown_actions:
80
- button_label: "Åtgärder"
81
72
  batch_actions:
82
73
  button_label: "Batch-åtgärder"
83
74
  default_confirmation: "Är du säker på att du vill göra detta?"
@@ -141,14 +132,7 @@
141
132
  sign_in_with_omniauth_provider: "Logga in med %{provider}"
142
133
  resend_unlock_instructions: "Skicka upplåsningsinstruktioner igen"
143
134
  resend_confirmation_instructions: "Skicka bekräftningsinstruktioner igen"
144
- unsupported_browser:
145
- headline: "Observera att ActiveAdmin inte längre stödjer Internet Explorer version 8 eller lägre."
146
- recommendation: "Vi rekommenderar att du uppgraderar till den senaste versionen av <a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, eller <a href=\"https://mozilla.org/firefox/\">Firefox</a>."
147
- turn_off_compatibility_view: "Om du använder IE 9 eller senare, se till att <a href=\"https://support.microsoft.com/sv-se/help/17471\">stänga av \"Compatibility View\"</a>."
148
135
  access_denied:
149
136
  message: "Du har inte behörighet att utföra denna åtgärd."
150
137
  index_list:
151
138
  table: "Tabell"
152
- block: "Lista"
153
- grid: "Rutnät"
154
- blog: "Blogg"
@@ -1,9 +1,6 @@
1
1
  tr:
2
2
  active_admin:
3
3
  dashboard: "Gösterge Paneli"
4
- dashboard_welcome:
5
- welcome: "Active Admin'e hoş geldiniz. Burası varsayılan gösterge paneli sayfasıdır."
6
- call_to_action: "Buraya bölümler eklemek için 'app/admin/dashboard.rb' dosyasına bakabilirsiniz."
7
4
  view: "Görüntüle"
8
5
  edit: "Düzenle"
9
6
  delete: "Sil"
@@ -27,15 +24,11 @@ tr:
27
24
  filter: "Filtrele"
28
25
  clear: "Filtreleri Temizle"
29
26
  search_status:
30
- headline: "Arama"
31
- current_scope: "Kapsam:"
32
- current_filters: "Seçili filtreler:"
33
27
  no_current_filters: "Yok"
34
28
  status_tag:
35
29
  "yes": "Evet"
36
30
  "no": "Hayır"
37
31
  "unset": "Hayır"
38
- main_content: "İçeriği görüntülemek için lütfen %{model}#main_content metodunu ekleyin."
39
32
  logout: "Çıkış Yap"
40
33
  powered_by: "%{active_admin} %{version} tarafından desteklenmektedir."
41
34
  sidebars:
@@ -55,8 +48,6 @@ tr:
55
48
  blank_slate:
56
49
  content: "Henüz %{resource_name} yok."
57
50
  link: "Bir tane oluşturun"
58
- dropdown_actions:
59
- button_label: "İşlemler"
60
51
  batch_actions:
61
52
  button_label: "Toplu İşlemler"
62
53
  default_confirmation: "Bunu yapmak istediğinizden emin misiniz?"
@@ -120,14 +111,7 @@ tr:
120
111
  sign_in_with_omniauth_provider: "%{provider} ile giriş yapın"
121
112
  resend_unlock_instructions: "Hesap geri açma talimatlarını tekrar gönder"
122
113
  resend_confirmation_instructions: "Onaylama talimatlarını tekrar gönder"
123
- unsupported_browser:
124
- headline: "ActiveAdmin Internet Explorer 8 ve altı artık desteklememektedir."
125
- recommendation: "Son sürüm <a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, ya da <a href=\"https://mozilla.org/firefox/\">Firefox</a> tarayıcılarından birine geçmenizi tavsiye ederiz."
126
- turn_off_compatibility_view: "IE 9 ya da üstünü kullanıyorsanız, <a href=\"http://windows.microsoft.com/tr-tr/internet-explorer/use-compatibility-view\">\"Uyumluluk Görünümü\"</a>nü kapatmayı unutmayın."
127
114
  access_denied:
128
115
  message: "Bu işlemi gerçekleştirmek için yetkiniz yok."
129
116
  index_list:
130
117
  table: "Tablo"
131
- block: "Liste"
132
- grid: "Izgara"
133
- blog: "Blog"
@@ -1,9 +1,6 @@
1
1
  uk:
2
2
  active_admin:
3
3
  dashboard: "Панель керування"
4
- dashboard_welcome:
5
- welcome: "Ласкаво просимо до Active Admin. Це стандартна сторінка керування сайтом."
6
- call_to_action: "Щоб додати сюди що-небудь, зазирніть у 'app/admin/dashboard.rb'"
7
4
  view: "Переглянути"
8
5
  edit: "Змінити"
9
6
  delete: "Видалити"
@@ -28,15 +25,11 @@ uk:
28
25
  from: "від"
29
26
  to: "до"
30
27
  search_status:
31
- headline: "Статус пошуку:"
32
- current_scope: "Область:"
33
- current_filters: "Поточний фільтр:"
34
28
  no_current_filters: "Жоден"
35
29
  status_tag:
36
30
  "yes": "Так"
37
31
  "no": "Ні"
38
32
  "unset": "Ні"
39
- main_content: "Створіть %{model}#main_content для відображення вмісту."
40
33
  logout: "Вийти"
41
34
  powered_by: "Powered by %{active_admin} %{version}"
42
35
  sidebars:
@@ -57,8 +50,6 @@ uk:
57
50
  blank_slate:
58
51
  content: "Поки-що немає %{resource_name}."
59
52
  link: "Створити"
60
- dropdown_actions:
61
- button_label: "Oперації"
62
53
  batch_actions:
63
54
  button_label: "Групові операції"
64
55
  default_confirmation: "Ви справді бажаєте це зробити?"
@@ -119,14 +110,7 @@ uk:
119
110
  sign_in_with_omniauth_provider: "Увійти з допомогою %{provider}"
120
111
  resend_unlock_instructions: "Повторна відправка інструкцій розблокування"
121
112
  resend_confirmation_instructions: "Повторна відправка інструкцій підтвердження"
122
- unsupported_browser:
123
- headline: "Зверніть, будь-ласка, увагу, що ActiveAdmin більше не підтримує Internet Explorer 8 версії і нижче"
124
- recommendation: "Ми рекомендуємо оновити версію вашого браузеру (<a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, або <a href=\"https://mozilla.org/firefox/\">Firefox</a>)."
125
- turn_off_compatibility_view: "Якщо ви використовуєте IE 9 і вище, переконайтесь, що <a href=\"https://support.microsoft.com/uk-ua/help/17471\">ви вимкнули опцію \"Перегляд в режимі сумісності\"</a>."
126
113
  access_denied:
127
114
  message: "Ви не авторизовані для виконання даної дії."
128
115
  index_list:
129
116
  table: "Таблиця"
130
- block: "Список"
131
- grid: "Сітка"
132
- blog: "Блог"
@@ -17,9 +17,6 @@ vi:
17
17
  updated_at: "Đã cập nhật"
18
18
  active_admin:
19
19
  dashboard: Bảng điều khiển
20
- dashboard_welcome:
21
- welcome: "Chào mừng bạn đến với Active Admin. Đây là trang điều khiển mặc định."
22
- call_to_action: "Để thêm thành phần cho trang điều khiển hãy chỉnh sửa 'app/admin/dashboard.rb'"
23
20
  view: "Xem"
24
21
  edit: "Chỉnh sửa"
25
22
  delete: "Xóa"
@@ -48,15 +45,11 @@ vi:
48
45
  scopes:
49
46
  all: "Tất cả"
50
47
  search_status:
51
- headline: "Danh sách tìm kiếm:"
52
- current_scope: "Phạm vi:"
53
- current_filters: "Bộ lọc hiện tại:"
54
48
  no_current_filters: "Không có"
55
49
  status_tag:
56
50
  "yes": "Có"
57
51
  "no": "Không Có"
58
52
  "unset": "Không Có"
59
- main_content: "Xin bổ sung %{model}#main_content để hiển thị nội dung."
60
53
  logout: "Đăng xuất"
61
54
  powered_by: "Bản quyền bởi %{active_admin} %{version}"
62
55
  sidebars:
@@ -76,8 +69,6 @@ vi:
76
69
  blank_slate:
77
70
  content: "Chưa có %{resource_name}."
78
71
  link: "Tạo mới"
79
- dropdown_actions:
80
- button_label: "Hành động"
81
72
  batch_actions:
82
73
  button_label: "Hành động hàng loạt"
83
74
  default_confirmation: "Bạn có chắc bạn muốn làm điều này?"
@@ -141,14 +132,7 @@ vi:
141
132
  sign_in_with_omniauth_provider: "Đăng nhập với %{provider}"
142
133
  resend_unlock_instructions: "Gửi lại hướng dẫn mở khoá"
143
134
  resend_confirmation_instructions: "Gửi lại hướng dẫn xác nhận"
144
- unsupported_browser:
145
- headline: "Vui lòng lưu ý rằng ActiveAdmin không còn hỗ trợ trên Internet Explorer các phiên bản 8 và thấp hơn."
146
- recommendation: "Chúng tôi khuyên bạn hãy vào <a href=\"http://browsehappy.com/\">nâng cấp trình duyệt của bạn </a> để cải thiện trải nghiệm của bạn."
147
- turn_off_compatibility_view: "Nếu bạn đang sử dụng IE 9 hoặc mới hơn, hãy chắc chắn bạn <a href=\"https://support.microsoft.com/en-us/help/17471\">tắt \"Compatibility View\"</a>."
148
135
  access_denied:
149
136
  message: "Bạn không có quyền thực hiện tính năng này"
150
137
  index_list:
151
138
  table: "Bảng"
152
- block: "Danh sách"
153
- grid: "Lưới"
154
- blog: "Blog"
@@ -17,9 +17,6 @@
17
17
  updated_at: "更新"
18
18
  active_admin:
19
19
  dashboard: "控制面板"
20
- dashboard_welcome:
21
- welcome: "欢迎使用Active Admin. 这是默认的控制面板页."
22
- call_to_action: "若要添加新的面板内容, 请修改 'app/admin/dashboard.rb'"
23
20
  view: "查看"
24
21
  edit: "编辑"
25
22
  delete: "删除"
@@ -48,15 +45,11 @@
48
45
  scopes:
49
46
  all: "所有"
50
47
  search_status:
51
- headline: "搜索条件:"
52
- current_scope: "范围:"
53
- current_filters: "过滤条件:"
54
48
  no_current_filters: "无"
55
49
  status_tag:
56
50
  "yes": "是"
57
51
  "no": "否"
58
52
  "unset": "否"
59
- main_content: "请执行 %{model}#main_content 来显示内容。"
60
53
  logout: "退出"
61
54
  powered_by: "构建程序为 %{active_admin} %{version}"
62
55
  sidebars:
@@ -76,8 +69,6 @@
76
69
  blank_slate:
77
70
  content: "暂时还没有%{resource_name}。"
78
71
  link: "新增一个"
79
- dropdown_actions:
80
- button_label: "操作"
81
72
  batch_actions:
82
73
  button_label: "批处理"
83
74
  default_confirmation: "你确定要这样做?"
@@ -141,14 +132,7 @@
141
132
  sign_in_with_omniauth_provider: "通过%{provider}登录"
142
133
  resend_unlock_instructions: "重发解锁邮件"
143
134
  resend_confirmation_instructions: "重发确认邮件"
144
- unsupported_browser:
145
- headline: "很抱歉,ActiveAdmin 已不再支持 Internet Explorer 8 以下版本的浏览器。"
146
- recommendation: "建议您升级到最新版本的<a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>,<a href=\"https://chrome.google.com/\">Google Chrome</a>,或是 <a href=\"https://mozilla.org/firefox/\">Firefox</a>。"
147
- turn_off_compatibility_view: "如果您使用的是 IE 9 或更新的版本,请确认<a href=\"https://support.microsoft.com/zh-cn/help/17472/windows-internet-explorer-11-fix-site-display-problems-compatibility-view\">已关闭“兼容性视图”</a>。"
148
135
  access_denied:
149
136
  message: "您无权处理此操作"
150
137
  index_list:
151
138
  table: "表格"
152
- block: "列表"
153
- grid: "网格"
154
- blog: "博客"
@@ -1,9 +1,6 @@
1
1
  "zh-TW":
2
2
  active_admin:
3
3
  dashboard: 儀表板
4
- dashboard_welcome:
5
- welcome: "歡迎來到 Active Admin,這是預設的儀表板頁面。"
6
- call_to_action: "要新增儀表板內容,請查看 'app/admin/dashboard.rb'"
7
4
  view: "檢視"
8
5
  edit: "編輯"
9
6
  delete: "刪除"
@@ -25,15 +22,11 @@
25
22
  filter: "篩選"
26
23
  clear: "清除篩選條件"
27
24
  search_status:
28
- headline: "搜尋條件:"
29
- current_scope: "子集:"
30
- current_filters: "目前篩選條件:"
31
25
  no_current_filters: "無"
32
26
  status_tag:
33
27
  "yes": "是"
34
28
  "no": "否"
35
29
  "unset": "否"
36
- main_content: "請實作 %{model}#main_content 以顯示內容。"
37
30
  logout: "登出"
38
31
  powered_by: "Powered by %{active_admin} %{version}"
39
32
  sidebars:
@@ -52,8 +45,6 @@
52
45
  blank_slate:
53
46
  content: "尚無 %{resource_name}"
54
47
  link: "建立一筆"
55
- dropdown_actions:
56
- button_label: "操作"
57
48
  batch_actions:
58
49
  button_label: "批次作業"
59
50
  default_confirmation: "你確定你要這樣做?"
@@ -115,14 +106,7 @@
115
106
  sign_in_with_omniauth_provider: "使用 %{provider} 登入"
116
107
  resend_unlock_instructions: "重新發送解鎖指示"
117
108
  resend_confirmation_instructions: "重新發送確認信"
118
- unsupported_browser:
119
- headline: "很抱歉,ActiveAdmin 已不再支援 Internet Explorer 8 以下版本的瀏覽器。"
120
- recommendation: "建議您升級到最新版本的<a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>,<a href=\"https://chrome.google.com/\">Google Chrome</a>,或是 <a href=\"https://mozilla.org/firefox/\">Firefox</a>。"
121
- turn_off_compatibility_view: "若您是使用 IE 9 或更新的版本,請確認<a href=\"https://support.microsoft.com/zh-tw/help/17471\">「相容性檢視」是關閉的</a>。"
122
109
  access_denied:
123
110
  message: "您沒有權限執行此項操作"
124
111
  index_list:
125
112
  table: "表格"
126
- block: "清單"
127
- grid: "格狀"
128
- blog: "部落格"
@@ -43,15 +43,12 @@ module ActiveAdmin
43
43
  @namespaces = Namespace::Store.new
44
44
  end
45
45
 
46
- include AssetRegistration
47
-
48
46
  # Event that gets triggered on load of Active Admin
49
47
  BeforeLoadEvent = "active_admin.application.before_load".freeze
50
48
  AfterLoadEvent = "active_admin.application.after_load".freeze
51
49
 
52
50
  # Runs before the app's AA initializer
53
51
  def setup!
54
- register_default_assets
55
52
  end
56
53
 
57
54
  # Runs after the app's AA initializer
@@ -148,7 +145,7 @@ module ActiveAdmin
148
145
  # ActiveAdmin.before_action :authenticate_admin!
149
146
  #
150
147
  AbstractController::Callbacks::ClassMethods.public_instance_methods.
151
- select { |m| m.match(/_action\z/) }.each do |name|
148
+ select { |m| m.end_with?('_action') }.each do |name|
152
149
  define_method name do |*args, &block|
153
150
  ActiveSupport.on_load(:active_admin_controller) do
154
151
  public_send name, *args, &block
@@ -164,11 +161,6 @@ module ActiveAdmin
164
161
 
165
162
  private
166
163
 
167
- def register_default_assets
168
- register_stylesheet "active_admin.css", media: "all"
169
- register_javascript "active_admin.js"
170
- end
171
-
172
164
  # Since app/admin is alphabetically before app/models, we have to remove it
173
165
  # from the host app's +autoload_paths+ to prevent missing constant errors.
174
166
  #
@@ -2,14 +2,11 @@
2
2
  module ActiveAdmin
3
3
  module BatchActions
4
4
  module Controller
5
-
6
5
  # Controller action that is called when submitting the batch action form
7
6
  def batch_action
8
7
  if action_present?
9
8
  selection = params[:collection_selection] || []
10
- inputs = JSON.parse params[:batch_action_inputs] || "{}"
11
- valid_keys = MethodOrProcHelper.render_in_context(self, current_batch_action.inputs).try(:keys)
12
- inputs = inputs.with_indifferent_access.slice *valid_keys
9
+ inputs = JSON.parse(params[:batch_action_inputs].presence || "{}")
13
10
  instance_exec selection, inputs, &current_batch_action.block
14
11
  else
15
12
  raise "Couldn't find batch action \"#{params[:batch_action]}\""
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveAdmin
3
-
4
3
  module BatchActions
5
4
  module ResourceExtension
6
5
  def initialize(*)
@@ -59,7 +58,7 @@ module ActiveAdmin
59
58
  destroy_options = {
60
59
  priority: 100,
61
60
  confirm: proc { I18n.t("active_admin.batch_actions.delete_confirmation", plural_model: active_admin_config.plural_resource_label.downcase) },
62
- if: proc { controller.action_methods.include?("destroy") && authorized?(ActiveAdmin::Auth::DESTROY, active_admin_config.resource_class) }
61
+ if: proc { destroy_action_authorized?(active_admin_config.resource_class) }
63
62
  }
64
63
 
65
64
  add_batch_action :destroy, proc { I18n.t("active_admin.delete") }, destroy_options do |selected_ids|
@@ -84,7 +83,7 @@ module ActiveAdmin
84
83
 
85
84
  include Comparable
86
85
 
87
- attr_reader :block, :title, :sym
86
+ attr_reader :block, :title, :sym, :partial, :link_html_options
88
87
 
89
88
  DEFAULT_CONFIRM_MESSAGE = proc { I18n.t "active_admin.batch_actions.default_confirmation" }
90
89
 
@@ -110,8 +109,8 @@ module ActiveAdmin
110
109
  # BatchAction.new(:flag, confirm: "Are you sure?") { |selection| }
111
110
  # => You can pass a custom confirmation message through `:confirm`
112
111
  #
113
- # BatchAction.new(:flag, form: {foo: :text, bar: :checkbox}) { |selection, inputs| }
114
- # => You can pass a hash of options to `:form` that will be rendered as form input fields for the user to fill out.
112
+ # BatchAction.new(:flag, partial: "flag_form", link_html_options: { "data-modal-target": "modal-id", "data-modal-show": "modal-id" }) { |selection, inputs| }
113
+ # => Pass a partial that contains a modal and with a data attribute that opens the modal with the form for the user to fill out.
115
114
  #
116
115
  def initialize(sym, title, options = {}, &block)
117
116
  @sym = sym
@@ -119,23 +118,19 @@ module ActiveAdmin
119
118
  @options = options
120
119
  @block = block
121
120
  @confirm = options[:confirm]
121
+ @partial = options[:partial]
122
+ @link_html_options = options[:link_html_options] || {}
122
123
  @block ||= proc {}
123
124
  end
124
125
 
125
126
  def confirm
126
127
  if @confirm == true
127
128
  DEFAULT_CONFIRM_MESSAGE
128
- elsif !@confirm && @options[:form]
129
- DEFAULT_CONFIRM_MESSAGE
130
129
  else
131
130
  @confirm
132
131
  end
133
132
  end
134
133
 
135
- def inputs
136
- @options[:form]
137
- end
138
-
139
134
  # Returns the display if block. If the block was not explicitly defined
140
135
  # a default block always returning true will be returned.
141
136
  def display_if_block
@@ -151,7 +146,5 @@ module ActiveAdmin
151
146
  def <=>(other)
152
147
  self.priority <=> other.priority
153
148
  end
154
-
155
149
  end
156
-
157
150
  end
@@ -3,13 +3,8 @@ require "active_admin/component"
3
3
 
4
4
  module ActiveAdmin
5
5
  module BatchActions
6
-
7
6
  # Build a BatchActionForm
8
7
  class BatchActionForm < ActiveAdmin::Component
9
- builder_method :batch_action_form
10
-
11
- attr_reader :prefix_html
12
-
13
8
  def build(options = {}, &block)
14
9
  options[:id] ||= "collection_selection"
15
10
 
@@ -33,7 +28,6 @@ module ActiveAdmin
33
28
  def closing_form_tag
34
29
  "</form>".html_safe
35
30
  end
36
-
37
31
  end
38
32
  end
39
33
  end
@@ -10,7 +10,7 @@ module ActiveAdmin
10
10
 
11
11
  def build(label_text = "")
12
12
  label do
13
- input type: "checkbox", id: "collection_selection_toggle_all", name: "collection_selection_toggle_all", class: "toggle_all"
13
+ input type: "checkbox", id: "collection_selection_toggle_all", name: "collection_selection_toggle_all", class: "batch-actions-toggle-all"
14
14
  text_node label_text if label_text.present?
15
15
  end
16
16
  end
@@ -21,7 +21,7 @@ module ActiveAdmin
21
21
  builder_method :resource_selection_cell
22
22
 
23
23
  def build(resource)
24
- input type: "checkbox", id: "batch_action_item_#{resource.id}", value: resource.id, class: "collection_selection", name: "collection_selection[]"
24
+ input type: "checkbox", id: "batch_action_item_#{resource.id}", value: resource.id, class: "batch-actions-resource-selection", name: "collection_selection[]"
25
25
  end
26
26
  end
27
27
 
@@ -7,11 +7,6 @@ ActiveAdmin.before_load do |app|
7
7
  ActiveAdmin::Resource.send :include, ActiveAdmin::BatchActions::ResourceExtension
8
8
  ActiveAdmin::ResourceController.send :include, ActiveAdmin::BatchActions::Controller
9
9
 
10
- # Require all the views
11
10
  require "active_admin/batch_actions/views/batch_action_form"
12
11
  require "active_admin/batch_actions/views/selection_cells"
13
- require "active_admin/batch_actions/views/batch_action_selector"
14
-
15
- # Register the views with the view factory
16
- app.view_factory.register batch_action_selector: ActiveAdmin::BatchActions::BatchActionSelector
17
12
  end
@@ -3,6 +3,8 @@ module ActiveAdmin
3
3
  module Callbacks
4
4
  extend ActiveSupport::Concern
5
5
 
6
+ CALLBACK_TYPES = %i[before after].freeze
7
+
6
8
  private
7
9
 
8
10
  # Simple callback system. Implements before and after callbacks for
@@ -58,7 +60,7 @@ module ActiveAdmin
58
60
  #
59
61
  def define_active_admin_callbacks(*names)
60
62
  names.each do |name|
61
- [:before, :after].each do |type|
63
+ CALLBACK_TYPES.each do |type|
62
64
  callback_name = "#{type}_#{name}_callbacks"
63
65
  callback_ivar = "@#{callback_name}"
64
66
 
@@ -75,10 +77,10 @@ module ActiveAdmin
75
77
  end
76
78
 
77
79
  # def run_create_callbacks
78
- define_method "run_#{name}_callbacks" do |*args, &block|
79
- self.class.send("before_#{name}_callbacks").each { |cbk| run_callback(cbk, *args) }
80
+ define_method :"run_#{name}_callbacks" do |*args, &block|
81
+ self.class.send(:"before_#{name}_callbacks").each { |cbk| run_callback(cbk, *args) }
80
82
  value = block.try :call
81
- self.class.send("after_#{name}_callbacks").each { |cbk| run_callback(cbk, *args) }
83
+ self.class.send(:"after_#{name}_callbacks").each { |cbk| run_callback(cbk, *args) }
82
84
  return value
83
85
  end
84
86
  send :private, "run_#{name}_callbacks"
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveAdmin
3
3
  class Component < Arbre::Component
4
-
5
4
  end
6
5
  end
@@ -129,7 +129,7 @@ module ActiveAdmin
129
129
  module Sanitizer
130
130
  extend self
131
131
 
132
- ATTACK_CHARACTERS = ["=", "+", "-", "@", "\t", "\r"].freeze
132
+ ATTACK_CHARACTERS = ['=', '+', '-', '@', "\t", "\r"].freeze
133
133
 
134
134
  def sanitize(value)
135
135
  return "'#{value}" if require_sanitization?(value)
@@ -10,8 +10,7 @@ module ActiveAdmin
10
10
  {
11
11
  path: ActiveAdmin.application.default_namespace || "/",
12
12
  controllers: ActiveAdmin::Devise.controllers,
13
- path_names: { sign_in: "login", sign_out: "logout" },
14
- sign_out_via: [*::Devise.sign_out_via, ActiveAdmin.application.logout_link_method].uniq
13
+ path_names: { sign_in: "login", sign_out: "logout" }
15
14
  }
16
15
  end
17
16
 
@@ -29,7 +28,8 @@ module ActiveAdmin
29
28
  extend ::ActiveSupport::Concern
30
29
  included do
31
30
  layout "active_admin_logged_out"
32
- helper ::ActiveAdmin::ViewHelpers
31
+ helper ::ActiveAdmin::LayoutHelper
32
+ helper ::ActiveAdmin::FormHelper
33
33
  end
34
34
 
35
35
  # Redirect to the default namespace on logout