rails_admin 2.3.0 → 3.0.0.beta

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 (329) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -11
  3. data/README.md +37 -31
  4. data/Rakefile +2 -2
  5. data/app/assets/javascripts/rails_admin.js +21 -0
  6. data/app/assets/stylesheets/rails_admin/custom/mixins.scss +1 -1
  7. data/app/assets/stylesheets/rails_admin/custom/variables.scss +1 -1
  8. data/app/assets/stylesheets/rails_admin.scss.erb +76 -0
  9. data/app/controllers/rails_admin/application_controller.rb +4 -3
  10. data/app/controllers/rails_admin/main_controller.rb +43 -24
  11. data/app/helpers/rails_admin/application_helper.rb +69 -52
  12. data/app/helpers/rails_admin/form_builder.rb +5 -4
  13. data/app/helpers/rails_admin/main_helper.rb +27 -43
  14. data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.erb +5 -0
  15. data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.erb +9 -0
  16. data/app/views/kaminari/ra-twitter-bootstrap/_page.html.erb +9 -0
  17. data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.erb +13 -0
  18. data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.erb +9 -0
  19. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.erb +9 -0
  20. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.erb +6 -0
  21. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.erb +9 -0
  22. data/app/views/layouts/rails_admin/_head.html.erb +17 -0
  23. data/app/views/layouts/rails_admin/_navigation.html.erb +21 -0
  24. data/app/views/layouts/rails_admin/_secondary_navigation.html.erb +24 -0
  25. data/app/views/layouts/rails_admin/_sidebar_navigation.html.erb +9 -0
  26. data/app/views/layouts/rails_admin/application.html.erb +27 -0
  27. data/app/views/layouts/rails_admin/modal.js.erb +7 -0
  28. data/app/views/layouts/rails_admin/pjax.html.erb +20 -0
  29. data/app/views/rails_admin/main/_dashboard_history.html.erb +45 -0
  30. data/app/views/rails_admin/main/_delete_notice.html.erb +35 -0
  31. data/app/views/rails_admin/main/_form_action_text.html.erb +7 -0
  32. data/app/views/rails_admin/main/_form_boolean.html.erb +16 -0
  33. data/app/views/rails_admin/main/{_form_ck_editor.html.haml → _form_ck_editor.html.erb} +3 -3
  34. data/app/views/rails_admin/main/_form_code_mirror.html.erb +9 -0
  35. data/app/views/rails_admin/main/_form_colorpicker.html.erb +1 -0
  36. data/app/views/rails_admin/main/_form_datetime.html.erb +9 -0
  37. data/app/views/rails_admin/main/_form_enumeration.html.erb +21 -0
  38. data/app/views/rails_admin/main/_form_field.html.erb +1 -0
  39. data/app/views/rails_admin/main/_form_file_upload.html.erb +17 -0
  40. data/app/views/rails_admin/main/{_form_filtering_multiselect.html.haml → _form_filtering_multiselect.html.erb} +11 -11
  41. data/app/views/rails_admin/main/{_form_filtering_select.html.haml → _form_filtering_select.html.erb} +13 -12
  42. data/app/views/rails_admin/main/_form_froala.html.erb +8 -0
  43. data/app/views/rails_admin/main/_form_multiple_file_upload.html.erb +20 -0
  44. data/app/views/rails_admin/main/_form_nested_many.html.erb +21 -0
  45. data/app/views/rails_admin/main/_form_nested_one.html.erb +21 -0
  46. data/app/views/rails_admin/main/_form_polymorphic_association.html.erb +27 -0
  47. data/app/views/rails_admin/main/_form_simple_mde.html.erb +8 -0
  48. data/app/views/rails_admin/main/_form_text.html.erb +1 -0
  49. data/app/views/rails_admin/main/_form_wysihtml5.html.erb +8 -0
  50. data/app/views/rails_admin/main/_submit_buttons.html.erb +25 -0
  51. data/app/views/rails_admin/main/bulk_delete.html.erb +19 -0
  52. data/app/views/rails_admin/main/dashboard.html.erb +64 -0
  53. data/app/views/rails_admin/main/delete.html.erb +21 -0
  54. data/app/views/rails_admin/main/edit.html.erb +3 -0
  55. data/app/views/rails_admin/main/export.html.erb +146 -0
  56. data/app/views/rails_admin/main/history.html.erb +78 -0
  57. data/app/views/rails_admin/main/index.html.erb +193 -0
  58. data/app/views/rails_admin/main/new.html.erb +3 -0
  59. data/app/views/rails_admin/main/show.html.erb +28 -0
  60. data/config/initializers/active_record_extensions.rb +3 -1
  61. data/config/initializers/mongoid_extensions.rb +1 -1
  62. data/config/locales/rails_admin.en.yml +5 -1
  63. data/lib/generators/rails_admin/install_generator.rb +51 -3
  64. data/lib/generators/rails_admin/templates/environment.js +6 -0
  65. data/lib/generators/rails_admin/templates/initializer.erb +2 -1
  66. data/lib/generators/rails_admin/templates/rails_admin.js.erb +2 -0
  67. data/lib/generators/rails_admin/templates/rails_admin.scss +1 -0
  68. data/lib/generators/rails_admin/templates/webpack.config.js +32 -0
  69. data/lib/rails_admin/abstract_model.rb +24 -10
  70. data/lib/rails_admin/adapters/active_record/association.rb +20 -1
  71. data/lib/rails_admin/adapters/active_record/object_extension.rb +29 -0
  72. data/lib/rails_admin/adapters/active_record/property.rb +1 -1
  73. data/lib/rails_admin/adapters/active_record.rb +19 -21
  74. data/lib/rails_admin/adapters/mongoid/association.rb +38 -9
  75. data/lib/rails_admin/adapters/mongoid/bson.rb +4 -5
  76. data/lib/rails_admin/adapters/mongoid/extension.rb +3 -1
  77. data/lib/rails_admin/adapters/mongoid/object_extension.rb +32 -0
  78. data/lib/rails_admin/adapters/mongoid/property.rb +2 -2
  79. data/lib/rails_admin/adapters/mongoid.rb +25 -19
  80. data/lib/rails_admin/config/actions/base.rb +7 -2
  81. data/lib/rails_admin/config/actions/bulk_delete.rb +2 -2
  82. data/lib/rails_admin/config/actions/dashboard.rb +4 -3
  83. data/lib/rails_admin/config/actions/delete.rb +5 -9
  84. data/lib/rails_admin/config/actions/edit.rb +7 -7
  85. data/lib/rails_admin/config/actions/export.rb +2 -2
  86. data/lib/rails_admin/config/actions/history_index.rb +2 -2
  87. data/lib/rails_admin/config/actions/history_show.rb +2 -2
  88. data/lib/rails_admin/config/actions/index.rb +5 -7
  89. data/lib/rails_admin/config/actions/new.rb +9 -9
  90. data/lib/rails_admin/config/actions/show.rb +1 -1
  91. data/lib/rails_admin/config/actions/show_in_app.rb +6 -2
  92. data/lib/rails_admin/config/actions.rb +4 -4
  93. data/lib/rails_admin/config/configurable.rb +2 -2
  94. data/lib/rails_admin/config/fields/association.rb +15 -12
  95. data/lib/rails_admin/config/fields/base.rb +44 -24
  96. data/lib/rails_admin/config/fields/factories/active_storage.rb +1 -0
  97. data/lib/rails_admin/config/fields/factories/association.rb +6 -8
  98. data/lib/rails_admin/config/fields/factories/carrierwave.rb +2 -1
  99. data/lib/rails_admin/config/fields/factories/devise.rb +2 -1
  100. data/lib/rails_admin/config/fields/factories/dragonfly.rb +2 -1
  101. data/lib/rails_admin/config/fields/factories/paperclip.rb +2 -1
  102. data/lib/rails_admin/config/fields/factories/shrine.rb +1 -1
  103. data/lib/rails_admin/config/fields/group.rb +1 -2
  104. data/lib/rails_admin/config/fields/types/active_record_enum.rb +2 -0
  105. data/lib/rails_admin/config/fields/types/active_storage.rb +9 -7
  106. data/lib/rails_admin/config/fields/types/all.rb +1 -0
  107. data/lib/rails_admin/config/fields/types/belongs_to_association.rb +4 -12
  108. data/lib/rails_admin/config/fields/types/boolean.rb +32 -8
  109. data/lib/rails_admin/config/fields/types/carrierwave.rb +1 -0
  110. data/lib/rails_admin/config/fields/types/citext.rb +13 -0
  111. data/lib/rails_admin/config/fields/types/color.rb +6 -2
  112. data/lib/rails_admin/config/fields/types/date.rb +5 -8
  113. data/lib/rails_admin/config/fields/types/datetime.rb +18 -21
  114. data/lib/rails_admin/config/fields/types/decimal.rb +9 -2
  115. data/lib/rails_admin/config/fields/types/dragonfly.rb +3 -1
  116. data/lib/rails_admin/config/fields/types/enum.rb +1 -1
  117. data/lib/rails_admin/config/fields/types/file_upload.rb +4 -3
  118. data/lib/rails_admin/config/fields/types/float.rb +9 -2
  119. data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -5
  120. data/lib/rails_admin/config/fields/types/has_one_association.rb +1 -13
  121. data/lib/rails_admin/config/fields/types/integer.rb +2 -6
  122. data/lib/rails_admin/config/fields/types/multiple_active_storage.rb +8 -6
  123. data/lib/rails_admin/config/fields/types/multiple_carrierwave.rb +1 -0
  124. data/lib/rails_admin/config/fields/types/multiple_file_upload.rb +4 -3
  125. data/lib/rails_admin/config/fields/types/numeric.rb +18 -0
  126. data/lib/rails_admin/config/fields/types/polymorphic_association.rb +3 -2
  127. data/lib/rails_admin/config/fields/types/string.rb +1 -1
  128. data/lib/rails_admin/config/fields/types/time.rb +1 -4
  129. data/lib/rails_admin/config/fields/types/timestamp.rb +0 -4
  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 +5 -6
  133. data/lib/rails_admin/config/hideable.rb +1 -1
  134. data/lib/rails_admin/config/inspectable.rb +1 -3
  135. data/lib/rails_admin/config/model.rb +10 -10
  136. data/lib/rails_admin/config/sections/base.rb +2 -3
  137. data/lib/rails_admin/config/sections/list.rb +4 -15
  138. data/lib/rails_admin/config/sections.rb +1 -1
  139. data/lib/rails_admin/config.rb +73 -38
  140. data/lib/rails_admin/engine.rb +36 -23
  141. data/lib/rails_admin/extension.rb +6 -14
  142. data/lib/rails_admin/extensions/cancancan/authorization_adapter.rb +4 -2
  143. data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +12 -7
  144. data/lib/rails_admin/extensions/pundit/authorization_adapter.rb +6 -7
  145. data/lib/rails_admin/support/csv_converter.rb +12 -13
  146. data/lib/rails_admin/support/datetime.rb +40 -74
  147. data/lib/rails_admin/support/esmodule_preprocessor.rb +32 -0
  148. data/lib/rails_admin/support/hash_helper.rb +6 -5
  149. data/lib/rails_admin/version.rb +7 -3
  150. data/lib/rails_admin.rb +1 -4
  151. data/lib/tasks/rails_admin.rake +3 -3
  152. data/package.json +28 -0
  153. data/src/rails_admin/base.js +21 -0
  154. data/src/rails_admin/filter-box.js +405 -0
  155. data/src/rails_admin/filtering-multiselect.js +394 -0
  156. data/src/rails_admin/filtering-select.js +302 -0
  157. data/src/rails_admin/i18n.js +19 -0
  158. data/src/rails_admin/nested-form-hooks.js +100 -0
  159. data/src/rails_admin/remote-form.js +190 -0
  160. data/src/rails_admin/sidescroll.js +20 -0
  161. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/theming.scss +93 -34
  162. data/src/rails_admin/styles/base.scss +64 -0
  163. data/src/rails_admin/styles/filtering-multiselect.scss +53 -0
  164. data/src/rails_admin/styles/filtering-select.scss +70 -0
  165. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/theming.scss +23 -21
  166. data/src/rails_admin/styles/themes/cerulean/variables.scss +830 -0
  167. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/mixins.scss +1 -1
  168. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/variables.scss +1 -1
  169. data/src/rails_admin/styles/widgets.scss +35 -0
  170. data/src/rails_admin/ui.js +172 -0
  171. data/src/rails_admin/vendor/jquery.pjax.js +899 -0
  172. data/src/rails_admin/vendor/jquery_nested_form.js +122 -0
  173. data/src/rails_admin/widgets.js +512 -0
  174. data/vendor/assets/fonts/rails_admin/fa-solid-900.eot +0 -0
  175. data/vendor/assets/fonts/rails_admin/fa-solid-900.svg +5034 -0
  176. data/vendor/assets/fonts/rails_admin/fa-solid-900.ttf +0 -0
  177. data/vendor/assets/fonts/rails_admin/fa-solid-900.woff +0 -0
  178. data/vendor/assets/fonts/rails_admin/fa-solid-900.woff2 +0 -0
  179. data/vendor/assets/javascripts/rails_admin/jquery-ui/data.js +41 -0
  180. data/vendor/assets/javascripts/rails_admin/jquery-ui/effect.js +1637 -0
  181. data/vendor/assets/javascripts/rails_admin/jquery-ui/ie.js +17 -0
  182. data/vendor/assets/javascripts/rails_admin/jquery-ui/keycode.js +47 -0
  183. data/vendor/assets/javascripts/rails_admin/jquery-ui/position.js +500 -0
  184. data/vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js +42 -0
  185. data/vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js +47 -0
  186. data/vendor/assets/javascripts/rails_admin/jquery-ui/unique-id.js +51 -0
  187. data/vendor/assets/javascripts/rails_admin/jquery-ui/version.js +17 -0
  188. data/vendor/assets/javascripts/rails_admin/jquery-ui/widget.js +735 -0
  189. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/autocomplete.js +689 -0
  190. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/menu.js +680 -0
  191. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/mouse.js +230 -0
  192. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/sortable.js +1561 -0
  193. data/vendor/assets/javascripts/rails_admin/jquery3.js +10872 -0
  194. data/vendor/assets/stylesheets/rails_admin/font-awesome.scss +4476 -2216
  195. metadata +118 -263
  196. data/app/assets/images/rails_admin/aristo/images/bg_fallback.png +0 -0
  197. data/app/assets/images/rails_admin/aristo/images/icon_sprite.png +0 -0
  198. data/app/assets/images/rails_admin/aristo/images/progress_bar.gif +0 -0
  199. data/app/assets/images/rails_admin/aristo/images/slider_handles.png +0 -0
  200. data/app/assets/images/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
  201. data/app/assets/images/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
  202. data/app/assets/images/rails_admin/bullet_black.png +0 -0
  203. data/app/assets/images/rails_admin/bullet_white.png +0 -0
  204. data/app/assets/images/rails_admin/calendar.png +0 -0
  205. data/app/assets/images/rails_admin/clock.png +0 -0
  206. data/app/assets/images/rails_admin/logo.png +0 -0
  207. data/app/assets/images/rails_admin/magnifier.png +0 -0
  208. data/app/assets/images/rails_admin/multiselect/icon_sprite.png +0 -0
  209. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-dark.png +0 -0
  210. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-light.png +0 -0
  211. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-dark.png +0 -0
  212. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-light.png +0 -0
  213. data/app/assets/javascripts/rails_admin/jquery-ui.js.erb +0 -8
  214. data/app/assets/javascripts/rails_admin/jquery.migrate.js +0 -3
  215. data/app/assets/javascripts/rails_admin/ra.filter-box.js +0 -253
  216. data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +0 -331
  217. data/app/assets/javascripts/rails_admin/ra.filtering-select.js +0 -294
  218. data/app/assets/javascripts/rails_admin/ra.i18n.js +0 -28
  219. data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.js +0 -59
  220. data/app/assets/javascripts/rails_admin/ra.remote-form.js +0 -155
  221. data/app/assets/javascripts/rails_admin/ra.sidescroll.js +0 -31
  222. data/app/assets/javascripts/rails_admin/ra.widgets.js +0 -379
  223. data/app/assets/javascripts/rails_admin/rails_admin.js +0 -21
  224. data/app/assets/javascripts/rails_admin/ui.js +0 -135
  225. data/app/assets/stylesheets/rails_admin/aristo/images/bg_fallback.png +0 -0
  226. data/app/assets/stylesheets/rails_admin/aristo/images/icon_sprite.png +0 -0
  227. data/app/assets/stylesheets/rails_admin/aristo/images/progress_bar.gif +0 -0
  228. data/app/assets/stylesheets/rails_admin/aristo/images/slider_handles.png +0 -0
  229. data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
  230. data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
  231. data/app/assets/stylesheets/rails_admin/aristo/jquery-ui-1.8.7.custom.scss +0 -733
  232. data/app/assets/stylesheets/rails_admin/base/font-awesome-4-compability.scss +0 -153
  233. data/app/assets/stylesheets/rails_admin/ra.filtering-multiselect.scss +0 -88
  234. data/app/assets/stylesheets/rails_admin/ra.sidescroll.scss +0 -29
  235. data/app/assets/stylesheets/rails_admin/ra.widgets.scss +0 -17
  236. data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +0 -110
  237. data/app/assets/stylesheets/rails_admin/themes/cerulean/variables.scss +0 -857
  238. data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.haml +0 -2
  239. data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.haml +0 -4
  240. data/app/views/kaminari/ra-twitter-bootstrap/_page.html.haml +0 -4
  241. data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.haml +0 -9
  242. data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.haml +0 -4
  243. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.haml +0 -4
  244. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.haml +0 -4
  245. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.haml +0 -4
  246. data/app/views/layouts/rails_admin/_head.html.haml +0 -7
  247. data/app/views/layouts/rails_admin/_navigation.html.haml +0 -12
  248. data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +0 -10
  249. data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +0 -3
  250. data/app/views/layouts/rails_admin/application.html.haml +0 -16
  251. data/app/views/layouts/rails_admin/pjax.html.haml +0 -12
  252. data/app/views/rails_admin/main/_dashboard_history.html.haml +0 -21
  253. data/app/views/rails_admin/main/_delete_notice.html.haml +0 -24
  254. data/app/views/rails_admin/main/_form_action_text.html.haml +0 -7
  255. data/app/views/rails_admin/main/_form_boolean.html.haml +0 -3
  256. data/app/views/rails_admin/main/_form_code_mirror.html.haml +0 -9
  257. data/app/views/rails_admin/main/_form_colorpicker.html.haml +0 -1
  258. data/app/views/rails_admin/main/_form_datetime.html.haml +0 -5
  259. data/app/views/rails_admin/main/_form_enumeration.html.haml +0 -19
  260. data/app/views/rails_admin/main/_form_field.html.haml +0 -1
  261. data/app/views/rails_admin/main/_form_file_upload.html.haml +0 -17
  262. data/app/views/rails_admin/main/_form_froala.html.haml +0 -8
  263. data/app/views/rails_admin/main/_form_multiple_file_upload.html.haml +0 -16
  264. data/app/views/rails_admin/main/_form_nested_many.html.haml +0 -15
  265. data/app/views/rails_admin/main/_form_nested_one.html.haml +0 -17
  266. data/app/views/rails_admin/main/_form_polymorphic_association.html.haml +0 -26
  267. data/app/views/rails_admin/main/_form_simple_mde.haml +0 -8
  268. data/app/views/rails_admin/main/_form_text.html.haml +0 -1
  269. data/app/views/rails_admin/main/_form_wysihtml5.html.haml +0 -8
  270. data/app/views/rails_admin/main/_submit_buttons.html.haml +0 -16
  271. data/app/views/rails_admin/main/bulk_delete.html.haml +0 -11
  272. data/app/views/rails_admin/main/dashboard.html.haml +0 -34
  273. data/app/views/rails_admin/main/delete.html.haml +0 -18
  274. data/app/views/rails_admin/main/edit.html.haml +0 -2
  275. data/app/views/rails_admin/main/export.html.haml +0 -92
  276. data/app/views/rails_admin/main/history.html.haml +0 -51
  277. data/app/views/rails_admin/main/index.html.haml +0 -126
  278. data/app/views/rails_admin/main/new.html.haml +0 -2
  279. data/app/views/rails_admin/main/show.html.haml +0 -15
  280. data/config/initializers/haml.rb +0 -5
  281. data/lib/rails_admin/adapters/active_record/abstract_object.rb +0 -38
  282. data/lib/rails_admin/adapters/active_record.rb.bak +0 -348
  283. data/lib/rails_admin/adapters/mongoid/abstract_object.rb +0 -42
  284. data/lib/rails_admin/bootstrap-sass/compass_functions.rb +0 -28
  285. data/lib/rails_admin/bootstrap-sass/sass_functions.rb +0 -16
  286. data/lib/rails_admin/bootstrap-sass.rb +0 -49
  287. data/lib/rails_admin/config/lazy_model.rb +0 -68
  288. data/lib/rails_admin/extensions/history/auditing_adapter.rb +0 -37
  289. data/lib/rails_admin/extensions/history/history.rb +0 -44
  290. data/lib/rails_admin/extensions/history.rb +0 -3
  291. data/lib/rails_admin/support/i18n.rb +0 -43
  292. data/vendor/assets/fonts/rails_admin/FontAwesome.otf +0 -0
  293. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.eot +0 -0
  294. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.svg +0 -2671
  295. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.ttf +0 -0
  296. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff +0 -0
  297. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff2 +0 -0
  298. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_background.png +0 -0
  299. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hex.png +0 -0
  300. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_b.png +0 -0
  301. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_h.png +0 -0
  302. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_s.png +0 -0
  303. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_indic.gif +0 -0
  304. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_overlay.png +0 -0
  305. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_b.png +0 -0
  306. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_g.png +0 -0
  307. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_r.png +0 -0
  308. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_select.gif +0 -0
  309. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_submit.png +0 -0
  310. data/vendor/assets/images/rails_admin/colorpicker/custom_background.png +0 -0
  311. data/vendor/assets/images/rails_admin/colorpicker/custom_hex.png +0 -0
  312. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_b.png +0 -0
  313. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_h.png +0 -0
  314. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_s.png +0 -0
  315. data/vendor/assets/images/rails_admin/colorpicker/custom_indic.gif +0 -0
  316. data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_b.png +0 -0
  317. data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_g.png +0 -0
  318. data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_r.png +0 -0
  319. data/vendor/assets/images/rails_admin/colorpicker/custom_submit.png +0 -0
  320. data/vendor/assets/images/rails_admin/colorpicker/select.png +0 -0
  321. data/vendor/assets/images/rails_admin/colorpicker/select2.png +0 -0
  322. data/vendor/assets/images/rails_admin/colorpicker/slider.png +0 -0
  323. data/vendor/assets/javascripts/rails_admin/jquery.colorpicker.js +0 -484
  324. data/vendor/assets/stylesheets/rails_admin/jquery.colorpicker.scss +0 -182
  325. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/README.txt +0 -0
  326. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/mixins.scss +0 -0
  327. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/variables.scss +0 -0
  328. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/mixins.scss +0 -0
  329. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/theming.scss +0 -0
