rails_admin 3.0.0.beta2 → 3.0.0.rc
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 +1 -2
- data/Rakefile +11 -0
- data/app/assets/javascripts/rails_admin.js +4 -4
- data/app/assets/stylesheets/rails_admin.scss +31 -0
- data/app/controllers/rails_admin/application_controller.rb +1 -1
- data/app/controllers/rails_admin/main_controller.rb +10 -18
- data/app/helpers/rails_admin/application_helper.rb +12 -13
- 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/_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 +38 -35
- 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 +0 -1
- data/lib/generators/rails_admin/templates/webpack.config.js +0 -3
- 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 +7 -3
- data/lib/rails_admin/adapters/mongoid/property.rb +3 -3
- data/lib/rails_admin/adapters/mongoid.rb +2 -2
- 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/new.rb +5 -0
- 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 +1 -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 +9 -4
- 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 +4 -1
- data/lib/rails_admin/engine.rb +2 -5
- 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 +4 -54
- 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 +80 -91
- 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: c5dbfec366d5d5bdfd29d652fb12b08631ac61984d67b770e82ccdb863e08e5c
|
4
|
+
data.tar.gz: 79bad15a57aea48250afd9257354caaac639767d794c7fe0dadc893c25b34cd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e152b02c903442a40d247078958dca2d762c60476e9ce374e37085b11a9419925dbaa0d6f834b3f13c38e12a4e832ab5ea437f465fc6e71f7a1fa206efec28a6
|
7
|
+
data.tar.gz: 5abb152ffd68f269badf7805e08e328a68b97efbc40030736ebaf45b1fe81de3005694004e3d7526fdd4139ee4beaf66154013b2bee71b3ca8e8402be7f9e17f
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ RailsAdmin is a Rails engine that provides an easy-to-use interface for managing
|
|
47
47
|
|
48
48
|
## Installation
|
49
49
|
|
50
|
-
1. On your gemfile: `gem 'rails_admin', ['>= 3.0.0.
|
50
|
+
1. On your gemfile: `gem 'rails_admin', ['>= 3.0.0.rc', '< 4']`
|
51
51
|
2. Run `bundle install`
|
52
52
|
3. Run `rails g rails_admin:install`
|
53
53
|
4. Provide a namespace for the routes when asked
|
@@ -103,7 +103,6 @@ If you think you found a bug in RailsAdmin, you can [submit an issue](https://gi
|
|
103
103
|
|
104
104
|
This library aims to support and is [tested against][ghactions] the following Ruby implementations:
|
105
105
|
|
106
|
-
- Ruby 2.5
|
107
106
|
- Ruby 2.6
|
108
107
|
- Ruby 2.7
|
109
108
|
- 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,17 +4,15 @@ 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.
|
15
|
+
scope = model_config.scope
|
18
16
|
if auth_scope = @authorization_adapter&.query(auth_scope_key, model_config.abstract_model)
|
19
17
|
scope = scope.merge(auth_scope)
|
20
18
|
end
|
@@ -49,33 +47,27 @@ module RailsAdmin
|
|
49
47
|
end
|
50
48
|
|
51
49
|
def respond_to_missing?(sym, include_private)
|
52
|
-
if RailsAdmin::Config::Actions.find(
|
50
|
+
if RailsAdmin::Config::Actions.find(sym)
|
53
51
|
true
|
54
52
|
else
|
55
53
|
super
|
56
54
|
end
|
57
55
|
end
|
58
56
|
|
59
|
-
def get_layout
|
60
|
-
"rails_admin/#{request.headers['X-PJAX'] ? 'pjax' : 'application'}"
|
61
|
-
end
|
62
|
-
|
63
57
|
def back_or_index
|
64
58
|
params[:return_to].presence && params[:return_to].include?(request.host) && (params[:return_to] != request.fullpath) ? params[:return_to] : index_path
|
65
59
|
end
|
66
60
|
|
67
61
|
def get_sort_hash(model_config)
|
68
62
|
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
63
|
field = model_config.list.fields.detect { |f| f.name.to_s == params[:sort] }
|
64
|
+
|
74
65
|
column =
|
75
|
-
if field.nil? || field.sortable ==
|
76
|
-
|
77
|
-
elsif field.sortable == false # use default sort, asked field is not sortable
|
66
|
+
if field.nil? || field.sortable == false # use default sort, asked field does not exist or is not sortable
|
67
|
+
field = model_config.list.possible_fields.detect { |f| f.name == model_config.list.sort_by.to_sym }
|
78
68
|
"#{abstract_model.table_name}.#{model_config.list.sort_by}"
|
69
|
+
elsif field.sortable == true # use the given field
|
70
|
+
"#{abstract_model.table_name}.#{field.name}"
|
79
71
|
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
72
|
field.sortable
|
81
73
|
elsif field.sortable.is_a?(Hash) # just join sortable hash, don't do anything smart
|
@@ -86,8 +78,8 @@ module RailsAdmin
|
|
86
78
|
"#{abstract_model.table_name}.#{field.sortable}"
|
87
79
|
end
|
88
80
|
|
89
|
-
|
90
|
-
{sort: column, sort_reverse: (params[:sort_reverse] ==
|
81
|
+
params[:sort_reverse] ||= 'false'
|
82
|
+
{sort: column, sort_reverse: (params[:sort_reverse] == (field&.sort_reverse&.to_s || 'true'))}
|
91
83
|
end
|
92
84
|
|
93
85
|
def redirect_to_on_success
|
@@ -28,7 +28,7 @@ module RailsAdmin
|
|
28
28
|
content_tag(:span, _current_user.email),
|
29
29
|
].compact.join.html_safe
|
30
30
|
if (edit_action = RailsAdmin::Config::Actions.find(:edit, controller: controller, abstract_model: abstract_model, object: _current_user)).try(:authorized?)
|
31
|
-
link_to content, rails_admin.url_for(action: edit_action.action_name, model_name: abstract_model.to_param, id: _current_user.id, controller: 'rails_admin/main')
|
31
|
+
link_to content, rails_admin.url_for(action: edit_action.action_name, model_name: abstract_model.to_param, id: _current_user.id, controller: 'rails_admin/main'), class: 'nav-link'
|
32
32
|
else
|
33
33
|
content_tag :span, content
|
34
34
|
end
|
@@ -87,7 +87,7 @@ module RailsAdmin
|
|
87
87
|
url = rails_admin.url_for(action: node.action_name, controller: 'rails_admin/main')
|
88
88
|
nav_icon = node.link_icon ? %(<i class="#{node.link_icon}"></i>).html_safe : ''
|
89
89
|
content_tag :li do
|
90
|
-
link_to nav_icon + " " + wording_for(:menu, node), url, class: "
|
90
|
+
link_to nav_icon + " " + wording_for(:menu, node), url, class: "nav-link"
|
91
91
|
end
|
92
92
|
end.join.html_safe
|
93
93
|
label ||= t('admin.misc.root_navigation')
|
@@ -98,7 +98,7 @@ module RailsAdmin
|
|
98
98
|
|
99
99
|
def static_navigation
|
100
100
|
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'))
|
101
|
+
content_tag(:li, link_to(title.to_s, url, target: '_blank', rel: 'noopener noreferrer', class: 'nav-link'))
|
102
102
|
end.join
|
103
103
|
|
104
104
|
label = RailsAdmin::Config.navigation_static_label || t('admin.misc.navigation_static_label')
|
@@ -114,7 +114,7 @@ module RailsAdmin
|
|
114
114
|
level_class = " nav-level-#{level}" if level > 0
|
115
115
|
nav_icon = node.navigation_icon ? %(<i class="#{node.navigation_icon}"></i>).html_safe : ''
|
116
116
|
li = content_tag :li, data: {model: model_param} do
|
117
|
-
link_to nav_icon + node.label_plural, url, class: "
|
117
|
+
link_to nav_icon + node.label_plural, url, class: "nav-link#{level_class}"
|
118
118
|
end
|
119
119
|
child_nodes = parent_groups[abstract_model.model_name]
|
120
120
|
child_nodes ? li + navigation(parent_groups, child_nodes, level + 1) : li
|
@@ -130,11 +130,11 @@ module RailsAdmin
|
|
130
130
|
parent_actions.collect do |a|
|
131
131
|
am = a.send(:eval, 'bindings[:abstract_model]')
|
132
132
|
o = a.send(:eval, 'bindings[:object]')
|
133
|
-
content_tag(:li, class: current_action?(a, am, o) && 'active') do
|
133
|
+
content_tag(:li, class: ['breadcrumb-item', current_action?(a, am, o) && 'active']) do
|
134
134
|
if current_action?(a, am, o)
|
135
135
|
wording_for(:breadcrumb, a, am, o)
|
136
136
|
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))
|
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)) do
|
138
138
|
wording_for(:breadcrumb, a, am, o)
|
139
139
|
end
|
140
140
|
else
|
@@ -151,11 +151,10 @@ module RailsAdmin
|
|
151
151
|
actions = actions(parent, abstract_model, object).select { |a| a.http_methods.include?(:get) && a.show_in_menu }
|
152
152
|
actions.collect do |action|
|
153
153
|
wording = wording_for(:menu, action)
|
154
|
-
li_class = ['icon', "#{action.key}_#{parent}_link"].
|
155
|
-
concat(current_action?(action) ? ['active'] : []).
|
154
|
+
li_class = ['nav-item', 'icon', "#{action.key}_#{parent}_link"].
|
156
155
|
concat(action.enabled? ? [] : ['disabled'])
|
157
156
|
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'} : {}))
|
157
|
+
label = content_tag(:i, '', {class: action.link_icon}) + ' ' + content_tag(:span, wording, (only_icon ? {style: 'display:none'} : {}))
|
159
158
|
if action.enabled? || !only_icon
|
160
159
|
href =
|
161
160
|
if action.enabled?
|
@@ -163,7 +162,7 @@ module RailsAdmin
|
|
163
162
|
else
|
164
163
|
'javascript:void(0)'
|
165
164
|
end
|
166
|
-
content_tag(:a, label, {href: href, target: action.link_target
|
165
|
+
content_tag(:a, label, {href: href, target: action.link_target, class: ['nav-link', current_action?(action) && 'active', !action.enabled? && 'disabled'].compact})
|
167
166
|
else
|
168
167
|
content_tag(:span, label)
|
169
168
|
end
|
@@ -175,12 +174,12 @@ module RailsAdmin
|
|
175
174
|
actions = actions(:bulkable, abstract_model)
|
176
175
|
return '' if actions.empty?
|
177
176
|
|
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 } +
|
177
|
+
content_tag :li, class: 'nav-item dropdown dropdown-menu-end' do
|
178
|
+
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
179
|
content_tag(:ul, class: 'dropdown-menu', style: 'left:auto; right:0;') do
|
181
180
|
actions.collect do |action|
|
182
181
|
content_tag :li do
|
183
|
-
link_to wording_for(:bulk_link, action, abstract_model), '#', class: 'bulk-link', data: {action: action.action_name}
|
182
|
+
link_to wording_for(:bulk_link, action, abstract_model), '#', class: 'dropdown-item bulk-link', data: {action: action.action_name}
|
184
183
|
end
|
185
184
|
end.join.html_safe
|
186
185
|
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 %>
|
@@ -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>
|
@@ -1,19 +1,21 @@
|
|
1
1
|
<title>
|
2
2
|
<%= "#{@abstract_model.try(:pretty_name) || @page_name} | #{[_get_plugin_name[0] || 'Rails', _get_plugin_name[1] || 'Admin'].join(' ')}" %>
|
3
3
|
</title>
|
4
|
-
<
|
4
|
+
<header class="py-2 m-2 border-bottom" data-model="<%= @abstract_model.to_param %>">
|
5
5
|
<h1>
|
6
6
|
<%= @page_name %>
|
7
7
|
</h1>
|
8
|
-
</
|
8
|
+
</header>
|
9
9
|
<% flash && flash.each do |key, value| %>
|
10
10
|
<div class="<%= flash_alert_class(key) %> alert alert-dismissible">
|
11
|
-
<button class="close" data-dismiss="alert" type="button">×</button>
|
12
11
|
<%= value %>
|
12
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
13
13
|
</div>
|
14
14
|
<% end %>
|
15
|
-
|
16
|
-
|
15
|
+
<nav aria-label="breadcrumb">
|
16
|
+
<%= breadcrumb %>
|
17
|
+
</nav>
|
18
|
+
<ul class="nav nav-tabs mb-3">
|
17
19
|
<%= menu_for((@abstract_model ? (@object.try(:persisted?) ? :member : :collection) : :root), @abstract_model, @object) %>
|
18
20
|
<%= content_for :contextual_tabs %>
|
19
21
|
</ul>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% flash && flash.each do |key, value| %>
|
2
2
|
<div class="<%= flash_alert_class(key) %> alert alert-dismissible">
|
3
|
-
<button class="close" data-dismiss="alert" type="button">×</button>
|
4
3
|
<%= value %>
|
4
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
5
5
|
</div>
|
6
6
|
<% end %>
|
7
7
|
<%= yield %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% label = o.send(abstract_model.config.object_label_method) %>
|
24
24
|
<% if show_action = action(:show, abstract_model, o) %>
|
25
25
|
<td>
|
26
|
-
<%= link_to(label, url_for(action: show_action.action_name, model_name: abstract_model.to_param, id: o.id)
|
26
|
+
<%= link_to(label, url_for(action: show_action.action_name, model_name: abstract_model.to_param, id: o.id)) %>
|
27
27
|
</td>
|
28
28
|
<% else %>
|
29
29
|
<td>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
</span>
|
6
6
|
<% wording = object.send(@model_config.object_label_method) %>
|
7
7
|
<% if show_action = action(:show, @abstract_model, object) %>
|
8
|
-
<%= link_to(wording, url_for(action: show_action.action_name, model_name: @abstract_model.to_param, id: object.id)
|
8
|
+
<%= link_to(wording, url_for(action: show_action.action_name, model_name: @abstract_model.to_param, id: object.id)) %>
|
9
9
|
<% else %>
|
10
10
|
<%= wording %>
|
11
11
|
<% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%= humanized_association.singularize %>
|
20
20
|
<% wording = child.send(child_config.object_label_method) %>
|
21
21
|
<% if child.id && (show_action = action(:show, child_config.abstract_model, child)) %>
|
22
|
-
<%= link_to(wording, url_for(action: show_action.action_name, model_name: child_config.abstract_model.to_param, id: child.id)
|
22
|
+
<%= link_to(wording, url_for(action: show_action.action_name, model_name: child_config.abstract_model.to_param, id: child.id)) %>
|
23
23
|
<% else %>
|
24
24
|
<%= wording %>
|
25
25
|
<% end %>
|
@@ -1,16 +1,14 @@
|
|
1
1
|
<% if field.nullable? %>
|
2
|
-
<div class="btn-group"
|
3
|
-
<% {'1': true, '0': false, '': nil}.each do |text, value| %>
|
4
|
-
|
5
|
-
|
2
|
+
<div class="btn-group" role="group">
|
3
|
+
<% {'1': [true, 'btn-outline-success'], '0': [false, 'btn-outline-danger'], '': [nil, 'btn-outline-secondary']}.each do |text, (value, btn_class)| %>
|
4
|
+
<%= form.radio_button field.method_name, text, field.html_attributes.reverse_merge({ checked: field.form_value == value, required: field.required, class: 'btn-check' }) %>
|
5
|
+
<label for="<%= form.object_name %>_<%= field.method_name %>_<%= text %>" class="<%= field.css_classes[value] %> btn <%= btn_class %>">
|
6
6
|
<%= field.labels[value].html_safe %>
|
7
7
|
</label>
|
8
8
|
<% end %>
|
9
9
|
</div>
|
10
10
|
<% else %>
|
11
|
-
<div class="
|
12
|
-
|
13
|
-
<%= 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}) %>
|
14
|
-
</label>
|
11
|
+
<div class="col-form-label">
|
12
|
+
<%= 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, class: 'form-check-input' }) %>
|
15
13
|
</div>
|
16
14
|
<% end %>
|