rails_admin 3.0.0.beta2 → 3.0.0.rc3
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/README.md +6 -9
- data/Rakefile +11 -0
- data/app/assets/javascripts/{rails_admin.js → rails_admin/application.js} +4 -4
- data/app/assets/stylesheets/rails_admin/application.scss +31 -0
- data/app/controllers/rails_admin/application_controller.rb +1 -1
- data/app/controllers/rails_admin/main_controller.rb +12 -21
- data/app/helpers/rails_admin/application_helper.rb +43 -22
- data/app/helpers/rails_admin/form_builder.rb +3 -3
- data/app/helpers/rails_admin/main_helper.rb +1 -1
- data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.erb +2 -2
- data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.erb +4 -4
- data/app/views/kaminari/ra-twitter-bootstrap/_page.html.erb +4 -4
- data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.erb +12 -10
- data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.erb +4 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.erb +4 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.erb +6 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.erb +4 -4
- data/app/views/layouts/rails_admin/_head.html.erb +2 -2
- data/app/views/layouts/rails_admin/_navigation.html.erb +12 -16
- data/app/views/layouts/rails_admin/_secondary_navigation.html.erb +8 -8
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.erb +1 -5
- data/app/views/layouts/rails_admin/application.html.erb +4 -7
- data/app/views/layouts/rails_admin/{pjax.html.erb → content.html.erb} +7 -5
- data/app/views/layouts/rails_admin/modal.js.erb +1 -1
- data/app/views/rails_admin/main/_dashboard_history.html.erb +1 -1
- data/app/views/rails_admin/main/_delete_notice.html.erb +2 -2
- data/app/views/rails_admin/main/_form_boolean.html.erb +6 -8
- data/app/views/rails_admin/main/_form_colorpicker.html.erb +5 -1
- data/app/views/rails_admin/main/_form_datetime.html.erb +8 -7
- data/app/views/rails_admin/main/_form_enumeration.html.erb +5 -1
- data/app/views/rails_admin/main/_form_file_upload.html.erb +1 -1
- data/app/views/rails_admin/main/_form_filtering_multiselect.html.erb +14 -14
- data/app/views/rails_admin/main/_form_filtering_select.html.erb +16 -21
- data/app/views/rails_admin/main/_form_multiple_file_upload.html.erb +1 -1
- data/app/views/rails_admin/main/_form_nested_many.html.erb +4 -4
- data/app/views/rails_admin/main/_form_nested_one.html.erb +4 -4
- data/app/views/rails_admin/main/_form_polymorphic_association.html.erb +11 -6
- data/app/views/rails_admin/main/_submit_buttons.html.erb +8 -8
- data/app/views/rails_admin/main/bulk_delete.html.erb +1 -1
- data/app/views/rails_admin/main/dashboard.html.erb +4 -4
- data/app/views/rails_admin/main/delete.html.erb +1 -1
- data/app/views/rails_admin/main/edit.html.erb +1 -1
- data/app/views/rails_admin/main/export.html.erb +35 -32
- data/app/views/rails_admin/main/history.html.erb +16 -14
- data/app/views/rails_admin/main/index.html.erb +39 -36
- data/app/views/rails_admin/main/new.html.erb +1 -1
- data/config/locales/rails_admin.en.yml +0 -1
- data/lib/generators/rails_admin/install_generator.rb +8 -7
- data/lib/generators/rails_admin/templates/webpack.config.js +0 -3
- data/lib/rails_admin/abstract_model.rb +3 -4
- data/lib/rails_admin/adapters/active_record/object_extension.rb +1 -1
- data/lib/rails_admin/adapters/active_record/property.rb +1 -1
- data/lib/rails_admin/adapters/active_record.rb +8 -3
- data/lib/rails_admin/adapters/mongoid/property.rb +3 -3
- data/lib/rails_admin/adapters/mongoid.rb +4 -4
- data/lib/rails_admin/config/actions/base.rb +1 -6
- data/lib/rails_admin/config/actions/dashboard.rb +13 -9
- data/lib/rails_admin/config/actions/delete.rb +4 -0
- data/lib/rails_admin/config/actions/edit.rb +4 -0
- data/lib/rails_admin/config/actions/export.rb +2 -1
- data/lib/rails_admin/config/actions/index.rb +2 -1
- data/lib/rails_admin/config/actions/new.rb +7 -1
- data/lib/rails_admin/config/actions/show_in_app.rb +0 -4
- data/lib/rails_admin/config/fields/association.rb +6 -1
- data/lib/rails_admin/config/fields/base.rb +3 -3
- data/lib/rails_admin/config/fields/factories/active_storage.rb +2 -1
- data/lib/rails_admin/config/fields/factories/association.rb +4 -4
- 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/types/action_text.rb +1 -1
- data/lib/rails_admin/config/fields/types/date.rb +7 -0
- data/lib/rails_admin/config/fields/types/datetime.rb +11 -5
- data/lib/rails_admin/config/fields/types/has_many_association.rb +4 -0
- data/lib/rails_admin/config/fields/types/has_one_association.rb +4 -0
- data/lib/rails_admin/config/fields/types/time.rb +9 -0
- data/lib/rails_admin/config/has_fields.rb +4 -0
- data/lib/rails_admin/config/model.rb +8 -0
- data/lib/rails_admin/config/sections/list.rb +4 -4
- data/lib/rails_admin/config.rb +18 -4
- data/lib/rails_admin/engine.rb +6 -13
- data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +2 -2
- data/lib/rails_admin/support/datetime.rb +50 -53
- data/lib/rails_admin/support/esmodule_preprocessor.rb +2 -1
- data/lib/rails_admin/version.rb +1 -1
- data/package.json +7 -5
- data/src/rails_admin/base.js +3 -6
- data/src/rails_admin/filter-box.js +36 -37
- data/src/rails_admin/filtering-select.js +3 -6
- data/src/rails_admin/i18n.js +0 -3
- data/src/rails_admin/nested-form-hooks.js +16 -8
- data/src/rails_admin/remote-form.js +18 -15
- data/src/rails_admin/styles/base/theming.scss +80 -155
- data/src/rails_admin/styles/base/variables.scss +2 -0
- data/src/rails_admin/styles/base.scss +8 -45
- data/src/rails_admin/styles/filtering-multiselect.scss +2 -2
- data/src/rails_admin/styles/filtering-select.scss +1 -1
- data/src/rails_admin/styles/widgets.scss +1 -10
- data/src/rails_admin/ui.js +19 -57
- data/src/rails_admin/widgets.js +38 -48
- data/vendor/assets/javascripts/rails_admin/bootstrap.js +5046 -0
- data/vendor/assets/javascripts/rails_admin/flatpickr-with-locales.js +10683 -0
- data/vendor/assets/javascripts/rails_admin/popper.js +1974 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_accordion.scss +118 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_alert.scss +57 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_badge.scss +29 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_breadcrumb.scss +28 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_button-group.scss +139 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_buttons.scss +64 -110
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_card.scss +216 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_carousel.scss +162 -176
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_close.scss +31 -26
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_containers.scss +41 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_dropdown.scss +240 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_forms.scss +9 -538
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_functions.scss +302 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_grid.scss +18 -69
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_helpers.scss +9 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_images.scss +42 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_list-group.scss +127 -84
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_mixins.scss +26 -22
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_modal.scss +209 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_nav.scss +139 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_navbar.scss +218 -542
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_offcanvas.scss +83 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_pagination.scss +46 -70
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_placeholders.scss +51 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_popover.scss +158 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_progress.scss +48 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_reboot.scss +625 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_root.scss +54 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_spinners.scss +69 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_tables.scss +100 -178
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_toasts.scss +51 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_tooltip.scss +97 -77
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_transitions.scss +27 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_type.scss +54 -254
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_utilities.scss +628 -55
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_variables.scss +1572 -781
- data/vendor/assets/stylesheets/rails_admin/bootstrap/bootstrap.scss +38 -35
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_floating-labels.scss +63 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_form-check.scss +152 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_form-control.scss +219 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_form-range.scss +91 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_form-select.scss +72 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_form-text.scss +11 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_input-group.scss +121 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_labels.scss +36 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/forms/_validation.scss +12 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_clearfix.scss +3 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_colored-links.scss +12 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_position.scss +30 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_ratio.scss +26 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_stacks.scss +15 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_stretched-link.scss +15 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_text-truncation.scss +7 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/helpers/_vr.scss +8 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_alert.scss +11 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_backdrop.scss +14 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_border-radius.scss +72 -12
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_box-shadow.scss +18 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_breakpoints.scss +127 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_buttons.scss +113 -30
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_caret.scss +64 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_clearfix.scss +5 -18
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_color-scheme.scss +7 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_container.scss +9 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_deprecate.scss +10 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_forms.scss +130 -70
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_gradients.scss +27 -38
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_grid.scss +127 -98
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_image.scss +6 -24
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_list-group.scss +13 -20
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_lists.scss +7 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_pagination.scss +24 -16
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_reset-text.scss +17 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_resize.scss +1 -1
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_table-variants.scss +21 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/{_text-overflow.scss → _text-truncate.scss} +2 -2
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_transition.scss +26 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_utilities.scss +89 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_visually-hidden.scss +29 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/utilities/_api.scss +47 -0
- data/vendor/assets/stylesheets/rails_admin/bootstrap/vendor/_rfs.scss +354 -0
- data/vendor/assets/stylesheets/rails_admin/flatpickr.css +791 -0
- metadata +88 -94
- data/app/assets/stylesheets/rails_admin.scss.erb +0 -76
- data/lib/generators/rails_admin/templates/environment.js +0 -6
- data/src/rails_admin/styles/themes/cerulean/mixins.scss +0 -0
- data/src/rails_admin/styles/themes/cerulean/theming.scss +0 -135
- data/src/rails_admin/styles/themes/cerulean/variables.scss +0 -830
- data/src/rails_admin/styles/themes/default/mixins.scss +0 -8
- data/src/rails_admin/styles/themes/default/theming.scss +0 -11
- data/src/rails_admin/styles/themes/default/variables.scss +0 -12
- data/src/rails_admin/vendor/jquery.pjax.js +0 -899
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-affix.js +0 -164
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-alert.js +0 -95
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-button.js +0 -125
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-carousel.js +0 -246
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-collapse.js +0 -212
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-dropdown.js +0 -165
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-modal.js +0 -358
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-popover.js +0 -123
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-scrollspy.js +0 -172
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-tab.js +0 -155
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-tooltip.js +0 -677
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-transition.js +0 -59
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap-typeahead.js +0 -1782
- data/vendor/assets/javascripts/rails_admin/bootstrap/bootstrap.js +0 -13
- data/vendor/assets/javascripts/rails_admin/bootstrap-datetimepicker.js +0 -2611
- data/vendor/assets/javascripts/rails_admin/jquery.pjax.js +0 -898
- data/vendor/assets/javascripts/rails_admin/moment-with-locales.js +0 -18085
- data/vendor/assets/stylesheets/rails_admin/_bootstrap-datetimepicker.scss +0 -343
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_alerts.scss +0 -68
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_badges.scss +0 -57
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_breadcrumbs.scss +0 -26
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_button-groups.scss +0 -240
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_code.scss +0 -68
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_component-animations.scss +0 -35
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_dropdowns.scss +0 -215
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_glyphicons.scss +0 -237
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_input-groups.scss +0 -166
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_jumbotron.scss +0 -48
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_labels.scss +0 -66
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_media.scss +0 -56
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_modals.scss +0 -150
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_navs.scss +0 -242
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_normalize.scss +0 -425
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_pager.scss +0 -55
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_panels.scss +0 -243
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_popovers.scss +0 -133
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_print.scss +0 -101
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_progress-bars.scss +0 -105
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_responsive-embed.scss +0 -34
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_responsive-utilities.scss +0 -174
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_scaffolding.scss +0 -150
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_theme.scss +0 -258
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_thumbnails.scss +0 -38
- data/vendor/assets/stylesheets/rails_admin/bootstrap/_wells.scss +0 -29
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_alerts.scss +0 -14
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_background-variant.scss +0 -11
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_center-block.scss +0 -7
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_grid-framework.scss +0 -81
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_hide-text.scss +0 -21
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_labels.scss +0 -12
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-divider.scss +0 -10
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_opacity.scss +0 -8
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_panels.scss +0 -24
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_progress-bar.scss +0 -10
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_reset-filter.scss +0 -8
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_responsive-visibility.scss +0 -21
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_size.scss +0 -10
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_tab-focus.scss +0 -9
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_table-row.scss +0 -28
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_text-emphasis.scss +0 -11
- data/vendor/assets/stylesheets/rails_admin/bootstrap/mixins/_vendor-prefixes.scss +0 -219
- data/vendor/assets/stylesheets/rails_admin/bootstrap-datetimepicker-build.scss +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ed0d71c0798b98c4a0afdff5fa2ed48ffd05d1e0124d52ccdb371012d117479
|
4
|
+
data.tar.gz: ed51dc928885ae4c57e9f02a9e40cf7689731570a78efc7d1bdfbe3afbd7e298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff6f4ff15d8722cb44f4bbfeb8375c6c68c24be7cfadaa1e0b2dcf323f43321bc40296c60cdbcd2a9ecc28685261ca5ef00b046481394044d3f6f3970e6ddf86
|
7
|
+
data.tar.gz: a23d415f1987f61dd8d5bf7dcac7d2d7307e602a0afe3d16c94d8a639ad952135154cc31728bd1f41e181e0f1a829d39afb8898c6fc1a301a75fa64649b117d7
|
data/README.md
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
# RailsAdmin
|
2
2
|
|
3
3
|
[![Gem Version](https://img.shields.io/gem/v/rails_admin.svg)][gem]
|
4
|
-
[![Build Status](https://img.shields.io/github/workflow/status/
|
5
|
-
[![Coverage Status](https://img.shields.io/coveralls/
|
6
|
-
[![
|
7
|
-
[![Code Climate](https://codeclimate.com/github/sferik/rails_admin.svg)][codeclimate]
|
4
|
+
[![Build Status](https://img.shields.io/github/workflow/status/railsadminteam/rails_admin/Test)][ghactions]
|
5
|
+
[![Coverage Status](https://img.shields.io/coveralls/railsadminteam/rails_admin.svg)][coveralls]
|
6
|
+
[![Code Climate](https://codeclimate.com/github/railsadminteam/rails_admin.svg)][codeclimate]
|
8
7
|
[![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=rails_admin&package-manager=bundler&version-scheme=semver)][semver]
|
9
8
|
|
10
9
|
[gem]: https://rubygems.org/gems/rails_admin
|
11
10
|
[ghactions]: https://github.com/railsadminteam/rails_admin/actions
|
12
|
-
[coveralls]: https://coveralls.io/r/
|
13
|
-
[
|
14
|
-
[codeclimate]: https://codeclimate.com/github/sferik/rails_admin
|
11
|
+
[coveralls]: https://coveralls.io/r/railsadminteam/rails_admin
|
12
|
+
[codeclimate]: https://codeclimate.com/github/railsadminteam/rails_admin
|
15
13
|
[semver]: https://dependabot.com/compatibility-score.html?dependency-name=rails_admin&package-manager=bundler&version-scheme=semver
|
16
14
|
|
17
15
|
RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.
|
@@ -47,7 +45,7 @@ RailsAdmin is a Rails engine that provides an easy-to-use interface for managing
|
|
47
45
|
|
48
46
|
## Installation
|
49
47
|
|
50
|
-
1. On your gemfile: `gem 'rails_admin', ['>= 3.0.0.
|
48
|
+
1. On your gemfile: `gem 'rails_admin', ['>= 3.0.0.rc3', '< 4']`
|
51
49
|
2. Run `bundle install`
|
52
50
|
3. Run `rails g rails_admin:install`
|
53
51
|
4. Provide a namespace for the routes when asked
|
@@ -103,7 +101,6 @@ If you think you found a bug in RailsAdmin, you can [submit an issue](https://gi
|
|
103
101
|
|
104
102
|
This library aims to support and is [tested against][ghactions] the following Ruby implementations:
|
105
103
|
|
106
|
-
- Ruby 2.5
|
107
104
|
- Ruby 2.6
|
108
105
|
- Ruby 2.7
|
109
106
|
- Ruby 3.0
|
data/Rakefile
CHANGED
@@ -22,3 +22,14 @@ rescue LoadError
|
|
22
22
|
end
|
23
23
|
|
24
24
|
task default: %i[spec rubocop]
|
25
|
+
|
26
|
+
namespace :vendorize do
|
27
|
+
desc 'Tasks for vendorizing assets'
|
28
|
+
|
29
|
+
task :flatpickr do
|
30
|
+
Dir.chdir(__dir__)
|
31
|
+
flatpickr = File.read('node_modules/flatpickr/dist/flatpickr.js')
|
32
|
+
locales = Dir.glob('node_modules/flatpickr/dist/l10n/*.js').map { |f| File.read(f) }
|
33
|
+
File.write('vendor/assets/javascripts/rails_admin/flatpickr-with-locales.js', ([flatpickr] + locales).join("\n"))
|
34
|
+
end
|
35
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
//= require 'rails-ujs'
|
2
|
+
//= require 'turbo'
|
2
3
|
//= require 'rails_admin/jquery3'
|
3
|
-
//= require 'rails_admin/jquery.pjax'
|
4
4
|
//= require 'jquery_nested_form'
|
5
5
|
//= require 'rails_admin/jquery-ui/effect'
|
6
6
|
//= require 'rails_admin/jquery-ui/widgets/sortable'
|
7
7
|
//= require 'rails_admin/jquery-ui/widgets/autocomplete'
|
8
|
-
//= require 'rails_admin/
|
9
|
-
//= require 'rails_admin/
|
10
|
-
//= require 'rails_admin/bootstrap
|
8
|
+
//= require 'rails_admin/flatpickr-with-locales'
|
9
|
+
//= require 'rails_admin/popper'
|
10
|
+
//= require 'rails_admin/bootstrap'
|
11
11
|
|
12
12
|
//= require 'rails_admin/filter-box'
|
13
13
|
//= require 'rails_admin/filtering-multiselect'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/*** Variables ***/
|
4
|
+
|
5
|
+
@import "rails_admin/custom/variables";
|
6
|
+
@import "rails_admin/styles/base/variables";
|
7
|
+
|
8
|
+
/*** Mixins ***/
|
9
|
+
|
10
|
+
@import "rails_admin/styles/base/mixins";
|
11
|
+
@import "rails_admin/custom/mixins";
|
12
|
+
|
13
|
+
/*** Bootstrap ***/
|
14
|
+
|
15
|
+
@import "rails_admin/bootstrap/bootstrap";
|
16
|
+
|
17
|
+
/*** Libraries ***/
|
18
|
+
|
19
|
+
@import "rails_admin/flatpickr";
|
20
|
+
@import "rails_admin/styles/filtering-select";
|
21
|
+
@import "rails_admin/styles/filtering-multiselect";
|
22
|
+
@import "rails_admin/styles/widgets";
|
23
|
+
|
24
|
+
/*** Font-awesome ***/
|
25
|
+
|
26
|
+
@import "rails_admin/font-awesome";
|
27
|
+
|
28
|
+
/*** RailsAdmin Theming ***/
|
29
|
+
|
30
|
+
@import "rails_admin/styles/base/theming";
|
31
|
+
@import "rails_admin/custom/theming";
|
@@ -32,7 +32,7 @@ module RailsAdmin
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def get_object
|
35
|
-
raise RailsAdmin::ObjectNotFound unless (@object = @abstract_model.get(params[:id]))
|
35
|
+
raise RailsAdmin::ObjectNotFound unless (@object = @abstract_model.get(params[:id], @model_config.scope))
|
36
36
|
end
|
37
37
|
|
38
38
|
def to_model_name(param)
|
@@ -4,20 +4,17 @@ module RailsAdmin
|
|
4
4
|
include RailsAdmin::MainHelper
|
5
5
|
include RailsAdmin::ApplicationHelper
|
6
6
|
|
7
|
-
layout :get_layout
|
8
|
-
|
9
7
|
before_action :check_for_cancel
|
10
8
|
|
11
9
|
def bulk_action
|
12
10
|
get_model
|
13
|
-
process(params[:bulk_action]) if params[:bulk_action].in?(RailsAdmin::Config::Actions.all(controller: self, abstract_model: @abstract_model).
|
11
|
+
process(params[:bulk_action]) if params[:bulk_action].in?(RailsAdmin::Config::Actions.all(:bulkable, controller: self, abstract_model: @abstract_model).collect(&:route_fragment))
|
14
12
|
end
|
15
13
|
|
16
14
|
def list_entries(model_config = @model_config, auth_scope_key = :index, additional_scope = get_association_scope_from_params, pagination = !(params[:associated_collection] || params[:all] || params[:bulk_ids]))
|
17
|
-
scope = model_config.
|
18
|
-
|
19
|
-
|
20
|
-
end
|
15
|
+
scope = model_config.scope
|
16
|
+
auth_scope = @authorization_adapter&.query(auth_scope_key, model_config.abstract_model)
|
17
|
+
scope = scope.merge(auth_scope) if auth_scope
|
21
18
|
scope = scope.instance_eval(&additional_scope) if additional_scope
|
22
19
|
get_collection(model_config, scope, pagination)
|
23
20
|
end
|
@@ -49,33 +46,27 @@ module RailsAdmin
|
|
49
46
|
end
|
50
47
|
|
51
48
|
def respond_to_missing?(sym, include_private)
|
52
|
-
if RailsAdmin::Config::Actions.find(
|
49
|
+
if RailsAdmin::Config::Actions.find(sym)
|
53
50
|
true
|
54
51
|
else
|
55
52
|
super
|
56
53
|
end
|
57
54
|
end
|
58
55
|
|
59
|
-
def get_layout
|
60
|
-
"rails_admin/#{request.headers['X-PJAX'] ? 'pjax' : 'application'}"
|
61
|
-
end
|
62
|
-
|
63
56
|
def back_or_index
|
64
57
|
params[:return_to].presence && params[:return_to].include?(request.host) && (params[:return_to] != request.fullpath) ? params[:return_to] : index_path
|
65
58
|
end
|
66
59
|
|
67
60
|
def get_sort_hash(model_config)
|
68
61
|
abstract_model = model_config.abstract_model
|
69
|
-
params[:sort] = params[:sort_reverse] = nil unless model_config.list.fields.collect { |f| f.name.to_s }.include? params[:sort]
|
70
|
-
params[:sort] ||= model_config.list.sort_by.to_s
|
71
|
-
params[:sort_reverse] ||= 'false'
|
72
|
-
|
73
62
|
field = model_config.list.fields.detect { |f| f.name.to_s == params[:sort] }
|
63
|
+
|
74
64
|
column =
|
75
|
-
if field.nil? || field.sortable ==
|
76
|
-
|
77
|
-
elsif field.sortable == false # use default sort, asked field is not sortable
|
65
|
+
if field.nil? || field.sortable == false # use default sort, asked field does not exist or is not sortable
|
66
|
+
field = model_config.list.possible_fields.detect { |f| f.name == model_config.list.sort_by.to_sym }
|
78
67
|
"#{abstract_model.table_name}.#{model_config.list.sort_by}"
|
68
|
+
elsif field.sortable == true # use the given field
|
69
|
+
"#{abstract_model.table_name}.#{field.name}"
|
79
70
|
elsif (field.sortable.is_a?(String) || field.sortable.is_a?(Symbol)) && field.sortable.to_s.include?('.') # just provide sortable, don't do anything smart
|
80
71
|
field.sortable
|
81
72
|
elsif field.sortable.is_a?(Hash) # just join sortable hash, don't do anything smart
|
@@ -86,8 +77,8 @@ module RailsAdmin
|
|
86
77
|
"#{abstract_model.table_name}.#{field.sortable}"
|
87
78
|
end
|
88
79
|
|
89
|
-
|
90
|
-
{sort: column, sort_reverse: (params[:sort_reverse] ==
|
80
|
+
params[:sort_reverse] ||= 'false'
|
81
|
+
{sort: column, sort_reverse: (params[:sort_reverse] == (field&.sort_reverse&.to_s || 'true'))}
|
91
82
|
end
|
92
83
|
|
93
84
|
def redirect_to_on_success
|
@@ -20,17 +20,24 @@ module RailsAdmin
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def edit_user_link
|
23
|
-
return nil unless _current_user.
|
24
|
-
return nil unless abstract_model = RailsAdmin.config(_current_user.class).abstract_model
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
if
|
31
|
-
|
23
|
+
return nil unless _current_user.try(:email).present?
|
24
|
+
return nil unless (abstract_model = RailsAdmin.config(_current_user.class).abstract_model)
|
25
|
+
|
26
|
+
edit_action = action(:edit, abstract_model, _current_user)
|
27
|
+
authorized = edit_action.try(:authorized?)
|
28
|
+
content = edit_user_link_label
|
29
|
+
|
30
|
+
if authorized
|
31
|
+
edit_url = rails_admin.url_for(
|
32
|
+
action_name: edit_action.action_name,
|
33
|
+
model_name: abstract_model.to_param,
|
34
|
+
controller: 'rails_admin/main',
|
35
|
+
id: _current_user.id,
|
36
|
+
)
|
37
|
+
|
38
|
+
link_to content, edit_url, class: 'nav-link'
|
32
39
|
else
|
33
|
-
content_tag :span, content
|
40
|
+
content_tag :span, content, class: 'nav-link'
|
34
41
|
end
|
35
42
|
end
|
36
43
|
|
@@ -87,7 +94,7 @@ module RailsAdmin
|
|
87
94
|
url = rails_admin.url_for(action: node.action_name, controller: 'rails_admin/main')
|
88
95
|
nav_icon = node.link_icon ? %(<i class="#{node.link_icon}"></i>).html_safe : ''
|
89
96
|
content_tag :li do
|
90
|
-
link_to nav_icon + " " + wording_for(:menu, node), url, class: "
|
97
|
+
link_to nav_icon + " " + wording_for(:menu, node), url, class: "nav-link"
|
91
98
|
end
|
92
99
|
end.join.html_safe
|
93
100
|
label ||= t('admin.misc.root_navigation')
|
@@ -98,7 +105,7 @@ module RailsAdmin
|
|
98
105
|
|
99
106
|
def static_navigation
|
100
107
|
li_stack = RailsAdmin::Config.navigation_static_links.collect do |title, url|
|
101
|
-
content_tag(:li, link_to(title.to_s, url, target: '_blank', rel: 'noopener noreferrer'))
|
108
|
+
content_tag(:li, link_to(title.to_s, url, target: '_blank', rel: 'noopener noreferrer', class: 'nav-link'))
|
102
109
|
end.join
|
103
110
|
|
104
111
|
label = RailsAdmin::Config.navigation_static_label || t('admin.misc.navigation_static_label')
|
@@ -114,7 +121,7 @@ module RailsAdmin
|
|
114
121
|
level_class = " nav-level-#{level}" if level > 0
|
115
122
|
nav_icon = node.navigation_icon ? %(<i class="#{node.navigation_icon}"></i>).html_safe : ''
|
116
123
|
li = content_tag :li, data: {model: model_param} do
|
117
|
-
link_to nav_icon + node.label_plural, url, class: "
|
124
|
+
link_to nav_icon + node.label_plural, url, class: "nav-link#{level_class}"
|
118
125
|
end
|
119
126
|
child_nodes = parent_groups[abstract_model.model_name]
|
120
127
|
child_nodes ? li + navigation(parent_groups, child_nodes, level + 1) : li
|
@@ -130,11 +137,11 @@ module RailsAdmin
|
|
130
137
|
parent_actions.collect do |a|
|
131
138
|
am = a.send(:eval, 'bindings[:abstract_model]')
|
132
139
|
o = a.send(:eval, 'bindings[:object]')
|
133
|
-
content_tag(:li, class: current_action?(a, am, o) && 'active') do
|
140
|
+
content_tag(:li, class: ['breadcrumb-item', current_action?(a, am, o) && 'active']) do
|
134
141
|
if current_action?(a, am, o)
|
135
142
|
wording_for(:breadcrumb, a, am, o)
|
136
143
|
elsif a.http_methods.include?(:get)
|
137
|
-
link_to rails_admin.url_for(action: a.action_name, controller: 'rails_admin/main', model_name: am.try(:to_param), id: (o.try(:persisted?) && o.try(:id) || nil))
|
144
|
+
link_to rails_admin.url_for(action: a.action_name, controller: 'rails_admin/main', model_name: am.try(:to_param), id: (o.try(:persisted?) && o.try(:id) || nil)) do
|
138
145
|
wording_for(:breadcrumb, a, am, o)
|
139
146
|
end
|
140
147
|
else
|
@@ -151,11 +158,10 @@ module RailsAdmin
|
|
151
158
|
actions = actions(parent, abstract_model, object).select { |a| a.http_methods.include?(:get) && a.show_in_menu }
|
152
159
|
actions.collect do |action|
|
153
160
|
wording = wording_for(:menu, action)
|
154
|
-
li_class = ['icon', "#{action.key}_#{parent}_link"].
|
155
|
-
concat(current_action?(action) ? ['active'] : []).
|
161
|
+
li_class = ['nav-item', 'icon', "#{action.key}_#{parent}_link"].
|
156
162
|
concat(action.enabled? ? [] : ['disabled'])
|
157
163
|
content_tag(:li, {class: li_class}.merge(only_icon ? {title: wording, rel: 'tooltip'} : {})) do
|
158
|
-
label = content_tag(:i, '', {class: action.link_icon}) + content_tag(:span, wording, (only_icon ? {style: 'display:none'} : {}))
|
164
|
+
label = content_tag(:i, '', {class: action.link_icon}) + ' ' + content_tag(:span, wording, (only_icon ? {style: 'display:none'} : {}))
|
159
165
|
if action.enabled? || !only_icon
|
160
166
|
href =
|
161
167
|
if action.enabled?
|
@@ -163,7 +169,7 @@ module RailsAdmin
|
|
163
169
|
else
|
164
170
|
'javascript:void(0)'
|
165
171
|
end
|
166
|
-
content_tag(:a, label, {href: href, target: action.link_target
|
172
|
+
content_tag(:a, label, {href: href, target: action.link_target, class: ['nav-link', current_action?(action) && 'active', !action.enabled? && 'disabled'].compact})
|
167
173
|
else
|
168
174
|
content_tag(:span, label)
|
169
175
|
end
|
@@ -175,12 +181,12 @@ module RailsAdmin
|
|
175
181
|
actions = actions(:bulkable, abstract_model)
|
176
182
|
return '' if actions.empty?
|
177
183
|
|
178
|
-
content_tag :li, class: 'dropdown
|
179
|
-
content_tag(:a, class: 'dropdown-toggle', data: {toggle: 'dropdown'}, href: '#') { t('admin.misc.bulk_menu_title').html_safe + ' ' + '<b class="caret"></b>'.html_safe } +
|
184
|
+
content_tag :li, class: 'nav-item dropdown dropdown-menu-end' do
|
185
|
+
content_tag(:a, class: 'nav-link dropdown-toggle', data: {'bs-toggle': 'dropdown'}, href: '#') { t('admin.misc.bulk_menu_title').html_safe + ' ' + '<b class="caret"></b>'.html_safe } +
|
180
186
|
content_tag(:ul, class: 'dropdown-menu', style: 'left:auto; right:0;') do
|
181
187
|
actions.collect do |action|
|
182
188
|
content_tag :li do
|
183
|
-
link_to wording_for(:bulk_link, action, abstract_model), '#', class: 'bulk-link', data: {action: action.action_name}
|
189
|
+
link_to wording_for(:bulk_link, action, abstract_model), '#', class: 'dropdown-item bulk-link', data: {action: action.action_name}
|
184
190
|
end
|
185
191
|
end.join.html_safe
|
186
192
|
end
|
@@ -207,5 +213,20 @@ module RailsAdmin
|
|
207
213
|
end
|
208
214
|
raise e
|
209
215
|
end
|
216
|
+
|
217
|
+
private
|
218
|
+
|
219
|
+
def edit_user_link_label
|
220
|
+
[
|
221
|
+
RailsAdmin::Config.show_gravatar &&
|
222
|
+
image_tag(gravatar_url(_current_user.email), alt: ''),
|
223
|
+
|
224
|
+
content_tag(:span, _current_user.email),
|
225
|
+
].filter(&:present?).join.html_safe
|
226
|
+
end
|
227
|
+
|
228
|
+
def gravatar_url(email)
|
229
|
+
"https://secure.gravatar.com/avatar/#{Digest::MD5.hexdigest email}?s=30"
|
230
|
+
end
|
210
231
|
end
|
211
232
|
end
|
@@ -43,9 +43,9 @@ module RailsAdmin
|
|
43
43
|
# do not show nested field if the target is the origin
|
44
44
|
return if nested_field_association?(field, nested_in)
|
45
45
|
|
46
|
-
@template.content_tag(:div, class: "
|
46
|
+
@template.content_tag(:div, class: "control-group row mb-3 #{field.type_css_class} #{field.css_class} #{'error' if field.errors.present?}", id: "#{dom_id(field)}_field") do
|
47
47
|
if field.label
|
48
|
-
label(field.method_name, field.label, class: 'col-sm-2
|
48
|
+
label(field.method_name, field.label, class: 'col-sm-2 col-form-label text-md-end') +
|
49
49
|
(field.nested_form ? field_for(field) : input_for(field))
|
50
50
|
else
|
51
51
|
field.nested_form ? field_for(field) : input_for(field)
|
@@ -68,7 +68,7 @@ module RailsAdmin
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def help_for(field)
|
71
|
-
field.help.present? ? @template.content_tag(:
|
71
|
+
field.help.present? ? @template.content_tag(:div, field.help, class: 'form-text') : ''.html_safe
|
72
72
|
end
|
73
73
|
|
74
74
|
def field_for(field)
|
@@ -52,7 +52,7 @@ module RailsAdmin
|
|
52
52
|
when :enum
|
53
53
|
options[:select_options] = options_for_select(field.with(object: @abstract_model.model.new).enum, filter_hash['v'])
|
54
54
|
when :date, :datetime, :time
|
55
|
-
options[:
|
55
|
+
options[:datetimepicker_options] = field.datepicker_options
|
56
56
|
end
|
57
57
|
options[:label] = field.label
|
58
58
|
options[:name] = field.name
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% if current_page.last? %>
|
2
|
-
<li class="next disabled">
|
3
|
-
<%= link_to raw(t 'admin.pagination.next'), '#' %>
|
2
|
+
<li class="page-item next disabled">
|
3
|
+
<%= link_to raw(t 'admin.pagination.next'), '#', class: 'page-link' %>
|
4
4
|
</li>
|
5
5
|
<% else %>
|
6
|
-
<li class="next">
|
7
|
-
<%= link_to raw(t 'admin.pagination.next'), url, class:
|
6
|
+
<li class="page-item next">
|
7
|
+
<%= link_to raw(t 'admin.pagination.next'), url, class: 'page-link' %>
|
8
8
|
</li>
|
9
9
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% if page.current? %>
|
2
|
-
<li class="active">
|
3
|
-
<%= link_to page, url, class:
|
2
|
+
<li class="page-item active">
|
3
|
+
<%= link_to page, url, class: 'page-link' %>
|
4
4
|
</li>
|
5
5
|
<% else %>
|
6
|
-
<li>
|
7
|
-
<%= link_to page, url, class:
|
6
|
+
<li class="page-item">
|
7
|
+
<%= link_to page, url, class: 'page-link' %>
|
8
8
|
</li>
|
9
9
|
<% end %>
|
@@ -1,13 +1,15 @@
|
|
1
1
|
<%= paginator.render do %>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
<%
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
<nav aria-label="Page navigation">
|
3
|
+
<ul class="pagination">
|
4
|
+
<%= prev_page_tag %>
|
5
|
+
<% each_page do |page| %>
|
6
|
+
<% if page.left_outer? or page.right_outer? or page.inside_window? %>
|
7
|
+
<%= page_tag page %>
|
8
|
+
<% elsif !page.was_truncated? %>
|
9
|
+
<%= gap_tag %>
|
10
|
+
<% end %>
|
9
11
|
<% end %>
|
10
|
-
|
11
|
-
|
12
|
-
</
|
12
|
+
<%= next_page_tag %>
|
13
|
+
</ul>
|
14
|
+
</nav>
|
13
15
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% if current_page.first? %>
|
2
|
-
<li class="prev disabled">
|
3
|
-
<%= link_to raw(t 'admin.pagination.previous'), '#' %>
|
2
|
+
<li class="page-item prev disabled">
|
3
|
+
<%= link_to raw(t 'admin.pagination.previous'), '#', class: 'page-link' %>
|
4
4
|
</li>
|
5
5
|
<% else %>
|
6
|
-
<li class="prev">
|
7
|
-
<%= link_to raw(t 'admin.pagination.previous'), url, class:
|
6
|
+
<li class="page-item prev">
|
7
|
+
<%= link_to raw(t 'admin.pagination.previous'), url, class: 'page-link' %>
|
8
8
|
</li>
|
9
9
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% if current_page.last? %>
|
2
|
-
<li class="next disabled">
|
3
|
-
<%= link_to raw(t 'admin.pagination.next'), '#' %>
|
2
|
+
<li class="page-item next disabled">
|
3
|
+
<%= link_to raw(t 'admin.pagination.next'), '#', class: 'page-link' %>
|
4
4
|
</li>
|
5
5
|
<% else %>
|
6
|
-
<li class="next">
|
7
|
-
<%= link_to raw(t 'admin.pagination.next'), url, class:
|
6
|
+
<li class="page-item next">
|
7
|
+
<%= link_to raw(t 'admin.pagination.next'), url, class: 'page-link' %>
|
8
8
|
</li>
|
9
9
|
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%= paginator.render do %>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
<nav aria-label="Page navigation">
|
3
|
+
<ul class="pagination">
|
4
|
+
<%= prev_page_tag if !current_page.first? %>
|
5
|
+
<%= next_page_tag %>
|
6
|
+
</ul>
|
7
|
+
</nav>
|
6
8
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% if current_page.first? %>
|
2
|
-
<li class="prev disabled">
|
3
|
-
<%= link_to raw(t 'admin.pagination.previous'), '#' %>
|
2
|
+
<li class="page-item prev disabled">
|
3
|
+
<%= link_to raw(t 'admin.pagination.previous'), '#', class: 'page-link' %>
|
4
4
|
</li>
|
5
5
|
<% else %>
|
6
|
-
<li class="prev">
|
7
|
-
<%= link_to raw(t 'admin.pagination.previous'), url, class:
|
6
|
+
<li class="page-item prev">
|
7
|
+
<%= link_to raw(t 'admin.pagination.previous'), url, class: 'page-link' %>
|
8
8
|
</li>
|
9
9
|
<% end %>
|
@@ -9,8 +9,8 @@
|
|
9
9
|
<%= javascript_pack_tag "rails_admin", async: true %>
|
10
10
|
<% when :webpack, :sprockets %>
|
11
11
|
<% handle_asset_dependency_error do %>
|
12
|
-
<%= stylesheet_link_tag "rails_admin.css", media: :all %>
|
13
|
-
<%= javascript_include_tag "rails_admin.js", async: true %>
|
12
|
+
<%= stylesheet_link_tag "rails_admin/application.css", media: :all %>
|
13
|
+
<%= javascript_include_tag "rails_admin/application.js", async: true %>
|
14
14
|
<% end %>
|
15
15
|
<% else
|
16
16
|
raise "Unknown asset_source: #{RailsAdmin::config.asset_source}"
|
@@ -1,20 +1,16 @@
|
|
1
1
|
<div class="container-fluid">
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<%= _get_plugin_name[1] || 'Admin' %>
|
15
|
-
</small>
|
16
|
-
</a>
|
17
|
-
</div>
|
2
|
+
<a class="navbar-brand" href="<%= dashboard_path %>">
|
3
|
+
<%= _get_plugin_name[0] || 'Rails' %>
|
4
|
+
<small>
|
5
|
+
<%= _get_plugin_name[1] || 'Admin' %>
|
6
|
+
</small>
|
7
|
+
</a>
|
8
|
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#secondary-navigation">
|
9
|
+
<span class="sr-only">
|
10
|
+
<%= t('admin.toggle_navigation') %>
|
11
|
+
</span>
|
12
|
+
<span class="navbar-toggler-icon"></span>
|
13
|
+
</button>
|
18
14
|
<div class="collapse navbar-collapse" id="secondary-navigation">
|
19
15
|
<%= render partial: 'layouts/rails_admin/secondary_navigation' %>
|
20
16
|
</div>
|
@@ -1,23 +1,23 @@
|
|
1
|
-
<ul class="
|
1
|
+
<ul class="navbar-nav ms-auto root_links">
|
2
2
|
<% actions(:root).select(&:show_in_navigation).each do |action| %>
|
3
|
-
<li class="<%= action.action_name %>_root_link">
|
4
|
-
<%= link_to wording_for(:menu, action), { action: action.action_name, controller: 'rails_admin/main' }, class:
|
3
|
+
<li class="nav-item <%= action.action_name %>_root_link">
|
4
|
+
<%= link_to wording_for(:menu, action), { action: action.action_name, controller: 'rails_admin/main' }, class: ['nav-link'] %>
|
5
5
|
</li>
|
6
6
|
<% end %>
|
7
7
|
<% if main_app_root_path = (main_app.root_path rescue false) %>
|
8
|
-
<li>
|
9
|
-
<%= link_to t('admin.home.name'), main_app_root_path %>
|
8
|
+
<li class="nav-item">
|
9
|
+
<%= link_to t('admin.home.name'), main_app_root_path, class: 'nav-link' %>
|
10
10
|
</li>
|
11
11
|
<% end %>
|
12
12
|
<% if _current_user %>
|
13
13
|
<% if user_link = edit_user_link %>
|
14
|
-
<li class="edit_user_root_link">
|
14
|
+
<li class="nav-item edit_user_root_link">
|
15
15
|
<%= user_link %>
|
16
16
|
</li>
|
17
17
|
<% end %>
|
18
18
|
<% if logout_path.present? %>
|
19
|
-
<li>
|
20
|
-
<%= link_to
|
19
|
+
<li class="nav-item">
|
20
|
+
<%= link_to t('admin.misc.log_out'), logout_path, method: logout_method, class: 'nav-link label label-danger' %>
|
21
21
|
</li>
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
@@ -1,9 +1,5 @@
|
|
1
|
-
<ul class="
|
1
|
+
<ul class="col-sm-3 col-md-2 btn-toggle-nav list-unstyled bg-light">
|
2
2
|
<%= main_navigation %>
|
3
|
-
</ul>
|
4
|
-
<ul class="nav nav-pills nav-stacked">
|
5
3
|
<%= root_navigation %>
|
6
|
-
</ul>
|
7
|
-
<ul class="nav nav-pills nav-stacked">
|
8
4
|
<%= static_navigation %>
|
9
5
|
</ul>
|
@@ -5,20 +5,17 @@
|
|
5
5
|
</head>
|
6
6
|
<body class="rails_admin">
|
7
7
|
<div data-i18n-options="<%= I18n.t("admin.js").to_json %>" id="admin-js"></div>
|
8
|
-
<
|
9
|
-
<%= t('admin.loading') %>
|
10
|
-
</div>
|
11
|
-
<nav class="navbar navbar-default navbar-fixed-top">
|
8
|
+
<nav class="navbar navbar-expand-md fixed-top navbar-dark bg-primary border-bottom">
|
12
9
|
<%= render "layouts/rails_admin/navigation" %>
|
13
10
|
</nav>
|
14
11
|
<div class="container-fluid">
|
15
12
|
<div class="row">
|
16
|
-
<div class="col-sm-3 col-md-2
|
13
|
+
<div class="col-sm-3 col-md-2 flex-wrap p-0">
|
17
14
|
<%= render "layouts/rails_admin/sidebar_navigation" %>
|
18
15
|
</div>
|
19
16
|
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
20
|
-
<div class="
|
21
|
-
<%= render template: 'layouts/rails_admin/
|
17
|
+
<div class="container">
|
18
|
+
<%= render template: 'layouts/rails_admin/content' %>
|
22
19
|
</div>
|
23
20
|
</div>
|
24
21
|
</div>
|