@@ -1,2 +0,0 @@
1
- %li.disabled
2
- %a{href: '#'}= raw(t 'admin.pagination.truncate')
@@ -1,4 +0,0 @@
1
- - if current_page.last?
2
- %li.next.disabled= link_to raw(t 'admin.pagination.next'), '#'
3
- - else
4
- %li.next= link_to raw(t 'admin.pagination.next'), url, class: (remote ? 'pjax' : '')
@@ -1,4 +0,0 @@
1
- - if page.current?
2
- %li.active= link_to page, url, class: (remote ? 'pjax' : '')
3
- - else
4
- %li= link_to page, url, class: (remote ? 'pjax' : '')
@@ -1,9 +0,0 @@
1
- = paginator.render do
2
- %ul.pagination
3
- = prev_page_tag
4
- - each_page do |page|
5
- - if page.left_outer? or page.right_outer? or page.inside_window?
6
- = page_tag page
7
- - elsif !page.was_truncated?
8
- = gap_tag
9
- = next_page_tag
@@ -1,4 +0,0 @@
1
- - if current_page.first?
2
- %li.prev.disabled= link_to raw(t 'admin.pagination.previous'), '#'
3
- - else
4
- %li.prev= link_to raw(t 'admin.pagination.previous'), url, class: (remote ? 'pjax' : '')
@@ -1,4 +0,0 @@
1
- - if current_page.last?
2
- %li.next.disabled= link_to raw(t 'admin.pagination.next'), '#'
3
- - else
4
- %li.next= link_to raw(t 'admin.pagination.next'), url, class: (remote ? 'pjax' : '')
@@ -1,4 +0,0 @@
1
- = paginator.render do
2
- %ul.pagination
3
- = prev_page_tag if !current_page.first?
4
- = next_page_tag
@@ -1,4 +0,0 @@
1
- - if current_page.first?
2
- %li.prev.disabled= link_to raw(t 'admin.pagination.previous'), '#'
3
- - else
4
- %li.prev= link_to raw(t 'admin.pagination.previous'), url, class: (remote ? 'pjax' : '')
@@ -1,7 +0,0 @@
1
- %meta{content: "IE=edge", "http-equiv" => "X-UA-Compatible"}
2
- %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
3
- %meta{content: "width=device-width, initial-scale=1", name: "viewport; charset=utf-8"}
4
- %meta{content: "NONE,NOARCHIVE", name: "robots"}
5
- = csrf_meta_tag
6
- = stylesheet_link_tag "rails_admin/rails_admin.css", media: :all
7
- = javascript_include_tag "rails_admin/rails_admin.js"
@@ -1,12 +0,0 @@
1
- .container-fluid
2
- .navbar-header
3
- %button.navbar-toggle.collapsed{ type: 'button', data: { toggle: 'collapse', target: '#secondary-navigation' } }
4
- %span.sr-only= t('admin.toggle_navigation')
5
- %span.icon-bar
6
- %span.icon-bar
7
- %span.icon-bar
8
- %a.navbar-brand.pjax{href: dashboard_path}
9
- = _get_plugin_name[0] || 'Rails'
10
- %small= _get_plugin_name[1] || 'Admin'
11
- .collapse.navbar-collapse#secondary-navigation
12
- = render partial: 'layouts/rails_admin/secondary_navigation'
@@ -1,10 +0,0 @@
1
- %ul.nav.navbar-nav.navbar-right.root_links
2
- - actions(:root).select(&:show_in_navigation).each do |action|
3
- %li{class: "#{action.action_name}_root_link"}= link_to wording_for(:menu, action), { action: action.action_name, controller: 'rails_admin/main' }, class: action.pjax? ? "pjax" : ""
4
- - if main_app_root_path = (main_app.root_path rescue false)
5
- %li= link_to t('admin.home.name'), main_app_root_path
6
- - if _current_user
7
- - if user_link = edit_user_link
8
- %li.edit_user_root_link= user_link
9
- - if logout_path.present?
10
- %li= link_to content_tag('span', t('admin.misc.log_out'), class: 'label label-danger'), logout_path, method: logout_method
@@ -1,3 +0,0 @@
1
- %ul.nav.nav-pills.nav-stacked= main_navigation
2
- %ul.nav.nav-pills.nav-stacked= root_navigation
3
- %ul.nav.nav-pills.nav-stacked= static_navigation
@@ -1,16 +0,0 @@
1
- !!! 5
2
- %html{lang: I18n.locale}
3
- %head
4
- = render "layouts/rails_admin/head"
5
- %body.rails_admin
6
- #admin-js{:'data-i18n-options' => I18n.t("admin.js").to_json}
7
- #loading.label.label-warning{style: 'display:none; position:fixed; right:20px; bottom:20px; z-index:100000'}= t('admin.loading')
8
- %nav.navbar.navbar-default.navbar-fixed-top
9
- = render "layouts/rails_admin/navigation"
10
- .container-fluid
11
- .row
12
- .col-sm-3.col-md-2.sidebar-nav
13
- = render "layouts/rails_admin/sidebar_navigation"
14
- .col-sm-9.col-sm-offset-3.col-md-10.col-md-offset-2
15
- .content{:'data-pjax-container' => true}
16
- = render template: 'layouts/rails_admin/pjax'
@@ -1,12 +0,0 @@
1
- %title= "#{@abstract_model.try(:pretty_name) || @page_name} | #{[_get_plugin_name[0] || 'Rails', _get_plugin_name[1] || 'Admin'].join(' ')}"
2
- .page-header{data: {model: @abstract_model.to_param}}
3
- %h1= @page_name
4
- - flash && flash.each do |key, value|
5
- .alert.alert-dismissible{class: flash_alert_class(key)}
6
- %button.close{type: 'button', :'data-dismiss' => "alert"} ×
7
- = value
8
- = breadcrumb
9
- %ul.nav.nav-tabs
10
- = menu_for((@abstract_model ? (@object.try(:persisted?) ? :member : :collection) : :root), @abstract_model, @object)
11
- = content_for :contextual_tabs
12
- = yield
@@ -1,21 +0,0 @@
1
- %table.table.table-condensed.table-striped
2
- %thead
3
- %tr
4
- %th.shrink.user= t("admin.table_headers.username")
5
- %th.shrink.items= t("admin.table_headers.item")
6
- %th.changes= t("admin.table_headers.changes")
7
- %tbody
8
- - @history.each do |t|
9
- - abstract_model = RailsAdmin.config(t.table).abstract_model
10
- %tr
11
- %td= t.try :username
12
- - if o = abstract_model.try(:get, t.item)
13
- - label = o.send(abstract_model.config.object_label_method)
14
- - if show_action = action(:show, abstract_model, o)
15
- %td= link_to(label, url_for(action: show_action.action_name, model_name: abstract_model.to_param, id: o.id), class: 'pjax')
16
- - else
17
- %td= label
18
- - else
19
- - label = Object.const_defined?(t.table) ? t.table.constantize.model_name.human : t.table
20
- %td= "#{label} ##{t.item}"
21
- %td= t.message
@@ -1,24 +0,0 @@
1
- - object = delete_notice
2
-
3
- %li{style: 'display:block; margin-top:10px'}
4
- %span.label.label-default= @abstract_model.pretty_name
5
- - wording = object.send(@model_config.object_label_method)
6
- - if show_action = action(:show, @abstract_model, object)
7
- = link_to(wording, url_for(action: show_action.action_name, model_name: @abstract_model.to_param, id: object.id), class: 'pjax')
8
- - else
9
- = wording
10
- %ul
11
- - @abstract_model.each_associated_children(object) do |association, children|
12
- - humanized_association = @abstract_model.model.human_attribute_name association.name
13
- - limit = children.count > 12 ? 10 : children.count
14
- - children.first(limit).each do |child|
15
- = content_tag :li, class: dom_class(child) do
16
- - child_config = RailsAdmin.config(child)
17
- = humanized_association.singularize
18
- - wording = child.send(child_config.object_label_method)
19
- - if child.id && (show_action = action(:show, child_config.abstract_model, child))
20
- = link_to(wording, url_for(action: show_action.action_name, model_name: child_config.abstract_model.to_param, id: child.id), class: 'pjax')
21
- - else
22
- = wording
23
- - if children.count > limit
24
- %li= t('admin.misc.more', count: children.count - limit, models_name: humanized_association)
@@ -1,7 +0,0 @@
1
- :ruby
2
- js_data = {
3
- csspath: field.css_location,
4
- jspath: field.js_location
5
- }
6
-
7
- = form.rich_text_area field.method_name, field.html_attributes.reverse_merge(data: { options: js_data.to_json })
@@ -1,3 +0,0 @@
1
- .checkbox
2
- %label{ style: 'display: block;' }
3
- = form.send field.view_helper, field.method_name, field.html_attributes.reverse_merge({ value: field.form_value, checked: field.form_value.in?([true, '1']), required: field.required})
@@ -1,9 +0,0 @@
1
- :ruby
2
- js_data = {
3
- csspath: field.css_location,
4
- jspath: field.js_location,
5
- options: field.config,
6
- locations: field.assets
7
- }
8
-
9
- = form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'codemirror', options: js_data.to_json }).reverse_merge({ value: field.form_value })
@@ -1 +0,0 @@
1
- = form.send field.view_helper, field.method_name, field.html_attributes.reverse_merge({class: 'form-control', value: field.form_value, style: "background-color: #{field.color}", data: {color: true}})
@@ -1,5 +0,0 @@
1
- .form-inline
2
- .input-group
3
- = form.send field.view_helper, field.method_name, field.html_attributes.reverse_merge({value: field.form_value, class: 'form-control', data: {datetimepicker: true, options: field.datepicker_options.to_json}})
4
- = form.label(field.method_name, class: 'input-group-addon') do
5
- %i.fa.fa-fw.fa-calendar
@@ -1,19 +0,0 @@
1
- - unless field.multiple?
2
- = form.select field.method_name, field.enum, { include_blank: true }.reverse_merge({ selected: field.form_value }), field.html_attributes.reverse_merge({ data: { enumeration: true }, placeholder: t('admin.misc.search') })
3
- - else
4
- :ruby
5
- js_data = {
6
- xhr: false,
7
- sortable: false,
8
- cacheAll: true,
9
- regional: {
10
- add: t("admin.misc.add_new"),
11
- chooseAll: t("admin.misc.chose_all"),
12
- clearAll: t("admin.misc.clear_all"),
13
- down: t("admin.misc.down"),
14
- remove: t("admin.misc.remove"),
15
- search: t("admin.misc.search"),
16
- up: t("admin.misc.up")
17
- }
18
- }
19
- = form.select field.method_name, field.enum, { selected: field.form_value, object: form.object }, field.html_attributes.reverse_merge({data: { filteringmultiselect: true, options: js_data.to_json }, multiple: true})
@@ -1 +0,0 @@
1
- = form.send field.view_helper, field.method_name, field.html_attributes.reverse_merge({ value: field.form_value, class: 'form-control', required: field.required})
@@ -1,17 +0,0 @@
1
- - file = field.value
2
-
3
- - if field.cache_method
4
- = form.hidden_field(field.cache_method, value: field.cache_value)
5
-
6
- .toggle{style: ('display:none;' if file && field.delete_method && form.object.send(field.delete_method) == '1')}
7
- - if value = field.pretty_value
8
- = value
9
-
10
- = form.file_field(field.name, field.html_attributes.reverse_merge({ data: { fileupload: true }}))
11
-
12
- - if field.optional? && field.errors.blank? && file && field.delete_method
13
- %a.btn.btn-info.btn-remove-image{href: '#', :'data-toggle' => 'button', role: 'button'}
14
- %i.icon-white.icon-trash
15
- = I18n.t('admin.actions.delete.menu').capitalize + " #{field.label.downcase}"
16
-
17
- = form.check_box(field.delete_method, style: 'display:none;')
@@ -1,8 +0,0 @@
1
- :ruby
2
- js_data = {
3
- csspath: field.css_location,
4
- jspath: field.js_location,
5
- config_options: field.config_options.to_json
6
- }
7
-
8
- = form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'froala-wysiwyg', options: js_data.to_json }).reverse_merge({ value: field.form_value })
@@ -1,16 +0,0 @@
1
- - field.attachments.each_with_index do |attachment, i|
2
- .toggle{class: field.reorderable? ? 'sortables' : ''}
3
- = attachment.pretty_value
4
- - if field.delete_method || field.keep_method
5
- %a.btn.btn-info.btn-remove-image{href: '#', :'data-toggle' => 'button', role: 'button'}
6
- %i.icon-white.icon-trash
7
- = I18n.t('admin.actions.delete.menu').capitalize + " #{field.label.downcase} ##{i + 1}"
8
- - if field.keep_method
9
- = form.check_box(field.keep_method, {multiple:true, checked: true, style: 'display:none;'}, attachment.keep_value, nil)
10
- - elsif field.delete_method
11
- = form.check_box(field.delete_method, {multiple:true, style: 'display:none;'}, attachment.delete_value, nil)
12
-
13
- = form.file_field(field.name, field.html_attributes.reverse_merge({ data: { :"multiple-fileupload" => true }, multiple: true }))
14
-
15
- - if field.cache_method
16
- = form.hidden_field(field.cache_method)
@@ -1,15 +0,0 @@
1
- .controls.col-sm-10{data: { nestedmany: true }}
2
- .btn-group
3
- %a.btn.btn-info.toggler{:'data-toggle' => "button", :'data-target' => "#{form.jquery_namespace(field)} > .tab-content, #{form.jquery_namespace(field)} > .controls > .nav", class: (field.active? ? 'active' : '')}
4
- %i.icon-white
5
- - unless field.nested_form[:update_only] || !field.inline_add
6
- = form.link_to_add "<i class=\"icon-plus icon-white\"></i> #{wording_for(:link, :new, field.associated_model_config.abstract_model)}".html_safe, field.name, { class: 'btn btn-info' }
7
- = form.errors_for(field)
8
- = form.help_for(field)
9
- %ul.nav.nav-tabs
10
-
11
- .tab-content
12
- = form.fields_for field.name do |nested_form|
13
- - if field.nested_form[:allow_destroy] || nested_form.options[:child_index] == "new_#{field.name}"
14
- = nested_form.link_to_remove '<span class="btn btn-small btn-danger"><i class="icon-trash icon-white"></i></span>'.html_safe
15
- = nested_form.generate({action: :nested, model_config: field.associated_model_config, nested_in: field })
@@ -1,17 +0,0 @@
1
- .controls.col-sm-10{data: { nestedone: true }}
2
- %ul.nav{style: 'margin-bottom:0px; display:none'}
3
- .btn-group
4
- %a.btn.btn-info.toggler{:'data-toggle' => "button", :'data-target' => "#{form.jquery_namespace(field)} > .tab-content", class: (field.active? ? 'active' : '') }
5
- %i.icon-white
6
- - unless field.nested_form[:update_only] || !field.inline_add
7
- = form.link_to_add "<i class=\"icon-plus icon-white\"></i> #{wording_for(:link, :new, field.associated_model_config.abstract_model)}".html_safe,
8
- field.name,
9
- { class: 'btn btn-info', :'data-add-label' => "<i class=\"icon-plus icon-white\"></i> #{wording_for(:link, :new, field.associated_model_config.abstract_model)}".gsub("\n", "") }
10
- = form.errors_for(field)
11
- = form.help_for(field)
12
-
13
- .tab-content
14
- = form.fields_for field.name do |nested_form|
15
- - if field.nested_form[:allow_destroy]
16
- = nested_form.link_to_remove '<span class="btn btn-small btn-danger"><i class="icon-trash icon-white"></i></span>'.html_safe
17
- = nested_form.generate({action: :nested, model_config: field.associated_model_config, nested_in: field })
@@ -1,26 +0,0 @@
1
- :ruby
2
- type_collection = field.polymorphic_type_collection
3
- type_column = field.association.foreign_type.to_s
4
- selected_type = field.bindings[:object].send(type_column)
5
- selected = field.bindings[:object].send(field.association.name)
6
- collection = selected ? [[field.formatted_value, selected.id]] : [[]]
7
- column_type_dom_id = form.dom_id(field).sub(field.method_name.to_s, type_column)
8
- current_action = params[:action].in?(['create', 'new']) ? 'create' : 'update'
9
-
10
- default_options = { float_left: false }
11
-
12
- js_data = type_collection.inject({}) do |options, model|
13
- model_name = model.second.underscore.downcase
14
- source_abstract_model = RailsAdmin.config(form.object.class).abstract_model
15
- options.merge(model_name.gsub("_", "") => {
16
- xhr: true,
17
- remote_source: index_path(model_name, source_object_id: form.object.id, source_abstract_model: source_abstract_model.to_param, current_action: current_action, compact: true),
18
- float_left: false
19
- })
20
- end
21
-
22
- .form-inline
23
- - js_data.each do |model, value|
24
- %div{id: "#{model}-js-options", data: { options: value.to_json } }
25
- = form.select type_column, type_collection, {include_blank: true, selected: selected_type}, class: "form-control", id: column_type_dom_id, data: { polymorphic: true, urls: field.polymorphic_type_urls.to_json }, style: "float: left; margin-right: 10px;"
26
- = form.select field.method_name, collection, {include_blank: true, selected: selected.try(:id)}, class: "form-control", data: { filteringselect: true, options: js_data[selected_type.try(:downcase)] || default_options }, placeholder: 'Search'
@@ -1,8 +0,0 @@
1
- :ruby
2
- js_data = {
3
- js_location: field.js_location,
4
- css_location: field.css_location,
5
- instance_config: field.instance_config
6
- }
7
-
8
- = form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'simplemde', options: js_data.to_json }).reverse_merge({ value: field.form_value })
@@ -1 +0,0 @@
1
- = form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: false, options: {}.to_json }).reverse_merge({ value: field.form_value, class: 'form-control', required: field.required })
@@ -1,8 +0,0 @@
1
- :ruby
2
- js_data = {
3
- csspath: field.css_location,
4
- jspath: field.js_location,
5
- config_options: field.config_options.to_json
6
- }
7
-
8
- = form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'bootstrap-wysihtml5', options: js_data.to_json }).reverse_merge({ value: field.form_value })
@@ -1,16 +0,0 @@
1
- .form-group.form-actions
2
- .col-sm-offset-2.col-sm-10
3
- %input{type: :hidden, name: 'return_to', value: (params[:return_to].presence || request.referer)}
4
- %button.btn.btn-primary{type: "submit", name: "_save", :'data-disable-with' => t("admin.form.save")}
5
- %i.icon-white.icon-ok
6
- = t("admin.form.save")
7
- %span.extra_buttons
8
- - if authorized? :new, @abstract_model
9
- %button.btn.btn-info{type: "submit", name: "_add_another", :'data-disable-with' => t("admin.form.save_and_add_another")}
10
- = t("admin.form.save_and_add_another")
11
- - if authorized? :edit, @abstract_model
12
- %button.btn.btn-info{type: "submit", name: "_add_edit", :'data-disable-with' => t("admin.form.save_and_edit")}
13
- = t("admin.form.save_and_edit")
14
- %button.btn.btn-default{type: "submit", name: "_continue", :'data-disable-with' => t("admin.form.cancel"), :formnovalidate => true}
15
- %i.icon-remove
16
- = t("admin.form.cancel")
@@ -1,11 +0,0 @@
1
- %h4= I18n.t('admin.form.bulk_delete')
2
- %ul= render partial: "delete_notice", collection: @objects
3
- = form_tag bulk_delete_path(model_name: @abstract_model.to_param, bulk_ids: @objects.map(&:id)), method: :delete do
4
- .form-actions
5
- %input{type: :hidden, name: 'return_to', value: (params[:return_to].presence || request.referer)}
6
- %button.btn.btn-danger{type: "submit", :'data-disable-with' => t("admin.form.confirmation")}
7
- %i.icon-white.icon-ok
8
- = t("admin.form.confirmation")
9
- %button.btn{type: "submit", name: "_continue", :'data-disable-with' => t("admin.form.cancel")}
10
- %i.icon-remove
11
- = t("admin.form.cancel")
@@ -1,34 +0,0 @@
1
- - if @abstract_models
2
- %table.table.table-condensed.table-striped
3
- %thead
4
- %tr
5
- %th.shrink.model-name= t "admin.table_headers.model_name"
6
- %th.shrink.last-created= t "admin.table_headers.last_created"
7
- %th.records= t "admin.table_headers.records"
8
- %th.shrink.controls
9
- %tbody
10
- - @abstract_models.each do |abstract_model|
11
- - if authorized? :index, abstract_model
12
- - index_path = index_path(model_name: abstract_model.to_param)
13
- - row_class = "#{cycle("odd", "even")}#{" link" if index_path} #{abstract_model.param_key}_links"
14
- %tr{class: row_class, :"data-link" => index_path}
15
- - last_created = @most_recent_created[abstract_model.model.name]
16
- - active = last_created.try(:today?)
17
- %td
18
- %span.show= link_to capitalize_first_letter(abstract_model.config.label_plural), index_path, class: 'pjax'
19
- %td
20
- - if last_created
21
- = t "admin.misc.time_ago", time: time_ago_in_words(last_created), default: "#{time_ago_in_words(last_created)} #{t("admin.misc.ago")}"
22
- %td
23
- - count = @count[abstract_model.model.name]
24
- - percent = count > 0 ? (@max <= 1 ? count : ((Math.log(count+1) * 100.0) / Math.log(@max+1)).to_i) : -1
25
- .progress{style: "margin-bottom:0px", class: "progress-#{get_indicator(percent)} #{active && 'active progress-striped'}" }
26
- .progress-bar.animate-width-to{:class => "progress-bar-#{get_indicator(percent)}", :'data-animate-length' => ([1.0, percent].max.to_i * 20), :'data-animate-width-to' => "#{[2.0, percent].max.to_i}%", style: "width:2%"}
27
- = @count[abstract_model.model.name]
28
- %td.links
29
- %ul.inline.list-inline= menu_for :collection, abstract_model, nil, true
30
- - if @auditing_adapter && authorized?(:history_index)
31
- #block-tables.block
32
- .content
33
- %h2= t("admin.actions.history_index.menu")
34
- = render partial: 'rails_admin/main/dashboard_history'
@@ -1,18 +0,0 @@
1
- %h4
2
- = t("admin.form.are_you_sure_you_want_to_delete_the_object", model_name: @abstract_model.pretty_name.downcase)
3
- &ldquo;
4
- %strong>= @model_config.with(object: @object).object_label
5
- \&rdquo;
6
- %span>
7
- = t("admin.form.all_of_the_following_related_items_will_be_deleted")
8
-
9
- %ul= render partial: "delete_notice", object: @object
10
- = form_for(@object, url: delete_path(model_name: @abstract_model.to_param, id: @object.id), html: {method: "delete"}) do
11
- %input{type: :hidden, name: 'return_to', value: (params[:return_to].presence || request.referer)}
12
- .form-actions
13
- %button.btn.btn-danger{type: "submit", :'data-disable-with' => t("admin.form.confirmation")}
14
- %i.icon-white.icon-ok
15
- = t("admin.form.confirmation")
16
- %button.btn{type: "submit", name: "_continue", :'data-disable-with' => t("admin.form.cancel")}
17
- %i.icon-remove
18
- = t("admin.form.cancel")
@@ -1,2 +0,0 @@
1
- = rails_admin_form_for @object, url: edit_path(@abstract_model, @object.id), as: @abstract_model.param_key, html: { method: "put", multipart: true, class: "form-horizontal denser", data: { title: @page_name } } do |form|
2
- = form.generate action: :update
@@ -1,92 +0,0 @@
1
- - params = request.params.except(:action, :controller, :utf8, :page, :per_page, :format, :authenticity_token)
2
- - visible_fields = @model_config.export.with(view: self, object: @abstract_model.model.new, controller: self.controller).visible_fields
3
-
4
- = form_tag export_path(params.merge(all: true)), method: 'post', class: 'form-horizontal' do
5
-
6
- %input{name: "send_data", type: "hidden", value: "true"}/
7
- %fieldset{id: 'fields_to_export'}
8
- %legend
9
- %i.icon-chevron-down
10
- = t('admin.export.select')
11
- .form-group.control-group
12
- .col-sm-12
13
- .checkbox
14
- %label{for: 'check_all'}
15
- = check_box_tag 'all', 'all', true, { id: 'check_all' }
16
- %b= t('admin.export.select_all_fields')
17
- .form-group.control-group
18
- .col-sm-12
19
- .well.well-sm.reverse-selection{rel: 'tooltip', title: t('admin.export.click_to_reverse_selection'), style: 'margin: 0; cursor: pointer;'}
20
- %b= t('admin.export.fields_from', name: @model_config.label_plural.downcase)
21
- .controls
22
- .row
23
- - visible_fields.select{ |f| !f.association? || f.association.polymorphic? }.each do |field|
24
- - list = field.virtual? ? 'methods' : 'only'
25
- .checkbox.col-sm-3
26
- - if field.association? && field.association.polymorphic?
27
- %label{for: "schema_#{list}_#{field.method_name}"}
28
- = check_box_tag "schema[#{list}][]", field.method_name, true, { id: "schema_#{list}_#{field.method_name}" }
29
- = field.label + " [id]"
30
- - polymorphic_type_column_name = @abstract_model.properties.detect {|p| field.association.foreign_type == p.name }.name
31
- %label{for: "schema_#{list}_#{polymorphic_type_column_name}"}
32
- = check_box_tag "schema[#{list}][]", polymorphic_type_column_name, true, { id: "schema_#{list}_#{polymorphic_type_column_name}" }
33
- = capitalize_first_letter(field.label) + " [type]"
34
- - else
35
- %label{for: "schema_#{list}_#{field.name}"}
36
- = check_box_tag "schema[#{list}][]", field.name, true, { id: "schema_#{list}_#{field.name}" }
37
- = capitalize_first_letter(field.label)
38
-
39
- - visible_fields.select{ |f| f.association? && !f.association.polymorphic? }.each do |field|
40
- - fields = field.associated_model_config.export.with(controller: self.controller, view: self, object: (associated_model = field.associated_model_config.abstract_model.model).new).visible_fields.select{ |f| !f.association? }
41
- .form-group.control-group
42
- .col-sm-12
43
- .well.well-sm.reverse-selection{rel: 'tooltip', title: t('admin.export.click_to_reverse_selection'), style: 'margin: 0; cursor: pointer;'}
44
- %b= t('admin.export.fields_from_associated', name: field.label.downcase)
45
- .controls
46
- .row
47
- - fields.each do |associated_model_field|
48
- - list = associated_model_field.virtual? ? 'methods' : 'only'
49
- .checkbox.col-sm-3
50
- %label{for: "schema_include_#{field.name}_#{list}_#{associated_model_field.name}"}
51
- = check_box_tag "schema[include][#{field.name}][#{list}][]", associated_model_field.name, true, { id: "schema_include_#{field.name}_#{list}_#{associated_model_field.name}" }
52
- = capitalize_first_letter(associated_model_field.label)
53
-
54
- %fieldset
55
- %legend
56
- %i.icon-chevron-down
57
- = t('admin.export.options_for', name: 'csv')
58
- .form-group.control-group
59
- - guessed_encoding = @abstract_model.encoding
60
- %label.col-sm-2.control-label{for: "csv_options_encoding_to"}= t('admin.export.csv.encoding_to')
61
- .col-sm-10.controls
62
- -# from http://books.google.com/support/partner/bin/answer.py?answer=30990 :
63
- = select_tag 'csv_options[encoding_to]', options_for_select(Encoding.name_list.sort), include_blank: true, placeholder: t('admin.misc.search'), :'data-enumeration' => true
64
- %p.help-block= t('admin.export.csv.encoding_to_help', name: guessed_encoding)
65
-
66
- .form-group.control-group
67
- %label.col-sm-2.control-label{for: "csv_options_skip_header"}= t('admin.export.csv.skip_header')
68
- .col-sm-10.controls
69
- .checkbox
70
- %label{style: 'display: block;' }
71
- = check_box_tag 'csv_options[skip_header]', 'true'
72
- %p.help-block= t('admin.export.csv.skip_header_help')
73
-
74
- .form-group.control-group
75
- %label.col-sm-2.control-label{for: "csv_options_generator_col_sep"}= t('admin.export.csv.col_sep')
76
- .col-sm-10.controls
77
- = select_tag 'csv_options[generator][col_sep]', options_for_select({ '' => t('admin.export.csv.default_col_sep'), "<comma> ','" => ',', "<semicolon> ';'" => ';', '<tabs>' => "'\t'" }), placeholder: t('admin.misc.search'), :'data-enumeration' => true
78
- %p.help-block= t('admin.export.csv.col_sep_help', value: t('admin.export.csv.default_col_sep'))
79
-
80
- .form-group.form-actions
81
- .col-sm-offset-2.col-sm-10
82
- %input{type: :hidden, name: 'return_to', value: (params[:return_to].presence || request.referer)}
83
- %button.btn.btn-primary{type: "submit", name: 'csv'}
84
- %i.icon-white.icon-ok
85
- = t("admin.export.confirmation", name: 'csv')
86
- %button.btn.btn-info{type: "submit", name: 'json'}
87
- = t("admin.export.confirmation", name: 'json')
88
- %button.btn.btn-info{type: "submit", name: 'xml'}
89
- = t("admin.export.confirmation", name: 'xml')
90
- %button.btn{type: "submit", name: "_continue"}
91
- %i.icon-remove
92
- = t("admin.form.cancel")
@@ -1,51 +0,0 @@
1
- - params = request.params.except(:action, :controller, :model_name)
2
- - query = params[:query]
3
- - filter = params[:filter]
4
- - sort = params[:sort]
5
- - sort_reverse = params[:sort_reverse]
6
- - path_method = params[:id] ? "history_show_path" : "history_index_path"
7
-
8
- = form_tag("", method: "get", class: "search pjax-form form-inline") do
9
- .well
10
- .input-group
11
- %input.form-control.input-small{name: "query", type: "search", value: query, placeholder: "#{t("admin.misc.filter")}", class: 'input-small'}
12
- %span.input-group-btn
13
- %button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
14
- %i.icon-white.icon-refresh
15
- = t("admin.misc.refresh")
16
- %table#history.table.table-striped.table-condensed
17
- %thead
18
- %tr
19
- - columns = []
20
- - columns << { property_name: "created_at", css_class: "created_at",link_text: t('admin.table_headers.created_at') }
21
- - columns << { property_name: "username", css_class: "username", link_text: t('admin.table_headers.username') }
22
- - columns << { property_name: "item", css_class: "item", link_text: t('admin.table_headers.item') } if @general
23
- - columns << { property_name: "message", css_class: "message", link_text: t('admin.table_headers.message') }
24
-
25
- - columns.each do |column|
26
- - property_name = column[:property_name]
27
- - selected = (sort == property_name)
28
- - sort_direction = (sort_reverse ? "headerSortUp" : "headerSortDown" if selected)
29
- - sort_location = send(path_method, params.except("sort_reverse").merge(model_name: @abstract_model.to_param, sort: property_name).merge(selected && sort_reverse != "true" ? {sort_reverse: "true"} : {}))
30
- %th{class: "header pjax #{column[:css_class]} #{sort_direction if selected}", :'data-href' => sort_location}= column[:link_text]
31
- %tbody
32
- - @history.each_with_index do |object, index|
33
- %tr
34
- - unless object.created_at.nil?
35
- %td= l(object.created_at, format: :long, default: l(object.created_at, format: :long))
36
- %td= object.username
37
- - if @general
38
- - if o = @abstract_model.get(object.item)
39
- - label = o.send(@abstract_model.config.object_label_method)
40
- - if show_action = action(:show, @abstract_model, o)
41
- %td= link_to(label, url_for(action: show_action.action_name, model_name: @abstract_model.to_param, id: o.id), class: 'pjax')
42
- - else
43
- %td= label
44
- - else
45
- %td= "#{@abstract_model.config.label} ##{object.item}"
46
- %td= object.message.in?(['delete', 'new']) ? t("admin.actions.#{object.message}.done").capitalize : object.message
47
-
48
- - unless params[:all] || !@history.respond_to?(:current_page)
49
- = paginate(@history, theme: 'ra-twitter-bootstrap', remote: true)
50
- = link_to(t("admin.misc.show_all"), send(path_method, params.merge(all: true)), class: "show-all btn pjax") unless (tc = @history.total_count) <= @history.size || tc > 100
51
-