activeadmin 1.0.0.pre2 → 1.0.0.pre3

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 (162) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +7 -4
  3. data/.travis.yml +17 -15
  4. data/CHANGELOG.md +5 -1
  5. data/CODE_OF_CONDUCT.md +22 -0
  6. data/Gemfile +26 -12
  7. data/README.md +24 -4
  8. data/activeadmin.gemspec +1 -0
  9. data/app/assets/javascripts/active_admin/base.js.coffee +1 -1
  10. data/app/assets/javascripts/active_admin/initializers/batch_actions.js.coffee +7 -0
  11. data/app/assets/javascripts/active_admin/initializers/datepicker.js.coffee +10 -0
  12. data/app/assets/javascripts/active_admin/initializers/filters.js.coffee +15 -0
  13. data/app/assets/javascripts/active_admin/initializers/tabs.js.coffee +3 -0
  14. data/app/assets/javascripts/active_admin/lib/batch_actions.js.coffee +1 -1
  15. data/app/assets/javascripts/active_admin/lib/dropdown-menu.js.coffee +1 -1
  16. data/app/assets/stylesheets/active_admin/_forms.scss +1 -1
  17. data/config/locales/ar.yml +47 -43
  18. data/config/locales/de.yml +2 -1
  19. data/config/locales/en.yml +2 -1
  20. data/config/locales/es-MX.yml +3 -3
  21. data/config/locales/es.yml +5 -4
  22. data/config/locales/fr.yml +2 -1
  23. data/config/locales/hu.yml +1 -1
  24. data/config/locales/id.yml +2 -1
  25. data/config/locales/it.yml +19 -0
  26. data/config/locales/ja.yml +2 -1
  27. data/config/locales/ko.yml +2 -1
  28. data/config/locales/nb.yml +6 -1
  29. data/config/locales/nl.yml +1 -1
  30. data/config/locales/pt-BR.yml +5 -1
  31. data/config/locales/ru.yml +4 -3
  32. data/config/locales/sv-SE.yml +3 -2
  33. data/config/locales/tr.yml +83 -44
  34. data/config/locales/uk.yml +13 -12
  35. data/config/locales/zh-CN.yml +2 -1
  36. data/config/locales/zh-TW.yml +10 -1
  37. data/cucumber.yml +1 -1
  38. data/docs/0-installation.md +24 -10
  39. data/docs/1-general-configuration.md +22 -0
  40. data/docs/12-arbre-components.md +1 -1
  41. data/docs/13-authorization-adapter.md +1 -1
  42. data/docs/14-gotchas.md +11 -3
  43. data/docs/2-resource-customization.md +16 -3
  44. data/docs/3-index-pages.md +1 -1
  45. data/docs/3-index-pages/index-as-table.md +13 -1
  46. data/docs/4-csv-format.md +19 -0
  47. data/docs/5-forms.md +14 -2
  48. data/docs/6-show-pages.md +1 -1
  49. data/features/decorators.feature +2 -0
  50. data/features/development_reloading.feature +1 -1
  51. data/features/edit_page.feature +4 -4
  52. data/features/index/batch_actions.feature +13 -0
  53. data/features/index/page_title.feature +2 -1
  54. data/features/new_page.feature +4 -4
  55. data/features/renamed_resource.feature +1 -1
  56. data/features/show/default_content.feature +1 -1
  57. data/features/show/page_title.feature +2 -1
  58. data/features/step_definitions/attribute_steps.rb +2 -2
  59. data/features/step_definitions/factory_steps.rb +2 -2
  60. data/features/step_definitions/filter_steps.rb +2 -2
  61. data/features/step_definitions/format_steps.rb +1 -1
  62. data/features/sti_resource.feature +2 -2
  63. data/features/strong_parameters.feature +3 -3
  64. data/features/support/env.rb +21 -4
  65. data/lib/active_admin/application.rb +11 -4
  66. data/lib/active_admin/authorization_adapter.rb +1 -1
  67. data/lib/active_admin/base_controller.rb +12 -2
  68. data/lib/active_admin/base_controller/authorization.rb +4 -7
  69. data/lib/active_admin/base_controller/menu.rb +5 -1
  70. data/lib/active_admin/batch_actions/controller.rb +0 -1
  71. data/lib/active_admin/batch_actions/resource_extension.rb +3 -2
  72. data/lib/active_admin/batch_actions/views/batch_action_selector.rb +1 -0
  73. data/lib/active_admin/csv_builder.rb +18 -15
  74. data/lib/active_admin/dependency.rb +74 -1
  75. data/lib/active_admin/error.rb +1 -1
  76. data/lib/active_admin/filters/active.rb +4 -3
  77. data/lib/active_admin/filters/resource_extension.rb +7 -3
  78. data/lib/active_admin/generators/boilerplate.rb +8 -0
  79. data/lib/active_admin/inputs/filters/base.rb +3 -1
  80. data/lib/active_admin/inputs/filters/base/search_method_select.rb +3 -3
  81. data/lib/active_admin/inputs/filters/date_range_input.rb +2 -2
  82. data/lib/active_admin/inputs/filters/select_input.rb +3 -2
  83. data/lib/active_admin/orm/active_record/comments.rb +13 -8
  84. data/lib/active_admin/page_controller.rb +5 -1
  85. data/lib/active_admin/reloader.rb +25 -0
  86. data/lib/active_admin/resource/menu.rb +1 -1
  87. data/lib/active_admin/resource_controller/data_access.rb +33 -20
  88. data/lib/active_admin/resource_controller/decorators.rb +2 -2
  89. data/lib/active_admin/resource_controller/streaming.rb +7 -1
  90. data/lib/active_admin/resource_dsl.rb +15 -9
  91. data/lib/active_admin/router.rb +1 -1
  92. data/lib/active_admin/scope.rb +2 -3
  93. data/lib/active_admin/version.rb +1 -1
  94. data/lib/active_admin/view_helpers/display_helper.rb +31 -0
  95. data/lib/active_admin/view_helpers/fields_for.rb +3 -2
  96. data/lib/active_admin/views/components/attributes_table.rb +5 -23
  97. data/lib/active_admin/views/components/index_list.rb +1 -1
  98. data/lib/active_admin/views/components/paginated_collection.rb +3 -3
  99. data/lib/active_admin/views/components/site_title.rb +1 -1
  100. data/lib/active_admin/views/components/table_for.rb +8 -27
  101. data/lib/active_admin/views/index_as_grid.rb +2 -2
  102. data/lib/active_admin/views/index_as_table.rb +24 -2
  103. data/lib/active_admin/views/pages/base.rb +1 -1
  104. data/lib/active_admin/views/pages/form.rb +6 -2
  105. data/lib/active_admin/views/title_bar.rb +1 -1
  106. data/lib/generators/active_admin/assets/templates/active_admin.scss +1 -1
  107. data/lib/generators/active_admin/install/install_generator.rb +1 -1
  108. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +14 -4
  109. data/lib/generators/active_admin/resource/templates/admin.rb +8 -2
  110. data/lib/ransack_ext.rb +8 -0
  111. data/script/local +15 -6
  112. data/spec/rails_helper.rb +12 -1
  113. data/spec/requests/javascript_spec.rb +15 -13
  114. data/spec/requests/stylesheets_spec.rb +1 -1
  115. data/spec/support/detect_rails_version.rb +1 -1
  116. data/spec/support/rails_template.rb +117 -104
  117. data/spec/support/rails_template_with_data.rb +5 -9
  118. data/spec/support/templates/admin/stores.rb +1 -1
  119. data/spec/unit/action_builder_spec.rb +58 -56
  120. data/spec/unit/authorization/authorization_adapter_spec.rb +5 -5
  121. data/spec/unit/authorization/index_overriding_spec.rb +2 -1
  122. data/spec/unit/auto_link_spec.rb +1 -1
  123. data/spec/unit/batch_actions/resource_spec.rb +2 -2
  124. data/spec/unit/batch_actions/settings_spec.rb +13 -13
  125. data/spec/unit/comments_spec.rb +5 -5
  126. data/spec/unit/csv_builder_spec.rb +59 -0
  127. data/spec/unit/dsl_spec.rb +1 -1
  128. data/spec/unit/filters/filter_form_builder_spec.rb +5 -4
  129. data/spec/unit/filters/resource_spec.rb +7 -0
  130. data/spec/unit/form_builder_spec.rb +4 -1
  131. data/spec/unit/generators/install_spec.rb +4 -4
  132. data/spec/unit/helpers/collection_spec.rb +4 -4
  133. data/spec/unit/menu_collection_spec.rb +3 -3
  134. data/spec/unit/namespace/register_page_spec.rb +17 -18
  135. data/spec/unit/namespace/register_resource_spec.rb +20 -21
  136. data/spec/unit/namespace_spec.rb +4 -4
  137. data/spec/unit/pundit_adapter_spec.rb +3 -3
  138. data/spec/unit/resource/action_items_spec.rb +1 -1
  139. data/spec/unit/resource/naming_spec.rb +1 -1
  140. data/spec/unit/resource/routes_spec.rb +6 -2
  141. data/spec/unit/resource/scopes_spec.rb +2 -2
  142. data/spec/unit/resource_controller/decorators_spec.rb +11 -0
  143. data/spec/unit/resource_controller/sidebars_spec.rb +17 -24
  144. data/spec/unit/resource_spec.rb +14 -12
  145. data/spec/unit/routing_spec.rb +19 -14
  146. data/spec/unit/scope_spec.rb +28 -33
  147. data/spec/unit/view_helpers/display_helper_spec.rb +165 -0
  148. data/spec/unit/view_helpers/download_format_links_helper_spec.rb +9 -9
  149. data/spec/unit/views/components/attributes_table_spec.rb +1 -1
  150. data/spec/unit/views/components/blank_slate_spec.rb +3 -3
  151. data/spec/unit/views/components/index_table_for_spec.rb +82 -1
  152. data/spec/unit/views/components/paginated_collection_spec.rb +0 -1
  153. data/spec/unit/views/components/table_for_spec.rb +13 -8
  154. data/spec/unit/views/components/unsupported_browser_spec.rb +2 -8
  155. data/spec/unit/views/index_as_blog_spec.rb +76 -0
  156. data/spec/unit/views/pages/form_spec.rb +9 -0
  157. data/tasks/test.rake +13 -5
  158. metadata +27 -10
  159. data/app/assets/javascripts/active_admin/application.js.coffee +0 -37
  160. data/spec/support/templates/cucumber.rb +0 -24
  161. data/spec/support/templates/cucumber_with_reloading.rb +0 -5
  162. data/spec/unit/view_helpers/display_name_spec.rb +0 -71
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8295f521abf01b20046fd0ab3a2d2a607228861
4
- data.tar.gz: fe52b902b0f23d798aebe7b2b10fef1f9618f0b4
3
+ metadata.gz: 1d9ab87025d4a0870a9b2d1c6676c53605366a48
4
+ data.tar.gz: ef002d06e21e9cfb5b52b416714b5fbb6abb40f6
5
5
  SHA512:
