activeadmin 0.6.0 → 0.6.1

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 (322) hide show
  1. data/.gitignore +5 -1
  2. data/.travis.yml +1 -1
  3. data/.yardopts +2 -3
  4. data/CHANGELOG.md +180 -36
  5. data/CONTRIBUTING.md +12 -2
  6. data/Gemfile +9 -3
  7. data/README.rdoc +38 -65
  8. data/Rakefile +1 -3
  9. data/activeadmin.gemspec +10 -11
  10. data/app/assets/images/active_admin/index_list_icons/block_icon.svg +1 -1
  11. data/app/assets/images/active_admin/index_list_icons/blog_icon.svg +1 -1
  12. data/app/assets/images/active_admin/index_list_icons/grid_icon.svg +1 -1
  13. data/app/assets/images/active_admin/index_list_icons/table_icon.svg +1 -1
  14. data/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee +2 -2
  15. data/app/assets/javascripts/active_admin/components/jquery.aa.dropdown-menu.js.coffee +2 -2
  16. data/app/assets/javascripts/active_admin/components/jquery.aa.popover.js.coffee +2 -2
  17. data/app/assets/javascripts/active_admin/components/jquery.aa.table-checkbox-toggler.js.coffee +2 -2
  18. data/app/assets/javascripts/active_admin/lib/namespace.js.coffee +2 -1
  19. data/app/assets/javascripts/active_admin/pages/application.js.coffee +6 -1
  20. data/app/assets/stylesheets/active_admin/_base.css.scss +29 -34
  21. data/app/assets/stylesheets/active_admin/_forms.css.scss +65 -62
  22. data/app/assets/stylesheets/active_admin/_header.css.scss +57 -45
  23. data/app/assets/stylesheets/active_admin/_typography.css.scss +9 -9
  24. data/app/assets/stylesheets/active_admin/components/_batch_actions.css.scss +1 -1
  25. data/app/assets/stylesheets/active_admin/components/_blank_slates.scss +5 -5
  26. data/app/assets/stylesheets/active_admin/components/_breadcrumbs.scss +2 -2
  27. data/app/assets/stylesheets/active_admin/components/_comments.css.scss +1 -1
  28. data/app/assets/stylesheets/active_admin/components/_date_picker.css.scss +20 -20
  29. data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +16 -16
  30. data/app/assets/stylesheets/active_admin/components/_flash_messages.css.scss +25 -23
  31. data/app/assets/stylesheets/active_admin/components/_grid.scss +2 -2
  32. data/app/assets/stylesheets/active_admin/components/_index_list.scss +1 -1
  33. data/app/assets/stylesheets/active_admin/components/_pagination.scss +10 -10
  34. data/app/assets/stylesheets/active_admin/components/_panels.scss +1 -1
  35. data/app/assets/stylesheets/active_admin/components/_popovers.css.scss +27 -27
  36. data/app/assets/stylesheets/active_admin/components/_scopes.scss +1 -1
  37. data/app/assets/stylesheets/active_admin/components/_table_tools.css.scss +10 -10
  38. data/app/assets/stylesheets/active_admin/components/_tables.css.scss +9 -9
  39. data/app/assets/stylesheets/active_admin/mixins/_buttons.css.scss +3 -3
  40. data/app/assets/stylesheets/active_admin/mixins/_gradients.css.scss +4 -4
  41. data/app/assets/stylesheets/active_admin/mixins/_icons.css.scss +4 -7
  42. data/app/assets/stylesheets/active_admin/mixins/_reset.css.scss +5 -5
  43. data/app/assets/stylesheets/active_admin/mixins/_rounded.css.scss +3 -3
  44. data/app/assets/stylesheets/active_admin/mixins/_sections.css.scss +6 -6
  45. data/app/assets/stylesheets/active_admin/mixins/_shadows.css.scss +8 -8
  46. data/app/assets/stylesheets/active_admin/mixins/_typography.scss +1 -1
  47. data/app/assets/stylesheets/active_admin/mixins/_utilities.scss +1 -1
  48. data/app/assets/stylesheets/active_admin/mixins/_variables.css.scss +9 -1
  49. data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +1 -1
  50. data/app/assets/stylesheets/active_admin/print.css.scss +2 -8
  51. data/app/assets/stylesheets/active_admin/structure/_footer.scss +5 -5
  52. data/app/assets/stylesheets/active_admin/structure/_main_structure.scss +13 -13
  53. data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +14 -14
  54. data/app/views/active_admin/devise/passwords/edit.html.erb +1 -1
  55. data/app/views/active_admin/devise/sessions/new.html.erb +1 -1
  56. data/app/views/active_admin/devise/shared/_links.erb +8 -1
  57. data/app/views/active_admin/resource/index.csv.erb +3 -3
  58. data/app/views/layouts/active_admin_logged_out.html.erb +5 -3
  59. data/config/locales/bg.yml +101 -0
  60. data/{lib/active_admin → config}/locales/ca.yml +24 -7
  61. data/{lib/active_admin → config}/locales/cs.yml +34 -12
  62. data/{lib/active_admin → config}/locales/da.yml +29 -7
  63. data/config/locales/de-CH.yml +117 -0
  64. data/{lib/active_admin → config}/locales/de.yml +19 -9
  65. data/config/locales/en-GB.yml +90 -0
  66. data/{lib/active_admin → config}/locales/en.yml +16 -6
  67. data/config/locales/es.yml +106 -0
  68. data/{lib/active_admin/locales/es.yml → config/locales/es_MX.yml} +14 -8
  69. data/{lib/active_admin → config}/locales/fr.yml +14 -6
  70. data/{lib/active_admin → config}/locales/he.yml +16 -6
  71. data/{lib/active_admin → config}/locales/hr.yml +14 -6
  72. data/{lib/active_admin → config}/locales/hu.yml +31 -6
  73. data/{lib/active_admin → config}/locales/it.yml +14 -6
  74. data/{lib/active_admin → config}/locales/ja.yml +32 -7
  75. data/{lib/active_admin → config}/locales/ko.yml +14 -6
  76. data/{lib/active_admin → config}/locales/lt.yml +15 -6
  77. data/{lib/active_admin → config}/locales/lv.yml +14 -6
  78. data/{lib/active_admin → config}/locales/nl.yml +14 -6
  79. data/{lib/active_admin → config}/locales/no-NB.yml +14 -6
  80. data/{lib/active_admin → config}/locales/pl.yml +14 -6
  81. data/{lib/active_admin → config}/locales/pt-BR.yml +14 -6
  82. data/{lib/active_admin → config}/locales/pt-PT.yml +14 -6
  83. data/{lib/active_admin → config}/locales/ro.yml +32 -7
  84. data/{lib/active_admin → config}/locales/ru.yml +30 -8
  85. data/{lib/active_admin → config}/locales/sv-SE.yml +14 -6
  86. data/{lib/active_admin → config}/locales/tr.yml +15 -6
  87. data/config/locales/uk.yml +100 -0
  88. data/{lib/active_admin → config}/locales/vi.yml +15 -6
  89. data/{lib/active_admin → config}/locales/zh-CN.yml +15 -6
  90. data/{lib/active_admin → config}/locales/zh-TW.yml +15 -6
  91. data/docs/0-installation.md +22 -18
  92. data/docs/1-general-configuration.md +1 -1
  93. data/docs/10-custom-pages.md +3 -3
  94. data/docs/11-decorators.md +18 -2
  95. data/docs/12-arbre-components.md +53 -54
  96. data/docs/13-authorization-adapter.md +31 -10
  97. data/docs/2-resource-customization.md +16 -1
  98. data/docs/3-index-pages.md +13 -1
  99. data/docs/3-index-pages/create-an-index.md +4 -4
  100. data/docs/3-index-pages/index-as-block.md +1 -1
  101. data/docs/3-index-pages/index-as-blog.md +1 -1
  102. data/docs/3-index-pages/index-as-grid.md +1 -1
  103. data/docs/4-csv-format.md +4 -4
  104. data/docs/5-forms.md +46 -3
  105. data/docs/{6-show-screens.md → 6-show-pages.md} +3 -3
  106. data/docs/8-custom-actions.md +3 -3
  107. data/docs/9-batch-actions.md +9 -1
  108. data/features/action_item.feature +6 -6
  109. data/features/authorization_cancan.feature +1 -1
  110. data/features/belongs_to.feature +3 -3
  111. data/features/breadcrumb.feature +2 -2
  112. data/features/comments/commenting.feature +7 -5
  113. data/features/dashboard.feature +0 -51
  114. data/features/favicon.feature +20 -0
  115. data/features/global_navigation.feature +0 -1
  116. data/features/index/batch_actions.feature +12 -11
  117. data/features/index/filters.feature +6 -6
  118. data/features/index/format_as_csv.feature +4 -5
  119. data/features/index/index_as_blog.feature +20 -1
  120. data/features/index/index_as_table.feature +1 -1
  121. data/features/index/index_blank_slate.feature +3 -3
  122. data/features/index/index_parameters.feature +4 -10
  123. data/features/index/index_scope_to.feature +24 -0
  124. data/features/index/index_scopes.feature +17 -5
  125. data/features/index/pagination.feature +15 -0
  126. data/features/registering_pages.feature +1 -1
  127. data/features/registering_resources.feature +2 -2
  128. data/features/show/default_content.feature +3 -3
  129. data/features/sidebar_sections.feature +3 -3
  130. data/features/specifying_actions.feature +1 -1
  131. data/features/step_definitions/additional_web_steps.rb +3 -16
  132. data/features/step_definitions/asset_steps.rb +5 -1
  133. data/features/step_definitions/attribute_steps.rb +4 -4
  134. data/features/step_definitions/batch_action_steps.rb +25 -74
  135. data/features/step_definitions/breadcrumb_steps.rb +1 -3
  136. data/features/step_definitions/comment_steps.rb +0 -1
  137. data/features/step_definitions/configuration_steps.rb +53 -69
  138. data/features/step_definitions/dashboard_steps.rb +2 -2
  139. data/features/step_definitions/factory_steps.rb +17 -33
  140. data/features/step_definitions/filter_steps.rb +2 -2
  141. data/features/step_definitions/format_steps.rb +10 -14
  142. data/features/step_definitions/index_scope_steps.rb +9 -25
  143. data/features/step_definitions/index_views_steps.rb +1 -1
  144. data/features/step_definitions/sidebar_steps.rb +2 -1
  145. data/features/step_definitions/site_title_steps.rb +1 -1
  146. data/features/step_definitions/table_steps.rb +6 -1
  147. data/features/step_definitions/user_steps.rb +23 -38
  148. data/features/step_definitions/web_steps.rb +18 -147
  149. data/features/support/env.rb +13 -34
  150. data/features/support/paths.rb +2 -0
  151. data/features/users/logging_in.feature +2 -2
  152. data/features/users/logging_out.feature +0 -12
  153. data/features/users/resetting_password.feature +1 -1
  154. data/lib/active_admin.rb +4 -17
  155. data/lib/active_admin/abstract_view_factory.rb +1 -1
  156. data/lib/active_admin/application.rb +19 -28
  157. data/lib/active_admin/asset_registration.rb +7 -25
  158. data/lib/active_admin/authorization_adapter.rb +9 -5
  159. data/lib/active_admin/base_controller.rb +2 -2
  160. data/lib/active_admin/base_controller/authorization.rb +25 -27
  161. data/lib/active_admin/batch_actions/resource_extension.rb +3 -3
  162. data/lib/active_admin/batch_actions/views/batch_action_selector.rb +1 -1
  163. data/lib/active_admin/batch_actions/views/selection_cells.rb +1 -1
  164. data/lib/active_admin/callbacks.rb +1 -1
  165. data/lib/active_admin/cancan_adapter.rb +2 -2
  166. data/lib/active_admin/comments.rb +32 -38
  167. data/lib/active_admin/comments/comment.rb +6 -8
  168. data/lib/active_admin/comments/views.rb +0 -1
  169. data/lib/active_admin/comments/views/active_admin_comments.rb +27 -38
  170. data/lib/active_admin/csv_builder.rb +4 -6
  171. data/lib/active_admin/dependency_checker.rb +4 -0
  172. data/lib/active_admin/deprecation.rb +3 -3
  173. data/lib/active_admin/dsl.rb +5 -5
  174. data/lib/active_admin/engine.rb +1 -1
  175. data/lib/active_admin/filters.rb +2 -1
  176. data/lib/active_admin/filters/forms.rb +36 -43
  177. data/lib/active_admin/filters/formtastic_addons.rb +45 -0
  178. data/lib/active_admin/filters/resource_extension.rb +9 -1
  179. data/lib/active_admin/form_builder.rb +30 -19
  180. data/lib/active_admin/helpers/optional_display.rb +11 -13
  181. data/lib/active_admin/helpers/settings.rb +50 -8
  182. data/lib/active_admin/inputs/filter_base.rb +5 -18
  183. data/lib/active_admin/inputs/filter_base/search_method_select.rb +73 -0
  184. data/lib/active_admin/inputs/filter_boolean_input.rb +6 -14
  185. data/lib/active_admin/inputs/filter_check_boxes_input.rb +1 -1
  186. data/lib/active_admin/inputs/filter_numeric_input.rb +2 -47
  187. data/lib/active_admin/inputs/filter_select_input.rb +32 -10
  188. data/lib/active_admin/inputs/filter_string_input.rb +12 -14
  189. data/lib/active_admin/namespace.rb +8 -40
  190. data/lib/active_admin/page.rb +2 -2
  191. data/lib/active_admin/page_dsl.rb +1 -1
  192. data/lib/active_admin/reloader.rb +3 -3
  193. data/lib/active_admin/resource.rb +16 -23
  194. data/lib/active_admin/resource/belongs_to.rb +8 -5
  195. data/lib/active_admin/resource/menu.rb +10 -23
  196. data/lib/active_admin/resource/naming.rb +3 -3
  197. data/lib/active_admin/resource/page_presenters.rb +2 -2
  198. data/lib/active_admin/resource/routes.rb +74 -21
  199. data/lib/active_admin/resource/scope_to.rb +74 -0
  200. data/lib/active_admin/resource/scopes.rb +8 -4
  201. data/lib/active_admin/resource_collection.rb +20 -66
  202. data/lib/active_admin/resource_controller.rb +12 -16
  203. data/lib/active_admin/resource_controller/data_access.rb +19 -22
  204. data/lib/active_admin/resource_controller/resource_class_methods.rb +2 -2
  205. data/lib/active_admin/resource_controller/scoping.rb +4 -9
  206. data/lib/active_admin/resource_dsl.rb +5 -32
  207. data/lib/active_admin/router.rb +34 -47
  208. data/lib/active_admin/scope.rb +5 -3
  209. data/lib/active_admin/sidebar_section.rb +1 -1
  210. data/lib/active_admin/version.rb +1 -1
  211. data/lib/active_admin/view_factory.rb +1 -1
  212. data/lib/active_admin/view_helpers/auto_link_helper.rb +1 -1
  213. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +8 -8
  214. data/lib/active_admin/view_helpers/display_helper.rb +15 -6
  215. data/lib/active_admin/view_helpers/download_format_links_helper.rb +2 -2
  216. data/lib/active_admin/view_helpers/form_helper.rb +6 -1
  217. data/lib/active_admin/view_helpers/icon_helper.rb +1 -1
  218. data/lib/active_admin/view_helpers/method_or_proc_helper.rb +5 -5
  219. data/lib/active_admin/view_helpers/title_helper.rb +1 -1
  220. data/lib/active_admin/views/components/action_list_popover.rb +6 -6
  221. data/lib/active_admin/views/components/attributes_table.rb +9 -12
  222. data/lib/active_admin/views/components/blank_slate.rb +4 -4
  223. data/lib/active_admin/views/components/columns.rb +1 -1
  224. data/lib/active_admin/views/components/index_list.rb +1 -1
  225. data/lib/active_admin/views/components/paginated_collection.rb +20 -12
  226. data/lib/active_admin/views/components/panel.rb +1 -1
  227. data/lib/active_admin/views/components/scopes.rb +2 -1
  228. data/lib/active_admin/views/components/sidebar_section.rb +1 -1
  229. data/lib/active_admin/views/components/status_tag.rb +1 -1
  230. data/lib/active_admin/views/header.rb +2 -2
  231. data/lib/active_admin/views/index_as_blog.rb +16 -3
  232. data/lib/active_admin/views/index_as_table.rb +2 -2
  233. data/lib/active_admin/views/pages/base.rb +8 -3
  234. data/lib/active_admin/views/pages/form.rb +2 -2
  235. data/lib/active_admin/views/pages/index.rb +19 -17
  236. data/lib/generators/active_admin/assets/templates/3.0/active_admin.js +1 -1
  237. data/lib/generators/active_admin/assets/templates/3.1/active_admin.css.scss +1 -13
  238. data/lib/generators/active_admin/devise/devise_generator.rb +22 -1
  239. data/lib/generators/active_admin/install/install_generator.rb +1 -5
  240. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +40 -19
  241. data/lib/generators/active_admin/install/templates/admin_user.rb.erb +18 -18
  242. data/lib/generators/active_admin/install/templates/migrations/create_active_admin_comments.rb +19 -0
  243. data/lib/generators/active_admin/resource/resource_generator.rb +1 -1
  244. data/lib/generators/active_admin/resource/templates/admin.rb +1 -1
  245. data/script/use_rails +1 -1
  246. data/spec/integration/memory_spec.rb +3 -2
  247. data/spec/javascripts/coffeescripts/jquery.aa.checkbox-toggler-spec.js.coffee +4 -4
  248. data/spec/javascripts/coffeescripts/jquery.aa.popover-spec.js.coffee +1 -1
  249. data/spec/javascripts/coffeescripts/jquery.aa.table-checkbox-toggler-spec.js.coffee +2 -2
  250. data/spec/javascripts/compiled/jquery.aa.checkbox-toggler-spec.js +4 -4
  251. data/spec/javascripts/compiled/jquery.aa.popover-spec.js +1 -1
  252. data/spec/javascripts/compiled/jquery.aa.table-checkbox-toggler-spec.js +2 -2
  253. data/spec/spec_helper.rb +16 -6
  254. data/spec/spec_helper_without_rails.rb +2 -0
  255. data/spec/support/deferred_garbage_collection.rb +19 -0
  256. data/spec/support/jslint.yml +1 -1
  257. data/spec/support/rails_template.rb +29 -27
  258. data/spec/support/templates/admin/stores.rb +5 -1
  259. data/spec/unit/abstract_view_factory_spec.rb +1 -1
  260. data/spec/unit/action_builder_spec.rb +7 -7
  261. data/spec/unit/active_admin_spec.rb +0 -14
  262. data/spec/unit/application_spec.rb +16 -17
  263. data/spec/unit/asset_registration_spec.rb +21 -8
  264. data/spec/unit/authorization/authorization_adapter_spec.rb +3 -3
  265. data/spec/unit/authorization/controller_authorization_spec.rb +16 -24
  266. data/spec/unit/batch_actions/resource_spec.rb +11 -11
  267. data/spec/unit/belongs_to_spec.rb +1 -1
  268. data/spec/unit/cancan_adapter_spec.rb +11 -3
  269. data/spec/unit/comments_spec.rb +10 -28
  270. data/spec/unit/controller_filters_spec.rb +22 -24
  271. data/spec/unit/csv_builder_spec.rb +3 -3
  272. data/spec/unit/devise_spec.rb +10 -10
  273. data/spec/unit/filters/filter_form_builder_spec.rb +140 -45
  274. data/spec/unit/filters/resource_spec.rb +20 -19
  275. data/spec/unit/form_builder_spec.rb +122 -70
  276. data/spec/unit/menu_item_spec.rb +3 -3
  277. data/spec/unit/namespace/authorization_spec.rb +4 -8
  278. data/spec/unit/namespace/register_page_spec.rb +1 -1
  279. data/spec/unit/namespace/register_resource_spec.rb +12 -7
  280. data/spec/unit/namespace_spec.rb +4 -10
  281. data/spec/unit/page_spec.rb +1 -1
  282. data/spec/unit/resource/menu_spec.rb +1 -1
  283. data/spec/unit/resource/naming_spec.rb +9 -0
  284. data/spec/unit/resource/pagination_spec.rb +2 -2
  285. data/spec/unit/resource/routes_spec.rb +73 -0
  286. data/spec/unit/resource/scopes_spec.rb +1 -1
  287. data/spec/unit/resource_collection_spec.rb +95 -43
  288. data/spec/unit/resource_registration_spec.rb +3 -12
  289. data/spec/unit/resource_spec.rb +41 -48
  290. data/spec/unit/routing_spec.rb +10 -64
  291. data/spec/unit/scope_spec.rb +19 -0
  292. data/spec/unit/settings_spec.rb +88 -0
  293. data/spec/unit/view_factory_spec.rb +1 -0
  294. data/spec/unit/{breadcrumbs_spec.rb → view_helpers/breadcrumbs_spec.rb} +16 -7
  295. data/spec/unit/view_helpers/display_name_spec.rb +41 -0
  296. data/spec/unit/view_helpers/form_helper_spec.rb +36 -2
  297. data/spec/unit/views/components/attributes_table_spec.rb +17 -9
  298. data/spec/unit/views/components/batch_action_popover_spec.rb +4 -4
  299. data/spec/unit/views/components/index_list_spec.rb +2 -2
  300. data/spec/unit/views/components/paginated_collection_spec.rb +42 -0
  301. data/spec/unit/views/components/panel_spec.rb +8 -0
  302. data/spec/unit/views/components/site_title_spec.rb +2 -2
  303. data/spec/unit/views/components/table_for_spec.rb +4 -4
  304. data/spec/unit/views/pages/form_spec.rb +35 -0
  305. data/spec/unit/views/pages/layout_spec.rb +1 -1
  306. data/spec/unit/views/tabbed_navigation_spec.rb +10 -10
  307. data/tasks/parallel_tests.rake +1 -1
  308. data/tasks/test.rake +4 -1
  309. metadata +117 -106
  310. data/app/assets/stylesheets/active_admin/pages/_dashboard.scss +0 -5
  311. data/lib/active_admin/comments/views/active_admin_comment.rb +0 -0
  312. data/lib/active_admin/dashboards.rb +0 -68
  313. data/lib/active_admin/dashboards/dashboard_controller.rb +0 -50
  314. data/lib/active_admin/dashboards/section.rb +0 -34
  315. data/lib/active_admin/locales/bg.yml +0 -77
  316. data/lib/generators/active_admin/install/templates/migrations/1_create_admin_notes.rb +0 -17
  317. data/lib/generators/active_admin/install/templates/migrations/2_move_admin_notes_to_comments.rb +0 -26
  318. data/spec/unit/base_controller_spec.rb +0 -6
  319. data/spec/unit/dashboard_controller_spec.rb +0 -76
  320. data/spec/unit/dashboard_section_spec.rb +0 -56
  321. data/spec/unit/dashboards_spec.rb +0 -59
  322. data/spec/unit/display_name_spec.rb +0 -29
