rails_admin 0.8.1 → 2.2.1

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

Potentially problematic release.


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

Files changed (313) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +17 -34
  3. data/LICENSE.md +1 -1
  4. data/README.md +34 -26
  5. data/app/assets/images/rails_admin/aristo/images/bg_fallback.png +0 -0
  6. data/app/assets/images/rails_admin/aristo/images/slider_handles.png +0 -0
  7. data/app/assets/images/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
  8. data/app/assets/images/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
  9. data/app/assets/images/rails_admin/bullet_black.png +0 -0
  10. data/app/assets/images/rails_admin/bullet_white.png +0 -0
  11. data/app/assets/images/rails_admin/calendar.png +0 -0
  12. data/app/assets/images/rails_admin/clock.png +0 -0
  13. data/app/assets/images/rails_admin/magnifier.png +0 -0
  14. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-dark.png +0 -0
  15. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-dark.png +0 -0
  16. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-light.png +0 -0
  17. data/app/assets/javascripts/rails_admin/custom/ui.js +1 -0
  18. data/app/assets/javascripts/rails_admin/jquery-ui.js.erb +8 -0
  19. data/app/assets/javascripts/rails_admin/jquery.migrate.js +3 -0
  20. data/app/assets/javascripts/rails_admin/ra.filter-box.js +148 -60
  21. data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +31 -26
  22. data/app/assets/javascripts/rails_admin/ra.filtering-select.js +211 -110
  23. data/app/assets/javascripts/rails_admin/ra.i18n.js +28 -0
  24. data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.js +59 -0
  25. data/app/assets/javascripts/rails_admin/ra.sidescroll.js +31 -0
  26. data/app/assets/javascripts/rails_admin/ra.widgets.js +379 -0
  27. data/app/assets/javascripts/rails_admin/rails_admin.js +5 -5
  28. data/app/assets/javascripts/rails_admin/ui.js +135 -0
  29. data/app/assets/stylesheets/rails_admin/aristo/images/bg_fallback.png +0 -0
  30. data/app/assets/stylesheets/rails_admin/aristo/images/slider_handles.png +0 -0
  31. data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
  32. data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
  33. data/app/assets/stylesheets/rails_admin/aristo/jquery-ui-1.8.7.custom.scss +5 -5
  34. data/app/assets/stylesheets/rails_admin/ra.sidescroll.scss +29 -0
  35. data/app/assets/stylesheets/rails_admin/ra.widgets.scss +9 -1
  36. data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +2 -1
  37. data/app/controllers/rails_admin/application_controller.rb +14 -8
  38. data/app/controllers/rails_admin/main_controller.rb +9 -9
  39. data/app/helpers/rails_admin/application_helper.rb +26 -11
  40. data/app/helpers/rails_admin/form_builder.rb +20 -12
  41. data/app/helpers/rails_admin/main_helper.rb +8 -7
  42. data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_gap.html.haml +0 -0
  43. data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_next_page.html.haml +0 -0
  44. data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_page.html.haml +0 -0
  45. data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_paginator.html.haml +0 -0
  46. data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_prev_page.html.haml +0 -0
  47. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.haml +4 -0
  48. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.haml +4 -0
  49. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.haml +4 -0
  50. data/app/views/layouts/rails_admin/_head.html.haml +7 -0
  51. data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +2 -2
  52. data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +2 -1
  53. data/app/views/layouts/rails_admin/application.html.haml +4 -10
  54. data/app/views/layouts/rails_admin/pjax.html.haml +1 -5
  55. data/app/views/rails_admin/main/_delete_notice.html.haml +14 -9
  56. data/app/views/rails_admin/main/_form_action_text.html.haml +7 -0
  57. data/app/views/rails_admin/main/_form_colorpicker.html.haml +1 -1
  58. data/app/views/rails_admin/main/_form_enumeration.html.haml +4 -3
  59. data/app/views/rails_admin/main/_form_file_upload.html.haml +5 -5
  60. data/app/views/rails_admin/main/_form_filtering_multiselect.html.haml +7 -6
  61. data/app/views/rails_admin/main/_form_filtering_select.html.haml +1 -1
  62. data/app/views/rails_admin/main/_form_multiple_file_upload.html.haml +16 -0
  63. data/app/views/rails_admin/main/_form_polymorphic_association.html.haml +18 -3
  64. data/app/views/rails_admin/main/_form_simple_mde.haml +8 -0
  65. data/app/views/rails_admin/main/dashboard.html.haml +5 -6
  66. data/app/views/rails_admin/main/export.html.haml +45 -36
  67. data/app/views/rails_admin/main/history.html.haml +3 -3
  68. data/app/views/rails_admin/main/index.html.haml +37 -26
  69. data/app/views/rails_admin/main/show.html.haml +6 -7
  70. data/config/initializers/active_record_extensions.rb +3 -3
  71. data/config/initializers/haml.rb +4 -1
  72. data/config/locales/rails_admin.en.yml +5 -2
  73. data/lib/generators/rails_admin/templates/initializer.erb +6 -2
  74. data/lib/rails_admin/abstract_model.rb +9 -10
  75. data/lib/rails_admin/adapters/active_record/abstract_object.rb +9 -3
  76. data/lib/rails_admin/adapters/active_record/property.rb +1 -5
  77. data/lib/rails_admin/adapters/active_record.rb +83 -28
  78. data/lib/rails_admin/adapters/mongoid/abstract_object.rb +3 -3
  79. data/lib/rails_admin/adapters/mongoid/association.rb +18 -6
  80. data/lib/rails_admin/adapters/mongoid/bson.rb +29 -0
  81. data/lib/rails_admin/adapters/mongoid/extension.rb +4 -2
  82. data/lib/rails_admin/adapters/mongoid/property.rb +3 -3
  83. data/lib/rails_admin/adapters/mongoid.rb +40 -26
  84. data/lib/rails_admin/bootstrap-sass/compass_functions.rb +1 -1
  85. data/lib/rails_admin/bootstrap-sass/sass_functions.rb +1 -3
  86. data/lib/rails_admin/bootstrap-sass.rb +8 -6
  87. data/lib/rails_admin/config/actions/base.rb +20 -5
  88. data/lib/rails_admin/config/actions/bulk_delete.rb +2 -4
  89. data/lib/rails_admin/config/actions/dashboard.rb +9 -5
  90. data/lib/rails_admin/config/actions/edit.rb +1 -3
  91. data/lib/rails_admin/config/actions/export.rb +1 -1
  92. data/lib/rails_admin/config/actions/index.rb +5 -3
  93. data/lib/rails_admin/config/actions/new.rb +4 -5
  94. data/lib/rails_admin/config/actions.rb +1 -1
  95. data/lib/rails_admin/config/configurable.rb +25 -18
  96. data/lib/rails_admin/config/fields/association.rb +11 -3
  97. data/lib/rails_admin/config/fields/base.rb +20 -27
  98. data/lib/rails_admin/config/fields/factories/action_text.rb +12 -0
  99. data/lib/rails_admin/config/fields/factories/active_storage.rb +30 -0
  100. data/lib/rails_admin/config/fields/factories/carrierwave.rb +4 -2
  101. data/lib/rails_admin/config/fields/factories/dragonfly.rb +1 -1
  102. data/lib/rails_admin/config/fields/factories/shrine.rb +27 -0
  103. data/lib/rails_admin/config/fields/types/action_text.rb +30 -0
  104. data/lib/rails_admin/config/fields/types/active_record_enum.rb +19 -2
  105. data/lib/rails_admin/config/fields/types/active_storage.rb +49 -0
  106. data/lib/rails_admin/config/fields/types/all.rb +7 -1
  107. data/lib/rails_admin/config/fields/types/belongs_to_association.rb +8 -0
  108. data/lib/rails_admin/config/fields/types/bson_object_id.rb +1 -15
  109. data/lib/rails_admin/config/fields/types/ck_editor.rb +7 -7
  110. data/lib/rails_admin/config/fields/types/code_mirror.rb +10 -12
  111. data/lib/rails_admin/config/fields/types/color.rb +2 -2
  112. data/lib/rails_admin/config/fields/types/datetime.rb +6 -3
  113. data/lib/rails_admin/config/fields/types/file_upload.rb +12 -4
  114. data/lib/rails_admin/config/fields/types/froala.rb +9 -11
  115. data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -1
  116. data/lib/rails_admin/config/fields/types/hidden.rb +2 -2
  117. data/lib/rails_admin/config/fields/types/json.rb +9 -1
  118. data/lib/rails_admin/config/fields/types/multiple_active_storage.rb +53 -0
  119. data/lib/rails_admin/config/fields/types/multiple_carrierwave.rb +56 -0
  120. data/lib/rails_admin/config/fields/types/multiple_file_upload.rb +125 -0
  121. data/lib/rails_admin/config/fields/types/password.rb +5 -1
  122. data/lib/rails_admin/config/fields/types/polymorphic_association.rb +12 -1
  123. data/lib/rails_admin/config/fields/types/serialized.rb +2 -2
  124. data/lib/rails_admin/config/fields/types/shrine.rb +54 -0
  125. data/lib/rails_admin/config/fields/types/simple_mde.rb +36 -0
  126. data/lib/rails_admin/config/fields/types/string.rb +8 -7
  127. data/lib/rails_admin/config/fields/types/string_like.rb +19 -0
  128. data/lib/rails_admin/config/fields/types/text.rb +2 -20
  129. data/lib/rails_admin/config/fields/types/wysihtml5.rb +14 -10
  130. data/lib/rails_admin/config/fields/types.rb +1 -1
  131. data/lib/rails_admin/config/fields.rb +3 -1
  132. data/lib/rails_admin/config/has_fields.rb +1 -1
  133. data/lib/rails_admin/config/has_groups.rb +1 -1
  134. data/lib/rails_admin/config/hideable.rb +1 -1
  135. data/lib/rails_admin/config/inspectable.rb +39 -0
  136. data/lib/rails_admin/config/lazy_model.rb +48 -8
  137. data/lib/rails_admin/config/model.rb +10 -22
  138. data/lib/rails_admin/config/proxyable/proxy.rb +7 -9
  139. data/lib/rails_admin/config/proxyable.rb +13 -1
  140. data/lib/rails_admin/config/sections/base.rb +4 -17
  141. data/lib/rails_admin/config/sections/list.rb +37 -0
  142. data/lib/rails_admin/config.rb +46 -25
  143. data/lib/rails_admin/engine.rb +37 -4
  144. data/lib/rails_admin/extension.rb +16 -4
  145. data/lib/rails_admin/extensions/cancancan/authorization_adapter.rb +23 -7
  146. data/lib/rails_admin/extensions/cancancan.rb +1 -1
  147. data/lib/rails_admin/extensions/controller_extension.rb +6 -0
  148. data/lib/rails_admin/extensions/history/auditing_adapter.rb +2 -2
  149. data/lib/rails_admin/extensions/history/history.rb +2 -2
  150. data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +59 -17
  151. data/lib/rails_admin/extensions/pundit/authorization_adapter.rb +11 -3
  152. data/lib/rails_admin/support/csv_converter.rb +20 -14
  153. data/lib/rails_admin/support/datetime.rb +7 -6
  154. data/lib/rails_admin/support/i18n.rb +7 -5
  155. data/lib/rails_admin/version.rb +2 -2
  156. data/lib/rails_admin.rb +23 -1
  157. data/lib/tasks/rails_admin.rake +16 -7
  158. data/vendor/assets/fonts/rails_admin/FontAwesome.otf +0 -0
  159. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.eot +0 -0
  160. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.svg +2671 -0
  161. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.ttf +0 -0
  162. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff +0 -0
  163. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff2 +0 -0
  164. data/vendor/assets/images/rails_admin/bootstrap/glyphicons-halflings-white.png +0 -0
  165. data/vendor/assets/images/rails_admin/bootstrap/glyphicons-halflings.png +0 -0
  166. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_background.png +0 -0
  167. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hex.png +0 -0
  168. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_b.png +0 -0
  169. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_h.png +0 -0
  170. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_s.png +0 -0
  171. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_indic.gif +0 -0
  172. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_overlay.png +0 -0
  173. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_b.png +0 -0
  174. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_g.png +0 -0
  175. data/{app → vendor}/assets/images/rails_admin/colorpicker/colorpicker_rgb_r.png +0 -0
  176. data/{app → vendor}/assets/images/rails_admin/colorpicker/colorpicker_select.gif +0 -0
  177. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_submit.png +0 -0
  178. data/vendor/assets/images/rails_admin/colorpicker/custom_background.png +0 -0
  179. data/vendor/assets/images/rails_admin/colorpicker/custom_hex.png +0 -0
  180. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_b.png +0 -0
  181. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_h.png +0 -0
  182. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_s.png +0 -0
  183. data/vendor/assets/images/rails_admin/colorpicker/custom_indic.gif +0 -0
  184. data/{app → vendor}/assets/images/rails_admin/colorpicker/custom_rgb_b.png +0 -0
  185. data/{app → vendor}/assets/images/rails_admin/colorpicker/custom_rgb_g.png +0 -0
  186. data/{app → vendor}/assets/images/rails_admin/colorpicker/custom_rgb_r.png +0 -0
  187. data/vendor/assets/images/rails_admin/colorpicker/custom_submit.png +0 -0
  188. data/vendor/assets/images/rails_admin/colorpicker/select.png +0 -0
  189. data/{app → vendor}/assets/images/rails_admin/colorpicker/select2.png +0 -0
  190. data/vendor/assets/images/rails_admin/colorpicker/slider.png +0 -0
  191. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-affix.js +50 -28
  192. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-alert.js +10 -7
  193. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-button.js +35 -20
  194. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-carousel.js +48 -25
  195. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-collapse.js +70 -28
  196. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-dropdown.js +56 -42
  197. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-modal.js +118 -40
  198. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-popover.js +26 -16
  199. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-scrollspy.js +29 -27
  200. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-tab.js +46 -19
  201. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-tooltip.js +280 -60
  202. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-transition.js +5 -5
  203. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-typeahead.js +0 -0
  204. data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap.js +0 -0
  205. data/vendor/assets/javascripts/rails_admin/bootstrap-datetimepicker.js +317 -150
  206. data/{app → vendor}/assets/javascripts/rails_admin/jquery.colorpicker.js +0 -0
  207. data/{app → vendor}/assets/javascripts/rails_admin/jquery.pjax.js +316 -161
  208. data/vendor/assets/javascripts/rails_admin/moment-with-locales.js +16528 -8420
  209. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_alerts.scss +0 -0
  210. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_badges.scss +0 -0
  211. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_breadcrumbs.scss +0 -0
  212. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_button-groups.scss +0 -0
  213. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_buttons.scss +0 -0
  214. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_carousel.scss +0 -0
  215. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_close.scss +0 -0
  216. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_code.scss +0 -0
  217. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_component-animations.scss +0 -0
  218. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_dropdowns.scss +0 -0
  219. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_forms.scss +0 -0
  220. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_glyphicons.scss +0 -0
  221. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_grid.scss +0 -0
  222. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_input-groups.scss +0 -0
  223. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_jumbotron.scss +0 -0
  224. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_labels.scss +0 -0
  225. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_list-group.scss +0 -0
  226. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_media.scss +0 -0
  227. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_mixins.scss +0 -0
  228. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_modals.scss +0 -0
  229. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_navbar.scss +0 -0
  230. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_navs.scss +0 -0
  231. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_normalize.scss +0 -0
  232. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_pager.scss +0 -0
  233. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_pagination.scss +0 -0
  234. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_panels.scss +0 -0
  235. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_popovers.scss +0 -0
  236. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_print.scss +0 -0
  237. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_progress-bars.scss +0 -0
  238. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_responsive-embed.scss +0 -0
  239. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_responsive-utilities.scss +0 -0
  240. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_scaffolding.scss +0 -0
  241. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_tables.scss +0 -0
  242. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_theme.scss +0 -0
  243. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_thumbnails.scss +0 -0
  244. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_tooltip.scss +0 -0
  245. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_type.scss +0 -0
  246. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_utilities.scss +0 -0
  247. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_variables.scss +0 -0
  248. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_wells.scss +0 -0
  249. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/bootstrap.scss +0 -0
  250. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_alerts.scss +0 -0
  251. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_background-variant.scss +0 -0
  252. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_border-radius.scss +0 -0
  253. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_buttons.scss +0 -0
  254. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_center-block.scss +0 -0
  255. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_clearfix.scss +0 -0
  256. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_forms.scss +0 -0
  257. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_gradients.scss +0 -0
  258. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_grid-framework.scss +0 -0
  259. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_grid.scss +0 -0
  260. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_hide-text.scss +0 -0
  261. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_image.scss +0 -0
  262. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_labels.scss +0 -0
  263. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_list-group.scss +0 -0
  264. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-divider.scss +0 -0
  265. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-vertical-align.scss +0 -0
  266. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_opacity.scss +0 -0
  267. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_pagination.scss +0 -0
  268. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_panels.scss +0 -0
  269. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_progress-bar.scss +0 -0
  270. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_reset-filter.scss +0 -0
  271. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_resize.scss +0 -0
  272. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_responsive-visibility.scss +0 -0
  273. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_size.scss +0 -0
  274. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_tab-focus.scss +0 -0
  275. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_table-row.scss +0 -0
  276. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_text-emphasis.scss +0 -0
  277. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_text-overflow.scss +0 -0
  278. data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_vendor-prefixes.scss +0 -0
  279. data/vendor/assets/stylesheets/rails_admin/font-awesome.scss +2342 -0
  280. data/{app → vendor}/assets/stylesheets/rails_admin/jquery.colorpicker.scss +0 -0
  281. metadata +214 -199
  282. data/app/assets/images/rails_admin/bootstrap/glyphicons-halflings-white.png +0 -0
  283. data/app/assets/images/rails_admin/bootstrap/glyphicons-halflings.png +0 -0
  284. data/app/assets/images/rails_admin/colorpicker/colorpicker_background.png +0 -0
  285. data/app/assets/images/rails_admin/colorpicker/colorpicker_hex.png +0 -0
  286. data/app/assets/images/rails_admin/colorpicker/colorpicker_hsb_b.png +0 -0
  287. data/app/assets/images/rails_admin/colorpicker/colorpicker_hsb_h.png +0 -0
  288. data/app/assets/images/rails_admin/colorpicker/colorpicker_hsb_s.png +0 -0
  289. data/app/assets/images/rails_admin/colorpicker/colorpicker_indic.gif +0 -0
  290. data/app/assets/images/rails_admin/colorpicker/colorpicker_overlay.png +0 -0
  291. data/app/assets/images/rails_admin/colorpicker/colorpicker_rgb_b.png +0 -0
  292. data/app/assets/images/rails_admin/colorpicker/colorpicker_rgb_g.png +0 -0
  293. data/app/assets/images/rails_admin/colorpicker/colorpicker_submit.png +0 -0
  294. data/app/assets/images/rails_admin/colorpicker/custom_background.png +0 -0
  295. data/app/assets/images/rails_admin/colorpicker/custom_hex.png +0 -0
  296. data/app/assets/images/rails_admin/colorpicker/custom_hsb_b.png +0 -0
  297. data/app/assets/images/rails_admin/colorpicker/custom_hsb_h.png +0 -0
  298. data/app/assets/images/rails_admin/colorpicker/custom_hsb_s.png +0 -0
  299. data/app/assets/images/rails_admin/colorpicker/custom_indic.gif +0 -0
  300. data/app/assets/images/rails_admin/colorpicker/custom_submit.png +0 -0
  301. data/app/assets/images/rails_admin/colorpicker/select.png +0 -0
  302. data/app/assets/images/rails_admin/colorpicker/slider.png +0 -0
  303. data/app/assets/javascripts/rails_admin/custom/ui.coffee +0 -1
  304. data/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js +0 -72
  305. data/app/assets/javascripts/rails_admin/ra.i18n.coffee +0 -8
  306. data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.coffee +0 -52
  307. data/app/assets/javascripts/rails_admin/ra.widgets.coffee +0 -308
  308. data/app/assets/javascripts/rails_admin/ui.coffee +0 -102
  309. data/config/initializers/devise_patch.rb +0 -9
  310. data/lib/rails_admin/config/fields/factories/refile.rb +0 -25
  311. data/lib/rails_admin/config/fields/types/refile.rb +0 -27
  312. data/lib/rails_admin/extensions/cancan/authorization_adapter.rb +0 -57
  313. data/lib/rails_admin/extensions/cancan.rb +0 -3
