activeadmin 2.13.0 → 2.14.0

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.

Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -0
  3. data/CONTRIBUTING.md +3 -4
  4. data/README.md +2 -2
  5. data/app/assets/javascripts/active_admin/base.js +1 -4
  6. data/app/assets/stylesheets/active_admin/_forms.scss +1 -1
  7. data/app/assets/stylesheets/active_admin/structure/_footer.scss +6 -1
  8. data/app/views/layouts/active_admin_logged_out.html.erb +5 -4
  9. data/config/locales/fr.yml +3 -3
  10. data/config/locales/vi.yml +34 -7
  11. data/config/locales/zh-CN.yml +36 -17
  12. data/lib/active_admin/application.rb +4 -4
  13. data/lib/active_admin/asset_registration.rb +3 -3
  14. data/lib/active_admin/authorization_adapter.rb +2 -0
  15. data/lib/active_admin/base_controller/authorization.rb +2 -2
  16. data/lib/active_admin/dependency.rb +0 -4
  17. data/lib/active_admin/engine.rb +1 -1
  18. data/lib/active_admin/filters/resource_extension.rb +4 -4
  19. data/lib/active_admin/namespace.rb +2 -2
  20. data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +1 -1
  21. data/lib/active_admin/orm/active_record/comments.rb +8 -8
  22. data/lib/active_admin/pundit_adapter.rb +0 -2
  23. data/lib/active_admin/resource/action_items.rb +2 -2
  24. data/lib/active_admin/version.rb +1 -1
  25. data/lib/active_admin/view_helpers/auto_link_helper.rb +1 -1
  26. data/lib/active_admin/views/index_as_table.rb +1 -1
  27. data/lib/active_admin/views/pages/base.rb +4 -3
  28. data/lib/active_admin/views/pages/index.rb +1 -1
  29. data/lib/active_admin.rb +1 -1
  30. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +17 -0
  31. metadata +5 -44
  32. data/docs/.gitignore +0 -1
  33. data/docs/0-installation.md +0 -142
  34. data/docs/1-general-configuration.md +0 -224
  35. data/docs/10-custom-pages.md +0 -150
  36. data/docs/11-decorators.md +0 -70
  37. data/docs/12-arbre-components.md +0 -214
  38. data/docs/13-authorization-adapter.md +0 -285
  39. data/docs/14-gotchas.md +0 -138
  40. data/docs/2-resource-customization.md +0 -475
  41. data/docs/3-index-pages/custom-index.md +0 -35
  42. data/docs/3-index-pages/index-as-block.md +0 -19
  43. data/docs/3-index-pages/index-as-blog.md +0 -69
  44. data/docs/3-index-pages/index-as-grid.md +0 -27
  45. data/docs/3-index-pages/index-as-table.md +0 -234
  46. data/docs/3-index-pages.md +0 -328
  47. data/docs/4-csv-format.md +0 -74
  48. data/docs/5-forms.md +0 -238
  49. data/docs/6-show-pages.md +0 -93
  50. data/docs/7-sidebars.md +0 -75
  51. data/docs/8-custom-actions.md +0 -177
  52. data/docs/9-batch-actions.md +0 -237
  53. data/docs/CNAME +0 -1
  54. data/docs/Gemfile +0 -4
  55. data/docs/Gemfile.lock +0 -283
  56. data/docs/README.md +0 -24
  57. data/docs/_config.yml +0 -4
  58. data/docs/_includes/footer.html +0 -8
  59. data/docs/_includes/google-analytics.html +0 -16
  60. data/docs/_includes/head.html +0 -7
  61. data/docs/_includes/toc.html +0 -98
  62. data/docs/_includes/top-menu.html +0 -17
  63. data/docs/_layouts/default.html +0 -21
  64. data/docs/documentation.md +0 -60
  65. data/docs/images/activeadmin.png +0 -0
  66. data/docs/images/code-header.png +0 -0
  67. data/docs/images/divider.png +0 -0
  68. data/docs/images/features.png +0 -0
  69. data/docs/images/tidelift.svg +0 -14
  70. data/docs/index.html +0 -226
  71. data/docs/stylesheets/main.css +0 -1205
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 170a59df9471df04e568a2ae1cc4dab8ff58c28fd28a6861a5e87ba596a4e913
4
- data.tar.gz: ff345b66e5c18bc94b2a9394d0a633ebe12cce3f7c94b5119ece2b54bcf86836
3
+ metadata.gz: e192ee32c6a28d748f4fe6a3c82aba50933295ca915ccb3b5d4f283749dd8ae4
4
+ data.tar.gz: b3440f204e78159fbff127db9085c81d921a23aacc11828dc1a95c54e1291096
5
5
  SHA512:
6
- metadata.gz: 558b34213e3a1af076814008a337ed3d7a66fa328c33bb460020f28595f4e4898e815752dde54c8b41ab6fa687989e7c4d0d8cd58113e736bdafe3943b3c3026
7
- data.tar.gz: bb0f39fecd17ef5bb0063aaa64cf2ee2684fa52b19faf7b2e37fc273484554ad97a686972f5d5baa02cbd8d785efd9de384769e86b2083f5a2a6c591381d573d
6
+ metadata.gz: b757b6e53f0385ac472b370b92e9cfff96ad10a04551322c27d3fde495b4f5a8f43d6c54ff19d6d32ca7d39db631759c3d8a76a491ad27d7ba38490ecdbce7ab
7
+ data.tar.gz: 03a6f3c614b350d6fafc130c1aebf31f0ba854ef06304bac52800cce61ce7dc26a674f07f2ead5032e89740e9f7e016bb1619f91e1e08e944f923ce5c76301c2
data/CHANGELOG.md CHANGED
@@ -2,6 +2,45 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.14.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.13.1..v2.14.0)
6
+
7
+ ### Enhancements
8
+
9
+ * Add csp_meta_tag to layout. [#7986] by [@javierjulio]
10
+ * Update config.register_javascript with options support. [#7002] by [@lanzhiheng]
11
+ * Use `csrf_meta_tags` in place of singular version. [#7985] by [@javierjulio]
12
+ * Allow different new and edit rules in authorization adapters. [#6535] by [@timwis]
13
+
14
+ ### Bug Fixes
15
+
16
+ * Fix form layout for hints and checkboxes. [#7772] by [@JewelSam]
17
+ * Update filters disabled error to include specific action. [#6195] by [@javawizard]
18
+ * Fix Comments controller destroy declaration. [#6482] by [@bliof]
19
+ * Stop pagination elements from overflowing outside of panel container. [#7599] by [@ray-curran]
20
+
21
+ ### Translation Improvements
22
+
23
+ * Update vi locale with more translations. [#7984] by [@rs-phunt]
24
+ * Update zh-CN locale with multiple corrections. [#7944] by [@hfl]
25
+ * Fix typo in Vietnamese locale for filter text. [#7920] by [@tvziet]
26
+ * Improve French translation. [#7653] by [@cprodhomme]
27
+
28
+ ### Documentation
29
+
30
+ * Add more documentation about PORO decorator requirements. [#7556] by [@sanfrecce-osaka]
31
+ * Add Load Paths docs to the active_admin.rb template. [#7541] by [@gabo-cs]
32
+
33
+ ### Performance
34
+
35
+ * Removes docs from exported gem. [#7013] by [@brunoarueira]
36
+
37
+ ## 2.13.1 [☰](https://github.com/activeadmin/activeadmin/compare/v2.13.0..v2.13.1)
38
+
39
+ ### Bug Fixes
40
+
41
+ * Honor load paths order when loading admin files. [#7488] by [@tf]
42
+ * Fix passing expected hash payload argument. [#7487] by [@ispyropoulos]
43
+
5
44
  ## 2.13.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.12.0..v2.13.0)
6
45
 
7
46
  ### Documentation
@@ -736,6 +775,7 @@ Please check [0-6-stable] for previous changes.
736
775
  [#6099]: https://github.com/activeadmin/activeadmin/pull/6099
737
776
  [#6124]: https://github.com/activeadmin/activeadmin/pull/6124
738
777
  [#6149]: https://github.com/activeadmin/activeadmin/pull/6149
778
+ [#6195]: https://github.com/activeadmin/activeadmin/pull/6195
739
779
  [#6198]: https://github.com/activeadmin/activeadmin/pull/6198
740
780
  [#6210]: https://github.com/activeadmin/activeadmin/pull/6210
741
781
  [#6221]: https://github.com/activeadmin/activeadmin/pull/6221
@@ -750,8 +790,10 @@ Please check [0-6-stable] for previous changes.
750
790
  [#6451]: https://github.com/activeadmin/activeadmin/pull/6451
751
791
  [#6460]: https://github.com/activeadmin/activeadmin/pull/6460
752
792
  [#6462]: https://github.com/activeadmin/activeadmin/pull/6462
793
+ [#6482]: https://github.com/activeadmin/activeadmin/pull/6482
753
794
  [#6487]: https://github.com/activeadmin/activeadmin/pull/6487
754
795
  [#6523]: https://github.com/activeadmin/activeadmin/pull/6523
796
+ [#6535]: https://github.com/activeadmin/activeadmin/pull/6535
755
797
  [#6536]: https://github.com/activeadmin/activeadmin/pull/6536
756
798
  [#6548]: https://github.com/activeadmin/activeadmin/pull/6548
757
799
  [#6583]: https://github.com/activeadmin/activeadmin/pull/6583
@@ -766,6 +808,8 @@ Please check [0-6-stable] for previous changes.
766
808
  [#6936]: https://github.com/activeadmin/activeadmin/pull/6936
767
809
  [#6954]: https://github.com/activeadmin/activeadmin/pull/6954
768
810
  [#6959]: https://github.com/activeadmin/activeadmin/pull/6959
811
+ [#7002]: https://github.com/activeadmin/activeadmin/pull/7002
812
+ [#7013]: https://github.com/activeadmin/activeadmin/pull/7013
769
813
  [#7095]: https://github.com/activeadmin/activeadmin/pull/7095
770
814
  [#7127]: https://github.com/activeadmin/activeadmin/pull/7127
771
815
  [#7144]: https://github.com/activeadmin/activeadmin/pull/7144
@@ -789,6 +833,18 @@ Please check [0-6-stable] for previous changes.
789
833
  [#7475]: https://github.com/activeadmin/activeadmin/pull/7475
790
834
  [#7476]: https://github.com/activeadmin/activeadmin/pull/7476
791
835
  [#7479]: https://github.com/activeadmin/activeadmin/pull/7479
836
+ [#7487]: https://github.com/activeadmin/activeadmin/pull/7487
837
+ [#7488]: https://github.com/activeadmin/activeadmin/pull/7488
838
+ [#7541]: https://github.com/activeadmin/activeadmin/pull/7541
839
+ [#7556]: https://github.com/activeadmin/activeadmin/pull/7556
840
+ [#7599]: https://github.com/activeadmin/activeadmin/pull/7599
841
+ [#7653]: https://github.com/activeadmin/activeadmin/pull/7653
842
+ [#7772]: https://github.com/activeadmin/activeadmin/pull/7772
843
+ [#7920]: https://github.com/activeadmin/activeadmin/pull/7920
844
+ [#7944]: https://github.com/activeadmin/activeadmin/pull/7944
845
+ [#7984]: https://github.com/activeadmin/activeadmin/pull/7984
846
+ [#7985]: https://github.com/activeadmin/activeadmin/pull/7985
847
+ [#7986]: https://github.com/activeadmin/activeadmin/pull/7986
792
848
 
793
849
  [@1000ship]: https://github.com/1000ship
794
850
  [@5t111111]: https://github.com/5t111111
@@ -803,8 +859,10 @@ Please check [0-6-stable] for previous changes.
803
859
  [@amiuhle]: https://github.com/amiuhle
804
860
  [@andreslemik]: https://github.com/andreslemik
805
861
  [@bartoszkopinski]: https://github.com/bartoszkopinski
862
+ [@bliof]: https://github.com/bliof
806
863
  [@blocknotes]: https://github.com/blocknotes
807
864
  [@bolshakov]: https://github.com/bolshakov
865
+ [@brunoarueira]: https://github.com/brunoarueira
808
866
  [@brunvez]: https://github.com/brunvez
809
867
  [@buren]: https://github.com/buren
810
868
  [@chancancode]: https://github.com/chancancode
@@ -826,22 +884,26 @@ Please check [0-6-stable] for previous changes.
826
884
  [@Fivell]: https://github.com/Fivell
827
885
  [@Fs00]: https://github.com/Fs00
828
886
  [@fuzziness]: https://github.com/fuzziness
887
+ [@gabo-cs]: https://github.com/gabo-cs
829
888
  [@giapnhdev]: https://github.com/giapnhdev
830
889
  [@gigorok]: https://github.com/gigorok
831
890
  [@glebtv]: https://github.com/glebtv
832
891
  [@gonzedge]: https://github.com/gonzedge
833
892
  [@guigs]: https://github.com/guigs
834
893
  [@HappyKadaver]: https://github.com/HappyKadaver
894
+ [@hfl]: https://github.com/hfl
835
895
  [@imcvampire]: https://github.com/imcvampire
836
896
  [@innparusu95]: https://github.com/innparusu95
837
897
  [@ionut998]: https://github.com/ionut998
838
898
  [@irmela]: https://github.com/irmela
899
+ [@ispyropoulos]: https://github.com/ispyropoulos
839
900
  [@Ivanov-Anton]: https://github.com/Ivanov-Anton
840
901
  [@jasl]: https://github.com/jasl
841
902
  [@javawizard]: https://github.com/javawizard
842
903
  [@javierjulio]: https://github.com/javierjulio
843
904
  [@jawa]: https://github.com/jawa
844
905
  [@jaynetics]: https://github.com/jaynetics
906
+ [@JewelSam]: https://github.com/JewelSam
845
907
  [@JiiHu]: https://github.com/JiiHu
846
908
  [@jiikko]: https://github.com/jiikko
847
909
  [@johnnyshields]: https://github.com/johnnyshields
@@ -855,6 +917,7 @@ Please check [0-6-stable] for previous changes.
855
917
  [@Kris-LIBIS]: https://github.com/Kris-LIBIS
856
918
  [@krzcho]: https://github.com/krzcho
857
919
  [@kwent]: https://github.com/kwent
920
+ [@lanzhiheng]: https://github.com/lanzhiheng
858
921
  [@leio10]: https://github.com/leio10
859
922
  [@littleforest]: https://github.com/littleforest
860
923
  [@Looooong]: https://github.com/Looooong
@@ -877,11 +940,14 @@ Please check [0-6-stable] for previous changes.
877
940
  [@PChambino]: https://github.com/PChambino
878
941
  [@potatosalad]: https://github.com/potatosalad
879
942
  [@pranas]: https://github.com/pranas
943
+ [@ray-curran]: https://github.com/ray-curran
880
944
  [@renotocn]: https://github.com/renotocn
881
945
  [@rn0rno]: https://github.com/rn0rno
882
946
  [@RobinvanderVliet]: https://github.com/RobinvanderVliet
883
947
  [@rogerkk]: https://github.com/rogerkk
884
948
  [@roramirez]: https://github.com/roramirez
949
+ [@rs-phunt]: https://github.com/rs-phunt
950
+ [@sanfrecce-osaka]: https://github.com/sanfrecce-osaka
885
951
  [@seanlinsley]: https://github.com/seanlinsley
886
952
  [@sergey-alekseev]: https://github.com/sergey-alekseev
887
953
  [@sgara]: https://github.com/sgara
@@ -894,12 +960,15 @@ Please check [0-6-stable] for previous changes.
894
960
  [@stereoscott]: https://github.com/stereoscott
895
961
  [@tagliala]: https://github.com/tagliala
896
962
  [@taralbass]: https://github.com/taralbass
963
+ [@tf]: https://github.com/tf
897
964
  [@tiagotex]: https://github.com/tiagotex
898
965
  [@timoschilling]: https://github.com/timoschilling
899
966
  [@TimPetricola]: https://github.com/TimPetricola
967
+ [@timwis]: https://github.com/timwis
900
968
  [@tomgilligan]: https://github.com/tomgilligan
901
969
  [@TonyArra]: https://github.com/TonyArra
902
970
  [@tordans]: https://github.com/tordans
971
+ [@tvziet]: https://github.com/tvziet
903
972
  [@utkarsh2102]: https://github.com/utkarsh2102
904
973
  [@varyonic]: https://github.com/varyonic
905
974
  [@vcsjones]: https://github.com/vcsjones
data/CONTRIBUTING.md CHANGED
@@ -25,8 +25,7 @@ git checkout -b 325-add-japanese-translations
25
25
 
26
26
  ### Get the test suite running
27
27
 
28
- Make sure you're using a recent ruby and have the `bundler` gem installed, at
29
- least version `1.14.3`.
28
+ Make sure you're using a recent Ruby version.
30
29
 
31
30
  You'll also need chrome installed in order to run cucumber scenarios.
32
31
 
@@ -56,8 +55,8 @@ Now you should be able to run the entire suite using:
56
55
  bin/rake
57
56
  ```
58
57
 
59
- The test run will generate a sample Rails application in `tmp/test_apps` to run the
60
- tests against.
58
+ The task will generate a sample Rails application in `tmp/test_apps` to run the
59
+ test suite against.
61
60
 
62
61
  If you want to test against a Rails version different from the latest, make sure
63
62
  you use the correct Gemfile, for example:
data/README.md CHANGED
@@ -95,8 +95,8 @@ Thanks to [Open Collective][opencollective contributors] and all our Open Collec
95
95
  [rubygems]: https://rubygems.org/gems/activeadmin
96
96
  [actions_badge]: https://github.com/activeadmin/activeadmin/workflows/ci/badge.svg
97
97
  [actions]: https://github.com/activeadmin/activeadmin/actions
98
- [coverage_badge]: https://api.codeclimate.com/v1/badges/779e407d22bacff19733/test_coverage
99
- [coverage]: https://codeclimate.com/github/activeadmin/activeadmin/test_coverage
98
+ [coverage_badge]: https://codecov.io/gh/activeadmin/activeadmin/branch/master/graph/badge.svg?token=NAjeBdkQXW
99
+ [coverage]: https://codecov.io/gh/activeadmin/activeadmin
100
100
  [inch_badge]: http://inch-ci.org/github/activeadmin/activeadmin.svg?branch=master
101
101
  [inch]: http://inch-ci.org/github/activeadmin/activeadmin
102
102
  [tidelift_badge]: https://tidelift.com/badges/github/activeadmin/activeadmin
@@ -474,7 +474,7 @@
474
474
  _setPrototypeOf(subClass, superClass);
475
475
  }
476
476
  function _setPrototypeOf(o, p) {
477
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
477
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
478
478
  o.__proto__ = p;
479
479
  return o;
480
480
  };
@@ -518,7 +518,4 @@
518
518
  }
519
519
  exports.ModalDialog = ModalDialog;
520
520
  exports.modal_dialog = modal_dialog;
521
- Object.defineProperty(exports, "__esModule", {
522
- value: true
523
- });
524
521
  });
@@ -171,7 +171,7 @@ form {
171
171
  &.boolean {
172
172
  min-height: 1.1em;
173
173
  label {
174
- width: 80%;
174
+ width: 100%;
175
175
  padding-left:20%;
176
176
  padding-right: 10px;
177
177
  text-transform: none !important;
@@ -9,6 +9,11 @@
9
9
  }
10
10
 
11
11
  // -------------------------------------- Index Footer (Under Table)
12
- #index_footer { padding-top: 5px; text-align: right; font-size: 0.85em; }
12
+ #index_footer {
13
+ @include clearfix;
14
+ padding-top: 5px;
15
+ text-align: right;
16
+ font-size: 0.85em;
17
+ }
13
18
 
14
19
  .index_content { clear: both; }
@@ -12,11 +12,11 @@
12
12
  <%= stylesheet_link_tag style, **options %>
13
13
  <% end %>
14
14
  <% end %>
15
- <% ActiveAdmin.application.javascripts.each do |path| %>
15
+ <% ActiveAdmin.application.javascripts.each do |path, options| %>
16
16
  <% if ActiveAdmin.application.use_webpacker %>
17
- <%= javascript_pack_tag path %>
17
+ <%= javascript_pack_tag path, **options %>
18
18
  <% else %>
19
- <%= javascript_include_tag path %>
19
+ <%= javascript_include_tag path, **options %>
20
20
  <% end %>
21
21
  <% end %>
22
22
 
@@ -26,7 +26,8 @@
26
26
  <%= tag(:meta, name: name, content: content) %>
27
27
  <% end %>
28
28
 
29
- <%= csrf_meta_tag %>
29
+ <%= csrf_meta_tags %>
30
+ <%= csp_meta_tag %>
30
31
  </head>
31
32
  <body class="active_admin logged_out <%= controller.action_name %>">
32
33
  <div id="wrapper">
@@ -38,9 +38,9 @@ fr:
38
38
  to: "À"
39
39
  search_status:
40
40
  headline: "Statut de la recherche :"
41
- current_scope: "Etendu du filtre :"
41
+ current_scope: "Périmètre :"
42
42
  current_filters: "Filtres actuels :"
43
- no_current_filters: "Aucun filtres"
43
+ no_current_filters: "Aucun filtre"
44
44
  status_tag:
45
45
  "yes": "Oui"
46
46
  "no": "Non"
@@ -52,7 +52,7 @@ fr:
52
52
  filters: "Filtres"
53
53
  search_status: "Statut de la recherche"
54
54
  pagination:
55
- empty: "Aucun %{model} trouvé"
55
+ empty: "Aucun(e) %{model} trouvé(e)"
56
56
  one: "Affichage de <b>1</b> %{model}"
57
57
  one_page: "Affichage des <b>%{n}</b> %{model}"
58
58
  multiple: "Affichage de %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> sur un total de <b>%{total}</b>"
@@ -1,4 +1,20 @@
1
1
  vi:
2
+ activerecord:
3
+ models:
4
+ comment:
5
+ one: "Bình luận"
6
+ other: "Các bình luận"
7
+ active_admin/comment:
8
+ one: "Bình luận"
9
+ other: "Các bình luận"
10
+ attributes:
11
+ active_admin/comment:
12
+ author_type: "Loại tác giả"
13
+ body: "Nội dung"
14
+ created_at: "Đã tạo"
15
+ namespace: "Namespace"
16
+ resource_type: "Resource type"
17
+ updated_at: "Đã cập nhật"
2
18
  active_admin:
3
19
  dashboard: Bảng điều khiển
4
20
  dashboard_welcome:
@@ -21,6 +37,7 @@ vi:
21
37
  has_many_new: "Thêm mới %{model}"
22
38
  has_many_delete: "Xóa"
23
39
  has_many_remove: "Hủy bỏ"
40
+ move: "Di chuyển"
24
41
  filters:
25
42
  buttons:
26
43
  filter: "Lọc"
@@ -36,10 +53,12 @@ vi:
36
53
  lteq_datetime: "Nhỏ hơn hoặc bằng"
37
54
  from: "Từ"
38
55
  to: "Đến"
56
+ scopes:
57
+ all: "Tất cả"
39
58
  search_status:
40
59
  headline: "Danh sách tìm kiếm:"
41
60
  current_scope: "Phạm vi:"
42
- current_filters: "Bộ lộc hiện tại:"
61
+ current_filters: "Bộ lọc hiện tại:"
43
62
  no_current_filters: "Không có"
44
63
  status_tag:
45
64
  "yes": "Có"
@@ -47,7 +66,7 @@ vi:
47
66
  "unset": "Không Có"
48
67
  main_content: "Xin bổ sung %{model}#main_content để hiển thị nội dung."
49
68
  logout: "Đăng xuất"
50
- powered_by: "Powered by %{active_admin} %{version}"
69
+ powered_by: "Bản quyền bởi %{active_admin} %{version}"
51
70
  sidebars:
52
71
  filters: "Bộ Lọc"
53
72
  search_status: "Trạng thái tìm kiếm"
@@ -75,12 +94,13 @@ vi:
75
94
  one: "Đã xóa thành công 1 %{model}"
76
95
  other: "Đã xóa thành công %{count} %{plural_model}"
77
96
  selection_toggle_explanation: "(Thay đổi lựa chọn)"
78
- action_label: "%{title} được chọn"
97
+ action_label: "%{title} đã được chọn"
79
98
  labels:
80
99
  destroy: "Xóa"
81
100
  comments:
82
101
  created_at: "Đã tạo"
83
102
  resource_type: "Resource Type"
103
+ author_type: "Loại tác giả"
84
104
  body: "Nội dung"
85
105
  author: "Tác giả"
86
106
  add: "Thêm bình luận"
@@ -117,15 +137,22 @@ vi:
117
137
  title: "Thay đổi mật khẩu của bạn"
118
138
  submit: "Thay đổi mật khẩu của tôi"
119
139
  unlock:
120
- title: "Gởi lại hướng dẫn mở khoá"
121
- submit: "Gởi lại hướng dẫn mở khoá"
140
+ title: "Gửi lại hướng dẫn mở khoá"
141
+ submit: "Gửi lại hướng dẫn mở khoá"
122
142
  resend_confirmation_instructions:
123
- title: "Gởi lại hướng dẫn xác nhận"
124
- submit: "Gởi lại hướng dẫn xác nhận"
143
+ title: "Gửi lại hướng dẫn xác nhận"
144
+ submit: "Gửi lại hướng dẫn xác nhận"
125
145
  links:
146
+ sign_up: "Đăng ký"
126
147
  sign_in: "Đăng nhập"
127
148
  forgot_your_password: "Quên mật khẩu của bạn?"
128
149
  sign_in_with_omniauth_provider: "Đăng nhập với %{provider}"
150
+ resend_unlock_instructions: "Gửi lại hướng dẫn mở khoá"
151
+ resend_confirmation_instructions: "Gửi lại hướng dẫn xác nhận"
152
+ unsupported_browser:
153
+ headline: "Vui lòng lưu ý rằng ActiveAdmin không còn hỗ trợ trên Internet Explorer các phiên bản 8 và thấp hơn."
154
+ recommendation: "Chúng tôi khuyên bạn hãy vào <a href=\"http://browsehappy.com/\">nâng cấp trình duyệt của bạn </a> để cải thiện trải nghiệm của bạn."
155
+ turn_off_compatibility_view: "Nếu bạn đang sử dụng IE 9 hoặc mới hơn, hãy chắc chắn bạn <a href=\"https://support.microsoft.com/en-us/help/17471\">tắt \"Compatibility View\"</a>."
129
156
  access_denied:
130
157
  message: "Bạn không có quyền thực hiện tính năng này"
131
158
  index_list:
@@ -1,4 +1,20 @@
1
1
  "zh-CN":
2
+ activerecord:
3
+ models:
4
+ comment:
5
+ one: "评论"
6
+ other: "评论"
7
+ active_admin/comment:
8
+ one: "评论"
9
+ other: "评论"
10
+ attributes:
11
+ active_admin/comment:
12
+ author_type: "作者类型"
13
+ body: "内容"
14
+ created_at: "创建"
15
+ namespace: "Namespace"
16
+ resource_type: "Resource 类型"
17
+ updated_at: "更新"
2
18
  active_admin:
3
19
  dashboard: "控制面板"
4
20
  dashboard_welcome:
@@ -8,8 +24,8 @@
8
24
  edit: "编辑"
9
25
  delete: "删除"
10
26
  delete_confirmation: "确定删除?"
11
- create_another: "新建另一个%{model}"
12
- new_model: "新建%{model}"
27
+ create_another: "新增另一个%{model}"
28
+ new_model: "新增%{model}"
13
29
  edit_model: "编辑%{model}"
14
30
  delete_model: "删除%{model}"
15
31
  details: "%{model}详情"
@@ -17,10 +33,11 @@
17
33
  empty: "未定义"
18
34
  previous: "上一个"
19
35
  next: "下一个"
20
- download: "下载:"
21
- has_many_new: "新建一个%{model}"
36
+ download: "下载:"
37
+ has_many_new: "新增一个%{model}"
22
38
  has_many_delete: "删除"
23
39
  has_many_remove: "清除"
40
+ move: "移动"
24
41
  filters:
25
42
  buttons:
26
43
  filter: "过滤"
@@ -28,26 +45,28 @@
28
45
  predicates:
29
46
  contains: "包含"
30
47
  equals: "等于"
31
- starts_with: "开头"
32
- ends_with: "完与"
48
+ starts_with: "始于"
49
+ ends_with: "止于"
33
50
  greater_than: "大于"
34
51
  less_than: "小于"
35
52
  gteq_datetime: "大于等于"
36
53
  lteq_datetime: "小于等于"
37
54
  from: "起"
38
55
  to: "止"
56
+ scopes:
57
+ all: "所有"
39
58
  search_status:
40
59
  headline: "搜索条件:"
41
- current_scope: "搜索范围:"
60
+ current_scope: "范围:"
42
61
  current_filters: "过滤条件:"
43
62
  no_current_filters: "无"
44
63
  status_tag:
45
64
  "yes": "是"
46
65
  "no": "否"
47
66
  "unset": "否"
48
- main_content: "请执行 %{model}#main_content 来显示内容."
67
+ main_content: "请执行 %{model}#main_content 来显示内容。"
49
68
  logout: "退出"
50
- powered_by: "Powered by %{active_admin} %{version}"
69
+ powered_by: "构建程序为 %{active_admin} %{version}"
51
70
  sidebars:
52
71
  filters: "所有条件"
53
72
  search_status: "搜索条件"
@@ -63,14 +82,14 @@
63
82
  other: "条目"
64
83
  any: "任何"
65
84
  blank_slate:
66
- content: "暂时还没有%{resource_name}."
67
- link: "新建一个"
85
+ content: "暂时还没有%{resource_name}"
86
+ link: "新增一个"
68
87
  dropdown_actions:
69
- button_label: "行动"
88
+ button_label: "操作"
70
89
  batch_actions:
71
90
  button_label: "批处理"
72
- default_confirmation: "你确定你要这样做?"
73
- delete_confirmation: "你确定要删除这些%{plural_model}?"
91
+ default_confirmation: "你确定要这样做?"
92
+ delete_confirmation: "你确定要删除这些%{plural_model}"
74
93
  succesfully_destroyed:
75
94
  one: "成功删除 1 %{model}"
76
95
  other: "成功删除 %{count} %{plural_model}"
@@ -92,7 +111,7 @@
92
111
  author_missing: "匿名"
93
112
  title_content: "(%{count})条评论"
94
113
  errors:
95
- empty_text: "评论保存失败,内空不能为空."
114
+ empty_text: "评论保存失败,内空不能为空。"
96
115
  devise:
97
116
  username:
98
117
  title: "用户名"
@@ -121,8 +140,8 @@
121
140
  title: "重新发送送解锁命令"
122
141
  submit: "重新发送送解锁命令"
123
142
  resend_confirmation_instructions:
124
- title: " 重新发送确认指示"
125
- submit: " 重新发送确认指示"
143
+ title: " 重新发送确认说明"
144
+ submit: " 重新发送确认说明"
126
145
  links:
127
146
  sign_up: "注册"
128
147
  sign_in: "登录"
@@ -76,7 +76,7 @@ module ActiveAdmin
76
76
 
77
77
  namespace = namespaces[name.to_sym] ||= begin
78
78
  namespace = Namespace.new(self, name)
79
- ActiveSupport::Notifications.instrument ActiveAdmin::Namespace::RegisterEvent, namespace
79
+ ActiveSupport::Notifications.instrument ActiveAdmin::Namespace::RegisterEvent, { active_admin_namespace: namespace }
80
80
  namespace
81
81
  end
82
82
 
@@ -112,10 +112,10 @@ module ActiveAdmin
112
112
  # To reload everything simply call `ActiveAdmin.unload!`
113
113
  def load!
114
114
  unless loaded?
115
- ActiveSupport::Notifications.instrument BeforeLoadEvent, self # before_load hook
115
+ ActiveSupport::Notifications.instrument BeforeLoadEvent, { active_admin_application: self } # before_load hook
116
116
  files.each { |file| load file } # load files
117
117
  namespace(default_namespace) # init AA resources
118
- ActiveSupport::Notifications.instrument AfterLoadEvent, self # after_load hook
118
+ ActiveSupport::Notifications.instrument AfterLoadEvent, { active_admin_application: self } # after_load hook
119
119
  @@loaded = true
120
120
  end
121
121
  end
@@ -126,7 +126,7 @@ module ActiveAdmin
126
126
 
127
127
  # Returns ALL the files to be loaded
128
128
  def files
129
- load_paths.flatten.compact.uniq.flat_map { |path| Dir["#{path}/**/*.rb"] }.sort
129
+ load_paths.flatten.compact.uniq.flat_map { |path| Dir["#{path}/**/*.rb"].sort }
130
130
  end
131
131
 
132
132
  # Creates all the necessary routes for the ActiveAdmin configurations
@@ -14,12 +14,12 @@ module ActiveAdmin
14
14
  stylesheets.clear
15
15
  end
16
16
 
17
- def register_javascript(name)
18
- javascripts.add name
17
+ def register_javascript(path, options = {})
18
+ javascripts[path] = options
19
19
  end
20
20
 
21
21
  def javascripts
22
- @javascripts ||= Set.new
22
+ @javascripts ||= {}
23
23
  end
24
24
 
25
25
  def clear_javascripts!
@@ -4,7 +4,9 @@ module ActiveAdmin
4
4
  # Default Authorization permissions for Active Admin
5
5
  module Authorization
6
6
  READ = :read
7
+ NEW = :new
7
8
  CREATE = :create
9
+ EDIT = :edit
8
10
  UPDATE = :update
9
11
  DESTROY = :destroy
10
12
  end
@@ -7,9 +7,9 @@ module ActiveAdmin
7
7
  ACTIONS_DICTIONARY = {
8
8
  index: ActiveAdmin::Authorization::READ,
9
9
  show: ActiveAdmin::Authorization::READ,
10
- new: ActiveAdmin::Authorization::CREATE,
10
+ new: ActiveAdmin::Authorization::NEW,
11
11
  create: ActiveAdmin::Authorization::CREATE,
12
- edit: ActiveAdmin::Authorization::UPDATE,
12
+ edit: ActiveAdmin::Authorization::EDIT,
13
13
  update: ActiveAdmin::Authorization::UPDATE,
14
14
  destroy: ActiveAdmin::Authorization::DESTROY
15
15
  }
@@ -56,10 +56,6 @@ module ActiveAdmin
56
56
  Matcher.new name.to_s
57
57
  end
58
58
 
59
- def self.supports_zeitwerk?
60
- RUBY_ENGINE != "jruby"
61
- end
62
-
63
59
  class Matcher
64
60
  attr_reader :name
65
61
 
@@ -12,7 +12,7 @@ module ActiveAdmin
12
12
  ActiveAdmin.application.stylesheets.each do |path, _|
13
13
  app.config.assets.precompile << path
14
14
  end
15
- ActiveAdmin.application.javascripts.each do |path|
15
+ ActiveAdmin.application.javascripts.each do |path, _|
16
16
  app.config.assets.precompile << path
17
17
  end
18
18
  end
@@ -3,8 +3,8 @@ module ActiveAdmin
3
3
  module Filters
4
4
 
5
5
  class Disabled < RuntimeError
6
- def initialize
7
- super "Can't remove a filter when filters are disabled. Enable filters with 'config.filters = true'"
6
+ def initialize(action)
7
+ super "Cannot #{action} a filter when filters are disabled. Enable filters with 'config.filters = true'"
8
8
  end
9
9
  end
10
10
 
@@ -61,7 +61,7 @@ module ActiveAdmin
61
61
  #
62
62
  # @param [Symbol] attributes The attributes to not filter on
63
63
  def remove_filter(*attributes)
64
- raise Disabled unless filters_enabled?
64
+ raise Disabled, "remove" unless filters_enabled?
65
65
 
66
66
  attributes.each { |attribute| (@filters_to_remove ||= []) << attribute.to_sym }
67
67
  end
@@ -73,7 +73,7 @@ module ActiveAdmin
73
73
  # @param [Hash] options The set of options that are passed through to
74
74
  # ransack for the field definition.
75
75
  def add_filter(attribute, options = {})
76
- raise Disabled unless filters_enabled?
76
+ raise Disabled, "add" unless filters_enabled?
77
77
 
78
78
  (@filters ||= {})[attribute.to_sym] = options
79
79
  end
@@ -60,7 +60,7 @@ module ActiveAdmin
60
60
  settings.respond_to?(method) ? settings.send(method, *args) : super
61
61
  end
62
62
 
63
- # Register a resource into this namespace. The preffered method to access this is to
63
+ # Register a resource into this namespace. The preferred method to access this is to
64
64
  # use the global registration ActiveAdmin.register which delegates to the proper
65
65
  # namespace instance.
66
66
  def register(resource_class, options = {}, &block)
@@ -72,7 +72,7 @@ module ActiveAdmin
72
72
  reset_menu!
73
73
 
74
74
  # Dispatch a registration event
75
- ActiveSupport::Notifications.instrument ActiveAdmin::Resource::RegisterEvent, config
75
+ ActiveSupport::Notifications.instrument ActiveAdmin::Resource::RegisterEvent, { active_admin_resource: config }
76
76
 
77
77
  # Return the config
78
78
  config