@@ -3,6 +3,16 @@
3
3
  This is a guide to contributing to Active Admin. It should walk you through the
4
4
  major steps to contributing code to the project.
5
5
 
6
+ ### 0. 'The test suite is failing locally!'
7
+
8
+ If your test suite is failing locally and the
9
+ [Travis build](https://secure.travis-ci.org/gregbell/active_admin.png?branch=master)
10
+ is passing, you've likely already generated the rails app that is used by
11
+ ActiveAdmin's test suite and the generated rails app has erroneous files.
12
+
13
+ To fix this, remove the generated rails app by deleting the directory and its
14
+ contents (`rm -rf spec/rails`) and then re-running the test suite.
15
+
6
16
  ### 1. Create an Issue on GitHub
7
17
 
8
18
  The first step to contributing to Active Admin is creating a ticket in our
@@ -28,7 +38,7 @@ working on):
28
38
 
29
39
  ### 3. Get the test suite running
30
40
 
31
- Active Admin is a gem that many people and businesses rely on for managing data
41
+ Active Admin is a gem that many people and businesses rely on for managing data
32
42
  in their production applications. Bugs are not cool. Although we're not perfect,
33
43
  we pride ourselves on writing well tested code. I hope you do too :)
34
44
 
@@ -96,7 +106,7 @@ browser, you're ready to test it against multiple versions of Rails.
96
106
  $> rake test:major_supported_rails
