activeadmin 0.5.1 → 0.6.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 (196) hide show
  1. data/.travis.yml +8 -5
  2. data/CHANGELOG.md +151 -0
  3. data/Gemfile +16 -16
  4. data/LICENSE +1 -1
  5. data/activeadmin.gemspec +1 -0
  6. data/app/assets/images/active_admin/index_list_icons/block_icon.svg +10 -0
  7. data/app/assets/images/active_admin/index_list_icons/blog_icon.svg +4 -0
  8. data/app/assets/images/active_admin/index_list_icons/grid_icon.svg +13 -0
  9. data/app/assets/images/active_admin/index_list_icons/table_icon.svg +3 -0
  10. data/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee +17 -44
  11. data/app/assets/javascripts/active_admin/components/jquery.aa.dropdown-menu.js.coffee +2 -4
  12. data/app/assets/javascripts/active_admin/components/jquery.aa.popover.js.coffee +0 -3
  13. data/app/assets/javascripts/active_admin/components/jquery.aa.table-checkbox-toggler.js.coffee +10 -12
  14. data/app/assets/javascripts/active_admin/pages/application.js.coffee +13 -10
  15. data/app/assets/javascripts/active_admin/pages/batch_actions.js.coffee +3 -3
  16. data/app/assets/stylesheets/active_admin/_base.css.scss +1 -0
  17. data/app/assets/stylesheets/active_admin/_header.css.scss +5 -2
  18. data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +2 -2
  19. data/app/assets/stylesheets/active_admin/components/_index_list.scss +12 -0
  20. data/app/assets/stylesheets/active_admin/components/_popovers.css.scss +2 -2
  21. data/app/assets/stylesheets/active_admin/components/_table_tools.css.scss +2 -2
  22. data/app/assets/stylesheets/active_admin/mixins/_buttons.css.scss +4 -4
  23. data/app/assets/stylesheets/active_admin/mixins/_gradients.css.scss +5 -4
  24. data/app/assets/stylesheets/active_admin/mixins/_sections.css.scss +1 -1
  25. data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +1 -1
  26. data/app/assets/stylesheets/active_admin/print.css.scss +2 -2
  27. data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +1 -1
  28. data/app/views/active_admin/devise/unlocks/new.html.erb +14 -12
  29. data/docs/1-general-configuration.md +13 -0
  30. data/docs/10-custom-pages.md +40 -28
  31. data/docs/11-decorators.md +6 -4
  32. data/docs/12-arbre-components.md +1 -1
  33. data/docs/13-authorization-adapter.md +206 -0
  34. data/docs/2-resource-customization.md +129 -14
  35. data/docs/3-index-pages.md +65 -0
  36. data/docs/3-index-pages/create-an-index.md +29 -0
  37. data/docs/3-index-pages/index-as-table.md +35 -11
  38. data/docs/5-forms.md +2 -2
  39. data/features/authorization.feature +64 -0
  40. data/features/authorization_cancan.feature +52 -0
  41. data/features/belongs_to.feature +41 -5
  42. data/features/index/batch_actions.feature +27 -3
  43. data/features/index/formats.feature +27 -0
  44. data/features/index/index_as_table.feature +74 -2
  45. data/features/index/index_parameters.feature +69 -0
  46. data/features/index/index_scopes.feature +7 -11
  47. data/features/index/page_title.feature +18 -0
  48. data/features/index/switch_index_view.feature +73 -0
  49. data/features/menu.feature +27 -0
  50. data/features/registering_pages.feature +21 -0
  51. data/features/step_definitions/additional_web_steps.rb +4 -0
  52. data/features/step_definitions/batch_action_steps.rb +16 -6
  53. data/features/step_definitions/index_scope_steps.rb +3 -3
  54. data/features/step_definitions/index_views_steps.rb +3 -0
  55. data/features/step_definitions/menu_steps.rb +4 -0
  56. data/features/support/env.rb +4 -0
  57. data/features/support/paths.rb +3 -0
  58. data/lib/active_admin.rb +4 -0
  59. data/lib/active_admin/application.rb +43 -76
  60. data/lib/active_admin/authorization_adapter.rb +128 -0
  61. data/lib/active_admin/base_controller.rb +18 -1
  62. data/lib/active_admin/base_controller/authorization.rb +153 -0
  63. data/lib/active_admin/base_controller/menu.rb +8 -3
  64. data/lib/active_admin/batch_actions/resource_extension.rb +8 -7
  65. data/lib/active_admin/batch_actions/views/batch_action_form.rb +1 -1
  66. data/lib/active_admin/cancan_adapter.rb +40 -0
  67. data/lib/active_admin/dashboards.rb +4 -5
  68. data/lib/active_admin/dashboards/dashboard_controller.rb +1 -1
  69. data/lib/active_admin/devise.rb +22 -7
  70. data/lib/active_admin/dsl.rb +18 -5
  71. data/lib/active_admin/engine.rb +1 -1
  72. data/lib/active_admin/filters/dsl.rb +1 -1
  73. data/lib/active_admin/filters/forms.rb +9 -7
  74. data/lib/active_admin/filters/resource_extension.rb +20 -15
  75. data/lib/active_admin/form_builder.rb +44 -49
  76. data/lib/active_admin/helpers/optional_display.rb +4 -8
  77. data/lib/active_admin/inputs/filter_boolean_input.rb +1 -1
  78. data/lib/active_admin/inputs/filter_string_input.rb +5 -1
  79. data/lib/active_admin/locales/bg.yml +1 -1
  80. data/lib/active_admin/locales/ca.yml +1 -1
  81. data/lib/active_admin/locales/cs.yml +26 -25
  82. data/lib/active_admin/locales/da.yml +1 -1
  83. data/lib/active_admin/locales/de.yml +1 -1
  84. data/lib/active_admin/locales/en.yml +11 -1
  85. data/lib/active_admin/locales/es.yml +16 -16
  86. data/lib/active_admin/locales/fr.yml +1 -1
  87. data/lib/active_admin/locales/he.yml +1 -1
  88. data/lib/active_admin/locales/hr.yml +1 -1
  89. data/lib/active_admin/locales/hu.yml +1 -1
  90. data/lib/active_admin/locales/it.yml +1 -1
  91. data/lib/active_admin/locales/ja.yml +4 -1
  92. data/lib/active_admin/locales/ko.yml +1 -1
  93. data/lib/active_admin/locales/lt.yml +1 -1
  94. data/lib/active_admin/locales/lv.yml +12 -1
  95. data/lib/active_admin/locales/nl.yml +2 -2
  96. data/lib/active_admin/locales/no-NB.yml +22 -1
  97. data/lib/active_admin/locales/pl.yml +1 -1
  98. data/lib/active_admin/locales/pt-BR.yml +1 -1
  99. data/lib/active_admin/locales/pt-PT.yml +81 -0
  100. data/lib/active_admin/locales/ro.yml +1 -1
  101. data/lib/active_admin/locales/ru.yml +1 -1
  102. data/lib/active_admin/locales/sv-SE.yml +1 -1
  103. data/lib/active_admin/locales/tr.yml +1 -1
  104. data/lib/active_admin/locales/vi.yml +1 -1
  105. data/lib/active_admin/locales/zh-CN.yml +1 -1
  106. data/lib/active_admin/locales/zh-TW.yml +1 -1
  107. data/lib/active_admin/menu.rb +76 -38
  108. data/lib/active_admin/menu_collection.rb +96 -0
  109. data/lib/active_admin/menu_item.rb +61 -71
  110. data/lib/active_admin/namespace.rb +67 -5
  111. data/lib/active_admin/page.rb +6 -0
  112. data/lib/active_admin/page_controller.rb +13 -3
  113. data/lib/active_admin/resource.rb +11 -20
  114. data/lib/active_admin/resource/action_items.rb +3 -3
  115. data/lib/active_admin/resource/controllers.rb +0 -17
  116. data/lib/active_admin/resource/menu.rb +52 -24
  117. data/lib/active_admin/resource/naming.rb +6 -10
  118. data/lib/active_admin/resource/page_presenters.rb +57 -3
  119. data/lib/active_admin/resource/routes.rb +46 -0
  120. data/lib/active_admin/resource_controller.rb +2 -17
  121. data/lib/active_admin/resource_controller/data_access.rb +299 -0
  122. data/lib/active_admin/resource_controller/decorators.rb +2 -1
  123. data/lib/active_admin/resource_dsl.rb +12 -14
  124. data/lib/active_admin/router.rb +61 -56
  125. data/lib/active_admin/scope.rb +28 -18
  126. data/lib/active_admin/version.rb +1 -1
  127. data/lib/active_admin/view_factory.rb +0 -1
  128. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +13 -19
  129. data/lib/active_admin/view_helpers/fields_for.rb +2 -0
  130. data/lib/active_admin/view_helpers/form_helper.rb +1 -1
  131. data/lib/active_admin/view_helpers/method_or_proc_helper.rb +66 -11
  132. data/lib/active_admin/views/components/attributes_table.rb +7 -4
  133. data/lib/active_admin/views/components/index_list.rb +68 -0
  134. data/lib/active_admin/views/components/paginated_collection.rb +13 -9
  135. data/lib/active_admin/views/components/scopes.rb +2 -8
  136. data/lib/active_admin/views/components/table_for.rb +1 -1
  137. data/lib/active_admin/views/footer.rb +1 -1
  138. data/lib/active_admin/views/header.rb +3 -2
  139. data/lib/active_admin/views/index_as_block.rb +4 -0
  140. data/lib/active_admin/views/index_as_blog.rb +4 -0
  141. data/lib/active_admin/views/index_as_grid.rb +4 -0
  142. data/lib/active_admin/views/index_as_table.rb +49 -7
  143. data/lib/active_admin/views/pages/index.rb +19 -4
  144. data/lib/active_admin/views/tabbed_navigation.rb +10 -54
  145. data/lib/generators/active_admin/install/install_generator.rb +5 -1
  146. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +58 -0
  147. data/spec/integration/{default_namespace.rb → default_namespace_spec.rb} +0 -16
  148. data/spec/spec_helper.rb +3 -0
  149. data/spec/support/detect_rails_version.rb +10 -3
  150. data/spec/support/rails_template.rb +1 -1
  151. data/spec/support/templates/post_decorator.rb +6 -6
  152. data/spec/unit/application_spec.rb +5 -5
  153. data/spec/unit/authorization/authorization_adapter_spec.rb +61 -0
  154. data/spec/unit/authorization/controller_authorization_spec.rb +47 -0
  155. data/spec/unit/base_controller_spec.rb +0 -2
  156. data/spec/unit/batch_actions/resource_spec.rb +1 -1
  157. data/spec/unit/breadcrumbs_spec.rb +3 -3
  158. data/spec/unit/cancan_adapter_spec.rb +35 -0
  159. data/spec/unit/config_shared_examples.rb +9 -30
  160. data/spec/unit/devise_spec.rb +29 -0
  161. data/spec/unit/dsl_spec.rb +61 -0
  162. data/spec/unit/filters/filter_form_builder_spec.rb +58 -4
  163. data/spec/unit/filters/resource_spec.rb +17 -5
  164. data/spec/unit/form_builder_spec.rb +15 -0
  165. data/spec/unit/menu_collection_spec.rb +62 -0
  166. data/spec/unit/menu_item_spec.rb +51 -37
  167. data/spec/unit/menu_spec.rb +33 -29
  168. data/spec/unit/namespace/authorization_spec.rb +31 -0
  169. data/spec/unit/namespace/register_page_spec.rb +6 -28
  170. data/spec/unit/namespace/register_resource_spec.rb +11 -34
  171. data/spec/unit/namespace_spec.rb +63 -2
  172. data/spec/unit/page_controller_spec.rb +0 -3
  173. data/spec/unit/reloader_spec.rb +5 -5
  174. data/spec/unit/resource/menu_spec.rb +1 -13
  175. data/spec/unit/resource/naming_spec.rb +20 -2
  176. data/spec/unit/resource/page_presenters_spec.rb +14 -2
  177. data/spec/unit/resource_controller/{collection_spec.rb → data_access_spec.rb} +31 -13
  178. data/spec/unit/resource_controller_spec.rb +4 -5
  179. data/spec/unit/resource_spec.rb +33 -11
  180. data/spec/unit/routing_spec.rb +43 -0
  181. data/spec/unit/scope_spec.rb +13 -0
  182. data/spec/unit/view_factory_spec.rb +0 -1
  183. data/spec/unit/view_helpers/fields_for_spec.rb +4 -0
  184. data/spec/unit/view_helpers/form_helper_spec.rb +6 -2
  185. data/spec/unit/view_helpers/method_or_proc_helper_spec.rb +97 -0
  186. data/spec/unit/views/components/attributes_table_spec.rb +11 -0
  187. data/spec/unit/views/components/index_list_spec.rb +32 -0
  188. data/spec/unit/views/tabbed_navigation_spec.rb +42 -40
  189. data/tasks/test.rake +1 -1
  190. metadata +127 -40
  191. data/lib/active_admin/menu_builder.rb +0 -65
  192. data/lib/active_admin/resource_controller/callbacks.rb +0 -59
  193. data/lib/active_admin/resource_controller/collection.rb +0 -158
  194. data/lib/active_admin/views/utility_nav.rb +0 -41
  195. data/spec/unit/base_controller_shared_examples.rb +0 -25
  196. data/spec/unit/dsl_include_spec.rb +0 -20
