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.
- checksums.yaml +4 -4
- data/Gemfile +9 -11
- data/README.md +37 -31
- data/Rakefile +2 -2
- data/app/assets/javascripts/rails_admin.js +21 -0
- data/app/assets/stylesheets/rails_admin/custom/mixins.scss +1 -1
- data/app/assets/stylesheets/rails_admin/custom/variables.scss +1 -1
- data/app/assets/stylesheets/rails_admin.scss.erb +76 -0
- data/app/controllers/rails_admin/application_controller.rb +4 -3
- data/app/controllers/rails_admin/main_controller.rb +43 -24
- data/app/helpers/rails_admin/application_helper.rb +69 -52
- data/app/helpers/rails_admin/form_builder.rb +5 -4
- data/app/helpers/rails_admin/main_helper.rb +27 -43
- data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.erb +5 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.erb +13 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.erb +6 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.erb +9 -0
- data/app/views/layouts/rails_admin/_head.html.erb +17 -0
- data/app/views/layouts/rails_admin/_navigation.html.erb +21 -0
- data/app/views/layouts/rails_admin/_secondary_navigation.html.erb +24 -0
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.erb +9 -0
- data/app/views/layouts/rails_admin/application.html.erb +27 -0
- data/app/views/layouts/rails_admin/modal.js.erb +7 -0
- data/app/views/layouts/rails_admin/pjax.html.erb +20 -0
- data/app/views/rails_admin/main/_dashboard_history.html.erb +45 -0
- data/app/views/rails_admin/main/_delete_notice.html.erb +35 -0
- data/app/views/rails_admin/main/_form_action_text.html.erb +7 -0
- data/app/views/rails_admin/main/_form_boolean.html.erb +16 -0
- data/app/views/rails_admin/main/{_form_ck_editor.html.haml → _form_ck_editor.html.erb} +3 -3
- data/app/views/rails_admin/main/_form_code_mirror.html.erb +9 -0
- data/app/views/rails_admin/main/_form_colorpicker.html.erb +1 -0
- data/app/views/rails_admin/main/_form_datetime.html.erb +9 -0
- data/app/views/rails_admin/main/_form_enumeration.html.erb +21 -0
- data/app/views/rails_admin/main/_form_field.html.erb +1 -0
- data/app/views/rails_admin/main/_form_file_upload.html.erb +17 -0
- data/app/views/rails_admin/main/{_form_filtering_multiselect.html.haml → _form_filtering_multiselect.html.erb} +11 -11
- data/app/views/rails_admin/main/{_form_filtering_select.html.haml → _form_filtering_select.html.erb} +13 -12
- data/app/views/rails_admin/main/_form_froala.html.erb +8 -0
- data/app/views/rails_admin/main/_form_multiple_file_upload.html.erb +20 -0
- data/app/views/rails_admin/main/_form_nested_many.html.erb +21 -0
- data/app/views/rails_admin/main/_form_nested_one.html.erb +21 -0
- data/app/views/rails_admin/main/_form_polymorphic_association.html.erb +27 -0
- data/app/views/rails_admin/main/_form_simple_mde.html.erb +8 -0
- data/app/views/rails_admin/main/_form_text.html.erb +1 -0
- data/app/views/rails_admin/main/_form_wysihtml5.html.erb +8 -0
- data/app/views/rails_admin/main/_submit_buttons.html.erb +25 -0
- data/app/views/rails_admin/main/bulk_delete.html.erb +19 -0
- data/app/views/rails_admin/main/dashboard.html.erb +64 -0
- data/app/views/rails_admin/main/delete.html.erb +21 -0
- data/app/views/rails_admin/main/edit.html.erb +3 -0
- data/app/views/rails_admin/main/export.html.erb +146 -0
- data/app/views/rails_admin/main/history.html.erb +78 -0
- data/app/views/rails_admin/main/index.html.erb +193 -0
- data/app/views/rails_admin/main/new.html.erb +3 -0
- data/app/views/rails_admin/main/show.html.erb +28 -0
- data/config/initializers/active_record_extensions.rb +3 -1
- data/config/initializers/mongoid_extensions.rb +1 -1
- data/config/locales/rails_admin.en.yml +5 -1
- data/lib/generators/rails_admin/install_generator.rb +51 -3
- data/lib/generators/rails_admin/templates/environment.js +6 -0
- data/lib/generators/rails_admin/templates/initializer.erb +2 -1
- data/lib/generators/rails_admin/templates/rails_admin.js.erb +2 -0
- data/lib/generators/rails_admin/templates/rails_admin.scss +1 -0
- data/lib/generators/rails_admin/templates/webpack.config.js +32 -0
- data/lib/rails_admin/abstract_model.rb +24 -10
- data/lib/rails_admin/adapters/active_record/association.rb +20 -1
- data/lib/rails_admin/adapters/active_record/object_extension.rb +29 -0
- data/lib/rails_admin/adapters/active_record/property.rb +1 -1
- data/lib/rails_admin/adapters/active_record.rb +19 -21
- data/lib/rails_admin/adapters/mongoid/association.rb +38 -9
- data/lib/rails_admin/adapters/mongoid/bson.rb +4 -5
- data/lib/rails_admin/adapters/mongoid/extension.rb +3 -1
- data/lib/rails_admin/adapters/mongoid/object_extension.rb +32 -0
- data/lib/rails_admin/adapters/mongoid/property.rb +2 -2
- data/lib/rails_admin/adapters/mongoid.rb +25 -19
- data/lib/rails_admin/config/actions/base.rb +7 -2
- data/lib/rails_admin/config/actions/bulk_delete.rb +2 -2
- data/lib/rails_admin/config/actions/dashboard.rb +4 -3
- data/lib/rails_admin/config/actions/delete.rb +5 -9
- data/lib/rails_admin/config/actions/edit.rb +7 -7
- data/lib/rails_admin/config/actions/export.rb +2 -2
- data/lib/rails_admin/config/actions/history_index.rb +2 -2
- data/lib/rails_admin/config/actions/history_show.rb +2 -2
- data/lib/rails_admin/config/actions/index.rb +5 -7
- data/lib/rails_admin/config/actions/new.rb +9 -9
- data/lib/rails_admin/config/actions/show.rb +1 -1
- data/lib/rails_admin/config/actions/show_in_app.rb +6 -2
- data/lib/rails_admin/config/actions.rb +4 -4
- data/lib/rails_admin/config/configurable.rb +2 -2
- data/lib/rails_admin/config/fields/association.rb +15 -12
- data/lib/rails_admin/config/fields/base.rb +44 -24
- data/lib/rails_admin/config/fields/factories/active_storage.rb +1 -0
- data/lib/rails_admin/config/fields/factories/association.rb +6 -8
- data/lib/rails_admin/config/fields/factories/carrierwave.rb +2 -1
- data/lib/rails_admin/config/fields/factories/devise.rb +2 -1
- data/lib/rails_admin/config/fields/factories/dragonfly.rb +2 -1
- data/lib/rails_admin/config/fields/factories/paperclip.rb +2 -1
- data/lib/rails_admin/config/fields/factories/shrine.rb +1 -1
- data/lib/rails_admin/config/fields/group.rb +1 -2
- data/lib/rails_admin/config/fields/types/active_record_enum.rb +2 -0
- data/lib/rails_admin/config/fields/types/active_storage.rb +9 -7
- data/lib/rails_admin/config/fields/types/all.rb +1 -0
- data/lib/rails_admin/config/fields/types/belongs_to_association.rb +4 -12
- data/lib/rails_admin/config/fields/types/boolean.rb +32 -8
- data/lib/rails_admin/config/fields/types/carrierwave.rb +1 -0
- data/lib/rails_admin/config/fields/types/citext.rb +13 -0
- data/lib/rails_admin/config/fields/types/color.rb +6 -2
- data/lib/rails_admin/config/fields/types/date.rb +5 -8
- data/lib/rails_admin/config/fields/types/datetime.rb +18 -21
- data/lib/rails_admin/config/fields/types/decimal.rb +9 -2
- data/lib/rails_admin/config/fields/types/dragonfly.rb +3 -1
- data/lib/rails_admin/config/fields/types/enum.rb +1 -1
- data/lib/rails_admin/config/fields/types/file_upload.rb +4 -3
- data/lib/rails_admin/config/fields/types/float.rb +9 -2
- data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -5
- data/lib/rails_admin/config/fields/types/has_one_association.rb +1 -13
- data/lib/rails_admin/config/fields/types/integer.rb +2 -6
- data/lib/rails_admin/config/fields/types/multiple_active_storage.rb +8 -6
- data/lib/rails_admin/config/fields/types/multiple_carrierwave.rb +1 -0
- data/lib/rails_admin/config/fields/types/multiple_file_upload.rb +4 -3
- data/lib/rails_admin/config/fields/types/numeric.rb +18 -0
- data/lib/rails_admin/config/fields/types/polymorphic_association.rb +3 -2
- data/lib/rails_admin/config/fields/types/string.rb +1 -1
- data/lib/rails_admin/config/fields/types/time.rb +1 -4
- data/lib/rails_admin/config/fields/types/timestamp.rb +0 -4
- data/lib/rails_admin/config/fields/types.rb +1 -1
- data/lib/rails_admin/config/fields.rb +3 -1
- data/lib/rails_admin/config/has_fields.rb +5 -6
- data/lib/rails_admin/config/hideable.rb +1 -1
- data/lib/rails_admin/config/inspectable.rb +1 -3
- data/lib/rails_admin/config/model.rb +10 -10
- data/lib/rails_admin/config/sections/base.rb +2 -3
- data/lib/rails_admin/config/sections/list.rb +4 -15
- data/lib/rails_admin/config/sections.rb +1 -1
- data/lib/rails_admin/config.rb +73 -38
- data/lib/rails_admin/engine.rb +36 -23
- data/lib/rails_admin/extension.rb +6 -14
- data/lib/rails_admin/extensions/cancancan/authorization_adapter.rb +4 -2
- data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +12 -7
- data/lib/rails_admin/extensions/pundit/authorization_adapter.rb +6 -7
- data/lib/rails_admin/support/csv_converter.rb +12 -13
- data/lib/rails_admin/support/datetime.rb +40 -74
- data/lib/rails_admin/support/esmodule_preprocessor.rb +32 -0
- data/lib/rails_admin/support/hash_helper.rb +6 -5
- data/lib/rails_admin/version.rb +7 -3
- data/lib/rails_admin.rb +1 -4
- data/lib/tasks/rails_admin.rake +3 -3
- data/package.json +28 -0
- data/src/rails_admin/base.js +21 -0
- data/src/rails_admin/filter-box.js +405 -0
- data/src/rails_admin/filtering-multiselect.js +394 -0
- data/src/rails_admin/filtering-select.js +302 -0
- data/src/rails_admin/i18n.js +19 -0
- data/src/rails_admin/nested-form-hooks.js +100 -0
- data/src/rails_admin/remote-form.js +190 -0
- data/src/rails_admin/sidescroll.js +20 -0
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/theming.scss +93 -34
- data/src/rails_admin/styles/base.scss +64 -0
- data/src/rails_admin/styles/filtering-multiselect.scss +53 -0
- data/src/rails_admin/styles/filtering-select.scss +70 -0
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/theming.scss +23 -21
- data/src/rails_admin/styles/themes/cerulean/variables.scss +830 -0
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/mixins.scss +1 -1
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/variables.scss +1 -1
- data/src/rails_admin/styles/widgets.scss +35 -0
- data/src/rails_admin/ui.js +172 -0
- data/src/rails_admin/vendor/jquery.pjax.js +899 -0
- data/src/rails_admin/vendor/jquery_nested_form.js +122 -0
- data/src/rails_admin/widgets.js +512 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.svg +5034 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/data.js +41 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/effect.js +1637 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/ie.js +17 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/keycode.js +47 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/position.js +500 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js +42 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js +47 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/unique-id.js +51 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/version.js +17 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widget.js +735 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/autocomplete.js +689 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/menu.js +680 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/mouse.js +230 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/sortable.js +1561 -0
- data/vendor/assets/javascripts/rails_admin/jquery3.js +10872 -0
- data/vendor/assets/stylesheets/rails_admin/font-awesome.scss +4476 -2216
- metadata +118 -263
- data/app/assets/images/rails_admin/aristo/images/bg_fallback.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/icon_sprite.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/progress_bar.gif +0 -0
- data/app/assets/images/rails_admin/aristo/images/slider_handles.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/rails_admin/bullet_black.png +0 -0
- data/app/assets/images/rails_admin/bullet_white.png +0 -0
- data/app/assets/images/rails_admin/calendar.png +0 -0
- data/app/assets/images/rails_admin/clock.png +0 -0
- data/app/assets/images/rails_admin/logo.png +0 -0
- data/app/assets/images/rails_admin/magnifier.png +0 -0
- data/app/assets/images/rails_admin/multiselect/icon_sprite.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-dark.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-light.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-dark.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-light.png +0 -0
- data/app/assets/javascripts/rails_admin/jquery-ui.js.erb +0 -8
- data/app/assets/javascripts/rails_admin/jquery.migrate.js +0 -3
- data/app/assets/javascripts/rails_admin/ra.filter-box.js +0 -253
- data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +0 -331
- data/app/assets/javascripts/rails_admin/ra.filtering-select.js +0 -294
- data/app/assets/javascripts/rails_admin/ra.i18n.js +0 -28
- data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.js +0 -59
- data/app/assets/javascripts/rails_admin/ra.remote-form.js +0 -155
- data/app/assets/javascripts/rails_admin/ra.sidescroll.js +0 -31
- data/app/assets/javascripts/rails_admin/ra.widgets.js +0 -379
- data/app/assets/javascripts/rails_admin/rails_admin.js +0 -21
- data/app/assets/javascripts/rails_admin/ui.js +0 -135
- data/app/assets/stylesheets/rails_admin/aristo/images/bg_fallback.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/icon_sprite.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/progress_bar.gif +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/slider_handles.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/jquery-ui-1.8.7.custom.scss +0 -733
- data/app/assets/stylesheets/rails_admin/base/font-awesome-4-compability.scss +0 -153
- data/app/assets/stylesheets/rails_admin/ra.filtering-multiselect.scss +0 -88
- data/app/assets/stylesheets/rails_admin/ra.sidescroll.scss +0 -29
- data/app/assets/stylesheets/rails_admin/ra.widgets.scss +0 -17
- data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +0 -110
- data/app/assets/stylesheets/rails_admin/themes/cerulean/variables.scss +0 -857
- data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.haml +0 -2
- data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.haml +0 -9
- data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.haml +0 -4
- data/app/views/layouts/rails_admin/_head.html.haml +0 -7
- data/app/views/layouts/rails_admin/_navigation.html.haml +0 -12
- data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +0 -10
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +0 -3
- data/app/views/layouts/rails_admin/application.html.haml +0 -16
- data/app/views/layouts/rails_admin/pjax.html.haml +0 -12
- data/app/views/rails_admin/main/_dashboard_history.html.haml +0 -21
- data/app/views/rails_admin/main/_delete_notice.html.haml +0 -24
- data/app/views/rails_admin/main/_form_action_text.html.haml +0 -7
- data/app/views/rails_admin/main/_form_boolean.html.haml +0 -3
- data/app/views/rails_admin/main/_form_code_mirror.html.haml +0 -9
- data/app/views/rails_admin/main/_form_colorpicker.html.haml +0 -1
- data/app/views/rails_admin/main/_form_datetime.html.haml +0 -5
- data/app/views/rails_admin/main/_form_enumeration.html.haml +0 -19
- data/app/views/rails_admin/main/_form_field.html.haml +0 -1
- data/app/views/rails_admin/main/_form_file_upload.html.haml +0 -17
- data/app/views/rails_admin/main/_form_froala.html.haml +0 -8
- data/app/views/rails_admin/main/_form_multiple_file_upload.html.haml +0 -16
- data/app/views/rails_admin/main/_form_nested_many.html.haml +0 -15
- data/app/views/rails_admin/main/_form_nested_one.html.haml +0 -17
- data/app/views/rails_admin/main/_form_polymorphic_association.html.haml +0 -26
- data/app/views/rails_admin/main/_form_simple_mde.haml +0 -8
- data/app/views/rails_admin/main/_form_text.html.haml +0 -1
- data/app/views/rails_admin/main/_form_wysihtml5.html.haml +0 -8
- data/app/views/rails_admin/main/_submit_buttons.html.haml +0 -16
- data/app/views/rails_admin/main/bulk_delete.html.haml +0 -11
- data/app/views/rails_admin/main/dashboard.html.haml +0 -34
- data/app/views/rails_admin/main/delete.html.haml +0 -18
- data/app/views/rails_admin/main/edit.html.haml +0 -2
- data/app/views/rails_admin/main/export.html.haml +0 -92
- data/app/views/rails_admin/main/history.html.haml +0 -51
- data/app/views/rails_admin/main/index.html.haml +0 -126
- data/app/views/rails_admin/main/new.html.haml +0 -2
- data/app/views/rails_admin/main/show.html.haml +0 -15
- data/config/initializers/haml.rb +0 -5
- data/lib/rails_admin/adapters/active_record/abstract_object.rb +0 -38
- data/lib/rails_admin/adapters/active_record.rb.bak +0 -348
- data/lib/rails_admin/adapters/mongoid/abstract_object.rb +0 -42
- data/lib/rails_admin/bootstrap-sass/compass_functions.rb +0 -28
- data/lib/rails_admin/bootstrap-sass/sass_functions.rb +0 -16
- data/lib/rails_admin/bootstrap-sass.rb +0 -49
- data/lib/rails_admin/config/lazy_model.rb +0 -68
- data/lib/rails_admin/extensions/history/auditing_adapter.rb +0 -37
- data/lib/rails_admin/extensions/history/history.rb +0 -44
- data/lib/rails_admin/extensions/history.rb +0 -3
- data/lib/rails_admin/support/i18n.rb +0 -43
- data/vendor/assets/fonts/rails_admin/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.svg +0 -2671
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_background.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hex.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_h.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_s.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_indic.gif +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_overlay.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_g.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_r.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_select.gif +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_submit.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_background.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hex.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_h.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_s.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_indic.gif +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_g.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_r.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_submit.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/select.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/select2.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/slider.png +0 -0
- data/vendor/assets/javascripts/rails_admin/jquery.colorpicker.js +0 -484
- data/vendor/assets/stylesheets/rails_admin/jquery.colorpicker.scss +0 -182
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/README.txt +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/mixins.scss +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/variables.scss +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/mixins.scss +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/theming.scss +0 -0
@@ -11,7 +11,7 @@ module RailsAdmin
|
|
11
11
|
|
12
12
|
def message
|
13
13
|
@message = @version.event
|
14
|
-
@version.respond_to?(:changeset) && @version.changeset.present? ? @message + ' [' + @version.changeset.to_a.collect { |c| c[0]
|
14
|
+
@version.respond_to?(:changeset) && @version.changeset.present? ? @message + ' [' + @version.changeset.to_a.collect { |c| "#{c[0]} = #{c[1][1]}" }.join(', ') + ']' : @message
|
15
15
|
end
|
16
16
|
|
17
17
|
def created_at
|
@@ -23,7 +23,11 @@ module RailsAdmin
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def username
|
26
|
-
|
26
|
+
begin
|
27
|
+
@user_class.find(@version.whodunnit).try(:email)
|
28
|
+
rescue StandardError
|
29
|
+
nil
|
30
|
+
end || @version.whodunnit
|
27
31
|
end
|
28
32
|
|
29
33
|
def item
|
@@ -57,13 +61,14 @@ module RailsAdmin
|
|
57
61
|
EOS
|
58
62
|
|
59
63
|
def self.setup
|
60
|
-
raise
|
61
|
-
|
64
|
+
raise 'PaperTrail not found' unless defined?(::PaperTrail)
|
65
|
+
|
66
|
+
RailsAdmin::Extensions::ControllerExtension.include ControllerExtension
|
62
67
|
end
|
63
68
|
|
64
69
|
def initialize(controller, user_class = 'User', version_class = '::Version')
|
65
70
|
@controller = controller
|
66
|
-
@controller
|
71
|
+
@controller&.send(:set_paper_trail_whodunnit)
|
67
72
|
begin
|
68
73
|
@user_class = user_class.to_s.constantize
|
69
74
|
rescue NameError
|
@@ -149,10 +154,10 @@ module RailsAdmin
|
|
149
154
|
# classes](https://github.com/paper-trail-gem/paper_trail#6a-custom-version-classes)
|
150
155
|
#
|
151
156
|
# ```ruby
|
152
|
-
# has_paper_trail class_name: 'MyVersion'
|
157
|
+
# has_paper_trail versions: { class_name: 'MyVersion' }
|
153
158
|
# ```
|
154
159
|
def version_class_for(model)
|
155
|
-
model.paper_trail_options
|
160
|
+
model.paper_trail_options.dig(:versions, :class_name).try(:constantize) || @version_class
|
156
161
|
end
|
157
162
|
end
|
158
163
|
end
|
@@ -7,7 +7,7 @@ module RailsAdmin
|
|
7
7
|
class AuthorizationAdapter
|
8
8
|
# This method is called first time only and used for setup
|
9
9
|
def self.setup
|
10
|
-
RailsAdmin::Extensions::ControllerExtension.
|
10
|
+
RailsAdmin::Extensions::ControllerExtension.include ::Pundit
|
11
11
|
end
|
12
12
|
|
13
13
|
# See the +authorize_with+ config method for where the initialization happens.
|
@@ -21,10 +21,9 @@ module RailsAdmin
|
|
21
21
|
# AbstractModel instance that applies. The third argument is the actual model
|
22
22
|
# instance if it is available.
|
23
23
|
def authorize(action, abstract_model = nil, model_object = nil)
|
24
|
-
record = model_object || abstract_model
|
25
|
-
if action && !policy(record).send(action_for_pundit(action))
|
26
|
-
|
27
|
-
end
|
24
|
+
record = model_object || abstract_model&.model
|
25
|
+
raise ::Pundit::NotAuthorizedError.new("not allowed to #{action} this #{record}") if action && !policy(record).send(action_for_pundit(action))
|
26
|
+
|
28
27
|
@controller.instance_variable_set(:@_pundit_policy_authorized, true)
|
29
28
|
end
|
30
29
|
|
@@ -33,7 +32,7 @@ module RailsAdmin
|
|
33
32
|
# This takes the same arguments as +authorize+. The difference is that this will
|
34
33
|
# return a boolean whereas +authorize+ will raise an exception when not authorized.
|
35
34
|
def authorized?(action, abstract_model = nil, model_object = nil)
|
36
|
-
record = model_object || abstract_model
|
35
|
+
record = model_object || abstract_model&.model
|
37
36
|
policy(record).send(action_for_pundit(action)) if action
|
38
37
|
end
|
39
38
|
|
@@ -50,7 +49,7 @@ module RailsAdmin
|
|
50
49
|
# records. It should return a hash of attributes which match what the user
|
51
50
|
# is authorized to create.
|
52
51
|
def attributes_for(action, abstract_model)
|
53
|
-
record = abstract_model
|
52
|
+
record = abstract_model&.model
|
54
53
|
policy(record).try(:attributes_for, action) || {}
|
55
54
|
end
|
56
55
|
|
@@ -1,11 +1,13 @@
|
|
1
1
|
# encoding: UTF-8
|
2
|
+
|
2
3
|
require 'csv'
|
3
4
|
|
4
5
|
module RailsAdmin
|
5
6
|
class CSVConverter
|
6
|
-
def initialize(objects = [], schema =
|
7
|
+
def initialize(objects = [], schema = nil)
|
7
8
|
@fields = []
|
8
9
|
@associations = []
|
10
|
+
schema ||= {}
|
9
11
|
|
10
12
|
return self if (@objects = objects).blank?
|
11
13
|
|
@@ -13,12 +15,14 @@ module RailsAdmin
|
|
13
15
|
@abstract_model = RailsAdmin::AbstractModel.new(@model)
|
14
16
|
@model_config = @abstract_model.config
|
15
17
|
@methods = [(schema[:only] || []) + (schema[:methods] || [])].flatten.compact
|
16
|
-
@fields = @methods.collect { |m|
|
18
|
+
@fields = @methods.collect { |m| export_field_for(m) }.compact
|
17
19
|
@empty = ::I18n.t('admin.export.empty_value_for_associated_objects')
|
18
20
|
schema_include = schema.delete(:include) || {}
|
19
21
|
|
20
22
|
@associations = schema_include.each_with_object({}) do |(key, values), hash|
|
21
|
-
association =
|
23
|
+
association = export_field_for(key)
|
24
|
+
next unless association&.association?
|
25
|
+
|
22
26
|
model_config = association.associated_model_config
|
23
27
|
abstract_model = model_config.abstract_model
|
24
28
|
methods = [(values[:only] || []) + (values[:methods] || [])].flatten.compact
|
@@ -28,7 +32,7 @@ module RailsAdmin
|
|
28
32
|
model: abstract_model.model,
|
29
33
|
abstract_model: abstract_model,
|
30
34
|
model_config: model_config,
|
31
|
-
fields: methods.collect { |m|
|
35
|
+
fields: methods.collect { |m| export_field_for(m, model_config) }.compact,
|
32
36
|
}
|
33
37
|
hash
|
34
38
|
end
|
@@ -41,13 +45,12 @@ module RailsAdmin
|
|
41
45
|
https://github.com/ruby/csv/issues/62
|
42
46
|
MSG
|
43
47
|
end
|
48
|
+
|
44
49
|
options = HashWithIndifferentAccess.new(options)
|
45
50
|
encoding_to = Encoding.find(options[:encoding_to]) if options[:encoding_to].present?
|
46
51
|
|
47
52
|
csv_string = generate_csv_string(options)
|
48
|
-
if encoding_to
|
49
|
-
csv_string = csv_string.encode(encoding_to, invalid: :replace, undef: :replace, replace: '?')
|
50
|
-
end
|
53
|
+
csv_string = csv_string.encode(encoding_to, invalid: :replace, undef: :replace, replace: '?') if encoding_to
|
51
54
|
|
52
55
|
# Add a BOM for utf8 encodings, helps with utf8 auto-detect for some versions of Excel.
|
53
56
|
# Don't add if utf8 but user don't want to touch input encoding:
|
@@ -61,12 +64,8 @@ module RailsAdmin
|
|
61
64
|
|
62
65
|
private
|
63
66
|
|
64
|
-
def
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
def export_fields_for(method, model_config = @model_config)
|
69
|
-
model_config.export.fields.select { |f| f.name == method }
|
67
|
+
def export_field_for(method, model_config = @model_config)
|
68
|
+
model_config.export.fields.detect { |f| f.name == method }
|
70
69
|
end
|
71
70
|
|
72
71
|
def generate_csv_string(options)
|
@@ -1,98 +1,64 @@
|
|
1
|
-
require 'rails_admin/support/i18n'
|
2
|
-
|
3
1
|
module RailsAdmin
|
4
2
|
module Support
|
5
3
|
class Datetime
|
6
4
|
# Ruby format options as a key and momentjs format options as a value
|
7
5
|
MOMENTJS_TRANSLATIONS = {
|
8
|
-
'%a' => 'ddd', # The abbreviated weekday name ("Sun")
|
9
6
|
'%A' => 'dddd', # The full weekday name ("Sunday")
|
10
|
-
'%
|
7
|
+
'%a' => 'ddd', # The abbreviated weekday name ("Sun")
|
11
8
|
'%B' => 'MMMM', # The full month name ("January")
|
9
|
+
'%b' => 'MMM', # The abbreviated month name ("Jan")
|
10
|
+
'%D' => 'MM/DD/YY', # American date format mm/dd/yy
|
12
11
|
'%d' => 'DD', # Day of the month (01..31)
|
13
12
|
'%-d' => 'D', # Day of the month (1..31)
|
14
|
-
'%
|
15
|
-
'%
|
16
|
-
'%
|
13
|
+
'%F' => 'YYYY-MM-DD', # ISO 8601 date format
|
14
|
+
'%G' => 'GGGG', # ISO Week Year (2020)
|
15
|
+
'%g' => 'GG', # ISO Week Year (20)
|
17
16
|
'%H' => 'HH', # Hour of the day, 24-hour clock (00..23)
|
17
|
+
'%-H' => 'H', # Hour of the day, 24-hour clock (0..23)
|
18
|
+
'%h' => 'MMM', # Same as %b
|
18
19
|
'%I' => 'hh', # Hour of the day, 12-hour clock (01..12)
|
20
|
+
'%-I' => 'h', # Hour of the day, 12-hour clock (1..12)
|
21
|
+
'%j' => 'DDDD', # Day of Year (001..366)
|
22
|
+
'%L' => 'SSS', # Millisecond of the second (000..999)
|
23
|
+
'%M' => 'mm', # Minute of the hour (00..59)
|
24
|
+
'%-M' => 'm', # Minute of the hour (0..59)
|
19
25
|
'%m' => 'MM', # Month of the year (01..12)
|
20
26
|
'%-m' => 'M', # Month of the year (1..12)
|
21
|
-
'%
|
27
|
+
'%N' => 'SSSSSSSSS', # Fractional seconds 9 digits
|
28
|
+
'%9N' => 'SSSSSSSSS', # Fractional seconds 9 digits
|
29
|
+
'%6N' => 'SSSSSS', # Fractional seconds 6 digits
|
30
|
+
'%3N' => 'SSS', # Fractional seconds 3 digits
|
31
|
+
'%P' => 'a', # Meridian indicator ('am' or 'pm')
|
22
32
|
'%p' => 'A', # Meridian indicator ('AM' or 'PM')
|
33
|
+
'%Q' => 'x', # Number of milliseconds since 1970-01-01 00:00:00 UTC.
|
34
|
+
'%R' => 'HH:mm', # 24-hour time (%H:%M)
|
35
|
+
'%r' => 'hh:mm:ss A', # 12-hour time (%I:%M:%S %p)
|
23
36
|
'%S' => 'ss', # Second of the minute (00..60)
|
37
|
+
'%-S' => 's', # Second of the minute (0..60)
|
38
|
+
'%s' => 'X', # Number of seconds since 1970-01-01 00:00:00 UTC.
|
39
|
+
'%T' => 'HH:mm:ss', # 24-hour time (%H:%M:%S)
|
40
|
+
'%U' => 'ww', # Week number of the year. The week starts with Sunday. (00..53)
|
41
|
+
'%u' => 'E', # Day of the week (Monday is 1, 1..7)
|
42
|
+
'%W' => 'WW', # Week number of the year. The week starts with Monday. (00..53)
|
43
|
+
'%w' => 'e', # Day of the week (Sunday is 0, 0..6)
|
44
|
+
'%X' => 'HH:mm:ss', # Same as %T
|
45
|
+
'%x' => 'MM/DD/YY', # Same as %D
|
24
46
|
'%Y' => 'YYYY', # Year with century
|
25
47
|
'%y' => 'YY', # Year without a century (00..99)
|
48
|
+
'%Z' => 'Z', # Equivalent to %:z (e.g. +09:00)
|
49
|
+
'%z' => 'ZZ', # Time zone as hour and minute offset from UTC (e.g. +0900)
|
50
|
+
'%:z' => 'Z', # Time zone as hour and minute offset from UTC with a colon (e.g. +09:00),
|
51
|
+
'%%' => '%',
|
26
52
|
}.freeze
|
27
53
|
|
28
54
|
class << self
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
when '%A'
|
36
|
-
english = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
37
|
-
day_names.each_with_index { |d, i| date_string = date_string.gsub(/#{d}/, english[i]) }
|
38
|
-
when '%a'
|
39
|
-
english = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
|
40
|
-
abbr_day_names.each_with_index { |d, i| date_string = date_string.gsub(/#{d}/, english[i]) }
|
41
|
-
when '%B'
|
42
|
-
english = [nil, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][1..-1]
|
43
|
-
month_names.each_with_index { |m, i| date_string = date_string.gsub(/#{m}/, english[i]) }
|
44
|
-
when '%b'
|
45
|
-
english = [nil, "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][1..-1]
|
46
|
-
abbr_month_names.each_with_index { |m, i| date_string = date_string.gsub(/#{m}/, english[i]) }
|
47
|
-
when '%p'
|
48
|
-
date_string = date_string.gsub(/#{::I18n.t('date.time.am', default: "am")}/, 'am')
|
49
|
-
date_string = date_string.gsub(/#{::I18n.t('date.time.pm', default: "pm")}/, 'pm')
|
50
|
-
end
|
55
|
+
def to_momentjs(strftime_format)
|
56
|
+
strftime_format.gsub(/(?<!%)(?<![-0-9:])\w+/, '[\0]').gsub(/%([-0-9:]?\w)/) do |match|
|
57
|
+
MOMENTJS_TRANSLATIONS[match] or raise <<-MSG.gsub(/^\s{14}/, '')
|
58
|
+
Unsupported strftime directive '#{match}' was found. Please consider explicitly setting momentjs_format instance option for the field.
|
59
|
+
field(:name_of_field) { momentjs_format '...' }
|
60
|
+
MSG
|
51
61
|
end
|
52
|
-
date_string
|
53
|
-
end
|
54
|
-
|
55
|
-
def normalize(date_string, format)
|
56
|
-
return unless date_string
|
57
|
-
delocalize(date_string, format)
|
58
|
-
parse_date_string(date_string)
|
59
|
-
end
|
60
|
-
|
61
|
-
# Parse normalized date strings using time zone
|
62
|
-
def parse_date_string(date_string)
|
63
|
-
::Time.zone.parse(date_string)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
attr_reader :strftime_format
|
68
|
-
|
69
|
-
def initialize(strftime_format)
|
70
|
-
@strftime_format = strftime_format
|
71
|
-
end
|
72
|
-
|
73
|
-
# Ruby to javascript formatting options translator
|
74
|
-
def to_momentjs
|
75
|
-
strftime_format.gsub(/\w[^.(!?%)\W]{1,}/, '[\0]').gsub(/%(\w|\-\w)/) do |match|
|
76
|
-
MOMENTJS_TRANSLATIONS[match]
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
# Delocalize a l10n datetime strings
|
81
|
-
def delocalize(value)
|
82
|
-
self.class.delocalize(value, strftime_format)
|
83
|
-
end
|
84
|
-
|
85
|
-
def parse_string(value)
|
86
|
-
return if value.blank?
|
87
|
-
return value if %w(DateTime Date Time).include?(value.class.name)
|
88
|
-
return if (delocalized_value = delocalize(value)).blank?
|
89
|
-
|
90
|
-
begin
|
91
|
-
# Adjust with the correct timezone and daylight savint time
|
92
|
-
datetime_with_wrong_tz = ::DateTime.strptime(delocalized_value, strftime_format.gsub('%-d', '%d'))
|
93
|
-
Time.zone.parse(datetime_with_wrong_tz.strftime('%Y-%m-%d %H:%M:%S'))
|
94
|
-
rescue ArgumentError
|
95
|
-
nil
|
96
62
|
end
|
97
63
|
end
|
98
64
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module RailsAdmin
|
2
|
+
class ESModulePreprocessor
|
3
|
+
def self.instance
|
4
|
+
@instance ||= new
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.call(input)
|
8
|
+
instance.call(input)
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize; end
|
12
|
+
|
13
|
+
def call(input)
|
14
|
+
data = input[:data]
|
15
|
+
|
16
|
+
# only process files under rails_admin/src
|
17
|
+
if input[:filename].start_with? RailsAdmin::Engine.root.join('src').to_s
|
18
|
+
data.gsub!(/^(import .+)$/) { "// #{Regexp.last_match(1)}" }
|
19
|
+
data.gsub!(/^(export +default +{)$/) do
|
20
|
+
case File.basename(input[:filename])
|
21
|
+
when 'i18n.js'
|
22
|
+
"/* #{Regexp.last_match(1)} */ window.I18n = {"
|
23
|
+
else
|
24
|
+
raise "Unable to preprocess file: #{input[:filename]}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
{data: data}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -13,11 +13,12 @@ module RailsAdmin
|
|
13
13
|
when Hash
|
14
14
|
obj.each_with_object({}) do |(key, val), res|
|
15
15
|
nkey = key.is_a?(String) ? key.to_sym : key
|
16
|
-
nval =
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
nval =
|
17
|
+
case val
|
18
|
+
when Hash, Array then symbolize(val)
|
19
|
+
when String then val.to_sym
|
20
|
+
else val
|
21
|
+
end
|
21
22
|
res[nkey] = nval
|
22
23
|
end
|
23
24
|
else
|
data/lib/rails_admin/version.rb
CHANGED
@@ -1,15 +1,19 @@
|
|
1
1
|
module RailsAdmin
|
2
2
|
class Version
|
3
|
-
MAJOR =
|
4
|
-
MINOR =
|
3
|
+
MAJOR = 3
|
4
|
+
MINOR = 0
|
5
5
|
PATCH = 0
|
6
|
-
PRE =
|
6
|
+
PRE = 'beta'.freeze
|
7
7
|
|
8
8
|
class << self
|
9
9
|
# @return [String]
|
10
10
|
def to_s
|
11
11
|
[MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
12
12
|
end
|
13
|
+
|
14
|
+
def js
|
15
|
+
JSON.parse(File.read("#{__dir__}/../../package.json"))['version']
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
data/lib/rails_admin.rb
CHANGED
@@ -5,7 +5,6 @@ require 'rails_admin/extension'
|
|
5
5
|
require 'rails_admin/extensions/cancancan'
|
6
6
|
require 'rails_admin/extensions/pundit'
|
7
7
|
require 'rails_admin/extensions/paper_trail'
|
8
|
-
require 'rails_admin/extensions/history'
|
9
8
|
require 'rails_admin/support/csv_converter'
|
10
9
|
require 'rails_admin/support/hash_helper'
|
11
10
|
require 'yaml'
|
@@ -28,7 +27,7 @@ module RailsAdmin
|
|
28
27
|
if entity
|
29
28
|
RailsAdmin::Config.model(entity, &block)
|
30
29
|
elsif block_given?
|
31
|
-
|
30
|
+
RailsAdmin::Config.apply(&block)
|
32
31
|
else
|
33
32
|
RailsAdmin::Config
|
34
33
|
end
|
@@ -56,5 +55,3 @@ module RailsAdmin
|
|
56
55
|
YAML.dump(object)
|
57
56
|
end
|
58
57
|
end
|
59
|
-
|
60
|
-
require 'rails_admin/bootstrap-sass' unless defined? Bootstrap
|
data/lib/tasks/rails_admin.rake
CHANGED
@@ -9,10 +9,10 @@ namespace :rails_admin do
|
|
9
9
|
system 'rails g rails_admin:uninstall'
|
10
10
|
end
|
11
11
|
|
12
|
-
desc 'CI env for
|
12
|
+
desc 'CI env for GitHub Actions'
|
13
13
|
task :prepare_ci_env do
|
14
14
|
adapter = ENV['CI_DB_ADAPTER'] || 'sqlite3'
|
15
|
-
database = ('sqlite3'
|
15
|
+
database = (adapter == 'sqlite3' ? 'db/development.sqlite3' : 'ci_rails_admin')
|
16
16
|
username =
|
17
17
|
case adapter
|
18
18
|
when 'postgresql'
|
@@ -28,7 +28,7 @@ namespace :rails_admin do
|
|
28
28
|
'adapter' => adapter,
|
29
29
|
'database' => database,
|
30
30
|
'username' => username,
|
31
|
-
'password' => ('postgresql'
|
31
|
+
'password' => (adapter == 'postgresql' ? 'postgres' : ''),
|
32
32
|
'host' => '127.0.0.1',
|
33
33
|
'encoding' => 'utf8',
|
34
34
|
'pool' => 5,
|
data/package.json
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"name": "rails_admin",
|
3
|
+
"version": "3.0.0-beta",
|
4
|
+
"description": "RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.",
|
5
|
+
"homepage": "https://github.com/railsadminteam/rails_admin",
|
6
|
+
"license": "MIT",
|
7
|
+
"author": "Mitsuhiro Shibuya <mit.shibuya@gmail.com>",
|
8
|
+
"files": [
|
9
|
+
"src"
|
10
|
+
],
|
11
|
+
"main": "src/rails_admin/base.js",
|
12
|
+
"scripts": {
|
13
|
+
"link": "yarn link && cd spec/dummy_app && yarn link rails_admin",
|
14
|
+
"format": "prettier -w ."
|
15
|
+
},
|
16
|
+
"dependencies": {
|
17
|
+
"@fortawesome/fontawesome-free": "^5.15.4",
|
18
|
+
"@rails/ujs": "^6.1.4-1",
|
19
|
+
"bootstrap-sass": "3.4.1",
|
20
|
+
"eonasdan-bootstrap-datetimepicker": "^4.17.49",
|
21
|
+
"jquery": "^3.6.0",
|
22
|
+
"jquery-ui": "^1.12.1",
|
23
|
+
"moment": "^2.29.1"
|
24
|
+
},
|
25
|
+
"devDependencies": {
|
26
|
+
"prettier": "^2.4.1"
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import Rails from "@rails/ujs";
|
2
|
+
import jQuery from "jquery";
|
3
|
+
import moment from "moment";
|
4
|
+
import "./vendor/jquery.pjax";
|
5
|
+
import "./vendor/jquery_nested_form";
|
6
|
+
import "bootstrap-sass";
|
7
|
+
import "moment/min/locales.js";
|
8
|
+
import "eonasdan-bootstrap-datetimepicker";
|
9
|
+
|
10
|
+
import "./filter-box";
|
11
|
+
import "./filtering-multiselect";
|
12
|
+
import "./filtering-select";
|
13
|
+
import "./nested-form-hooks";
|
14
|
+
import "./remote-form";
|
15
|
+
import "./sidescroll";
|
16
|
+
import "./ui";
|
17
|
+
import "./widgets";
|
18
|
+
|
19
|
+
Rails.start();
|
20
|
+
window.$ = window.jQuery = jQuery;
|
21
|
+
window.moment = moment;
|