6
- metadata.gz: 8ef13bb91c4254719eb93a7be555c640f83f5ad9708efd767d90752cd48e6e38516f899d2cdc999f855b32771abf0d32b01e6795ccd81b5df1e99566aedb56e5
7
- data.tar.gz: c5259a3c9bac3012f5d0817ff70b08dd76e19379020bd34aad367851f03017f57e07970d826537433e98aa0d52f0652f8a3d794d28e341cddbedca68259326ec
6
+ metadata.gz: fdbef7b94c6fa4c27c8c2bf67d9700a0f0a870c6814e6ea7b272543308a4417aac0a5a9ccf28878ef4de103eb23e02d1268203bcc3e2793c930ce56a46dbf87d
7
+ data.tar.gz: 390d198a515ae3c70d0d279f5203a6bdfbcdb325335813aad9fc19ab9a76d9daf745b0cf159ea40464609e03e6cad864b8f007dcec2bf406b3f8f6b22be8c5b1
data/.hound.yml CHANGED
@@ -1,11 +1,14 @@
1
1
  ruby:
2
- enabled: true
2
+ enabled: false
3
3
 
4
4
  coffee_script:
5
- enabled: true
5
+ enabled: false
6
6
 
7
7
  java_script:
8
- enabled: true
8
+ enabled: false
9
9
 