@@ -1,57 +0,0 @@
1
- module RailsAdmin
2
- module Extensions
3
- module CanCan
4
- # This adapter is for the CanCan[https://github.com/ryanb/cancan] authorization library.
5
- # You can create another adapter for different authorization behavior, just be certain it
6
- # responds to each of the public methods here.
7
- class AuthorizationAdapter
8
- # See the +authorize_with+ config method for where the initialization happens.
9
- def initialize(controller, ability = ::Ability)
10
- @controller = controller
11
- @controller.instance_variable_set '@ability', ability
12
- @controller.extend ControllerExtension
13
- @controller.current_ability.authorize! :access, :rails_admin
14
- end
15
-
16
- # This method is called in every controller action and should raise an exception
17
- # when the authorization fails. The first argument is the name of the controller
18
- # action as a symbol (:create, :bulk_delete, etc.). The second argument is the
19
- # AbstractModel instance that applies. The third argument is the actual model
20
- # instance if it is available.
21
- def authorize(action, abstract_model = nil, model_object = nil)
22
- @controller.current_ability.authorize!(action, model_object || abstract_model && abstract_model.model) if action
23
- end
24
-
25
- # This method is called primarily from the view to determine whether the given user
26
- # has access to perform the action on a given model. It should return true when authorized.
27
- # This takes the same arguments as +authorize+. The difference is that this will
28
- # return a boolean whereas +authorize+ will raise an exception when not authorized.
29
- def authorized?(action, abstract_model = nil, model_object = nil)
30
- @controller.current_ability.can?(action, model_object || abstract_model && abstract_model.model) if action
31
- end
32
-
33
- # This is called when needing to scope a database query. It is called within the list
34
- # and bulk_delete/destroy actions and should return a scope which limits the records
35
- # to those which the user can perform the given action on.
36
- def query(action, abstract_model)
37
- abstract_model.model.accessible_by(@controller.current_ability, action)
38
- end
39
-
40
- # This is called in the new/create actions to determine the initial attributes for new
41
- # records. It should return a hash of attributes which match what the user
42
- # is authorized to create.
43
- def attributes_for(action, abstract_model)
44
- @controller.current_ability.attributes_for(action, abstract_model && abstract_model.model)
45
- end
46
-
47
- module ControllerExtension
48
- def current_ability
49
- # use _current_user instead of default current_user so it works with
50
- # whatever current user method is defined with RailsAdmin
51
- @current_ability ||= @ability.new(_current_user)
52
- end
53
- end
54
- end
55
- end
56
- end
57
- end
@@ -1,3 +0,0 @@
1
- require 'rails_admin/extensions/cancan/authorization_adapter'
2
-
3
- RailsAdmin.add_extension(:cancan, RailsAdmin::Extensions::CanCan, authorization: true)