@@ -1,12 +1,15 @@
1
1
  script: bundle exec rake test
2
2
  rvm:
3
- - ree
4
- - 1.9.2
5
3
  - 1.9.3
4
+ - 2.0.0
6
5
  before_install:
7
6
  - gem update --system
8
7
  - gem --version
8
+ - gem install bundler
9
9
  env:
10
- - RAILS=3.0.12
11
- - RAILS=3.1.4
12
- - RAILS=3.2.3
10
+ - RAILS=3.0.20
11
+ - RAILS=3.1.12
12
+ - RAILS=3.2.13
13
+ matrix:
14
+ allow_failures:
15
+ - rvm: 2.0.0
@@ -1,5 +1,102 @@
1
1
  ## Master (unreleased)
2
2
 
3
+ None yet
4
+
5
+ ## 0.6.0
6
+
7
+ ### Bug Fixes
8
+
9
+ * Fix conflict with Redcloth [#1805][] by [@adrienkohlbecker][]
10
+ * Add missing batch actions translations. [#1788][] by [@EtienneDepaulis][]
11
+ * Fix for [#1960][], pluralize the example `admin_users` model to be consistent [#1961][] by [@rmw][]
12
+ * JS fix for batch actions checkbox toggling [#1947][] by [@ai][]
13
+ * Fixed routing bug when using `config.default_namespace = false` in initializer [#2043][]
14
+ by [@Daxter][] and [@gregbell][]
15
+
16
+ ### Enhancements
17
+
18
+ * Rubinis compatability change over block variables [#1871][] by [@dbussin][]
19
+ * Compatability with Draper 1.0 release [#1896][] by [@hakanensari][]
20
+ * Fixed references to "dashboards.rb" in locales, since file doesn't exist [#1873][] by [@ryansch][]
21
+ * Removing deprecated bourbon box-shadow mixin [#1913][] by [@stereoscott][]
22
+ * More Japanese localizations [#1929][] by [@johnnyshields][]
23
+ * Devise lockable module now supported by default [#1933][] by [@Bishop][]
24
+ * `IndexTableFor` component now returns a unique DOM id, ie `"index_table_posts"` instead of just `"posts"` [#1966][] by [@TiagoCardoso1983][]
25
+ * Coffeescript 1.5 compatability as constructors no longer return a value [#1940][] by [@ronen][]
26
+ * Allow options to be passed to the Abre element for rows in `attributes_table` [#1439][] by [@Daxter][]
27
+ * Gender neutral Spanish translations [#1973][] by [@laffinkippah][]
28
+ * Adds the ability to use `starts_with` and `ends_with` in string filters [#1962][] by [@rmw][]
29
+ * Added support for translating resources when registered with `:as` [#2044][]
30
+ by [@Daxter]
31
+ * Scopes are no longer hidden when empty filter results [#1804][] by [@Daxter][]
32
+ * Dynamic scope names with procs [#2018][] by [@Daxter][]
33
+ * Filters no support the `:if` optional argument [#1801][] by [@Daxter][]
34
+ * Member & collection actions support multiple HTTP methods for the same action [#2000][] by [@rdsoze][]
35
+
36
+ ### New Features
37
+
38
+ * Authorization DSL including a default CanCan adapter [#1817][] by [@pcreux][]
39
+ and [@gregbell][]
40
+ * New "actions" DSL for customizing actions on index listing [#1834][] by [@ejholmes][]
41
+ * Index title can now be set via a proc [#1861][] by [@jamesalmond][]
42
+ * Can now disable `download_links` per resource, index collection or globally throughout AA [#1908][] by [@TBAA][]
43
+ * Filters: add ability to search for blank/null fields with boolean search [#1893][] by [@whatcould][]
44
+ * New `navigation_menu` DSL for menu system [#1967][] by [@macfanatic][] and [@gregbell][]
45
+ * Support segmented control switch between different index styles [#1745][] by
46
+ [@joshuacollins85][]
47
+
48
+ ### Other
49
+
50
+ * Updated documentation for formtastic deprecated f.buttons [#1867][] by [@ericcumbee][]
51
+ * Copyright updated for 2013 [#1937][] by [@snapapps][]
52
+
53
+ ### Contributors
54
+
55
+ 327 Commits by 42 authors
56
+
57
+ * Adrien Kohlbecker
58
+ * Alexandr Prudnikov
59
+ * Andrew Pietsch
60
+ * Andrey A.I. Sitnik
61
+ * Andrey Rozhkovsky
62
+ * Anthony Zacharakis
63
+ * Bartlomiej Niemtur
64
+ * David DIDIER
65
+ * David Reese
66
+ * Daxter
67
+ * Dirkjan Bussink
68
+ * Dominik Masur
69
+ * Eric Cumbee
70
+ * Eric J. Holmes
71
+ * Etienne Depaulis
72
+ * Gosha Arinich
73
+ * Greg Bell
74
+ * Ian Carroll
75
+ * James Almond
76
+ * Johnny Shields
77
+ * Joshua Collins
78
+ * Kieran Klaassen
79
+ * Luís Ramalho
80
+ * Matt Brewer
81
+ * Nathaniel Bibler
82
+ * Olek Janiszewski
83
+ * Philippe Creux
84
+ * Raison Dsouza
85
+ * Rebecca Miller-Webster
86
+ * Roman Sklenar
87
+ * Roman Sklenář
88
+ * Ryan Schlesinger
89
+ * Scott Meves
90
+ * Sean Ian Linsley
91
+ * Sergey Pchelincev
92
+ * Simon Menke
93
+ * Tiago Cardoso
94
+ * Travis Pew
95
+ * WU Jun
96
+ * laffinkippah
97
+ * ronen barzel
98
+ * тιηуηυмвєяѕ
99
+
3
100
  ## 0.5.1
4
101
 
5
102
  ### Enhancements
@@ -644,6 +741,7 @@ of the highlights. 250 commits. Enough said.
644
741
  [#1041]: https://github.com/gregbell/active_admin/issues/1041
645
742
  [#1063]: https://github.com/gregbell/active_admin/issues/1063
646
743
  [#1117]: https://github.com/gregbell/active_admin/issues/1117
744
+ [#1439]: https://github.com/gregbell/active_admin/issues/1439
647
745
  [#1609]: https://github.com/gregbell/active_admin/issues/1609
648
746
  [#1626]: https://github.com/gregbell/active_admin/issues/1626
649
747
  [#1647]: https://github.com/gregbell/active_admin/issues/1647
@@ -652,36 +750,81 @@ of the highlights. 250 commits. Enough said.
652
750
  [#1681]: https://github.com/gregbell/active_admin/issues/1681
653
751
  [#1683]: https://github.com/gregbell/active_admin/issues/1683
654
752
  [#1699]: https://github.com/gregbell/active_admin/issues/1699
753
+ [#1745]: https://github.com/gregbell/active_admin/issues/1745
655
754
  [#1752]: https://github.com/gregbell/active_admin/issues/1752
656
755
  [#1775]: https://github.com/gregbell/active_admin/issues/1775
657
756
  [#1782]: https://github.com/gregbell/active_admin/issues/1782
658
757
  [#1783]: https://github.com/gregbell/active_admin/issues/1783
758
+ [#1788]: https://github.com/gregbell/active_admin/issues/1788
759
+ [#1801]: https://github.com/gregbell/active_admin/issues/1801
760
+ [#1804]: https://github.com/gregbell/active_admin/issues/1804
761
+ [#1805]: https://github.com/gregbell/active_admin/issues/1805
762
+ [#1817]: https://github.com/gregbell/active_admin/issues/1817
763
+ [#1834]: https://github.com/gregbell/active_admin/issues/1834
764
+ [#1861]: https://github.com/gregbell/active_admin/issues/1861
765
+ [#1867]: https://github.com/gregbell/active_admin/issues/1867
766
+ [#1871]: https://github.com/gregbell/active_admin/issues/1871
767
+ [#1873]: https://github.com/gregbell/active_admin/issues/1873
768
+ [#1893]: https://github.com/gregbell/active_admin/issues/1893
769
+ [#1896]: https://github.com/gregbell/active_admin/issues/1896
770
+ [#1908]: https://github.com/gregbell/active_admin/issues/1908
771
+ [#1913]: https://github.com/gregbell/active_admin/issues/1913
772
+ [#1929]: https://github.com/gregbell/active_admin/issues/1929
773
+ [#1933]: https://github.com/gregbell/active_admin/issues/1933
774
+ [#1937]: https://github.com/gregbell/active_admin/issues/1937
775
+ [#1940]: https://github.com/gregbell/active_admin/issues/1940
776
+ [#1947]: https://github.com/gregbell/active_admin/issues/1947
777
+ [#1960]: https://github.com/gregbell/active_admin/issues/1960
778
+ [#1961]: https://github.com/gregbell/active_admin/issues/1961
779
+ [#1962]: https://github.com/gregbell/active_admin/issues/1962
780
+ [#1966]: https://github.com/gregbell/active_admin/issues/1966
781
+ [#1967]: https://github.com/gregbell/active_admin/issues/1967
782
+ [#1973]: https://github.com/gregbell/active_admin/issues/1973
783
+ [#2000]: https://github.com/gregbell/active_admin/issues/2000
784
+ [#2018]: https://github.com/gregbell/active_admin/issues/2018
785
+ [#2043]: https://github.com/gregbell/active_admin/issues/2043
786
+ [#2044]: https://github.com/gregbell/active_admin/issues/2044
787
+ [@Bishop]: https://github.com/Bishop
659
788
  [@BoboFraggins]: https://github.com/BoboFraggins
660
789
  [@DMajrekar]: https://github.com/DMajrekar
790
+ [@Daxter]: https://github.com/Daxter
791
+ [@EtienneDepaulis]: https://github.com/EtienneDepaulis
661
792
  [@MoritzMoritz]: https://github.com/MoritzMoritz
793
+ [@TBAA]: https://github.com/TBAA
794
+ [@TiagoCardoso1983]: https://github.com/TiagoCardoso1983
662
795
  [@ZequeZ]: https://github.com/ZequeZ
796
+ [@adrienkohlbecker]: https://github.com/adrienkohlbecker
797
+ [@ai]: https://github.com/ai
663
798
  [@amiel]: https://github.com/amiel
664
799
  [@bobbytables]: https://github.com/bobbytables
665
800
  [@caifara]: https://github.com/caifara
666
801
  [@comboy]: https://github.com/comboy
667
802
  [@dapi]: https://github.com/dapi
803
+ [@dbussin]: https://github.com/dbussin
668
804
  [@dhiemstra]: https://github.com/dhiemstra
669
805
  [@doug316]: https://github.com/doug316
670
806
  [@ebeigarts]: https://github.com/ebeigarts
807
+ [@ejholmes]: https://github.com/ejholmes
671
808
  [@emzeq]: https://github.com/emzeq
809
+ [@ericcumbee]: https://github.com/ericcumbee
672
810
  [@fabiokr]: https://github.com/fabiokr
673
811
  [@fabiormoura]: https://github.com/fabiormoura
674
812
  [@fbuenemann]: https://github.com/fbuenemann
675
813
  [@george]: https://github.com/george
676
814
  [@ggilder]: https://github.com/ggilder
677
815
  [@gregbell]: https://github.com/gregbell
816
+ [@hakanensari]: https://github.com/hakanensari
678
817
  [@j]: https://github.com/j
818
+ [@jamesalmond]: https://github.com/jamesalmond
679
819
  [@jancel]: https://github.com/jancel
680
820
  [@jbarket]: https://github.com/jbarket
821
+ [@johnnyshields]: https://github.com/johnnyshields
822
+ [@joshuacollins85]: https://github.com/joshuacollins85
681
823
  [@jschwindt]: https://github.com/jschwindt
682
824
  [@kerberoS]: https://github.com/kerberoS
683
825
  [@knoopx]: https://github.com/knoopx
684
826
  [@krug]: https://github.com/krug
827
+ [@laffinkippah]: https://github.com/laffinkippah
685
828
  [@latortuga]: https://github.com/latortuga
686
829
  [@macfanatic]: https://github.com/macfanatic
687
830
  [@mattvague]: https://github.com/mattvague
@@ -693,19 +836,27 @@ of the highlights. 250 commits. Enough said.
693
836
  [@per_page]: https://github.com/per_page
694
837
  [@ptn]: https://github.com/ptn
695
838
  [@randym]: https://github.com/randym
839
+ [@rdsoze]: https://github.com/rdsoze
696
840
  [@rheaton]: https://github.com/rheaton
841
+ [@rmw]: https://github.com/rmw
697
842
  [@robdiciuccio]: https://github.com/robdiciuccio
698
843
  [@rolfb]: https://github.com/rolfb
844
+ [@ronen]: https://github.com/ronen
845
+ [@ryansch]: https://github.com/ryansch
699
846
  [@samvincent]: https://github.com/samvincent
700
847
  [@sftsang]: https://github.com/sftsang
701
848
  [@shayfrendt]: https://github.com/shayfrendt
702
849
  [@shell]: https://github.com/shell
703
850
  [@simonoff]: https://github.com/simonoff
851
+ [@snapapps]: https://github.com/snapapps
852
+ [@stereoscott]: https://github.com/stereoscott
704
853
  [@sunny]: https://github.com/sunny
705
854
  [@tracedwax]: https://github.com/tracedwax
706
855
  [@tricknotes]: https://github.com/tricknotes
707
856
  [@utkarshkukreti]: https://github.com/utkarshkukreti
708
857
  [@vairix]: https://github.com/vairix
858
+ [@vairix-ssierra]: https://github.com/vairix-ssierra
709
859
  [@watson]: https://github.com/watson
860
+ [@whatcould]: https://github.com/whatcould
710
861
  [@yawn]: https://github.com/yawn
711
862
  [@yorch]: https://github.com/yorch
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ ACTIVE_ADMIN_PATH = File.dirname(__FILE__) unless defined?(ACTIVE_ADMIN_PATH)
7
7
  require File.expand_path('spec/support/detect_rails_version', ACTIVE_ADMIN_PATH)
8
8
 
9
9
  rails_version = detect_rails_version
10
- gem 'rails', rails_version
10
+ gem 'rails', rails_version
11
11
  gem 'bourbon'
12
12
 
13
13
  case rails_version
@@ -22,26 +22,26 @@ else
22
22
  end
23
23
 
24
24
  group :development, :test do
25
- gem 'sqlite3'
26
-
27
- gem 'rake', '~> 10.0.2', :require => false
28
- gem 'haml', '~> 3.1.7', :require => false
25
+ gem 'haml', '~> 3.1.7', :require => false
26
+ gem 'rake', '~> 10.0.2', :require => false
27
+ gem 'rails-i18n' # Provides default i18n for many languages
28
+ gem 'rdiscount' # Markdown implementation (for yard)
29
+ gem 'sprockets'
29
30
  gem 'yard'
30
- gem 'rdiscount' # For yard
31
- gem "sprockets"
32
- gem 'rails-i18n' # Gives us default i18n for many languages
33
- gem 'parallel_tests'
34
31
  end
35
32
 
36
33
  group :test do
37
- gem 'rspec-rails', '~> 2.9.0'
38
- gem 'cucumber-rails', '1.3.0', :require => false
39
- gem 'capybara', '1.1.2'
34
+ gem 'cancan'
35
+ gem 'capybara', '1.1.2'
36
+ gem 'cucumber-rails', '1.3.0', :require => false
40
37
  gem 'database_cleaner'
41
- gem 'shoulda-matchers'
42
- gem 'launchy'
43
- gem 'jslint_on_rails', '~> 1.1.1'
38
+ gem 'guard-coffeescript'
44
39
  gem 'guard-rspec'
45
- gem "guard-coffeescript"
46
40
  gem 'jasmine'
41
+ gem 'jslint_on_rails', '~> 1.1.1'
42
+ gem 'launchy'
43
+ gem 'parallel_tests'
44
+ gem 'rspec-rails', '~> 2.9.0'
45
+ gem 'shoulda-matchers', '1.5.0' # See active_admin#2004
46
+ gem 'sqlite3'
47
47
  end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Greg Bell, VersaPay Corporation
1
+ Copyright (c) 2013 Greg Bell, VersaPay Corporation
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -4,6 +4,7 @@ require "active_admin/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{activeadmin}
7
+ s.license = "MIT"
7
8
  s.version = ActiveAdmin::VERSION
8
9
  s.platform = Gem::Platform::RUBY
9
10
  s.homepage = %q{http://activeadmin.info}
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="87.5px" viewBox="0 0 100 87.5" style="enable-background:new 0 0 100 87.5;" xml:space="preserve">
2
+ <path style="fill:#010101;" d="M12.5,6.25c0,3.455-2.795,6.25-6.25,6.25C2.795,12.5,0,9.705,0,6.25C0,2.795,2.795,0,6.25,0 C9.705,0,12.5,2.795,12.5,6.25z"/>
3
+ <rect x="25" style="fill:#010101;" width="75" height="12.5"/>
4
+ <path style="fill:#010101;" d="M12.5,56.25c0,3.455-2.795,6.25-6.25,6.25C2.795,62.5,0,59.705,0,56.25S2.795,50,6.25,50 C9.705,50,12.5,52.795,12.5,56.25z"/>
5
+ <rect x="25" y="50" style="fill:#010101;" width="75" height="12.5"/>
6
+ <path style="fill:#010101;" d="M12.5,31.25c0,3.455-2.795,6.25-6.25,6.25C2.795,37.5,0,34.705,0,31.25S2.795,25,6.25,25 C9.705,25,12.5,27.795,12.5,31.25z"/>
7
+ <path style="fill:#010101;" d="M12.5,81.25c0,3.455-2.795,6.25-6.25,6.25C2.795,87.5,0,84.705,0,81.25S2.795,75,6.25,75 C9.705,75,12.5,77.795,12.5,81.25z"/>
8
+ <rect x="25" y="25" style="fill:#010101;" width="75" height="12.5"/>
9
+ <rect x="25" y="75" style="fill:#010101;" width="75" height="12.5"/>
10
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="63.62px" viewBox="0 0 100 63.62" enable-background="new 0 0 100 63.62" xml:space="preserve">
2
+ <path d="M40.592,41.293V23.226c0-4.67,3.617-8.457,8.079-8.457h17.675v-4.307C66.346,4.685,61.868,0,56.35,0H9.996 C4.477,0,0,4.685,0,10.463v22.354c0,5.777,4.477,10.463,9.996,10.463h7.649c0,4.115,0,8.234,0,12.352 c0,0.682,0.936,1.162,1.422,0.59c3.645-4.314,7.287-8.627,10.933-12.941h10.825C40.677,42.641,40.592,41.979,40.592,41.293z"/>
3
+ <path d="M45.178,26.205v20.168c0,4.211,3.263,7.627,7.289,7.627h19.21c2.658,3.145,5.313,6.289,7.97,9.434 c0.354,0.42,1.036,0.068,1.036-0.428c0-3.002,0-6.004,0-9.006h12.029c4.025,0,7.288-3.416,7.288-7.627V26.205 c0-4.212-3.263-7.629-7.288-7.629H52.467C48.441,18.576,45.178,21.992,45.178,26.205z"/>
4
+ </svg>
@@ -0,0 +1,13 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
2
+ <g>
3
+ <path fill="#000000" d="M24.666,2.5H5.334C3.769,2.5,2.5,3.769,2.5,5.334v19.331c0,1.565,1.269,2.834,2.834,2.834h19.331 c1.565,0,2.834-1.269,2.834-2.834V5.334C27.5,3.769,26.231,2.5,24.666,2.5z"/>
4
+ <path fill="#000000" d="M59.704,2.5H40.373c-1.565,0-2.834,1.269-2.834,2.834v19.331c0,1.565,1.269,2.834,2.834,2.834h19.331 c1.565,0,2.835-1.269,2.835-2.834V5.334C62.539,3.769,61.27,2.5,59.704,2.5z"/>
5
+ <path fill="#000000" d="M94.742,2.5h-19.33c-1.566,0-2.835,1.269-2.835,2.834v19.331c0,1.565,1.269,2.834,2.835,2.834h19.33 c1.566,0,2.836-1.269,2.836-2.834V5.334C97.578,3.769,96.309,2.5,94.742,2.5z"/>
6
+ <path fill="#000000" d="M24.666,37.667H5.334c-1.565,0-2.834,1.269-2.834,2.834v19.331c0,1.565,1.269,2.834,2.834,2.834h19.331 c1.565,0,2.834-1.269,2.834-2.834V40.501C27.5,38.936,26.231,37.667,24.666,37.667z"/>
7
+ <path fill="#000000" d="M59.704,37.667H40.373c-1.565,0-2.834,1.269-2.834,2.834v19.331c0,1.565,1.269,2.834,2.834,2.834h19.331 c1.565,0,2.835-1.269,2.835-2.834V40.501C62.539,38.936,61.27,37.667,59.704,37.667z"/>
8
+ <path fill="#000000" d="M94.742,37.667h-19.33c-1.566,0-2.835,1.269-2.835,2.834v19.331c0,1.565,1.269,2.834,2.835,2.834h19.33 c1.566,0,2.836-1.269,2.836-2.834V40.501C97.578,38.936,96.309,37.667,94.742,37.667z"/>
9
+ <path fill="#000000" d="M24.666,72.833H5.334c-1.565,0-2.834,1.269-2.834,2.835v19.33c0,1.566,1.269,2.834,2.834,2.834h19.331 c1.565,0,2.834-1.268,2.834-2.834v-19.33C27.5,74.102,26.231,72.833,24.666,72.833z"/>
10
+ <path fill="#000000" d="M59.704,72.833H40.373c-1.565,0-2.834,1.269-2.834,2.835v19.33c0,1.566,1.269,2.834,2.834,2.834h19.331 c1.565,0,2.835-1.268,2.835-2.834v-19.33C62.539,74.102,61.27,72.833,59.704,72.833z"/>
11
+ <path fill="#000000" d="M94.742,72.833h-19.33c-1.566,0-2.835,1.269-2.835,2.835v19.33c0,1.566,1.269,2.834,2.835,2.834h19.33 c1.566,0,2.836-1.268,2.836-2.834v-19.33C97.578,74.102,96.309,72.833,94.742,72.833z"/>
12
+ </g>
13
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
2
+ <path d="M0,0v100h100V0H0z M93.164,39.662H66.55V25.469h2.396h24.219V39.662z M64.499,58.308H35.501V41.706h28.998V58.308z M35.501,39.662V25.469h2.389h24.219h2.39v14.193H35.501z M31.055,25.469h2.396v14.193H6.836V25.469H31.055z M33.451,41.706v16.602 H6.836V41.706H33.451z M6.836,60.352h26.615v16.575H6.836V60.352z M35.501,60.352h28.998v16.575H35.501V60.352z M66.55,60.352 h26.614v16.575H66.55V60.352z M66.55,58.308V41.706h26.614v16.602H66.55z M6.836,93.164v-14.18h26.615v14.18H6.836z M35.501,93.164 v-14.18h28.998v14.18H35.501z M66.55,78.984h26.614v14.18H66.55V78.984z"/>
3
+ </svg>
@@ -1,64 +1,37 @@
1
1
  window.AA.CheckboxToggler = class AA.CheckboxToggler
2
-
3
- constructor: (@options, @container) ->
4
-
2
+ constructor: (@options, @container)->
5
3
  defaults = {}
6
-
7
- @options = $.extend( {}, defaults, options );
8
-
4
+ @options = $.extend {}, defaults, options
9
5
  @_init()
10
6
  @_bind()
11
7
 
12
8
  _init: ->
13
-
14
9
  if not @container
15
- throw new Error("Container element not found")
10
+ throw new Error('Container element not found')
16
11
  else
17
12
  @$container = $(@container)
18
13
 
19
- if not @$container.find(".toggle_all").length
20
- throw new Error("'toggle all' checkbox not found")
14
+ if not @$container.find('.toggle_all').length
15
+ throw new Error('"toggle all" checkbox not found')
21
16
  else
22
- @toggle_all_checkbox = @$container.find(".toggle_all")
17
+ @toggle_all_checkbox = @$container.find '.toggle_all'
23
18
 
24
- @checkboxes = @$container.find(":checkbox").not(@toggle_all_checkbox)
19
+ @checkboxes = @$container.find(':checkbox').not @toggle_all_checkbox
25
20
 
26
21
  _bind: ->
27
- @checkboxes.bind "change", (e) =>
28
- @_didChangeCheckbox(e.target)
29
-
30
- @toggle_all_checkbox.bind "change", (e) =>
31
- @_didChangeToggleAllCheckbox()
22
+ @checkboxes.change (e)=> @_didChangeCheckbox e.target
23
+ @toggle_all_checkbox.change => @_didChangeToggleAllCheckbox()
32
24
 
33
- _didChangeCheckbox: (checkbox) ->
34
- if @checkboxes.filter(":checked").length == @checkboxes.length - 1
35
- @_uncheckToggleAllCheckbox()
36
- else if @checkboxes.filter(":checked").length == @checkboxes.length
37
- @_checkToggleAllCheckbox()
25
+ _didChangeCheckbox: (checkbox)->
26
+ switch @checkboxes.filter(':checked').length
27
+ when @checkboxes.length - 1 then @toggle_all_checkbox.prop checked: null
28
+ when @checkboxes.length then @toggle_all_checkbox.prop checked: true
38
29
 
39
30
  _didChangeToggleAllCheckbox: ->
40
- if @toggle_all_checkbox.attr("checked") == "checked"
41
- @_checkAllCheckboxes()
42
- else
43
- @_uncheckAllCheckboxes()
44
-
45
- _uncheckToggleAllCheckbox: ->
46
- @toggle_all_checkbox.removeAttr("checked")
47
-
48
- _checkToggleAllCheckbox: ->
49
- @toggle_all_checkbox.attr("checked","checked")
50
-
51
- _uncheckAllCheckboxes: ->
52
- @checkboxes.each (index, el) =>
53
- $(el).removeAttr("checked")
54
- @_didChangeCheckbox(el)
55
-
56
- _checkAllCheckboxes: ->
57
- @checkboxes.each (index, el) =>
58
- $(el).attr("checked","checked")
31
+ setting = if @toggle_all_checkbox.prop 'checked' then true else null
32
+ @checkboxes.each (index, el)=>
33
+ $(el).prop checked: setting
59
34
  @_didChangeCheckbox(el)
60
-
61
35
 
62
- ( ( $ ) ->
36
+ jQuery ($)->
63
37
  $.widget.bridge 'checkboxToggler', AA.CheckboxToggler
64
- )( jQuery )
@@ -20,8 +20,6 @@ window.AA.DropdownMenu = class AA.DropdownMenu
20
20
  @_buildMenuList()
21
21
  @_bind()
22
22
 
23
- return @
24
-
25
23
  open: ->
26
24
  @isOpen = true
27
25
  @$menuList.fadeIn @options.fadeInDuration
@@ -85,14 +83,14 @@ window.AA.DropdownMenu = class AA.DropdownMenu
85
83
  false
86
84
 
87
85
  _positionMenuList: ->
88
- centerOfButtonFromLeft = @$menuButton.offset().left + @$menuButton.outerWidth() / 2
86
+ centerOfButtonFromLeft = @$menuButton.position().left + @$menuButton.outerWidth() / 2
89
87
  centerOfmenuListFromLeft = @$menuList.outerWidth() / 2
90
88
  menuListLeftPos = centerOfButtonFromLeft - centerOfmenuListFromLeft
91
89
  @$menuList.css "left", menuListLeftPos
92
90
 
93
91
  _positionNipple: ->
94
92
  centerOfmenuListFromLeft = @$menuList.outerWidth() / 2
95
- bottomOfButtonFromTop = @$menuButton.offset().top + @$menuButton.outerHeight() + 10
93
+ bottomOfButtonFromTop = @$menuButton.position().top + @$menuButton.outerHeight() + 10
96
94
  @$menuList.css "top", bottomOfButtonFromTop
97
95
  $nipple = @$menuList.find(".dropdown_menu_nipple")
98
96
  centerOfnippleFromLeft = $nipple.outerWidth() / 2