10
10
  scss:
11
- enabled: true
11
+ enabled: false
12
+
13
+ Metrics/LineLength:
14
+ Max: 110
@@ -12,31 +12,33 @@ script:
12
12
  - bundle exec rake test_with_coveralls
13
13
  rvm:
14
14
  - 1.9
15
- - 2.1
16
- - 2.2
17
- - jruby-9.0.0.0
15
+ - 2.3.0
16
+ - jruby-9.0.5.0
18
17
  env:
19
18
  matrix:
20
- - "RAILS=3.2.22"
21
- - "RAILS=4.1.11"
22
- - "RAILS=4.2.2"
19
+ - RAILS=3.2.22
20
+ - RAILS=4.2.5
21
+ - RAILS="> 5.x"
23
22
  global:
24
23
  - JRUBY_OPTS="-J-Xmx1024m --debug"
25
24
  matrix:
26
25
  fast_finish: true
27
26
  exclude:
28
- - rvm: 2.2
29
- env: "RAILS=3.2.22"
30
- - rvm: jruby-9.0.0.0
31
- env: "RAILS=3.2.22"
32
- - rvm: 2.1
33
- env: "RAILS=4.1.11"
34
- - rvm: 2.1
35
- env: "RAILS=4.2.2"
27
+ - rvm: 1.9
28
+ env: RAILS="> 5.x"
29
+ allow_failures:
30
+ - rvm: 2.3.0
31
+ env: RAILS="> 5.x"
32
+ - rvm: jruby-9.0.5.0
33
+ env: RAILS="> 5.x"
34
+ branches:
35
+ only:
36
+ - master
37
+ - /\A\d-\d-stable\z/
36
38
  notifications:
37
39
  irc:
38
40
  channels:
39
- - "irc.freenode.org#activeadmin"
41
+ - irc.freenode.org#activeadmin
40
42
  on_success: change
41
43
  on_failure: always
42
44
  skip_join: true
@@ -6,7 +6,8 @@
6
6
  * Rename `allow_comments` to `comments` for more consistent naming [#3695][] by [@pranas][]
7
7
  * JavaScript `window.AA` has been removed, use `window.ActiveAdmin` [#3606][] by [@timoschilling][]
8
8
  * `f.form_buffers` has been removed [#3486][] by [@varyonic][]
9
- * iconic has been removed [#3553][] by [@timoschilling][]
9
+ * Iconic has been removed [#3553][] by [@timoschilling][]
10
+ * `config.show_comments_in_menu` has been removed [#4187][] by [@drn][]
10
11
 
11
12
  ### Enhancements
12
13
 
@@ -18,6 +19,8 @@
18
19
 
19
20
  #### Minor
20
21
 
22
+ * Stream CSV downloads as they're generated [#3038][] by [@craigmcnamara][]
23
+ * Disable streaming in development for easier debugging [#3535][] by [@seanlinsley][]
21
24
  * Improved code reloading [#3783][] by [@chancancode][]
22
25
  * Do not auto link to inaccessible actions [#3686][] by [@pranas][]
23
26
  * Allow to enable comments on per-resource basis [#3695][] by [@pranas][]
@@ -43,6 +46,7 @@
43
46
  ```ruby
44
47
  index download_links: ->{ can?(:view_all_download_links) || [:pdf] }
45
48
  ```
49
+ * Comments menu can be customized via configuration passed to `config.comments_menu` [#4187][] by [@drn][]
46
50
 
47
51
  ### Security Fixes
48
52
 
@@ -0,0 +1,22 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6
+
7
+ Examples of unacceptable behavior by participants include:
8
+
9
+ * The use of sexualized language or imagery
10
+ * Personal attacks
11
+ * Trolling or insulting/derogatory comments
12
+ * Public or private harassment
13
+ * Publishing other's private information, such as physical or electronic addresses, without explicit permission
14
+ * Other unethical or unprofessional conduct.
15
+
16
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17
+
18
+ This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
19
+
20
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
21
+
22
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
data/Gemfile CHANGED
@@ -7,15 +7,28 @@ require File.expand_path 'spec/support/detect_rails_version', File.dirname(__FIL
7
7
  rails_version = detect_rails_version
8
8
  gem 'rails', rails_version
9
9
 
10
- jquery_ui_rails_version = rails_version > "4" ? "~> 5.0" : "~> 4.0"
11
- gem 'jquery-ui-rails', jquery_ui_rails_version
10
+ gem 'jquery-ui-rails', rails_version[0] == '3' ? '~> 4.0' : '~> 5.0'
12
11
 
13
- gem 'execjs', '~> 2.4.0' # ~> 2.5.0 works only for Ruby > 2.0
12
+ gem 'test-unit', '~> 3.0' if rails_version[0] == '3'
13
+
14
+ if rails_version == '> 5.x'
15
+ # Note: when updating this list, be sure to also update the README
16
+ gem 'ransack', github: 'activerecord-hackery/ransack'
17
+ gem 'kaminari', github: 'amatsuda/kaminari', branch: '0-17-stable'
18
+ gem 'draper', github: 'audionerd/draper', branch: 'rails5', ref: 'e816e0e587'
19
+ gem 'formtastic', github: 'justinfrench/formtastic'
20
+ gem 'activemodel-serializers-xml', github: 'rails/activemodel-serializers-xml' # drapergem/draper#697
21
+ gem 'rack-mini-profiler', github: 'MiniProfiler/rack-mini-profiler'
22
+ gem 'database_cleaner', github: 'DatabaseCleaner/database_cleaner'
23
+ gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', platforms: :jruby
24
+ end
25
+
26
+ gem 'mime-types', '< 3' # Remove this line when we drop support for Ruby 1.9
14
27
 
15
28
  # Optional dependencies
16
29
  gem 'cancan'
17
- gem 'devise'
18
- gem 'draper'
30
+ gem 'devise', rails_version == '> 5.x' ? '> 4.x' : '~> 3.5'
31
+ gem 'draper' if rails_version != '> 5.x'
19
32
  gem 'pundit'
20
33
 
21
34
  # Utility gems used in both development & test environments
@@ -31,7 +44,7 @@ group :development do
31
44
  gem 'binding_of_caller', platforms: :mri # Retrieve the binding of a method's caller in MRI Ruby >= 1.9.2
32
45
 
33
46
  # Performance
34
- gem 'rack-mini-profiler' # Inline app profiler. See ?pp=help for options.
47
+ gem 'rack-mini-profiler' if rails_version != '> 5.x' # Inline app profiler. See ?pp=help for options.
35
48
  gem 'flamegraph', platforms: :mri # Flamegraph visualiztion: ?pp=flamegraph
36
49
 
37
50
  # Documentation
@@ -45,17 +58,18 @@ group :test do
45
58
  gem 'simplecov', require: false # Test coverage generator. Go to /coverage/ after running tests
46
59
  gem 'coveralls', require: false # Test coverage website. Go to https://coveralls.io
47
60
  gem 'cucumber-rails', require: false
48
- gem 'database_cleaner'
49
- gem 'guard-rspec'
61
+ gem 'cucumber', '1.3.20'
62
+ gem 'database_cleaner' if rails_version != '> 5.x'
63
+ gem 'guard-rspec', require: false
64
+ gem 'listen', '~> 2.7', platforms: :ruby_19
50
65
  gem 'jasmine'
51
66
  gem 'jslint_on_rails'
52
67
  gem 'launchy'
53
68
  gem 'rails-i18n' # Provides default i18n for many languages
54
- gem 'rspec'
55
- gem 'rspec-rails', '~> 3.1.0'
69
+ gem 'rspec-rails', '>= 3.5.0.beta1'
56
70
  gem 'i18n-spec'
57
- gem 'shoulda-matchers'
71
+ gem 'shoulda-matchers', '<= 2.8.0'
58
72
  gem 'sqlite3', platforms: :mri
59
- gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
73
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby if rails_version != '> 5.x'
60
74
  gem 'poltergeist'
61
75
  end
data/README.md CHANGED
@@ -6,16 +6,14 @@ Active Admin is a Ruby on Rails framework for creating elegant backends for webs
6
6
  [![Travis CI ](http://img.shields.io/travis/activeadmin/activeadmin/master.svg) ](https://travis-ci.org/activeadmin/activeadmin)
7
7
  [![Quality ](http://img.shields.io/codeclimate/github/activeadmin/activeadmin.svg) ](https://codeclimate.com/github/activeadmin/activeadmin)
8
8
  [![Coverage ](http://img.shields.io/coveralls/activeadmin/activeadmin.svg) ](https://coveralls.io/r/activeadmin/activeadmin)
9
- [![Gittip ](http://img.shields.io/gittip/activeadmin.svg) ](https://gittip.com/activeadmin)
10
9
  [![Inch CI ](http://inch-ci.org/github/activeadmin/activeadmin.svg?branch=master) ](http://inch-ci.org/github/activeadmin/activeadmin)
11
- [![Stories in Ready](http://badge.waffle.io/activeadmin/activeadmin.png?label=ready&title=ready)](https://waffle.io/activeadmin/activeadmin)
12
10
 
13
11
  ## State of the project
14
12
 
15
13
  ### 1.0.0
16
14
 
17
15
  We're [currently working on 1.0.0](https://github.com/activeadmin/activeadmin/issues?milestone=18),
18
- which as far as dependencies, moves us from meta_search to Ransack and adds Rails 4 support.
16
+ which as far as dependencies, moves us from meta_search to Ransack and adds Rails 4 & 5 support.
19
17
 
20
18
  You can get it by tracking master:
21
19
  ```ruby
@@ -24,11 +22,33 @@ gem 'activeadmin', github: 'activeadmin'
24
22
 
25
23
  Or you can using rubygems:
26
24
  ```ruby
27
- gem 'activeadmin', '~> 1.0.0.pre1'
25
+ gem 'activeadmin', '~> 1.0.0.pre2'
28
26
  ```
29
27
 
30
28
  *Keep in mind that during the time where we use `pre`-release label, things can break in each release!*
31
29
 
30
+ ### Rails 5
31
+
32
+ Active Admin master has preliminary support for Rails 5. To give it a try, these Gemfile changes may be needed:
33
+
34
+ ```ruby
35
+ gem 'devise', '> 4.x'
36
+ gem 'rspec-rails', '>= 3.5.0.beta1'
37
+ gem 'ransack', github: 'activerecord-hackery/ransack'
38
+ gem 'kaminari', github: 'amatsuda/kaminari', branch: '0-17-stable'
39
+ gem 'formtastic', github: 'justinfrench/formtastic'
40
+ gem 'draper', github: 'audionerd/draper', branch: 'rails5', ref: 'e816e0e587'
41
+ # To fix a Draper deprecation error
42
+ gem 'activemodel-serializers-xml', github: 'rails/activemodel-serializers-xml'
43
+ # Optional -- only if you already include these gems
44
+ gem 'rack-mini-profiler', github: 'MiniProfiler/rack-mini-profiler'
45
+ gem 'database_cleaner', github: 'pschambacher/database_cleaner', branch: 'rails5.0', ref: '8dd9fa4'
46
+ # Only for JRuby:
47
+ gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', platforms: :jruby
48
+ ```
49
+
50
+ If something isn't working for you please report it on [#4177](https://github.com/activeadmin/activeadmin/issues/4177).
51
+
32
52
  ### 0.6.x
33
53
 
34
54
  The plan is to follow [semantic versioning](http://semver.org/) as of 1.0.0. The 0.6.x line will
@@ -27,4 +27,5 @@ Gem::Specification.new do |s|
27
27
  s.add_dependency 'rails', '>= 3.2', '< 5.0'
28
28
  s.add_dependency 'ransack', '~> 1.3'
29
29
  s.add_dependency 'sass-rails'
30
+ s.add_dependency 'sprockets', '< 4'
30
31
  end
@@ -4,6 +4,6 @@
4
4
  #= require_self
5
5
  #= require_tree ./lib
6
6
  #= require_tree ./ext
7
- #= require ./application
7
+ #= require_tree ./initializers
8
8
 
9
9
  window.ActiveAdmin = {}
@@ -0,0 +1,7 @@
1
+ $(document).on 'ready page:load turbolinks:load', ->
2
+ # In order for index scopes to overflow properly onto the next line, we have
3
+ # to manually set its width based on the width of the batch action button.
4
+ if (batch_actions_selector = $('.table_tools .batch_actions_selector')).length
5
+ batch_actions_selector.next().css
6
+ width: "calc(100% - 10px - #{batch_actions_selector.outerWidth()}px)"
7
+ 'float': 'right'
@@ -0,0 +1,10 @@
1
+ $(document).on 'ready page:load turbolinks:load', ->
2
+ $(document).on 'focus', 'input.datepicker:not(.hasDatepicker)', ->
3
+ input = $(@)
4
+
5
+ # Only create datepickers in compatible browsers
6
+ return if input[0].type is 'date'
7
+
8
+ defaults = dateFormat: 'yy-mm-dd'
9
+ options = input.data 'datepicker-options'
10
+ input.datepicker $.extend(defaults, options)
@@ -0,0 +1,15 @@
1
+ $(document).on 'ready page:load turbolinks:load', ->
2
+ # Clear Filters button
3
+ $('.clear_filters_btn').click ->
4
+ params = window.location.search.slice(1).split('&')
5
+ regex = /^(q\[|q%5B|q%5b|page|commit)/
6
+ window.location.search = (param for param in params when not param.match(regex)).join('&')
7
+
8
+ # Filter form: don't send any inputs that are empty
9
+ $('.filter_form').submit ->
10
+ $(@).find(':input').filter(-> @value is '').prop 'disabled', true
11
+
12
+ # Filter form: for filters that let you choose the query method from
13
+ # a dropdown, apply that choice to the filter input field.
14
+ $('.filter_form_field.select_and_search select').change ->
15
+ $(@).siblings('input').prop name: "q[#{@value}]"
@@ -0,0 +1,3 @@
1
+ $(document).on 'ready page:load turbolinks:load', ->
2
+ # Tab navigation
3
+ $('#active_admin_content .tabs').tabs()
@@ -1,4 +1,4 @@
1
- $(document).on 'ready page:load', ->
1
+ $(document).on 'ready page:load turbolinks:load', ->
2
2
 
3
3
  #
4
4
  # Use ActiveAdmin.modal_dialog to prompt user if confirmation is required for current Batch Action
@@ -97,5 +97,5 @@ class ActiveAdmin.DropdownMenu
97
97
 
98
98
  $.widget.bridge 'aaDropdownMenu', ActiveAdmin.DropdownMenu
99
99
 
100
- $(document).on 'ready page:load', ->
100
+ $(document).on 'ready page:load turbolinks:load', ->
101
101
  $('.dropdown_menu').aaDropdownMenu()
@@ -180,7 +180,7 @@ form {
180
180
 
181
181
  /* Boolean Field */
182
182
  &.boolean {
183
- height: 1.1em;
183
+ min-height: 1.1em;
184
184
  label {
185
185
  width: 80%;
186
186
  padding-left:20%;
@@ -1,9 +1,9 @@
1
1
  ar:
2
2
  active_admin:
3
- dashboard: لوحة تحكم
3
+ dashboard: "لوحة تحكم"
4
4
  dashboard_welcome:
5
- welcome: ".مرحبا بك في الادارة. لوحة التحكم الرئيسية "
6
- call_to_action: "'app/admin/dashboard.rb' لاضافة وحدة الي لوحة التحكم, اتبع "
5
+ welcome: "مرحبًا بك في في صفحة الإدارة، وهذه هي الصفحة الإفتراضيّة."
6
+ call_to_action: "لإضافة أقسام إلى لوحة التحكم, راجع: 'app/admin/dashboard.rb'"
7
7
  view: "عرض"
8
8
  edit: "تعديل"
9
9
  delete: "حذف"
@@ -11,34 +11,35 @@ ar:
11
11
  new_model: "جديد %{model}"
12
12
  edit_model: "تعديل %{model}"
13
13
  delete_model: "حذف %{model}"
14
- details: "%{model} التفاصيل"
14
+ details: "تفاصيل %{model}"
15
15
  cancel: "إلغاء"
16
16
  empty: "فارغ"
17
17
  previous: "السابق"
18
18
  next: "التالي"
19
19
  download: "تحميل"
20
- has_many_new: "اضافة جديد %{model}"
20
+ has_many_new: "إضافة %{model} جديد"
21
21
  has_many_delete: "حذف"
22
- has_many_remove: "ازالة"
22
+ has_many_remove: "إزالة"
23
23
  filters:
24
24
  buttons:
25
- filter: "تصنيف"
26
- clear: "تفريغ"
25
+ filter: "تصفية"
26
+ clear: "تفريغ التصفية"
27
27
  predicates:
28
28
  contains: "يحتوي"
29
29
  equals: "متساوي"
30
- starts_with: "يبدأ ب"
31
- ends_with: "ينتهي ب"
32
- greater_than: "اكثر من"
33
- less_than: "اقل من"
30
+ starts_with: "يبدأ بـ"
31
+ ends_with: "ينتهي بـ"
32
+ greater_than: "أكبر من"
33
+ less_than: "أقل من"
34
34
  search_status:
35
- headline: "المجال:"
35
+ headline: "حالات البحث:"
36
+ current_scope: "المجال:"
36
37
  current_filters: "المُرشحات الحاليّة:"
37
38
  no_current_filters: "بدون"
38
39
  status_tag:
39
- "yes": "نعم"
40
- "no": "لا"
41
- main_content: "الرجاء التنفيذ %{model}#main_content لعرض المحتويات."
40
+ 'yes': "نعم"
41
+ 'no': "لا"
42
+ main_content: "الرجاء تنفيذ %{model}#main_content لعرض المحتوى."
42
43
  logout: "تسجيل الخروج"
43
44
  powered_by: "تنفيذ %{active_admin} %{version}"
44
45
  sidebars:
@@ -48,49 +49,52 @@ ar:
48
49
  empty: "لا يوجد %{model} "
49
50
  one: "عرض <b>1</b> %{model}"
50
51
  one_page: "عرض <b>all %{n}</b> %{model}"
51
- multiple: "عرض %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> of <b>%{total}</b> in total"
52
+ multiple: "عرض %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> من <b>%{total}</b> بالمجمل"
52
53
  multiple_without_total: "عرض %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
53
54
  entry:
54
55
  one: "مدخل"
55
56
  other: "مدخلات"
56
57
  any: "أي"
57
58
  blank_slate:
58
- content: "لايوجد %{resource_name} بعد."
59
- link: "أنشاء"
59
+ content: "لايوجد %{resource_name} بعد."
60
+ link: "إنشاء"
60
61
  dropdown_actions:
61
- button_label: "عمليات"
62
+ button_label: "إجراءات"
62
63
  batch_actions:
63
- button_label: "Batch Actions"
64
- default_confirmation: "هل انت متأكد من هذا"
65
- delete_confirmation: " هل انت متأكد من حذف هذا%{plural_model}?"
64
+ button_label: "إجراءات متعددة"
65
+ default_confirmation: "هل أنت متأكّد؟"
66
+ delete_confirmation: "هل أنت متأكّد من حذف هذه %{plural_model}؟"
66
67
  succesfully_destroyed:
67
- one: "دمرت بنجاح 1 %{model}"
68
- other: "دمرت بنجاح %{count} %{plural_model}"
68
+ one: "حُذف بنجاح 1 %{model}"
69
+ other: "حُذف بنجاح %{count} %{plural_model}"
69
70
  selection_toggle_explanation: "(تتبيث الخيار)"
70
71
  link: "إنشاء"
71
- action_label: "%{title} مختار"
72
+ action_label: "اُختير %{title}"
72
73
  labels:
73
74
  destroy: "حذف"
74
75
  comments:
75
- resource_type: "نوع المصادر"
76
- author_type: "نوع الؤلف"
76
+ resource_type: "نوع المصدر"
77
+ author_type: "نوع الؤلّف"
77
78
  body: "هيكل"
78
- author: "مؤلف"
79
+ author: "مؤلّف"
79
80
  title: "تعليق"
80
81
  add: "إضافة تعليق"
81
- resource: "مصادر"
82
- no_comments_yet: "لا يوجد تعليقات بعد"
82
+ resource: "مصدر"
83
+ no_comments_yet: "لا يوجد تعليقات بعد."
83
84
  author_missing: "مجهول"
84
85
  title_content: "تعليقات (%{count})"
85
86
  errors:
86
- empty_text: "لم يتم إضافة تعليق، النص فارغ"
87
+ empty_text: "لم يُحفظ التعليق، النص فارغ."
88
+ created_at: "أُنشئ"
89
+ delete: "حذف تعليق"
90
+ delete_confirmation: "هل أنت متأكّد من حذف هذه التعليقات؟"
87
91
  devise:
88
92
  username:
89
93
  title: "اسم المستخدم"
90
94
  email:
91
95
  title: "البريد الإلكترونيّ"
92
96
  subdomain:
93
- title: "فرعي"
97
+ title: "مجال فرعي"
94
98
  password:
95
99
  title: "كلمة المرور"
96
100
  sign_up:
@@ -104,27 +108,27 @@ ar:
104
108
  title: "هل نسيت كلمة المرور؟"
105
109
  submit: "استرجاع كلمة المرور"
106
110
  change_password:
107
- title: "تغير كلمة المرور"
108
- submit: "تغير كلمة المرور"
111
+ title: "تغير كلمة المرور خاصتك"
112
+ submit: "تغير كلمة المرور خاصتي"
109
113
  unlock:
110
- title: "إعادة ارسال التعليمات المحررة"
111
- submit: "إعادة ارسال التعليمات المحررة"
114
+ title: "إعادة إرسال تعليمات فك الحظر"
115
+ submit: "إعادة إرسال تعليمات فك الحظر"
112
116
  resend_confirmation_instructions:
113
- title: ""
117
+ title: "إعادة ارسال تعليمات التأكيد"
114
118
  submit: "إعادة ارسال تعليمات التأكيد"
115
119
  links:
116
120
  sign_up: "التسجيل"
117
121
  sign_in: "دخول"
118
122
  forgot_your_password: "هل نسيت كلمة المرور؟"
119
- sign_in_with_omniauth_provider: "تسجيل الدخول ب %{provider}"
123
+ sign_in_with_omniauth_provider: "تسجيل الدخول بـ %{provider}"
120
124
  resend_unlock_instructions: "إعادة إرسال تعليمات تنشيط الحساب"
121
125
  resend_confirmation_instructions: "إعادة إرسال تعليمات تأكيد الحساب"
122
126
  unsupported_browser:
123
- headline: "يُرجى مُلاحظة أن أكتف أدمن لم تعد تدعم المُتصفّح إنترنت اكسبلورر الإصدار الثامن وما قبله"
124
- recommendation: "ننصح بالتحديث إلى الإصدار الأخير <a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, أو <a href=\"https://mozilla.org/firefox/\">Firefox</a>."
125
- turn_off_compatibility_view: "إن كنت تستخدم الإصدار التاسع من إنترنت إكسبلورر فتأكّد من أن <a href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\">turn off \"Compatibility View\"</a>."
127
+ headline: "يُرجى مُلاحظة أن (أكتف أدمن) لم تعد تدعم المُتصفّح إنترنت اكسبلوررالإصدار الثامن وما قبله"
128
+ recommendation: "ننصح بالتحديث إلى الإصدارات الأخيرة من: <a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, أو <a href=\"https://mozilla.org/firefox/\">Firefox</a>."
129
+ turn_off_compatibility_view: "إن كنت تستخدم الإصدار التاسع وما يليه من إنترنت إكسبلورر تأكّد من <a href=\"http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer\">تعطيل \"Compatibility View\"</a>."
126
130
  access_denied:
127
- message: "غير مصرح لك"
131
+ message: "لم يُصرّح لك بهذا الإجراء."
128
132
  index_list:
129
133
  table: "جدول"
130
134
  block: "قائمة"