activeadmin 1.4.3 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activeadmin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +70 -10
- data/CONTRIBUTING.md +12 -11
- data/README.md +34 -8
- data/app/assets/javascripts/active_admin/base.es6 +23 -0
- data/app/assets/javascripts/active_admin/ext/jquery-ui.es6 +7 -0
- data/app/assets/javascripts/active_admin/ext/jquery.es6 +9 -0
- data/app/assets/javascripts/active_admin/initializers/datepicker.es6 +16 -0
- data/app/assets/javascripts/active_admin/initializers/filters.es6 +45 -0
- data/app/assets/javascripts/active_admin/initializers/tabs.es6 +6 -0
- data/app/assets/javascripts/active_admin/lib/active_admin.es6 +41 -0
- data/app/assets/javascripts/active_admin/lib/batch_actions.es6 +55 -0
- data/app/assets/javascripts/active_admin/lib/checkbox-toggler.es6 +49 -0
- data/app/assets/javascripts/active_admin/lib/dropdown-menu.es6 +123 -0
- data/app/assets/javascripts/active_admin/lib/has_many.es6 +95 -0
- data/app/assets/javascripts/active_admin/lib/modal_dialog.es6 +61 -0
- data/app/assets/javascripts/active_admin/lib/per_page.es6 +47 -0
- data/app/assets/javascripts/active_admin/lib/table-checkbox-toggler.es6 +36 -0
- data/app/assets/stylesheets/active_admin/_forms.scss +2 -14
- data/app/assets/stylesheets/active_admin/components/_status_tags.scss +0 -5
- data/app/assets/stylesheets/active_admin/components/_tabs.scss +1 -1
- data/app/assets/stylesheets/active_admin/mixins/_gradients.scss +1 -1
- data/app/views/active_admin/devise/confirmations/new.html.erb +1 -1
- data/app/views/active_admin/devise/passwords/edit.html.erb +1 -1
- data/app/views/active_admin/devise/passwords/new.html.erb +1 -1
- data/app/views/active_admin/devise/registrations/new.html.erb +1 -2
- data/app/views/active_admin/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/active_admin/devise/unlocks/new.html.erb +1 -1
- data/app/views/layouts/active_admin_logged_out.html.erb +1 -1
- data/config/locales/bg.yml +0 -1
- data/config/locales/he.yml +0 -1
- data/config/locales/hu.yml +4 -0
- data/config/locales/lt.yml +2 -2
- data/config/locales/uk.yml +2 -0
- data/docs/0-installation.md +2 -2
- data/docs/13-authorization-adapter.md +4 -4
- data/docs/CNAME +1 -1
- data/docs/index.html +2 -2
- data/lib/active_admin.rb +9 -4
- data/lib/active_admin/application.rb +8 -14
- data/lib/active_admin/application_settings.rb +3 -0
- data/lib/active_admin/asset_registration.rb +0 -8
- data/lib/active_admin/base_controller.rb +6 -6
- data/lib/active_admin/base_controller/authorization.rb +2 -4
- data/lib/active_admin/batch_actions/controller.rb +1 -1
- data/lib/active_admin/batch_actions/resource_extension.rb +4 -4
- data/lib/active_admin/callbacks.rb +1 -1
- data/lib/active_admin/csv_builder.rb +1 -1
- data/lib/active_admin/dependency.rb +1 -77
- data/lib/active_admin/dsl.rb +1 -8
- data/lib/active_admin/error.rb +1 -1
- data/lib/active_admin/filters/active_filter.rb +3 -1
- data/lib/active_admin/filters/active_sidebar.rb +5 -1
- data/lib/active_admin/filters/forms.rb +2 -2
- data/lib/active_admin/filters/formtastic_addons.rb +1 -1
- data/lib/active_admin/filters/resource_extension.rb +3 -3
- data/lib/active_admin/form_builder.rb +3 -3
- data/lib/active_admin/generators/boilerplate.rb +1 -1
- data/lib/active_admin/helpers/scope_chain.rb +1 -0
- data/lib/active_admin/inputs/datepicker_input.rb +1 -1
- data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
- data/lib/active_admin/menu_item.rb +1 -1
- data/lib/active_admin/namespace.rb +2 -2
- data/lib/active_admin/namespace_settings.rb +7 -4
- data/lib/active_admin/orm/active_record/comments.rb +4 -4
- data/lib/active_admin/orm/active_record/comments/comment.rb +2 -2
- data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +10 -5
- data/lib/active_admin/page_dsl.rb +1 -1
- data/lib/active_admin/pundit_adapter.rb +13 -4
- data/lib/active_admin/resource.rb +2 -2
- data/lib/active_admin/resource/action_items.rb +1 -1
- data/lib/active_admin/resource/attributes.rb +7 -4
- data/lib/active_admin/resource/menu.rb +3 -3
- data/lib/active_admin/resource/naming.rb +3 -3
- data/lib/active_admin/resource/routes.rb +9 -4
- data/lib/active_admin/resource/scopes.rb +3 -3
- data/lib/active_admin/resource/sidebars.rb +1 -1
- data/lib/active_admin/resource_collection.rb +2 -2
- data/lib/active_admin/resource_controller/action_builder.rb +10 -0
- data/lib/active_admin/resource_controller/resource_class_methods.rb +2 -0
- data/lib/active_admin/resource_dsl.rb +5 -3
- data/lib/active_admin/router.rb +1 -1
- data/lib/active_admin/scope.rb +4 -4
- data/lib/active_admin/settings_node.rb +1 -1
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_helpers.rb +1 -1
- data/lib/active_admin/view_helpers/display_helper.rb +10 -2
- data/lib/active_admin/view_helpers/download_format_links_helper.rb +1 -0
- data/lib/active_admin/view_helpers/method_or_proc_helper.rb +2 -0
- data/lib/active_admin/views.rb +1 -1
- data/lib/active_admin/views/components/active_admin_form.rb +7 -1
- data/lib/active_admin/views/components/attributes_table.rb +3 -3
- data/lib/active_admin/views/components/paginated_collection.rb +1 -1
- data/lib/active_admin/views/components/sidebar_section.rb +0 -3
- data/lib/active_admin/views/components/status_tag.rb +1 -18
- data/lib/active_admin/views/components/table_for.rb +2 -2
- data/lib/active_admin/views/components/tabs.rb +11 -2
- data/lib/active_admin/views/footer.rb +1 -1
- data/lib/active_admin/views/index_as_table.rb +5 -4
- data/lib/active_admin/views/pages/base.rb +3 -0
- data/lib/generators/active_admin/assets/assets_generator.rb +2 -2
- data/lib/generators/active_admin/assets/templates/active_admin.js +1 -0
- data/lib/generators/active_admin/install/install_generator.rb +6 -2
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +20 -1
- data/lib/generators/active_admin/install/templates/dashboard.rb +2 -3
- data/lib/generators/active_admin/install/templates/migrations/create_active_admin_comments.rb.erb +1 -15
- data/lib/generators/active_admin/page/page_generator.rb +1 -1
- data/lib/generators/active_admin/resource/resource_generator.rb +1 -1
- data/lib/ransack_ext.rb +3 -3
- data/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +80 -0
- data/vendor/assets/javascripts/jquery-ui/form.js +22 -0
- data/vendor/assets/javascripts/jquery-ui/labels.js +65 -0
- data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +274 -283
- metadata +107 -96
- data/.circleci/config.yml +0 -572
- data/.github/ISSUE_TEMPLATE.md +0 -20
- data/.gitignore +0 -16
- data/.mdlrc +0 -1
- data/.rspec +0 -1
- data/.rspec_parallel +0 -2
- data/.rubocop.yml +0 -99
- data/.simplecov +0 -9
- data/.yardopts +0 -7
- data/Gemfile +0 -30
- data/Gemfile.common +0 -26
- data/Gemfile.lock +0 -433
- data/Rakefile +0 -24
- data/activeadmin.gemspec +0 -32
- data/app/assets/javascripts/active_admin/base.js.coffee +0 -13
- data/app/assets/javascripts/active_admin/ext/jquery-ui.js.coffee +0 -6
- data/app/assets/javascripts/active_admin/ext/jquery.js.coffee +0 -7
- data/app/assets/javascripts/active_admin/initializers/batch_actions.js.coffee +0 -11
- data/app/assets/javascripts/active_admin/initializers/datepicker.js.coffee +0 -14
- data/app/assets/javascripts/active_admin/initializers/filters.js.coffee +0 -26
- data/app/assets/javascripts/active_admin/initializers/tabs.js.coffee +0 -7
- data/app/assets/javascripts/active_admin/lib/batch_actions.js.coffee +0 -42
- data/app/assets/javascripts/active_admin/lib/checkbox-toggler.js.coffee +0 -46
- data/app/assets/javascripts/active_admin/lib/dropdown-menu.js.coffee +0 -104
- data/app/assets/javascripts/active_admin/lib/flash.js.coffee +0 -19
- data/app/assets/javascripts/active_admin/lib/has_many.js.coffee +0 -79
- data/app/assets/javascripts/active_admin/lib/modal_dialog.js.coffee +0 -45
- data/app/assets/javascripts/active_admin/lib/per_page.js.coffee +0 -46
- data/app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee +0 -22
- data/bin/install_chromedriver.sh +0 -17
- data/config/i18n-tasks.yml +0 -26
- data/config/mdl_style.rb +0 -11
- data/cucumber.yml +0 -7
- data/gemfiles/rails_42.gemfile +0 -10
- data/gemfiles/rails_42.gemfile.lock +0 -339
- data/gemfiles/rails_50.gemfile +0 -10
- data/gemfiles/rails_50.gemfile.lock +0 -353
- data/gemfiles/rails_51.gemfile +0 -10
- data/gemfiles/rails_51.gemfile.lock +0 -353
- data/lib/active_admin/event.rb +0 -24
- data/lib/active_admin/helpers/output_safety_helper.rb +0 -35
- data/lib/bug_report_templates/active_admin_master.rb +0 -111
- data/lib/generators/active_admin/assets/templates/active_admin.js.coffee +0 -1
- data/tasks/application_generator.rb +0 -50
- data/tasks/docs.rake +0 -64
- data/tasks/gemfiles.rake +0 -8
- data/tasks/lint.rake +0 -110
- data/tasks/local.rake +0 -27
- data/tasks/release.rake +0 -6
- data/tasks/test.rake +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14a99000e6e2ff1c9906d21efa9a26ae64b41f7f1c07176351e139b571193791
|
4
|
+
data.tar.gz: 12a8dc13422e8167019ffb0c7027e3480d2077859cf9fd6689a6f380dea170ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e1bd4db42b3a3d9f9a1f47a60012b56436ec8397b80b663f5b137903b88392a4ccadc2773ea79263c1c7681812a10adcaaafd3d3078c0371ad763dcd7b23c06
|
7
|
+
data.tar.gz: d3eeabf0022b5d0472c752cf85f155af8520507fd93656db441456fb4afec662a2411bea6a864cd59d1b979f92bcde93c6cf594eb2d5e892d288fef82e6f3c24
|
data/CHANGELOG.md
CHANGED
@@ -2,26 +2,68 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
-
##
|
5
|
+
## 2.0.0.rc1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.4.3..v2.0.0.rc1)
|
6
|
+
|
7
|
+
### Enhancements
|
8
|
+
|
9
|
+
* Add your own content to the site `<head>`, like analytics [#5590] by [@buren]
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
ActiveAdmin.setup do |config|
|
13
|
+
config.head = ''.html_safe
|
14
|
+
end
|
15
|
+
```
|
16
|
+
|
17
|
+
#### Minor
|
18
|
+
|
19
|
+
* Add better support for rendering lists. [#5370] by [@dkniffin]
|
20
|
+
* Undeprecate `config.register_stylesheet` and `config.register_javascript` for lack of better solution for including external assets. It might be reevaluated in the future. [#5662] by [@deivid-rodriguez]
|
21
|
+
|
22
|
+
### Security Fixes
|
23
|
+
|
24
|
+
* Prevent leaking hashed passwords via user CSV export and adds a config option for sensitive attributes. [#5486] by [@chrp]
|
25
|
+
|
26
|
+
### Bug Fixes
|
27
|
+
|
28
|
+
* Fix for paginated collections with `per_page: Array, pagination_total: false`. [#5627] by [@bartoszkopinski]
|
29
|
+
* Restrict ransack requirement to >= 2.1.1 to play nice with Rails 5.2.2. [#5632] by [@deivid-rodriguez]
|
30
|
+
* Bad interpolation variables on pagination keys in Lithuanian translation. [#5631] by [@deivid-rodriguez]
|
31
|
+
* Tabs are not correctly created when using non-transliteratable characters as title. [#5650] by [@panasyuk]
|
32
|
+
* Sidebar title internationalization. [#5417] by [@WaKeMaTTa]
|
33
|
+
* `filter` labels not allowing a `Proc` to be passed. [#5418] by [@WaKeMaTTa]
|
34
|
+
|
35
|
+
### Removals
|
36
|
+
|
37
|
+
* Rails 4.2 support has been dropped. [#5104] by [@javierjulio] and [@deivid-rodriguez]
|
38
|
+
* Dependency on coffee-rails has been removed. [#5081] by [@javierjulio]
|
39
|
+
If your application uses coffescript but was relying on ActiveAdmin to provide
|
40
|
+
the dependency, you need to add the `coffee-script` gem to your `Gemfile` to
|
41
|
+
restore it. If your only usage of coffescript was the
|
42
|
+
`active_admin.js.coffee` generated by ActiveAdmin's generator, you can also
|
43
|
+
convert that file to plain JS (`//= require active_admin/base` if you
|
44
|
+
didn't add any stuff to it).
|
45
|
+
* Devise 3 support has been dropped. [#5608] by [@deivid-rodriguez] and [@javierjulio]
|
46
|
+
|
47
|
+
## 1.4.3 [☰](https://github.com/activeadmin/activeadmin/compare/v1.4.2..v1.4.3)
|
6
48
|
|
7
49
|
### Bug Fixes
|
8
50
|
|
9
51
|
* Fix `form` parameter to `batch_action` no longer accepting procs. [#5611] by [@buren] and [@deivid-rodriguez]
|
10
52
|
* Fix passing a proc to `scope_to`. [#5611] by [@deivid-rodriguez]
|
11
53
|
|
12
|
-
## 1.4.2 [☰](https://github.com/activeadmin/activeadmin/compare/v1.4.1
|
54
|
+
## 1.4.2 [☰](https://github.com/activeadmin/activeadmin/compare/v1.4.1..v1.4.2)
|
13
55
|
|
14
56
|
### Bug Fixes
|
15
57
|
|
16
58
|
* Fix `input_html` filter option evaluated only once. [#5376] by [@kjeldahl]
|
17
59
|
|
18
|
-
## 1.4.1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.4.0
|
60
|
+
## 1.4.1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.4.0..v1.4.1)
|
19
61
|
|
20
62
|
### Bug Fixes
|
21
63
|
|
22
64
|
* Fix menu item link with method delete. [#5583] by [@tiagotex]
|
23
65
|
|
24
|
-
## 1.4.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.3.1
|
66
|
+
## 1.4.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.3.1..v1.4.0)
|
25
67
|
|
26
68
|
### Enhancements
|
27
69
|
|
@@ -54,13 +96,13 @@
|
|
54
96
|
* Fixed resource filtering by association when the resource has custom primary key. [#5446] by [@wasifhossain]
|
55
97
|
* Fixed "create anoter" checkbox styling. [#5324] by [@faucct]
|
56
98
|
|
57
|
-
## 1.3.1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.3.0
|
99
|
+
## 1.3.1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.3.0..v1.3.1)
|
58
100
|
|
59
101
|
### Bug Fixes
|
60
102
|
|
61
103
|
* gemspec should have more permissive ransack dependency. [#5448] by [@varyonic]
|
62
104
|
|
63
|
-
## 1.3.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.2.1
|
105
|
+
## 1.3.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.2.1..v1.3.0)
|
64
106
|
|
65
107
|
### Enhancements
|
66
108
|
|
@@ -68,13 +110,13 @@
|
|
68
110
|
|
69
111
|
* Rails 5.2 support [#5343] by [@varyonic], [#5399], [#5401] by [@zorab47]
|
70
112
|
|
71
|
-
## 1.2.1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.2.0
|
113
|
+
## 1.2.1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.2.0..v1.2.1)
|
72
114
|
|
73
115
|
### Bug Fixes
|
74
116
|
|
75
117
|
* Resolve issue with [#5275] preventing XSS in filters sidebar. [#5299] by [@faucct]
|
76
118
|
|
77
|
-
## 1.2.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.1.0
|
119
|
+
## 1.2.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.1.0..v1.2.0)
|
78
120
|
|
79
121
|
### Enhancements
|
80
122
|
|
@@ -101,7 +143,7 @@
|
|
101
143
|
* Fixed [#5198] Prevent XSS on sidebar's current filter rendering. [#5275] by [@deivid-rodriguez]
|
102
144
|
* Sanitize display_name. [#5284] by [@markstory]
|
103
145
|
|
104
|
-
## 1.1.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.0.0
|
146
|
+
## 1.1.0 [☰](https://github.com/activeadmin/activeadmin/compare/v1.0.0..v1.1.0)
|
105
147
|
|
106
148
|
### Bug Fixes
|
107
149
|
|
@@ -158,7 +200,7 @@
|
|
158
200
|
* Allow passing a class to `action_item` block. [#4997] by [@Fivell]
|
159
201
|
* Add pagination to the comments section. [#5088] by [@alex-bogomolov]
|
160
202
|
|
161
|
-
## 1.0.0 [☰](https://github.com/activeadmin/activeadmin/compare/v0.6.3
|
203
|
+
## 1.0.0 [☰](https://github.com/activeadmin/activeadmin/compare/v0.6.3..v1.0.0)
|
162
204
|
|
163
205
|
### Breaking Changes
|
164
206
|
|
@@ -308,8 +350,10 @@ Please check [0-6-stable] for previous changes.
|
|
308
350
|
[#5052]: https://github.com/activeadmin/activeadmin/pull/5052
|
309
351
|
[#5060]: https://github.com/activeadmin/activeadmin/pull/5060
|
310
352
|
[#5069]: https://github.com/activeadmin/activeadmin/pull/5069
|
353
|
+
[#5081]: https://github.com/activeadmin/activeadmin/pull/5081
|
311
354
|
[#5088]: https://github.com/activeadmin/activeadmin/pull/5088
|
312
355
|
[#5093]: https://github.com/activeadmin/activeadmin/pull/5093
|
356
|
+
[#5104]: https://github.com/activeadmin/activeadmin/pull/5104
|
313
357
|
[#5119]: https://github.com/activeadmin/activeadmin/pull/5119
|
314
358
|
[#5120]: https://github.com/activeadmin/activeadmin/pull/5120
|
315
359
|
[#5125]: https://github.com/activeadmin/activeadmin/pull/5125
|
@@ -343,12 +387,15 @@ Please check [0-6-stable] for previous changes.
|
|
343
387
|
[#5357]: https://github.com/activeadmin/activeadmin/pull/5357
|
344
388
|
[#5359]: https://github.com/activeadmin/activeadmin/pull/5359
|
345
389
|
[#5368]: https://github.com/activeadmin/activeadmin/pull/5368
|
390
|
+
[#5370]: https://github.com/activeadmin/activeadmin/pull/5370
|
346
391
|
[#5375]: https://github.com/activeadmin/activeadmin/pull/5375
|
347
392
|
[#5376]: https://github.com/activeadmin/activeadmin/pull/5376
|
348
393
|
[#5399]: https://github.com/activeadmin/activeadmin/pull/5399
|
349
394
|
[#5401]: https://github.com/activeadmin/activeadmin/pull/5401
|
350
395
|
[#5408]: https://github.com/activeadmin/activeadmin/pull/5408
|
351
396
|
[#5413]: https://github.com/activeadmin/activeadmin/pull/5413
|
397
|
+
[#5417]: https://github.com/activeadmin/activeadmin/pull/5417
|
398
|
+
[#5418]: https://github.com/activeadmin/activeadmin/pull/5418
|
352
399
|
[#5433]: https://github.com/activeadmin/activeadmin/pull/5433
|
353
400
|
[#5446]: https://github.com/activeadmin/activeadmin/pull/5446
|
354
401
|
[#5448]: https://github.com/activeadmin/activeadmin/pull/5448
|
@@ -356,11 +403,19 @@ Please check [0-6-stable] for previous changes.
|
|
356
403
|
[#5458]: https://github.com/activeadmin/activeadmin/pull/5458
|
357
404
|
[#5461]: https://github.com/activeadmin/activeadmin/pull/5461
|
358
405
|
[#5464]: https://github.com/activeadmin/activeadmin/pull/5464
|
406
|
+
[#5486]: https://github.com/activeadmin/activeadmin/pull/5486
|
359
407
|
[#5501]: https://github.com/activeadmin/activeadmin/pull/5501
|
360
408
|
[#5517]: https://github.com/activeadmin/activeadmin/pull/5517
|
361
409
|
[#5537]: https://github.com/activeadmin/activeadmin/pull/5537
|
362
410
|
[#5583]: https://github.com/activeadmin/activeadmin/pull/5583
|
411
|
+
[#5608]: https://github.com/activeadmin/activeadmin/pull/5608
|
363
412
|
[#5611]: https://github.com/activeadmin/activeadmin/pull/5611
|
413
|
+
[#5627]: https://github.com/activeadmin/activeadmin/pull/5627
|
414
|
+
[#5631]: https://github.com/activeadmin/activeadmin/pull/5631
|
415
|
+
[#5632]: https://github.com/activeadmin/activeadmin/pull/5632
|
416
|
+
[#5650]: https://github.com/activeadmin/activeadmin/pull/5650
|
417
|
+
[#5590]: https://github.com/activeadmin/activeadmin/pull/5590
|
418
|
+
[#5662]: https://github.com/activeadmin/activeadmin/pull/5662
|
364
419
|
|
365
420
|
[@5t111111]: https://github.com/5t111111
|
366
421
|
[@aarek]: https://github.com/aarek
|
@@ -377,6 +432,7 @@ Please check [0-6-stable] for previous changes.
|
|
377
432
|
[@deivid-rodriguez]: https://github.com/deivid-rodriguez
|
378
433
|
[@dennisvdvliet]: https://github.com/dennisvdvliet
|
379
434
|
[@dhyegofernando]: https://github.com/dhyegofernando
|
435
|
+
[@dkniffin]: https://github.com/dkniffin
|
380
436
|
[@dmitry]: https://github.com/dmitry
|
381
437
|
[@drn]: https://github.com/drn
|
382
438
|
[@eikes]: https://github.com/eikes
|
@@ -415,6 +471,10 @@ Please check [0-6-stable] for previous changes.
|
|
415
471
|
[@TimPetricola]: https://github.com/TimPetricola
|
416
472
|
[@varyonic]: https://github.com/varyonic
|
417
473
|
[@wasifhossain]: https://github.com/wasifhossain
|
474
|
+
[@WaKeMaTTa]: https://github.com/WaKeMaTTa
|
418
475
|
[@Wowu]: https://github.com/Wowu
|
419
476
|
[@wspurgin]: https://github.com/wspurgin
|
420
477
|
[@zorab47]: https://github.com/zorab47
|
478
|
+
[@chrp]: https://github.com/chrp
|
479
|
+
[@bartoszkopinski]: https://github.com/bartoszkopinski
|
480
|
+
[@panasyuk]: https://github.com/panasyuk
|
data/CONTRIBUTING.md
CHANGED
@@ -38,10 +38,10 @@ bundle install
|
|
38
38
|
Now you should be able to run the entire suite using:
|
39
39
|
|
40
40
|
```sh
|
41
|
-
|
41
|
+
bin/rake
|
42
42
|
```
|
43
43
|
|
44
|
-
The test run will generate a sample Rails application in `
|
44
|
+
The test run will generate a sample Rails application in `tmp/rails` to run the
|
45
45
|
tests against.
|
46
46
|
|
47
47
|
If your tests are passing locally but they're failing on CircleCI, it's probably
|
@@ -91,7 +91,7 @@ a look at your changes in a browser.
|
|
91
91
|
To boot up a test Rails app:
|
92
92
|
|
93
93
|
```sh
|
94
|
-
|
94
|
+
bin/rake local server
|
95
95
|
```
|
96
96
|
|
97
97
|
This will automatically create a Rails app if none already exists, and store it
|
@@ -107,21 +107,22 @@ If you need to perform any other commands on the test application, just pass
|
|
107
107
|
them to the `local` rake task. For example, to boot the rails console:
|
108
108
|
|
109
109
|
```sh
|
110
|
-
|
110
|
+
bin/rake local console
|
111
111
|
```
|
112
112
|
|
113
|
-
Or to migrate the database
|
113
|
+
Or to migrate the database, if you create a new migration or just play around
|
114
|
+
with the db:
|
114
115
|
|
115
116
|
```sh
|
116
|
-
|
117
|
+
bin/rake local db:migrate
|
117
118
|
```
|
118
119
|
|
119
120
|
### Get the style right
|
120
121
|
|
121
122
|
Your patch should follow the same conventions & pass the same code quality
|
122
|
-
checks as the rest of the project. `
|
123
|
-
|
124
|
-
individually. Run `
|
123
|
+
checks as the rest of the project. `bin/rake lint` will give you feedback in
|
124
|
+
this regard. You can check & fix style issues by running each linter
|
125
|
+
individually. Run `bin/rake -T lint` to see the available linters.
|
125
126
|
|
126
127
|
### Make a Pull Request
|
127
128
|
|
@@ -200,7 +201,7 @@ Maintainers need to do the following to push out a release:
|
|
200
201
|
* Make sure you have [chandler] properly configured. Chandler is used to
|
201
202
|
automatically submit github release notes from the changelog right after
|
202
203
|
pushing the gem to rubygems.
|
203
|
-
* `
|
204
|
+
* `bin/rake release`
|
204
205
|
|
205
206
|
[chandler]: https://github.com/mattbrictson/chandler#2-configure-credentials
|
206
207
|
[chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/getting-started
|
@@ -210,7 +211,7 @@ Maintainers need to do the following to push out a release:
|
|
210
211
|
[new issue]: https://github.com/activeadmin/activeadmin/issues/new
|
211
212
|
[fork Active Admin]: https://help.github.com/articles/fork-a-repo
|
212
213
|
[searching all issues]: https://github.com/activeadmin/activeadmin/issues?q=
|
213
|
-
[master template]: https://github.com/activeadmin/activeadmin/blob/master/
|
214
|
+
[master template]: https://github.com/activeadmin/activeadmin/blob/master/tasks/bug_report_template.rb
|
214
215
|
[make a pull request]: https://help.github.com/articles/creating-a-pull-request
|
215
216
|
[git rebasing]: http://git-scm.com/book/en/Git-Branching-Rebasing
|
216
217
|
[interactive rebase]: https://help.github.com/articles/interactive-rebase
|
data/README.md
CHANGED
@@ -32,16 +32,22 @@ Google Groups, IRC #activeadmin and Gitter are not actively monitored.
|
|
32
32
|
|
33
33
|
## Want to contribute?
|
34
34
|
|
35
|
-
|
36
|
-
is
|
35
|
+
If you want to contribute through code or documentation, the [Contributing
|
36
|
+
guide is the best place to start][contributing]. If you have questions, feel free
|
37
|
+
to ask.
|
37
38
|
|
38
39
|
## Want to support us?
|
39
40
|
|
40
|
-
|
41
|
+
If you want to support us financially, you can [help fund the project
|
42
|
+
through a Tidelift subscription][tidelift]. By buying a Tidelift subscription
|
43
|
+
you make sure your whole dependency stack is properly maintained, while also
|
44
|
+
getting a comprehensive view of outdated dependencies, new releases, security
|
45
|
+
alerts, and licensing compatibility issues.
|
41
46
|
|
42
|
-
You can support us with a weekly tip via [Liberapay]
|
47
|
+
You can also support us with a weekly tip via [Liberapay].
|
43
48
|
|
44
|
-
|
49
|
+
Finally, we have an [Open Collective][opencollective page] where you can become a backer or
|
50
|
+
sponsor for the project, and also submit expenses to it.
|
45
51
|
|
46
52
|
## Dependencies
|
47
53
|
|
@@ -56,6 +62,23 @@ Tool | Description
|
|
56
62
|
[Kaminari] | Elegant pagination for any sort of collection
|
57
63
|
[Ransack] | Provides a simple search API to query your data
|
58
64
|
|
65
|
+
## Security contact information
|
66
|
+
|
67
|
+
Please use the Tidelift security contact to [report a security vulnerability][Tidelift security contact].
|
68
|
+
Tidelift will coordinate the fix and disclosure.
|
69
|
+
|
70
|
+
## Acknowledgements
|
71
|
+
|
72
|
+
Thanks to [Greg Bell][Greg] for creating and sharing this project with the open source community.
|
73
|
+
|
74
|
+
Thanks to [all the people that ever contributed through code][contributors] or
|
75
|
+
other means such as bug reports, issue triaging, feature suggestions, code
|
76
|
+
snippet tips, Slack discussions and so on.
|
77
|
+
|
78
|
+
Thanks to [Tidelift][tidelift] and all our Tidelift subscribers.
|
79
|
+
|
80
|
+
Thanks to [Open Collective][opencollective contributors] and all our Open Collective contributors.
|
81
|
+
|
59
82
|
[Arbre]: https://github.com/activeadmin/arbre
|
60
83
|
[Devise]: https://github.com/plataformatec/devise
|
61
84
|
[Formtastic]: https://github.com/justinfrench/formtastic
|
@@ -79,6 +102,9 @@ Tool | Description
|
|
79
102
|
[wiki]: https://github.com/activeadmin/activeadmin/wiki
|
80
103
|
[stackoverflow]: http://stackoverflow.com/questions/tagged/activeadmin
|
81
104
|
[contributing]: https://github.com/activeadmin/activeadmin/blob/master/CONTRIBUTING.md
|
82
|
-
[
|
83
|
-
[
|
84
|
-
[
|
105
|
+
[Liberapay]: https://liberapay.com/Active-Admin/donate
|
106
|
+
[Tidelift security contact]: https://tidelift.com/security
|
107
|
+
[Greg]: https://github.com/gregbell
|
108
|
+
[contributors]: https://github.com/activeadmin/activeadmin/graphs/contributors
|
109
|
+
[opencollective page]: https://opencollective.com/activeadmin
|
110
|
+
[opencollective contributors]: https://opencollective.com/activeadmin#contributors
|
@@ -0,0 +1,23 @@
|
|
1
|
+
//= require jquery3
|
2
|
+
//= require jquery-ui/widgets/datepicker
|
3
|
+
//= require jquery-ui/widgets/dialog
|
4
|
+
//= require jquery-ui/widgets/sortable
|
5
|
+
//= require jquery-ui/widgets/tabs
|
6
|
+
//= require jquery-ui/widget
|
7
|
+
//= require jquery_ujs
|
8
|
+
//= require_self
|
9
|
+
//= require ./ext/jquery
|
10
|
+
//= require ./ext/jquery-ui
|
11
|
+
//= require ./lib/active_admin
|
12
|
+
//= require ./lib/batch_actions
|
13
|
+
//= require ./lib/dropdown-menu
|
14
|
+
//= require ./lib/has_many
|
15
|
+
//= require ./lib/modal_dialog
|
16
|
+
//= require ./lib/per_page
|
17
|
+
//= require ./lib/checkbox-toggler
|
18
|
+
//= require ./lib/table-checkbox-toggler
|
19
|
+
//= require ./initializers/datepicker
|
20
|
+
//= require ./initializers/filters
|
21
|
+
//= require ./initializers/tabs
|
22
|
+
|
23
|
+
window.ActiveAdmin = {}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
// Short-circuits `_focusTabbable` to focus on the modal itself instead of
|
2
|
+
// elements inside the modal. Without this, if a datepicker is the first input,
|
3
|
+
// it'll immediately pop up when the modal opens.
|
4
|
+
// See this ticket for more info: http://bugs.jqueryui.com/ticket/4731
|
5
|
+
$.ui.dialog.prototype._focusTabbable = function() {
|
6
|
+
this.uiDialog.focus();
|
7
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// `serializeArray` generates => [{ name: 'foo', value: 'bar' }]
|
2
|
+
// This function remaps it to => { foo: 'bar' }
|
3
|
+
$.fn.serializeObject = function() {
|
4
|
+
return this.serializeArray()
|
5
|
+
.reduce((obj, item) => {
|
6
|
+
obj[item.name] = item.value
|
7
|
+
return obj
|
8
|
+
}, {});
|
9
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
(($) => {
|
2
|
+
|
3
|
+
$(document)
|
4
|
+
.on('focus', 'input.datepicker:not(.hasDatepicker)', function() {
|
5
|
+
const input = $(this);
|
6
|
+
|
7
|
+
// Only create datepickers in compatible browsers
|
8
|
+
if (input[0].type === 'date') { return; }
|
9
|
+
|
10
|
+
const defaults = { dateFormat: 'yy-mm-dd' };
|
11
|
+
const options = input.data('datepicker-options');
|
12
|
+
|
13
|
+
input.datepicker($.extend(defaults, options));
|
14
|
+
});
|
15
|
+
|
16
|
+
})(jQuery);
|
@@ -0,0 +1,45 @@
|
|
1
|
+
(($, ActiveAdmin) => {
|
2
|
+
|
3
|
+
class Filters {
|
4
|
+
|
5
|
+
static _clearForm(event) {
|
6
|
+
const regex = /^(q\[|q%5B|q%5b|page|utf8|commit)/;
|
7
|
+
const params = ActiveAdmin
|
8
|
+
.queryStringToParams()
|
9
|
+
.filter(({name}) => !name.match(regex));
|
10
|
+
|
11
|
+
event.preventDefault();
|
12
|
+
|
13
|
+
if (ActiveAdmin.turbolinks) {
|
14
|
+
ActiveAdmin.turbolinksVisit(params);
|
15
|
+
} else {
|
16
|
+
window.location.search = ActiveAdmin.toQueryString(params);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
static _disableEmptyInputFields(event) {
|
21
|
+
const params = $(this)
|
22
|
+
.find(':input')
|
23
|
+
.filter((i, input) => input.value === '')
|
24
|
+
.prop({ disabled: true })
|
25
|
+
.end()
|
26
|
+
.serializeArray();
|
27
|
+
|
28
|
+
if (ActiveAdmin.turbolinks) {
|
29
|
+
event.preventDefault();
|
30
|
+
ActiveAdmin.turbolinksVisit(params);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
static _setSearchType() {
|
35
|
+
$(this).siblings('input').prop({name: `q[${this.value}]`});
|
36
|
+
}
|
37
|
+
|
38
|
+
}
|
39
|
+
|
40
|
+
$(document).
|
41
|
+
on('click', '.clear_filters_btn', Filters._clearForm).
|
42
|
+
on('submit', '.filter_form', Filters._disableEmptyInputFields).
|
43
|
+
on('change', '.filter_form_field.select_and_search select', Filters._setSearchType);
|
44
|
+
|
45
|
+
})(jQuery, window.activeadmin);
|
@@ -0,0 +1,41 @@
|
|
1
|
+
((window, $) => {
|
2
|
+
|
3
|
+
class ActiveAdmin {
|
4
|
+
|
5
|
+
static get turbolinks() {
|
6
|
+
return (typeof Turbolinks !== 'undefined' && Turbolinks.supported);
|
7
|
+
}
|
8
|
+
|
9
|
+
static turbolinksVisit(params) {
|
10
|
+
const path = [window.location.pathname, '?', this.toQueryString(params)].join('')
|
11
|
+
Turbolinks.visit(path);
|
12
|
+
}
|
13
|
+
|
14
|
+
static queryString() {
|
15
|
+
return (window.location.search || '').replace(/^\?/, '');
|
16
|
+
}
|
17
|
+
|
18
|
+
static queryStringToParams() {
|
19
|
+
const decode = (value) => decodeURIComponent((value || '').replace(/\+/g, '%20'));
|
20
|
+
|
21
|
+
return this.queryString()
|
22
|
+
.split("&")
|
23
|
+
.map(pair => pair.split("="))
|
24
|
+
.map(([key, value]) => {
|
25
|
+
return { name: decode(key), value: decode(value) }
|
26
|
+
});
|
27
|
+
}
|
28
|
+
|
29
|
+
static toQueryString(params) {
|
30
|
+
const encode = (value) => encodeURIComponent(value || '');
|
31
|
+
|
32
|
+
return params
|
33
|
+
.map(({name, value}) => [ encode(name), encode(value) ])
|
34
|
+
.map(pair => pair.join('='))
|
35
|
+
.join('&')
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
window.activeadmin = ActiveAdmin
|
40
|
+
|
41
|
+
})(window, jQuery);
|