97
107
 
98
108
  This command runs the cukes and specs against a couple of major versions of
99
- Rails. We will run this command when we review your pull request, if this
109
+ Rails. We will run this command when we review your pull request, if this
100
110
  rake task isn't passing, the pull request will not be merged in.
101
111
 
102
112
 
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
@@ -21,6 +21,11 @@ else
21
21
  raise "Rails #{rails_version} is not supported yet"
22
22
  end
23
23
 
24
+ group :development do
25
+ gem 'better_errors', '~> 0.9.0' # Web UI to debug exceptions. Go to /__better_errors to access the latest one
26
+ gem 'binding_of_caller', '~> 0.7.1' # Retrieve the binding of a method's caller in MRI Ruby >= 1.9.2
27
+ end
28
+
24
29
  group :development, :test do
25
30
  gem 'haml', '~> 3.1.7', :require => false
26
31
  gem 'rake', '~> 10.0.2', :require => false
@@ -33,8 +38,9 @@ end
33
38
  group :test do
34
39
  gem 'cancan'
35
40
  gem 'capybara', '1.1.2'
41
+ gem 'coveralls', '~> 0.6.7', require: false # Test coverage tool: www.coveralls.io
36
42
  gem 'cucumber-rails', '1.3.0', :require => false
37
- gem 'database_cleaner'
43
+ gem 'database_cleaner', '<= 1.0.1'
38
44
  gem 'guard-coffeescript'
