activeadmin 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +59 -2
- data/CONTRIBUTING.md +10 -40
- data/README.md +2 -2
- data/app/assets/javascripts/active_admin/base.js +13 -3
- data/app/assets/stylesheets/active_admin/_header.scss +37 -3
- data/app/assets/stylesheets/active_admin/mixins/_variables.scss +3 -0
- data/app/javascript/active_admin/base.js +9 -0
- data/app/views/layouts/active_admin_logged_out.html.erb +15 -5
- data/config/locales/en-CA.yml +3 -3
- data/config/locales/en-GB.yml +3 -3
- data/config/locales/en.yml +3 -3
- data/config/locales/es.yml +3 -3
- data/config/locales/fr.yml +4 -4
- data/config/locales/lv.yml +2 -2
- data/config/locales/vi.yml +6 -5
- data/docs/0-installation.md +26 -2
- data/docs/2-resource-customization.md +10 -1
- data/docs/3-index-pages.md +1 -1
- data/docs/9-batch-actions.md +2 -2
- data/docs/Gemfile.lock +71 -72
- data/docs/_includes/top-menu.html +1 -1
- data/docs/documentation.md +1 -1
- data/docs/index.html +6 -6
- data/lib/active_admin/csv_builder.rb +7 -3
- data/lib/active_admin/inputs/filters/date_range_input.rb +12 -9
- data/lib/active_admin/localizers/resource_localizer.rb +1 -1
- data/lib/active_admin/menu.rb +5 -2
- data/lib/active_admin/namespace_settings.rb +3 -0
- data/lib/active_admin/resource/naming.rb +1 -1
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/views/components/scopes.rb +2 -0
- data/lib/active_admin/views/components/table_for.rb +1 -1
- data/lib/active_admin/views/pages/base.rb +8 -4
- data/lib/generators/active_admin/install/install_generator.rb +7 -1
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +7 -0
- data/lib/generators/active_admin/webpacker/plugins/jquery.js +7 -0
- data/lib/generators/active_admin/webpacker/templates/active_admin.js +5 -0
- data/lib/generators/active_admin/webpacker/templates/active_admin.scss +17 -0
- data/lib/generators/active_admin/webpacker/templates/print.scss +2 -0
- data/lib/generators/active_admin/webpacker/webpacker_generator.rb +26 -0
- metadata +8 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ab0e48981374c48c42109adc93edce137eed195218c8b7d26a8895f1a3e3e85
|
|
4
|
+
data.tar.gz: f4a1228efba99ed7d3bdcd93330fb7687fd321521e7ca521c1363ed1a72f3bf6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c98537ec2c59cfca738a38c5a0c905f15f55fa4aafb3bb9680880f628e89ad8226458b1a950a9ce717c01bc7a72dd6e6b906c77088a0096bf9b4397ae9475bd
|
|
7
|
+
data.tar.gz: 3af41a29c2c5602198b7f614360f223c53c2f0c47b931fca189f30d96decfc4211697dea7cfc364e1ea218015259622c2180a15b0164db86615255363ca983f5
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.7.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.6.1..v2.7.0)
|
|
6
|
+
|
|
7
|
+
### Enhancements
|
|
8
|
+
|
|
9
|
+
* Extend menu to allow for nested submenus. [#5994] by [@taralbass]
|
|
10
|
+
* Add Webpacker compatibility with opt-in config switch and installation generator. [#5855] by [@sgara]
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* Fix scopes renderer when resource has only optional scopes and their conditions are false. [#6149] by [@Looooong]
|
|
15
|
+
* Fix some missing wrapper markup in "logged out" layout. [#6086] by [@irmela]
|
|
16
|
+
* Fix some typos in Vietnamese translation. [#6099] by [@giapnhdev]
|
|
17
|
+
|
|
18
|
+
## 2.6.1 [☰](https://github.com/activeadmin/activeadmin/compare/v2.6.0..v2.6.1)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* Fix some ruby 2.7 warnings about keyword args. [#6000] by [@vcsjones]
|
|
23
|
+
* Missing `create_another` translation in Vietnamese. [#6002] by [@imcvampire]
|
|
24
|
+
* Using "destroy" for user facing message is too robotic, prefer "delete". [#6047] by [@vfonic]
|
|
25
|
+
* Typo in confirmation message for comment deletion. [#6047] by [@vfonic]
|
|
26
|
+
|
|
27
|
+
## 2.6.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.5.0..v2.6.0)
|
|
28
|
+
|
|
29
|
+
### Enhancements
|
|
30
|
+
|
|
31
|
+
* Display multiple flash messages in separate elements. [#5929] by [@mirelon]
|
|
32
|
+
* Make delete confirmation messages in French & Spanish gender-neutral. [#5946] by [@cprodhomme]
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* Export ModalDialog component to re-enable client side usage. [#5956] by [@sgara]
|
|
37
|
+
* Use default ActionView options instead of default Formtastic options for DateRangeInput [#5957] by [@mirelon]
|
|
38
|
+
* Fix i18n key in docs example to translate scopes. [#5943] by [@adler99]
|
|
39
|
+
|
|
5
40
|
## 2.5.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.4.0..v2.5.0)
|
|
6
41
|
|
|
7
42
|
### Enhancements
|
|
@@ -13,7 +48,7 @@
|
|
|
13
48
|
* Convert namespace to sym to prevent duplicate namespaces such as :foo and 'foo'. [#5931] by [@westonganger]
|
|
14
49
|
* Use filter label when condition has a predicate. [#5886] by [@ko-lem]
|
|
15
50
|
* Fix error when routing with array containing symbol. [#5870] by [@jwesorick]
|
|
16
|
-
* Fix error when there is a model named `Tag` and `meta_tags` have been configured. [#
|
|
51
|
+
* Fix error when there is a model named `Tag` and `meta_tags` have been configured. [#5895] by [@micred], [@FabioRos] and [@deivid-rodriguez]
|
|
17
52
|
* Allow specifying custom `input_html` for `DateRangeInput`. [#5867] by [@mirelon]
|
|
18
53
|
* Adjust `#main_content` right margin to take into account possible custom values of `$sidebar-width` and `$section-padding`. [#5887] by [@guigs]
|
|
19
54
|
* Improved polymorphic routes generation to avoid problems when multiple `belongs_to` are defined. [#5938] by [@leio10]
|
|
@@ -514,18 +549,33 @@ Please check [0-6-stable] for previous changes.
|
|
|
514
549
|
[#5548]: https://github.com/activeadmin/activeadmin/pull/5548
|
|
515
550
|
[#5842]: https://github.com/activeadmin/activeadmin/pull/5842
|
|
516
551
|
[#5854]: https://github.com/activeadmin/activeadmin/pull/5854
|
|
552
|
+
[#5855]: https://github.com/activeadmin/activeadmin/pull/5855
|
|
517
553
|
[#5874]: https://github.com/activeadmin/activeadmin/pull/5874
|
|
518
554
|
[#5877]: https://github.com/activeadmin/activeadmin/pull/5877
|
|
519
555
|
[#5886]: https://github.com/activeadmin/activeadmin/pull/5886
|
|
520
556
|
[#5870]: https://github.com/activeadmin/activeadmin/pull/5870
|
|
521
|
-
[#
|
|
557
|
+
[#5894]: https://github.com/activeadmin/activeadmin/pull/5894
|
|
558
|
+
[#5895]: https://github.com/activeadmin/activeadmin/pull/5895
|
|
522
559
|
[#5867]: https://github.com/activeadmin/activeadmin/pull/5867
|
|
523
560
|
[#5887]: https://github.com/activeadmin/activeadmin/pull/5887
|
|
524
561
|
[#5931]: https://github.com/activeadmin/activeadmin/pull/5931
|
|
525
562
|
[#5938]: https://github.com/activeadmin/activeadmin/pull/5938
|
|
563
|
+
[#5929]: https://github.com/activeadmin/activeadmin/pull/5929
|
|
564
|
+
[#5943]: https://github.com/activeadmin/activeadmin/pull/5943
|
|
565
|
+
[#5946]: https://github.com/activeadmin/activeadmin/pull/5946
|
|
566
|
+
[#5956]: https://github.com/activeadmin/activeadmin/pull/5956
|
|
567
|
+
[#5957]: https://github.com/activeadmin/activeadmin/pull/5957
|
|
568
|
+
[#6000]: https://github.com/activeadmin/activeadmin/pull/6000
|
|
569
|
+
[#6002]: https://github.com/activeadmin/activeadmin/pull/6002
|
|
570
|
+
[#6047]: https://github.com/activeadmin/activeadmin/pull/6047
|
|
571
|
+
[#5994]: https://github.com/activeadmin/activeadmin/pull/5994
|
|
572
|
+
[#6149]: https://github.com/activeadmin/activeadmin/pull/6149
|
|
573
|
+
[#6086]: https://github.com/activeadmin/activeadmin/pull/6086
|
|
574
|
+
[#6099]: https://github.com/activeadmin/activeadmin/pull/6099
|
|
526
575
|
|
|
527
576
|
[@5t111111]: https://github.com/5t111111
|
|
528
577
|
[@aarek]: https://github.com/aarek
|
|
578
|
+
[@adler99]: https://github.com/adler99
|
|
529
579
|
[@ajw725]: https://github.com/ajw725
|
|
530
580
|
[@alex-bogomolov]: https://github.com/alex-bogomolov
|
|
531
581
|
[@amiel]: https://github.com/amiel
|
|
@@ -538,6 +588,7 @@ Please check [0-6-stable] for previous changes.
|
|
|
538
588
|
[@chancancode]: https://github.com/chancancode
|
|
539
589
|
[@chrp]: https://github.com/chrp
|
|
540
590
|
[@chumakoff]: https://github.com/chumakoff
|
|
591
|
+
[@cprodhomme]: https://github.com/cprodhomme
|
|
541
592
|
[@craigmcnamara]: https://github.com/craigmcnamara
|
|
542
593
|
[@DanielHeath]: https://github.com/DanielHeath
|
|
543
594
|
[@deivid-rodriguez]: https://github.com/deivid-rodriguez
|
|
@@ -551,10 +602,12 @@ Please check [0-6-stable] for previous changes.
|
|
|
551
602
|
[@FabioRos]: https://github.com/FabioRos
|
|
552
603
|
[@faucct]: https://github.com/faucct
|
|
553
604
|
[@Fivell]: https://github.com/Fivell
|
|
605
|
+
[@giapnhdev]: https://github.com/giapnhdev
|
|
554
606
|
[@glebtv]: https://github.com/glebtv
|
|
555
607
|
[@gonzedge]: https://github.com/gonzedge
|
|
556
608
|
[@guigs]: https://github.com/guigs
|
|
557
609
|
[@HappyKadaver]: https://github.com/HappyKadaver
|
|
610
|
+
[@imcvampire]: https://github.com/imcvampire
|
|
558
611
|
[@innparusu95]: https://github.com/innparusu95
|
|
559
612
|
[@ionut998]: https://github.com/ionut998
|
|
560
613
|
[@irmela]: https://github.com/irmela
|
|
@@ -572,6 +625,7 @@ Please check [0-6-stable] for previous changes.
|
|
|
572
625
|
[@Kris-LIBIS]: https://github.com/Kris-LIBIS
|
|
573
626
|
[@kwent]: https://github.com/kwent
|
|
574
627
|
[@leio10]: https://github.com/leio10
|
|
628
|
+
[@Looooong]: https://github.com/Looooong
|
|
575
629
|
[@markstory]: https://github.com/markstory
|
|
576
630
|
[@mauriciopasquier]: https://github.com/mauriciopasquier
|
|
577
631
|
[@mconiglio]: https://github.com/mconiglio
|
|
@@ -594,10 +648,13 @@ Please check [0-6-stable] for previous changes.
|
|
|
594
648
|
[@shouya]: https://github.com/shouya
|
|
595
649
|
[@stefsava]: https://github.com/stefsava
|
|
596
650
|
[@stereoscott]: https://github.com/stereoscott
|
|
651
|
+
[@taralbass]: https://github.com/taralbass
|
|
597
652
|
[@tiagotex]: https://github.com/tiagotex
|
|
598
653
|
[@timoschilling]: https://github.com/timoschilling
|
|
599
654
|
[@TimPetricola]: https://github.com/TimPetricola
|
|
600
655
|
[@varyonic]: https://github.com/varyonic
|
|
656
|
+
[@vcsjones]: https://github.com/vcsjones
|
|
657
|
+
[@vfonic]: https://github.com/vfonic
|
|
601
658
|
[@violeta-p]: https://github.com/violeta-p
|
|
602
659
|
[@WaKeMaTTa]: https://github.com/WaKeMaTTa
|
|
603
660
|
[@wasifhossain]: https://github.com/wasifhossain
|
data/CONTRIBUTING.md
CHANGED
|
@@ -5,10 +5,12 @@ like you that make Active Admin such a great tool.
|
|
|
5
5
|
|
|
6
6
|
### Where do I go from here?
|
|
7
7
|
|
|
8
|
-
If you've noticed a bug or have a
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
If you've noticed a bug or have a feature request, [make one][new issue]! It's
|
|
9
|
+
generally best if you get confirmation of your bug or approval for your feature
|
|
10
|
+
request this way before starting to code.
|
|
11
|
+
|
|
12
|
+
If you have a general question about activeadmin, you can post it on [Stack
|
|
13
|
+
Overflow], the issue tracker is only for bugs and feature requests.
|
|
12
14
|
|
|
13
15
|
### Fork & create a branch
|
|
14
16
|
|
|
@@ -67,22 +69,6 @@ export BUNDLE_GEMFILE=gemfiles/rails_60/Gemfile
|
|
|
67
69
|
**Warning** SCSS assets are aimed to be used indifferently with Sprockets **and** webpacker.
|
|
68
70
|
As such, make sure not to use any sass-rails directives such as `asset-url` or `image-url`.
|
|
69
71
|
|
|
70
|
-
### Did you find a bug?
|
|
71
|
-
|
|
72
|
-
* **Ensure the bug was not already reported** by [searching all issues].
|
|
73
|
-
|
|
74
|
-
* If you're unable to find an open issue addressing the problem,
|
|
75
|
-
[open a new one][new issue]. Be sure to include a **title and clear
|
|
76
|
-
description**, as much relevant information as possible, and a **code sample**
|
|
77
|
-
or an **executable test case** demonstrating the expected behavior that is not
|
|
78
|
-
occurring.
|
|
79
|
-
|
|
80
|
-
* If possible, use the relevant bug report templates to create the issue.
|
|
81
|
-
Simply copy the content of the appropriate template into a .rb file, make the
|
|
82
|
-
necessary changes to demonstrate the issue, and **paste the content into the
|
|
83
|
-
issue description**:
|
|
84
|
-
* [**ActiveAdmin** master issues][master template]
|
|
85
|
-
|
|
86
72
|
### Implement your fix or feature
|
|
87
73
|
|
|
88
74
|
At this point, you're ready to make your changes! Feel free to ask for help;
|
|
@@ -205,36 +191,20 @@ met.
|
|
|
205
191
|
Maintainers need to do the following to push out a release:
|
|
206
192
|
|
|
207
193
|
* Make sure all pull requests are in and that changelog is current
|
|
208
|
-
*
|
|
209
|
-
* If it's not a patch level release, create a stable branch for that release,
|
|
210
|
-
otherwise switch to the stable branch corresponding to the patch release you
|
|
211
|
-
want to ship:
|
|
212
|
-
|
|
213
|
-
```sh
|
|
214
|
-
git checkout master
|
|
215
|
-
git fetch activeadmin
|
|
216
|
-
git rebase activeadmin/master
|
|
217
|
-
# If the release is 2.1.x then this should be: 2-1-stable
|
|
218
|
-
git checkout -b N-N-stable
|
|
219
|
-
git push activeadmin N-N-stable:N-N-stable
|
|
220
|
-
```
|
|
221
|
-
|
|
194
|
+
* Switch to the master branch and make sure it's up to date.
|
|
222
195
|
* Make sure you have [chandler] properly configured. Chandler is used to
|
|
223
196
|
automatically submit github release notes from the changelog right after
|
|
224
197
|
pushing the gem to rubygems.
|
|
225
|
-
* `bin/rake release
|
|
198
|
+
* Run one of `bin/rake release:prepare_{prerelease,prepatch,patch,preminor,minor,premajor,major}`, push the result and create a PR.
|
|
199
|
+
* Run `bin/rake release` from the target branch once the PR is merged.
|
|
226
200
|
|
|
227
201
|
[chandler]: https://github.com/mattbrictson/chandler#2-configure-credentials
|
|
228
|
-
[mailing list]: http://groups.google.com/group/activeadmin
|
|
229
202
|
[Stack Overflow]: http://stackoverflow.com/questions/tagged/activeadmin
|
|
230
|
-
[search the issue tracker]: https://github.com/activeadmin/activeadmin/issues?q=something
|
|
231
203
|
[new issue]: https://github.com/activeadmin/activeadmin/issues/new
|
|
232
204
|
[fork Active Admin]: https://help.github.com/articles/fork-a-repo
|
|
233
|
-
[searching all issues]: https://github.com/activeadmin/activeadmin/issues?q=
|
|
234
|
-
[master template]: https://github.com/activeadmin/activeadmin/blob/master/tasks/bug_report_template.rb
|
|
235
205
|
[make a pull request]: https://help.github.com/articles/creating-a-pull-request
|
|
236
206
|
[git rebasing]: http://git-scm.com/book/en/Git-Branching-Rebasing
|
|
237
|
-
[interactive rebase]: https://help.github.com/
|
|
207
|
+
[interactive rebase]: https://help.github.com/en/github/using-git/about-git-rebase
|
|
238
208
|
[shortcut reference links]: https://github.github.com/gfm/#shortcut-reference-link
|
|
239
209
|
[Rollup]: https://rollupjs.org/guide/en/#quick-start
|
|
240
210
|
[Yarn]: https://yarnpkg.com/en/docs/install
|
data/README.md
CHANGED
|
@@ -93,7 +93,7 @@ Thanks to [Open Collective][opencollective contributors] and all our Open Collec
|
|
|
93
93
|
|
|
94
94
|
[rubygems_badge]: http://img.shields.io/gem/v/activeadmin.svg
|
|
95
95
|
[rubygems]: https://rubygems.org/gems/activeadmin
|
|
96
|
-
[circle_badge]: https://circleci.com/gh/activeadmin/activeadmin/tree/master.svg
|
|
96
|
+
[circle_badge]: https://circleci.com/gh/activeadmin/activeadmin/tree/master.svg?style=svg
|
|
97
97
|
[circle]: https://circleci.com/gh/activeadmin/activeadmin/tree/master
|
|
98
98
|
[coverage_badge]: https://api.codeclimate.com/v1/badges/779e407d22bacff19733/test_coverage
|
|
99
99
|
[coverage]: https://codeclimate.com/github/activeadmin/activeadmin/test_coverage
|
|
@@ -101,7 +101,7 @@ Thanks to [Open Collective][opencollective contributors] and all our Open Collec
|
|
|
101
101
|
[inch]: http://inch-ci.org/github/activeadmin/activeadmin
|
|
102
102
|
[tidelift_badge]: https://tidelift.com/badges/github/activeadmin/activeadmin
|
|
103
103
|
[tidelift]: https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=readme
|
|
104
|
-
[tidelift_enterprise]: https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=
|
|
104
|
+
[tidelift_enterprise]: https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=enterprise
|
|
105
105
|
[tidelift_support]: https://tidelift.com/subscription/pkg/rubygems-activeadmin?utm_source=rubygems-activeadmin&utm_medium=referral&utm_campaign=github&utm_content=support
|
|
106
106
|
|
|
107
107
|
[docs]: http://activeadmin.info/0-installation.html
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
//= require jquery_ujs
|
|
11
11
|
//= require_self
|
|
12
12
|
|
|
13
|
-
(function(factory) {
|
|
14
|
-
typeof define === "function" && define.amd ? define([ "jquery", "jquery-ui/ui/widgets/datepicker", "jquery-ui/ui/widgets/dialog", "jquery-ui/ui/widgets/sortable", "jquery-ui/ui/widgets/tabs", "jquery-ui/ui/widget", "jquery-ujs" ], factory) :
|
|
15
|
-
})
|
|
13
|
+
(function(global, factory) {
|
|
14
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("jquery"), require("jquery-ui/ui/widgets/datepicker"), require("jquery-ui/ui/widgets/dialog"), require("jquery-ui/ui/widgets/sortable"), require("jquery-ui/ui/widgets/tabs"), require("jquery-ui/ui/widget"), require("jquery-ujs")) : typeof define === "function" && define.amd ? define([ "exports", "jquery", "jquery-ui/ui/widgets/datepicker", "jquery-ui/ui/widgets/dialog", "jquery-ui/ui/widgets/sortable", "jquery-ui/ui/widgets/tabs", "jquery-ui/ui/widget", "jquery-ujs" ], factory) : (global = global || self,
|
|
15
|
+
factory(global.ActiveAdmin = {}));
|
|
16
|
+
})(this, function(exports) {
|
|
16
17
|
"use strict";
|
|
17
18
|
$.fn.serializeObject = function() {
|
|
18
19
|
return this.serializeArray().reduce(function(obj, item) {
|
|
@@ -506,4 +507,13 @@
|
|
|
506
507
|
return $("#active_admin_content .tabs").tabs();
|
|
507
508
|
};
|
|
508
509
|
$(document).ready(onDOMReady$2).on("page:load turbolinks:load", onDOMReady$2);
|
|
510
|
+
function modal_dialog(message, inputs, callback) {
|
|
511
|
+
console.warn("ActiveAdmin.modal_dialog is deprecated in favor of ActiveAdmin.ModalDialog, please update usage.");
|
|
512
|
+
return ModalDialog(message, inputs, callback);
|
|
513
|
+
}
|
|
514
|
+
exports.ModalDialog = ModalDialog;
|
|
515
|
+
exports.modal_dialog = modal_dialog;
|
|
516
|
+
Object.defineProperty(exports, "__esModule", {
|
|
517
|
+
value: true
|
|
518
|
+
});
|
|
509
519
|
});
|
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
margin: 0;
|
|
53
53
|
padding: 0;
|
|
54
54
|
|
|
55
|
+
li {
|
|
56
|
+
/* Hover on li, display the ul */
|
|
57
|
+
&:hover > ul { display: block;}
|
|
58
|
+
}
|
|
59
|
+
|
|
55
60
|
& > li {
|
|
56
61
|
display: inline-block;
|
|
57
62
|
margin-right: 4px;
|
|
@@ -95,8 +100,6 @@
|
|
|
95
100
|
}
|
|
96
101
|
|
|
97
102
|
|
|
98
|
-
/* Hover on li, display the ul */
|
|
99
|
-
&:hover ul { display: block;}
|
|
100
103
|
/* Drop down menus */
|
|
101
104
|
ul {
|
|
102
105
|
background: $hover-menu-item-background;
|
|
@@ -114,6 +117,7 @@
|
|
|
114
117
|
z-index: 1010;
|
|
115
118
|
|
|
116
119
|
li {
|
|
120
|
+
position: relative;
|
|
117
121
|
margin: 0px;
|
|
118
122
|
a {
|
|
119
123
|
background: none;
|
|
@@ -124,10 +128,40 @@
|
|
|
124
128
|
&.current {
|
|
125
129
|
a { @include rounded(0) }
|
|
126
130
|
}
|
|
131
|
+
|
|
132
|
+
&.has_nested > a {
|
|
133
|
+
background: url($menu-arrow-right-light-icon-url) no-repeat calc(100% - 7px) 55%;
|
|
134
|
+
padding-right: 20px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&.has_nested:hover > a {
|
|
138
|
+
background: url($menu-arrow-right-dark-icon-url) no-repeat calc(100% - 7px) 55%;
|
|
139
|
+
color: #fff;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
ul {
|
|
143
|
+
@include rounded-all(10px,10px,10px,10px);
|
|
144
|
+
margin-top: 0;
|
|
145
|
+
top: -3px;
|
|
146
|
+
left: 100%;
|
|
147
|
+
|
|
148
|
+
/* Create an invisible backdrop that adds 8px margin around the dropdown menu or submenu
|
|
149
|
+
that maintains the hover. This makes it much easier to navigate to submenus in
|
|
150
|
+
particular without losing hover accientally, especially near rounded corners. */
|
|
151
|
+
&:after {
|
|
152
|
+
content: "";
|
|
153
|
+
display: block;
|
|
154
|
+
position: absolute;
|
|
155
|
+
top: -8px;
|
|
156
|
+
left: -8px;
|
|
157
|
+
height: calc(100% + 16px);
|
|
158
|
+
width: calc(100% + 16px);
|
|
159
|
+
z-index: -2;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
127
162
|
}
|
|
128
163
|
}
|
|
129
164
|
}
|
|
130
|
-
|
|
131
165
|
}
|
|
132
166
|
|
|
133
167
|
#tabs {
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
// Images
|
|
6
6
|
$menu-arrow-light-icon-url: 'data:image/png;base64,R0lGODlhBwAEAKIAAL6+vry8vIiIiJWVlf///3t7ewAAAAAAACH5BAEAAAUALAAAAAAHAAQAAAMLWLol80MoF5mQKgEAOw==' !default;
|
|
7
7
|
$menu-arrow-dark-icon-url: 'data:image/png;base64,R0lGODlhBwAEAKIAAG1tbWxsbElJSVBQUP///0JCQgAAAAAAACH5BAEAAAUALAAAAAAHAAQAAAMLWLol80MoF5mQKgEAOw==' !default;
|
|
8
|
+
$menu-arrow-right-light-icon-url: 'data:image/gif;base64,R0lGODlhBAAHAKECAKqqqszMzPkVFfkVFSH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAAIALAAAAAAEAAcAAAIJlA0XKbH9nmAFADs=' !default;
|
|
9
|
+
$menu-arrow-right-dark-icon-url: 'data:image/gif;base64,R0lGODlhBAAHAMIEAG1tbWxsbElJSVBQUPkVFfkVFfkVFfkVFSH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAAEALAAAAAAEAAcAAAMKGKqy02G8OGeACQA7' !default;
|
|
10
|
+
|
|
8
11
|
$orderable-icon-url: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAABGCAYAAAAAVo4aAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAH5JREFUeNpi3LhlOwMU1AExGxDXwARYoHQLEFdD2cxAXAliMKFJgEAFEHfBJEHGMKLhMpgkTsAEdch/NNwCk2xCdiEQtML4LEgCf6EubUX3Cgh0oNvJ+P//f7wOGpUclRwYSZb41CyidNbB8giNM+9oXhmVHHm5bJjUSAABBgDKKiwMMUxPwgAAAABJRU5ErkJggg==' !default;
|
|
9
12
|
|
|
10
13
|
// Colors
|
|
@@ -17,3 +17,12 @@ import "./initializers/has-many"
|
|
|
17
17
|
import "./initializers/per-page"
|
|
18
18
|
import "./initializers/table-checkbox-toggler"
|
|
19
19
|
import "./initializers/tabs"
|
|
20
|
+
|
|
21
|
+
import ModalDialog from "./lib/modal-dialog";
|
|
22
|
+
|
|
23
|
+
function modal_dialog(message, inputs, callback) {
|
|
24
|
+
console.warn("ActiveAdmin.modal_dialog is deprecated in favor of ActiveAdmin.ModalDialog, please update usage.");
|
|
25
|
+
return ModalDialog(message, inputs, callback);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { ModalDialog, modal_dialog };
|
|
@@ -6,10 +6,18 @@
|
|
|
6
6
|
<title><%= [@page_title, ActiveAdmin.application.site_title(self)].compact.join(" | ") %></title>
|
|
7
7
|
|
|
8
8
|
<% ActiveAdmin.application.stylesheets.each do |style, options| %>
|
|
9
|
-
|
|
9
|
+
<% if ActiveAdmin.application.use_webpacker %>
|
|
10
|
+
<%= stylesheet_pack_tag style, options %>
|
|
11
|
+
<% else %>
|
|
12
|
+
<%= stylesheet_link_tag style, options %>
|
|
13
|
+
<% end %>
|
|
10
14
|
<% end %>
|
|
11
15
|
<% ActiveAdmin.application.javascripts.each do |path| %>
|
|
12
|
-
|
|
16
|
+
<% if ActiveAdmin.application.use_webpacker %>
|
|
17
|
+
<%= javascript_pack_tag path %>
|
|
18
|
+
<% else %>
|
|
19
|
+
<%= javascript_include_tag path %>
|
|
20
|
+
<% end %>
|
|
13
21
|
<% end %>
|
|
14
22
|
|
|
15
23
|
<%= favicon_link_tag ActiveAdmin.application.favicon if ActiveAdmin.application.favicon %>
|
|
@@ -24,9 +32,11 @@
|
|
|
24
32
|
<div id="wrapper">
|
|
25
33
|
|
|
26
34
|
<div id="content_wrapper">
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
<div class="flashes">
|
|
36
|
+
<% flash_messages.each do |type, message| %>
|
|
37
|
+
<%= content_tag :div, message, class: "flash flash_#{type}" %>
|
|
38
|
+
<% end %>
|
|
39
|
+
</div>
|
|
30
40
|
<div id="active_admin_content">
|
|
31
41
|
<%= yield %>
|
|
32
42
|
</div>
|
data/config/locales/en-CA.yml
CHANGED
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
default_confirmation: "Are you sure you want to do this?"
|
|
69
69
|
delete_confirmation: "Are you sure you want to delete these %{plural_model}?"
|
|
70
70
|
succesfully_destroyed:
|
|
71
|
-
one: "Successfully
|
|
72
|
-
other: "Successfully
|
|
71
|
+
one: "Successfully deleted 1 %{model}"
|
|
72
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
73
73
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
74
74
|
action_label: "%{title} Selected"
|
|
75
75
|
labels:
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
author: "Author"
|
|
83
83
|
add: "Add Comment"
|
|
84
84
|
delete: "Delete Comment"
|
|
85
|
-
delete_confirmation: "Are you sure you want to delete these
|
|
85
|
+
delete_confirmation: "Are you sure you want to delete these comments?"
|
|
86
86
|
resource: "Resource"
|
|
87
87
|
no_comments_yet: "No comments yet."
|
|
88
88
|
author_missing: "Anonymous"
|
data/config/locales/en-GB.yml
CHANGED
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
default_confirmation: "Are you sure you want to do this?"
|
|
69
69
|
delete_confirmation: "Are you sure you want to delete these %{plural_model}?"
|
|
70
70
|
succesfully_destroyed:
|
|
71
|
-
one: "Successfully
|
|
72
|
-
other: "Successfully
|
|
71
|
+
one: "Successfully deleted 1 %{model}"
|
|
72
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
73
73
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
74
74
|
action_label: "%{title} Selected"
|
|
75
75
|
labels:
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
author: "Author"
|
|
83
83
|
add: "Add Comment"
|
|
84
84
|
delete: "Delete Comment"
|
|
85
|
-
delete_confirmation: "Are you sure you want to delete these
|
|
85
|
+
delete_confirmation: "Are you sure you want to delete these comments?"
|
|
86
86
|
resource: "Resource"
|
|
87
87
|
no_comments_yet: "No comments yet."
|
|
88
88
|
author_missing: "Anonymous"
|
data/config/locales/en.yml
CHANGED
|
@@ -91,8 +91,8 @@ en:
|
|
|
91
91
|
default_confirmation: "Are you sure you want to do this?"
|
|
92
92
|
delete_confirmation: "Are you sure you want to delete these %{plural_model}?"
|
|
93
93
|
succesfully_destroyed:
|
|
94
|
-
one: "Successfully
|
|
95
|
-
other: "Successfully
|
|
94
|
+
one: "Successfully deleted 1 %{model}"
|
|
95
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
96
96
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
97
97
|
action_label: "%{title} Selected"
|
|
98
98
|
labels:
|
|
@@ -105,7 +105,7 @@ en:
|
|
|
105
105
|
author: "Author"
|
|
106
106
|
add: "Add Comment"
|
|
107
107
|
delete: "Delete Comment"
|
|
108
|
-
delete_confirmation: "Are you sure you want to delete these
|
|
108
|
+
delete_confirmation: "Are you sure you want to delete these comments?"
|
|
109
109
|
resource: "Resource"
|
|
110
110
|
no_comments_yet: "No comments yet."
|
|
111
111
|
author_missing: "Anonymous"
|
data/config/locales/es.yml
CHANGED
|
@@ -23,7 +23,7 @@ es:
|
|
|
23
23
|
view: "Ver"
|
|
24
24
|
edit: "Editar"
|
|
25
25
|
delete: "Eliminar"
|
|
26
|
-
delete_confirmation: "¿
|
|
26
|
+
delete_confirmation: "¿Confirma que desea borrar este elemento?"
|
|
27
27
|
create_another: "Crear otro %{model}"
|
|
28
28
|
new_model: "Añadir %{model}"
|
|
29
29
|
edit_model: "Editar %{model}"
|
|
@@ -89,7 +89,7 @@ es:
|
|
|
89
89
|
batch_actions:
|
|
90
90
|
button_label: "Acciones en masa"
|
|
91
91
|
default_confirmation: "¿Seguro que quieres hacer esto?"
|
|
92
|
-
delete_confirmation: "
|
|
92
|
+
delete_confirmation: "Se eliminarán %{plural_model}. ¿Desea continuar?"
|
|
93
93
|
succesfully_destroyed:
|
|
94
94
|
one: "Se ha destruido 1 %{model} con éxito"
|
|
95
95
|
other: "Se han destruido %{count} %{plural_model} con éxito"
|
|
@@ -105,7 +105,7 @@ es:
|
|
|
105
105
|
author: "Autor"
|
|
106
106
|
add: "Comentar"
|
|
107
107
|
delete: "Borrar Comentario"
|
|
108
|
-
delete_confirmation: "¿
|
|
108
|
+
delete_confirmation: "¿Confirma que desea borrar este comentario?"
|
|
109
109
|
resource: "Recurso"
|
|
110
110
|
no_comments_yet: "No hay comentarios aún."
|
|
111
111
|
author_missing: "Anónimo"
|
data/config/locales/fr.yml
CHANGED
|
@@ -7,7 +7,7 @@ fr:
|
|
|
7
7
|
view: "Voir"
|
|
8
8
|
edit: "Modifier"
|
|
9
9
|
delete: "Supprimer"
|
|
10
|
-
delete_confirmation: "
|
|
10
|
+
delete_confirmation: "Voulez-vous vraiment supprimer ceci ?"
|
|
11
11
|
create_another: "Créer autre %{model}"
|
|
12
12
|
new_model: "Créer %{model}"
|
|
13
13
|
edit_model: "Modifier %{model}"
|
|
@@ -69,8 +69,8 @@ fr:
|
|
|
69
69
|
button_label: "Actions"
|
|
70
70
|
batch_actions:
|
|
71
71
|
button_label: "Actions groupées"
|
|
72
|
-
default_confirmation: "
|
|
73
|
-
delete_confirmation: "
|
|
72
|
+
default_confirmation: "Voulez-vous vraiment faire cela ?"
|
|
73
|
+
delete_confirmation: "Voulez-vous vraiment supprimer ces %{plural_model} ?"
|
|
74
74
|
succesfully_destroyed:
|
|
75
75
|
one: "1 %{model} supprimé"
|
|
76
76
|
other: "%{count} %{plural_model} supprimés"
|
|
@@ -86,7 +86,7 @@ fr:
|
|
|
86
86
|
author: "Auteur"
|
|
87
87
|
add: "Ajouter un commentaire"
|
|
88
88
|
delete: "Supprimer ce commentaire"
|
|
89
|
-
delete_confirmation: "
|
|
89
|
+
delete_confirmation: "Voulez-vous vraiment supprimer ce commentaire ?"
|
|
90
90
|
resource: "Ressource"
|
|
91
91
|
no_comments_yet: "Aucun commentaire actuellement"
|
|
92
92
|
author_missing: "Anonyme"
|
data/config/locales/lv.yml
CHANGED
|
@@ -60,8 +60,8 @@ lv:
|
|
|
60
60
|
default_confirmation: "Vai tiešām vēlaties to darīt?"
|
|
61
61
|
delete_confirmation: "Vai tiešām vēlaties dzēst šos %{plural_model}?"
|
|
62
62
|
succesfully_destroyed:
|
|
63
|
-
one: "Successfully
|
|
64
|
-
other: "Successfully
|
|
63
|
+
one: "Successfully deleted 1 %{model}"
|
|
64
|
+
other: "Successfully deleted %{count} %{plural_model}"
|
|
65
65
|
selection_toggle_explanation: "(Toggle Selection)"
|
|
66
66
|
action_label: "%{title} Selected"
|
|
67
67
|
labels:
|
data/config/locales/vi.yml
CHANGED
|
@@ -3,20 +3,21 @@ vi:
|
|
|
3
3
|
dashboard: Bảng điều khiển
|
|
4
4
|
dashboard_welcome:
|
|
5
5
|
welcome: "Chào mừng bạn đến với Active Admin. Đây là trang điều khiển mặc định."
|
|
6
|
-
call_to_action: "Để thêm
|
|
6
|
+
call_to_action: "Để thêm thành phần cho trang điều khiển hãy chỉnh sửa 'app/admin/dashboard.rb'"
|
|
7
7
|
view: "Xem"
|
|
8
8
|
edit: "Chỉnh sửa"
|
|
9
9
|
delete: "Xóa"
|
|
10
|
-
delete_confirmation: "Bạn có chắc chắn rằng mình muốn xóa
|
|
10
|
+
delete_confirmation: "Bạn có chắc chắn rằng mình muốn xóa không?"
|
|
11
11
|
new_model: "Tạo mới %{model}"
|
|
12
12
|
edit_model: "Chỉnh sửa %{model}"
|
|
13
13
|
delete_model: "Xóa %{model}"
|
|
14
|
+
create_another: "Tạo thêm %{model}"
|
|
14
15
|
details: "%{model} Chi tiết"
|
|
15
16
|
cancel: "Hủy"
|
|
16
17
|
empty: "Trống"
|
|
17
18
|
previous: "Trước"
|
|
18
|
-
next: "
|
|
19
|
-
download: "
|
|
19
|
+
next: "Sau"
|
|
20
|
+
download: "Tải về:"
|
|
20
21
|
has_many_new: "Thêm mới %{model}"
|
|
21
22
|
has_many_delete: "Xóa"
|
|
22
23
|
has_many_remove: "Hủy bỏ"
|
|
@@ -28,7 +29,7 @@ vi:
|
|
|
28
29
|
contains: "Có chứa"
|
|
29
30
|
equals: "Bằng"
|
|
30
31
|
starts_with: "Bắt đầu với"
|
|
31
|
-
ends_with: "Kết thúc
|
|
32
|
+
ends_with: "Kết thúc bởi"
|
|
32
33
|
greater_than: "Lớn hơn"
|
|
33
34
|
less_than: "Nhỏ hơn"
|
|
34
35
|
gteq_datetime: "Lớn hơn hoặc bằng"
|
data/docs/0-installation.md
CHANGED
|
@@ -51,8 +51,8 @@ The generator adds these core files, among others:
|
|
|
51
51
|
Now, migrate and seed your database before starting the server:
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
rails db:migrate
|
|
55
|
+
rails db:seed
|
|
56
56
|
rails server
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -112,6 +112,30 @@ Draper::CollectionDecorator.send :delegate, :per_page_kaminari
|
|
|
112
112
|
|
|
113
113
|
If you're getting the error `wrong number of arguments (6 for 4..5)`, [read #2703].
|
|
114
114
|
|
|
115
|
+
## webpacker
|
|
116
|
+
|
|
117
|
+
For new apps starting with Rails 6.0, Webpacker has become the default asset generator. You can **opt-in to using Webpacker for ActiveAdmin assets** as well by updating your configuration to turn on the `use_webpacker` option, either at installation time or manually.
|
|
118
|
+
|
|
119
|
+
* at active_admin installation:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
rails g active_admin:install --use_webpacker
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
* manually:
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
ActiveAdmin.setup do |config|
|
|
129
|
+
config.use_webpacker = true
|
|
130
|
+
end
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
And run the generator to get default Active Admin assets:
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
rails g active_admin:webpacker
|
|
137
|
+
```
|
|
138
|
+
|
|
115
139
|
[CHANGELOG]: https://github.com/activeadmin/activeadmin/blob/master/CHANGELOG.md
|
|
116
140
|
[dashboard.rb]: https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/dashboard.rb
|
|
117
141
|
[active_admin.rb]: https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/active_admin.rb.erb
|
|
@@ -164,7 +164,8 @@ The menu method accepts a hash with the following options:
|
|
|
164
164
|
|
|
165
165
|
* `:label` - The string or proc label to display in the menu. If it's a proc, it
|
|
166
166
|
will be called each time the menu is rendered.
|
|
167
|
-
* `:parent` - The string id (or label) of the parent used for this menu
|
|
167
|
+
* `:parent` - The string id (or label) of the parent used for this menu, or an array
|
|
168
|
+
of string ids (or labels) for a nested menu
|
|
168
169
|
* `:if` - A block or a symbol of a method to call to decide if the menu item
|
|
169
170
|
should be displayed
|
|
170
171
|
* `:priority` - The integer value of the priority, which defaults to `10`
|
|
@@ -227,6 +228,14 @@ end
|
|
|
227
228
|
Note that the "Blog" parent menu item doesn't even have to exist yet; it can be
|
|
228
229
|
dynamically generated for you.
|
|
229
230
|
|
|
231
|
+
To further nest an item under a submenu, provide an array of parents.
|
|
232
|
+
|
|
233
|
+
```ruby
|
|
234
|
+
ActiveAdmin.register Post do
|
|
235
|
+
menu parent: ["Admin", "Blog"]
|
|
236
|
+
end
|
|
237
|
+
```
|
|
238
|
+
|
|
230
239
|
### Customizing Parent Menu Items
|
|
231
240
|
|
|
232
241
|
All of the options given to a standard menu item are also available to
|