39
45
  gem 'guard-rspec'
40
46
  gem 'jasmine'
@@ -42,6 +48,6 @@ group :test do
42
48
  gem 'launchy'
43
49
  gem 'parallel_tests'
44
50
  gem 'rspec-rails', '~> 2.9.0'
45
- gem 'shoulda-matchers', '1.5.0' # See active_admin#2004
51
+ gem 'shoulda-matchers'
46
52
  gem 'sqlite3'
47
53
  end
@@ -1,10 +1,12 @@
1
1
  = Active Admin
2
2
 
3
- Active Admin is a framework for creating administration style interfaces. It
4
- abstracts common business application patterns to make it simple for developers
5
- to implement beautiful and elegant interfaces with very little effort.
3
+ Active Admin is a Ruby on Rails framework for creating elegant backends for website administration.
6
4
 
7
- {<img src="https://secure.travis-ci.org/gregbell/active_admin.png?branch=master" />}[http://travis-ci.org/gregbell/active_admin] {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/gregbell/active_admin] {<img src="https://gemnasium.com/gregbell/active_admin.png" />}[https://gemnasium.com/gregbell/active_admin]
5
+ {<img src="https://secure.travis-ci.org/gregbell/active_admin.png?branch=master" />}[http://travis-ci.org/gregbell/active_admin]
6
+ {<img src="https://codeclimate.com/github/gregbell/active_admin.png" />}[https://codeclimate.com/github/gregbell/active_admin]
7
+ {<img src="https://gemnasium.com/gregbell/active_admin.png" />}[https://gemnasium.com/gregbell/active_admin]
8
+ {<img src="https://coveralls.io/repos/gregbell/active_admin/badge.png?branch=master" />}[https://coveralls.io/r/gregbell/active_admin?branch=master]
9
+ {<img src="http://badgr.co/gittip/activeadmin.png" />}[https://www.gittip.com/activeadmin/]
8
10
 
9
11
  == Documentation & Support
10
12
 
@@ -23,93 +25,64 @@ to implement beautiful and elegant interfaces with very little effort.
23
25
  3. Ensure that developers can easily customize every nook and cranny of the interface.
24
26
  4. Build common interfaces as shareable gems so that the entire community benefits.
25
27
 
26
- == Bugs Reports & Contributing
27
-
28
- * Bug Reports: https://github.com/gregbell/active_admin/issues
29
- * Want to Contribute? Read the Guide: https://github.com/gregbell/active_admin/blob/master/CONTRIBUTING.md
30
-
31
- == Feature Requests
32
-
33
- Please don't put feature requests in Github Issues. They will be closed as soon as they
34
- are reviewed by one of the core team members. If you would like a feature in Active Admin,
35
- please submit a well tested pull request with the desired changes. If you're not a coder,
36
- then the mailing list may be a good place to try to convince someone to help you out
37
- with your cause.
38
-
39
- If you are going to submit a pull request, please read the contributing guide:
40
- https://github.com/gregbell/active_admin/blob/master/CONTRIBUTING.md
41
-
42
-
43
28
  == Getting Started
44
29
 
45
- Active Admin is released as a Ruby Gem. The gem is to be installed within a Ruby
46
- on Rails 3 application. To install, simply add the following to your Gemfile:
30
+ Active Admin is a Ruby Gem.
47
31
 
48
32
  gem 'activeadmin'
49
33
 
50
- After updating your bundle, run the installer
34
+ More accurately, it's a {Rails Engine}[http://guides.rubyonrails.org/engines.html]
35
+ that can be injected into your existing Ruby on Rails application.
51
36
 
52
37
  $> rails generate active_admin:install
53
38
 
54
- The installer creates an initializer used for configuring defaults used by Active Admin as well
55
- as a new folder at <tt>app/admin</tt> to put all your admin configurations.
39
+ The generator adds these core files, among others:
40
+
41
+ app/admin/dashboard.rb
42
+ app/assets/javascripts/active_admin.js
43
+ app/assets/stylesheets/active_admin.css.scss
44
+ config/initializers/active_admin.rb
56
45
 
57
- Migrate your db and start the server:
46
+ Migrate your database and start the server:
58
47
 
59
48
  $> rake db:migrate
60
49
  $> rails server
61
50
 
62
- Visit http://localhost:3000/admin and log in using:
51
+ Visit http://localhost:3000/admin and log in as the default user:
63
52
 
64
53
  * *User*: admin@example.com
65
54
  * *Password*: password
66
55
 
67
56
  Voila! You're on your brand new Active Admin dashboard.
68
57
 
69
- To register your first model, run:
58
+ To register an existing model with Active Admin:
70
59
 
71
- $> rails generate active_admin:resource [MyModelName]
60
+ $> rails generate active_admin:resource MyModel
72
61
 
73
- This creates a file at <tt>app/admin/my_model_names.rb</tt> for configuring the resource.
74
- Refresh your web browser to see the interface.
62
+ This creates a file at <tt>app/admin/my_model.rb</tt> to set up the UI; refresh your browser to see it.
75
63
 
76
64
  == Upgrading
77
65
 
78
- When upgrading to a new version of ActiveAdmin you may need to run
79
- $> rails generate active_admin:assets
80
-
81
- If you get:
82
- uninitialized constant Admin::DashboardController
83
- when trying to view the dashboard (at +/admin+), ensure +app/admin/dashboards.rb+ looks like the current {default}[https://raw.github.com/gregbell/active_admin/master/lib/generators/active_admin/install/templates/dashboard.rb].
66
+ When upgrading to a new version, it's a good idea to check the {CHANGELOG}[https://github.com/gregbell/active_admin/blob/master/CHANGELOG.md].
84
67
 
68
+ To update the JS & CSS assets:
69
+ $> rails generate active_admin:assets
85
70
 
86
- == Next Steps
87
-
88
- The best place to get documentation is at http://activeadmin.info/documentation.html.
89
-
90
- To view a sample Active Admin application, checkout http://demo.activeadmin.info
91
-
92
- If you have any questions, please email the mailing list at http://groups.google.com/group/activeadmin
93
-
71
+ You should also sync these files with their counterparts in the AA source code:
72
+ * app/admin/dashboard.rb {~>}[https://github.com/gregbell/active_admin/blob/master/lib/generators/active_admin/install/templates/dashboard.rb]
73
+ * config/initializers/active_admin.rb {~>}[https://github.com/gregbell/active_admin/blob/master/lib/generators/active_admin/install/templates/active_admin.rb.erb]
94
74
 
95
75
  == Tools Being Used
96
76
 
97
- We believe strongly in not writing code unless we have to, so Active Admin is built using many
98
- other open source projects:
99
-
100
- InheritedResources::
101
- Inherited Resources speeds up development by making your controllers inherit all restful
102
- actions so you just have to focus on what is important.
103
- Formtastic::
104
- A DSL for semantically building amazing forms.
105
- Devise::
106
- User authentication is done using Devise
107
- Kaminari::
108
- Pagination for rails apps
109
- Iconic Icons::
110
- Excellent SVG icon set designed by P.J. Onori: http://somerandomdude.com/projects/iconic
111
-
112
-
113
- == Copyright
114
-
115
- Copyright (c) 2011 Greg Bell, VersaPay Corporation. See LICENSE for details.
77
+ We try not to reinvent the wheel, so Active Admin is built using many other open source projects:
78
+
79
+ {Inherited Resources}[https://github.com/josevalim/inherited_resources]::
80
+ Simplifies controllers with pre-built RESTful controller actions
81
+ {Formtastic}[https://github.com/justinfrench/formtastic]::
82
+ A Rails form builder plugin with semantically rich and accessible markup
83
+ {Devise}[https://github.com/plataformatec/devise]::
84
+ Powerful, extensible user authentication
85
+ {Kaminari}[https://github.com/amatsuda/kaminari]::
86
+ Clean & powerful pagination for your models
87
+ {Iconic Icons}[http://somerandomdude.com/projects/iconic]::
88
+ An excellent SVG icon set designed by P.J. Onori
data/Rakefile CHANGED
@@ -3,7 +3,6 @@ require 'rake'
3
3
  Bundler.setup
4
4
  Bundler::GemHelper.install_tasks
5
5
 
6
-
7
6
  def cmd(command)
8
7
  puts command
9
8
  raise unless system command
@@ -14,8 +13,7 @@ require File.expand_path('../spec/support/detect_rails_version', __FILE__)
14
13
  # Import all our rake tasks
15
14
  FileList['tasks/**/*.rake'].each { |task| import task }
16
15
 
17
- # Run the specs & cukes using parallel_tests
18
- task :default => :parallel_tests
16
+ task :default => :test
19
17
 
20
18
  begin
21
19
  require 'jasmine'
@@ -18,15 +18,14 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_dependency("rails", ">= 3.0.0")
22
- s.add_dependency("jquery-rails", ">= 1.0.0")
23
- s.add_dependency("bourbon", ">= 1.0.0")
24
- s.add_dependency("meta_search", ">= 0.9.2")
25
- s.add_dependency("devise", ">= 1.1.2")
26
- s.add_dependency("formtastic", ">= 2.0.0")
27
- s.add_dependency("inherited_resources", ">= 1.3.1")
28
- s.add_dependency("kaminari", ">= 0.13.0")
29
- s.add_dependency("sass", ">= 3.1.0")
30
- s.add_dependency("fastercsv", ">= 0")
31
- s.add_dependency("arbre", ">= 1.0.1")
21
+ s.add_dependency "arbre", "~> 1.0"
22
+ s.add_dependency "bourbon", ">= 1.0.0", "< 4"
23
+ s.add_dependency "devise", ">= 1.5.4", "< 4"
24
+ s.add_dependency "formtastic", "~> 2.0"
25
+ s.add_dependency "inherited_resources", "~> 1.3"
26
+ s.add_dependency "jquery-rails", ">= 1.0.0", "< 3"
27
+ s.add_dependency "kaminari", "~> 0.13"
28
+ s.add_dependency "meta_search", "~> 1.0"
29
+ s.add_dependency "rails", ">= 3.0.0", "< 4"
30
+ s.add_dependency "sass", "~> 3.1"
32
31
  end
@@ -7,4 +7,4 @@
7
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
8
  <rect x="25" y="25" style="fill:#010101;" width="75" height="12.5"/>
9
9
  <rect x="25" y="75" style="fill:#010101;" width="75" height="12.5"/>
10
- </svg>
10
+ </svg>
@@ -1,4 +1,4 @@
1
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
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
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>
4
+ </svg>
@@ -10,4 +10,4 @@
10
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
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
12
  </g>
13
- </svg>
13
+ </svg>
@@ -1,3 +1,3 @@
1
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
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>
3
+ </svg>
@@ -1,4 +1,4 @@
1
- window.AA.CheckboxToggler = class AA.CheckboxToggler
1
+ window.ActiveAdmin.CheckboxToggler = class ActiveAdmin.CheckboxToggler
2
2
  constructor: (@options, @container)->
3
3
  defaults = {}
4
4
  @options = $.extend {}, defaults, options
@@ -34,4 +34,4 @@ window.AA.CheckboxToggler = class AA.CheckboxToggler
34
34
  @_didChangeCheckbox(el)
35
35
 
36
36
  jQuery ($)->
37
- $.widget.bridge 'checkboxToggler', AA.CheckboxToggler
37
+ $.widget.bridge 'checkboxToggler', ActiveAdmin.CheckboxToggler
@@ -1,4 +1,4 @@
1
- window.AA.DropdownMenu = class AA.DropdownMenu
1
+ window.ActiveAdmin.DropdownMenu = class ActiveAdmin.DropdownMenu
2
2
 
3
3
  constructor: (@options, @element) ->
4
4
 
@@ -98,7 +98,7 @@ window.AA.DropdownMenu = class AA.DropdownMenu
98
98
  $nipple.css "left", nippleLeftPos
99
99
 
100
100
  (($) ->
101
- $.widget.bridge 'aaDropdownMenu', AA.DropdownMenu
101
+ $.widget.bridge 'aaDropdownMenu', ActiveAdmin.DropdownMenu
102
102
 
103
103
  $ ->
104
104
  $(".dropdown_menu").aaDropdownMenu()
@@ -1,5 +1,5 @@
1
1
 
2
- window.AA.Popover = class AA.Popover
2
+ window.ActiveAdmin.Popover = class ActiveAdmin.Popover
3
3
 
4
4
  constructor: (@options, @element) ->
5
5
 
@@ -93,5 +93,5 @@ window.AA.Popover = class AA.Popover
93
93
  $nipple.css "left", nippleLeftPos
94
94
 
95
95
  (($) ->
96
- $.widget.bridge 'popover', AA.Popover
96
+ $.widget.bridge 'popover', ActiveAdmin.Popover
97
97
  )(jQuery)
@@ -1,4 +1,4 @@
1
- window.AA.TableCheckboxToggler = class AA.TableCheckboxToggler extends AA.CheckboxToggler
1
+ window.ActiveAdmin.TableCheckboxToggler = class ActiveAdmin.TableCheckboxToggler extends ActiveAdmin.CheckboxToggler
2
2
  _init: ->
3
3
  super
4
4
 
@@ -22,4 +22,4 @@ window.AA.TableCheckboxToggler = class AA.TableCheckboxToggler extends AA.Checkb
22
22
  $(cell).parent('tr').find(':checkbox').click()
23
23
 
24
24
  jQuery ($)->
25
- $.widget.bridge 'tableCheckboxToggler', AA.TableCheckboxToggler
25
+ $.widget.bridge 'tableCheckboxToggler', ActiveAdmin.TableCheckboxToggler
@@ -1,3 +1,4 @@
1
1
  # Make a namespace for ActiveAdmin plugins
2
2
 
3
- window.AA = {}
3
+ window.ActiveAdmin = {}
4
+ window.AA = window.ActiveAdmin unless window.AA
@@ -12,5 +12,10 @@ $ ->
12
12
  $('.dropdown_button').popover()
13
13
 
14
14
  # Filter form: don't send any inputs that are empty
15
- $('#q_search').submit ->
15
+ $('.filter_form').submit ->
16
16
  $(@).find(':input').filter(-> @value is '').prop 'disabled', true
17
+
18
+ # Filter form: for filters that let you choose the query method from
19
+ # a dropdown, apply that choice to the filter input field.
20
+ $('.filter_form_field.select_and_search select').change ->
21
+ $(@).siblings('input').prop name: "q[#{@value}]"
@@ -1,45 +1,40 @@
1
1
  /* Active Admin CSS */
2
2
  // Reset Away!
3
- body.active_admin {
4
- @include global-reset;
5
- }
3
+ @include global-reset;
6
4
 
7
5
  // Partials
8
- body.active_admin {
9
- @import "active_admin/typography";
10
- @import "active_admin/header";
11
- @import "active_admin/forms";
12
- @import "active_admin/components/comments";
13
- @import "active_admin/components/flash_messages";
14
- @import "active_admin/components/date_picker";
15
- @import "active_admin/components/popovers";
16
- @import "active_admin/components/tables";
17
- @import "active_admin/components/batch_actions";
18
- @import "active_admin/components/blank_slates";
19
- @import "active_admin/components/breadcrumbs";
20
- @import "active_admin/components/dropdown_menu";
21
- @import "active_admin/components/buttons";
22
- @import "active_admin/components/grid";
23
- @import "active_admin/components/links";
24
- @import "active_admin/components/pagination";
25
- @import "active_admin/components/panels";
26
- @import "active_admin/components/columns";
27
- @import "active_admin/components/scopes";
28
- @import "active_admin/components/status_tags";
29
- @import "active_admin/components/table_tools";
30
- @import "active_admin/components/index_list";
31
- @import "active_admin/pages/dashboard";
32
- @import "active_admin/pages/logged_out";
33
- @import "active_admin/structure/footer";
34
- @import "active_admin/structure/main_structure";
35
- @import "active_admin/structure/title_bar";
36
- }
6
+ @import "active_admin/typography";
7
+ @import "active_admin/header";
8
+ @import "active_admin/forms";
9
+ @import "active_admin/components/comments";
10
+ @import "active_admin/components/flash_messages";
11
+ @import "active_admin/components/date_picker";
12
+ @import "active_admin/components/popovers";
13
+ @import "active_admin/components/tables";
14
+ @import "active_admin/components/batch_actions";
15
+ @import "active_admin/components/blank_slates";
16
+ @import "active_admin/components/breadcrumbs";
17
+ @import "active_admin/components/dropdown_menu";
18
+ @import "active_admin/components/buttons";
19
+ @import "active_admin/components/grid";
20
+ @import "active_admin/components/links";
21
+ @import "active_admin/components/pagination";
22
+ @import "active_admin/components/panels";
23
+ @import "active_admin/components/columns";
24
+ @import "active_admin/components/scopes";
25
+ @import "active_admin/components/status_tags";
26
+ @import "active_admin/components/table_tools";
27
+ @import "active_admin/components/index_list";
28
+ @import "active_admin/pages/logged_out";
29
+ @import "active_admin/structure/footer";
30
+ @import "active_admin/structure/main_structure";
31
+ @import "active_admin/structure/title_bar";
37
32
 
38
- body.active_admin {
33
+ body {
39
34
  @include sans-family;
40
35
  line-height: 150%;
41
36
  font-size: 72%;
42
- background: #fff;
37
+ background: $body-background-color;
43
38
  margin: 0;
44
39
  padding: 0;
45
40
  color: $text-color;
@@ -4,8 +4,8 @@ form {
4
4
  ul, ol, li, fieldset, legend, input, textarea, select, p { margin:0; padding:0; }
5
5
  ol, ul { list-style: none }
6
6
 
7
- fieldset {
8
- border: 0;
7
+ fieldset {
8
+ border: 0;
9
9
  padding: 10px 0;
10
10
  margin-bottom: 20px;
11
11
 
@@ -24,8 +24,11 @@ form {
24
24
  float: left;
25
25
  font-size: 1.0em;
26
26
  font-weight: bold;
27
- color: $section-header-text-color;
28
- abbr { border: none; color: #aaa; }
27
+ color: $form-label-color;
28
+ abbr {
29
+ border: none;
30
+ color: $required-field-marker-color;
31
+ }
29
32
  }
30
33
  }
31
34
 
@@ -37,12 +40,12 @@ form {
37
40
  }
38
41
  }
39
42
 
40
- ol > li > li label {
41
- line-height:100%;
42
- padding-top:0;
43
- input {
44
- line-height:100%;
45
- vertical-align:middle;
43
+ ol > li > li label {
44
+ line-height:100%;
45
+ padding-top:0;
46
+ input {
47
+ line-height:100%;
48
+ vertical-align:middle;
46
49
  margin-top:-0.1em;
47
50
  }
48
51
  }
@@ -50,30 +53,30 @@ form {
50
53
 
51
54
  /* Nested Fieldsets and Legends */
52
55
  fieldset > ol > li {
53
- fieldset {
54
- position:relative;
56
+ fieldset {
57
+ position:relative;
55
58
  padding: 0;
56
59
  margin-bottom: 0;
57
60
 
58
- legend {
59
- position:absolute;
60
- width:95%;
61
- padding-top:0.1em;
62
- left: 0px;
63
- font-size: 100%;
61
+ legend {
62
+ position:absolute;
63
+ width:95%;
64
+ padding-top:0.1em;
65
+ left: 0px;
66
+ font-size: 100%;
64
67
  font-weight: normal;
65
68
  span { position:absolute; }
66
69
  &.label label { position:absolute; }
67
70
  }
68
71
 
69
- ol {
70
- float:left;
71
- width:74%;
72
- margin:0;
73
- padding:0 0 0 20%;
72
+ ol {
73
+ float:left;
74
+ width:74%;
75
+ margin:0;
76
+ padding:0 0 0 20%;
74
77
 
75
78
  li {
76
- padding:0;
79
+ padding:0;
77
80
  border:0;
78
81
  }
79
82
  }
@@ -89,7 +92,7 @@ form {
89
92
  @include sans-family;
90
93
  outline: none;
91
94
  padding: 8px $text-input-horizontal-padding 7px;
92
-
95
+
93
96
  &:focus {
94
97
  border: 1px solid #99a2aa;
95
98
  @include shadow(0,0,4px,#99a2aa);
@@ -99,17 +102,17 @@ form {
99
102
  fieldset > ol > li {
100
103
 
101
104
  /* Hints */
102
- p.inline-hints {
105
+ p.inline-hints {
103
106
  font-size: 0.95em;
104
107
  font-style: italic;
105
- color:#666;
106
- margin: 0.5em 0 0 20%;
108
+ color:#666;
109
+ margin: 0.5em 0 0 20%;
107
110
  }
108
111
 
109
112
  /* Date and Time Fields */
110
113
  &.date, &.time, &.datetime, &.date_select {
111
114
  fieldset ol li {
112
- float:left; width:auto; margin:0 0.5em 0 0;
115
+ float:left; width:auto; margin:0 0.5em 0 0;
113
116
  label { display: none; }
114
117
  input { display:inline; margin:0; padding:0; }
115
118
  }
@@ -117,13 +120,13 @@ form {
117
120
 
118
121
  /* Check Boxes or Radio fields */
119
122
  &.check_boxes, &.radio {
120
- fieldset ol {
123
+ fieldset ol {
121
124
  margin-bottom:-0.6em;
122
- li {
123
- margin:0.1em 0 0.5em 0;
124
- label {
125
- float:none;
126
- width:100%;
125
+ li {
126
+ margin:0.1em 0 0.5em 0;
127
+ label {
128
+ float:none;
129
+ width:100%;
127
130
  input { margin-right:0.2em; }
128
131
  }
129
132
  }
@@ -133,10 +136,10 @@ form {
133
136
  /* Boolean Field */
134
137
  &.boolean {
135
138
  height: 1.1em;
136
- label {
139
+ label {
137
140
  width: 80%;
138
- padding-left:20%;
139
- padding-right: 10px;
141
+ padding-left:20%;
142
+ padding-right: 10px;
140
143
  text-transform: none !important;
141
144
  font-weight: normal;
142
145
  input { margin:0 0.5em 0 0.2em; }
@@ -144,15 +147,15 @@ form {
144
147
  }
145
148
 
146
149
  /* Errors */
147
- p.inline-errors {
150
+ p.inline-errors {
148
151
  color: $error-color;
149
152
  font-weight: bold;
150
- margin:0.3em 0 0 20%;
153
+ margin:0.3em 0 0 20%;
151
154
  }
152
- ul.errors {
155
+ ul.errors {
153
156
  color: $error-color;
154
- margin:0.5em 0 0 20%;
155
- list-style:square;
157
+ margin:0.5em 0 0 20%;
158
+ list-style:square;
156
159
  li { padding:0; border:none; display:list-item; }
157
160
  }
158
161
 
@@ -164,32 +167,32 @@ form {
164
167
  }
165
168
 
166
169
  /* semantic_errors */
167
- ul.errors {
170
+ ul.errors {
168
171
  background: lighten($error-color, 60%);
169
172
  @include rounded(4px);
170
173
  color: $error-color;
171
174
  font-weight: bold;
172
175
  margin-bottom: 10px;
173
176
  padding: 10px;
174
- list-style:square;
177
+ list-style:square;
175
178
  li { margin-left:15px; padding:0; border:none; display:list-item; }
176
179
  }
177
180
 
178
181
  /* Buttons */
179
-
182
+
180
183
  input[type=submit] {
181
184
  @include dark-button;
182
185
  cursor: pointer;
183
-
186
+
184
187
  }
185
-
188
+
186
189
  .buttons, .actions {
187
- margin-top: 15px;
190
+ margin-top: 15px;
188
191
  input[type=submit] { margin-right: 10px; }
189
192
  }
190
-
193
+
191
194
  fieldset.buttons li, fieldset.actions li {
192
- float:left;
195
+ float:left;
193
196
  padding: 0;
194
197
 
195
198
  &.cancel {
@@ -201,16 +204,16 @@ form {
201
204
 
202
205
  }
203
206
 
204
- // -------------------------------------- Sidebar Forms
207
+ // -------------------------------------- Sidebar Forms
205
208
 
206
209
  $sidebar-inner-content-width: $sidebar-width - ($section-padding * 2);
207
210
 
208
- .sidebar_section {
211
+ .sidebar_section {
209
212
 
210
213
  label {
211
214
  display: block;
212
215
  text-transform: uppercase;
213
- color: $section-header-text-color;
216
+ color: $form-label-color;
214
217
  font-size: 0.9em;
215
218
  font-weight: bold;
216
219
  }
@@ -218,7 +221,7 @@ $sidebar-inner-content-width: $sidebar-width - ($section-padding * 2);
218
221
  select {
219
222
  width: $sidebar-inner-content-width;
220
223
  }
221
-
224
+
222
225
  input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], textarea {
223
226
  width: $sidebar-inner-content-width - ($text-input-horizontal-padding * 2);
224
227
  }
@@ -238,10 +241,10 @@ $date-range-filter-input-width: ($sidebar-inner-content-width / 2) - $filter-fie
238
241
 
239
242
  form.filter_form {
240
243
  .filter_form_field {
241
- margin-bottom: 10px;
244
+ margin-bottom: 10px;
242
245
  clear: both;
243
-
244
- &.filter_numeric {
246
+
247
+ &.select_and_search {
245
248
  input[type=text] {
246
249
  margin-left: $filter-field-seperator-width + 4;
247
250
  width: $side-by-side-filter-input-width;
@@ -250,11 +253,11 @@ form.filter_form {
250
253
  width: $side-by-side-filter-select-width;
251
254
  }
252
255
  }
253
-
256
+
254
257
  &.filter_check_boxes {
255
258
  label { margin-bottom: 3px; }
256
- .check_boxes_wrapper label {
257
- font-weight: normal;
259
+ .check_boxes_wrapper label {
260
+ font-weight: normal;
258
261
  margin-bottom: 3px;
259
262
  text-transform: none;
260
263
  font-size: 1.0em;
@@ -268,7 +271,7 @@ form.filter_form {
268
271
  text-align: center;
269
272
  width: $filter-field-seperator-width;
270
273
  }
271
-
274
+
272
275
  input[type=text] {
273
276
  background: #fff url(active_admin_image_path('datepicker/datepicker-input-icon.png')) no-repeat 100% 7px;
274
277
  padding-right: $date-range-filter-input-right-padding;