activeadmin 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -21,12 +21,18 @@
21
21
  download: "Ladda ner:"
22
22
  has_many_new: "Skapa en ny %{model}"
23
23
  has_many_delete: "Ta bort"
24
- filter: "Filter"
25
- clear_filters: "Töm dina filters"
26
- search_field: "Sök %{field}"
27
- equal_to: "Lika med"
28
- greater_than: "Större än"
29
- less_than: "Mindre än"
24
+ has_many_remove: "Ta bort"
25
+ filters:
26
+ buttons:
27
+ filter: "Filter"
28
+ clear: "Töm dina filters"
29
+ predicates:
30
+ contains: "Innehåller"
31
+ equals: "Lika med"
32
+ starts_with: "Börjar med"
33
+ ends_with: "Slutar med"
34
+ greater_than: "Större än"
35
+ less_than: "Mindre än"
30
36
  main_content: "Implementera %{model}#main_content för att kunna visa något."
31
37
  logout: "Logga ut"
32
38
  powered_by: "Powered by %{active_admin} %{version}"
@@ -37,6 +43,7 @@
37
43
  one: "Visar <b>1</b> utav %{model}"
38
44
  one_page: "Visar <b>alla %{n}</b> utav %{model}"
39
45
  multiple: "Visar %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> av <b>%{total}</b> totalt"
46
+ multiple_without_total: "Visar %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
40
47
  entry:
41
48
  one: "inlägg"
42
49
  other: "inlägg"
@@ -79,3 +86,4 @@
79
86
  links:
80
87
  sign_in: "Logga in"
81
88
  forgot_your_password: "Glömt ditt lösenord?"
89
+ sign_in_with_omniauth_provider: "Logga in med %{provider}"
@@ -21,12 +21,18 @@ tr:
21
21
  download: "İndir:"
22
22
  has_many_new: "Yeni %{model} kaydı ekle"
23
23
  has_many_delete: "Sil"
24
- filter: "Filtrele"
25
- clear_filters: "Filtreleri Temizle"
26
- search_field: "%{field} alanında ara"
27
- equal_to: "Eşittir"
28
- greater_than: "Büyükse"
29
- less_than: "Küçükse"
24
+ has_many_remove: "Çıkarmak"
25
+ filters:
26
+ buttons:
27
+ filter: "Filtrele"
28
+ clear: "Filtreleri Temizle"
29
+ predicates:
30
+ contains: "içerir"
31
+ equals: "Eşittir"
32
+ starts_with: "ile başlar"
33
+ ends_with: "ile biter"
34
+ greater_than: "Büyükse"
35
+ less_than: "Küçükse"
30
36
  main_content: "İçeriği görüntülemek için lütfen %{model}#main_content metodunu ekleyin."
31
37
  logout: "Oturumu Sonlandır"
32
38
  powered_by: "Powered by %{active_admin} %{version}"
@@ -37,6 +43,7 @@ tr:
37
43
  one: "<b>1</b> %{model} kaydı görüntüleniyor"
38
44
  one_page: "<b>%{n}</b> kayıt %{model} modelinde görüntüleniyor"
39
45
  multiple: "%{model} toplam %{total} kayıt bulundu. <b>%{from} ile %{to} arası</b> arası görüntüleniyor"
46
+ multiple_without_total: "%{model}. <b>%{from} ile %{to} arası</b> arası görüntüleniyor"
40
47
  entry:
41
48
  one: "Girdi"
42
49
  other: "Girdiler"
@@ -79,3 +86,5 @@ tr:
79
86
  links:
80
87
  sign_in: "Oturum aç"
81
88
  forgot_your_password: "Şifreni mi unuttun?"
89
+ sign_in_with_omniauth_provider: "%{provider} ile giriş yapın"
90
+
@@ -0,0 +1,100 @@
1
+ uk:
2
+ active_admin:
3
+ dashboard: "Панель керування"
4
+ dashboard_welcome:
5
+ welcome: "Ласкаво просимо в Active Admin. Це стандартна сторінка керування сайтом."
6
+ call_to_action: "Щоб додати сюди що-небудь загляніть в 'app/admin/dashboard.rb'"
7
+ view: "Переглянути"
8
+ edit: "Змінити"
9
+ delete: "Видалити"
10
+ delete_confirmation: "Ви впевнені, що хочете це видалити?"
11
+ new_model: "Створити %{model}"
12
+ create_model: "Створити %{model}"
13
+ edit_model: "Змінити %{model}"
14
+ update_model: "Змінити %{model}"
15
+ delete_model: "Видалити %{model}"
16
+ details: "%{model} детальніше"
17
+ cancel: "Відміна"
18
+ empty: "Пусто"
19
+ previous: "Поперед."
20
+ next: "Наст."
21
+ download: "Завантаження:"
22
+ has_many_new: "Додати %{model}"
23
+ has_many_delete: "Прибрати"
24
+ has_many_remove: "Видалити"
25
+ filter: "Фільтрувати"
26
+ clear_filters: "Очистити"
27
+ contains: "Містить"
28
+ starts_with: "Починається з"
29
+ ends_with: "Закінчується"
30
+ equal_to: "="
31
+ greater_than: "більше"
32
+ less_than: "менше"
33
+ main_content: "Створіть %{model}#main_content для відображення вмісту."
34
+ logout: "Вийти"
35
+ powered_by: "Powered by %{active_admin} %{version}"
36
+ sidebars:
37
+ filters: "Фільтри"
38
+ pagination:
39
+ empty: "%{model} не знайдено"
40
+ one: "Результат: <b>1</b> %{model}"
41
+ one_page: "Результат: <b>%{n}</b> %{model}"
42
+ multiple: "Результат: %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> з <b>%{total}</b>"
43
+ multiple_without_total: "Результат: %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
44
+ entry:
45
+ one: "запис"
46
+ other: "записів"
47
+ any: "Будь-який"
48
+ blank_slate:
49
+ content: "Покищо немає %{resource_name}."
50
+ link: "Створити"
51
+ batch_actions:
52
+ button_label: "Групові операції"
53
+ delete_confirmation: "Ви впевнені, що хочете видалити %{plural_model}? Ви не зможете це відмінити."
54
+ succesfully_destroyed:
55
+ one: "Успішно видалено: 1 %{model}"
56
+ few: "Успішно видалено: %{count} %{plural_model}"
57
+ many: "Успішно видалено: %{count} %{plural_model}"
58
+ other: "Успішно видалено: %{count} %{plural_model}"
59
+ selection_toggle_explanation: "(Відмінити все / Зняти виділення)"
60
+ link: "Створити"
61
+ action_label: "%{title} вибране"
62
+ labels:
63
+ destroy: "Видалити"
64
+ comments:
65
+ resource_type: "Тип ресурса"
66
+ author_type: "Тип автора"
67
+ body: "Текст"
68
+ author: "Автор"
69
+ title: "Коментар"
70
+ add: "Додати Коментар"
71
+ resource: "Ресурс"
72
+ no_comments_yet: "Покищо немає коментарів."
73
+ title_content: "Коментарі (%{count})"
74
+ errors:
75
+ empty_text: "Коментар не збережено, текст не повинен бути пустим."
76
+ devise:
77
+ login:
78
+ title: "Вхід"
79
+ remember_me: "Запам'ятати мене"
80
+ submit: "Увійти"
81
+ reset_password:
82
+ title: "Забули пароль?"
83
+ submit: "Скинути пароль"
84
+ change_password:
85
+ title: "Зміна паролю"
86
+ submit: "Змінити пароль"
87
+ unlock:
88
+ title: "Відправити повторно інструкції з розблокування"
89
+ submit: "Відправити повторно інструкції з розблокування"
90
+ links:
91
+ sign_in: "Увійти"
92
+ forgot_your_password: "Забули пароль?"
93
+ sign_in_with_omniauth_provider: "Увійти з допомогою %{provider}"
94
+ access_denied:
95
+ message: "Ви не авторизовані для виконання даної дії."
96
+ index_list:
97
+ table: "Таблиця"
98
+ block: "Список"
99
+ grid: "Сітка"
100
+ blog: "Блог"
@@ -21,12 +21,18 @@ vi:
21
21
  download: "Download:"
22
22
  has_many_new: "Thêm mới %{model}"
23
23
  has_many_delete: "Xóa"
24
- filter: "Lọc"
25
- clear_filters: "Xóa dữ liệu lọc"
26
- search_field: "Tìm kiếm %{field}"
27
- equal_to: "Bằng"
28
- greater_than: "Lớn hơn"
29
- less_than: "Nhỏ hơn"
24
+ has_many_remove: "Hủy bỏ"
25
+ filters:
26
+ buttons:
27
+ filter: "Lọc"
28
+ clear: "Xóa dữ liệu lọc"
29
+ predicates:
30
+ contains: "Thông tin"
31
+ equals: "Bằng"
32
+ starts_with: "Bắt đầu với"
33
+ ends_with: "Kết thúc với việc"
34
+ greater_than: "Lớn hơn"
35
+ less_than: "Nhỏ hơn"
30
36
  main_content: "Xin bổ sung %{model}#main_content để hiển thị nội dung."
31
37
  logout: "Đăng xuất"
32
38
  powered_by: "Powered by %{active_admin} %{version}"
@@ -37,6 +43,7 @@ vi:
37
43
  one: "Đang hiển thị <b>1</b> %{model}"
38
44
  one_page: "Đang hiển thị <b>tất cả %{n}</b> %{model}"
39
45
  multiple: "Đang hiển thị %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> of <b>%{total}</b> trong tất cả."
46
+ multiple_without_total: "Đang hiển thị %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>."
40
47
  entry:
41
48
  one: "entry"
42
49
  other: "entries"
@@ -79,3 +86,5 @@ vi:
79
86
  links:
80
87
  sign_in: "Đăng nhập"
81
88
  forgot_your_password: "Quên mật khẩu của bạn?"
89
+ sign_in_with_omniauth_provider: "Đăng nhập với %{provider}"
90
+
@@ -21,12 +21,18 @@
21
21
  download: "下载:"
22
22
  has_many_new: "新建一个%{model}"
23
23
  has_many_delete: "删除"
24
- filter: "过滤"
25
- clear_filters: "清除条件"
26
- search_field: "查找%{field}"
27
- equal_to: "等于"
28
- greater_than: "大于"
29
- less_than: "小于"
24
+ has_many_remove: "清除"
25
+ filters:
26
+ buttons:
27
+ filter: "过滤"
28
+ clear: "清除条件"
29
+ predicates:
30
+ contains: "包含"
31
+ equals: "等于"
32
+ starts_with: "开头"
33
+ ends_with: "完与"
34
+ greater_than: "大于"
35
+ less_than: "小于"
30
36
  main_content: "请执行 %{model}#main_content 来显示内容."
31
37
  logout: "退出"
32
38
  powered_by: "Powered by %{active_admin} %{version}"
@@ -37,6 +43,7 @@
37
43
  one: "显示 <b>1</b> %{model}"
38
44
  one_page: "显示 <b>所有 %{n}</b> %{model}"
39
45
  multiple: "显示所有 <b>%{total}</b> %{model}中的<b>%{from}&nbsp;-&nbsp;%{to}</b> 条"
46
+ multiple_without_total: "%{model}中的<b>%{from}&nbsp;-&nbsp;%{to}</b> 条"
40
47
  entry:
41
48
  one: "条目"
42
49
  other: "条目"
@@ -79,3 +86,5 @@
79
86
  links:
80
87
  sign_in: "登录"
81
88
  forgot_your_password: "忘记密码?"
89
+ sign_in_with_omniauth_provider: "登入%{provider}"
90
+
@@ -21,12 +21,18 @@
21
21
  download: "下載:"
22
22
  has_many_new: "增加新的 %{model}"
23
23
  has_many_delete: "刪除"
24
- filter: "篩選"
25
- clear_filters: "清除篩選條件"
26
- search_field: "搜尋 %{field}"
27
- equal_to: "等於"
28
- greater_than: "大於"
29
- less_than: "小於"
24
+ has_many_remove: "清除"
25
+ filters:
26
+ buttons:
27
+ filter: "篩選"
28
+ clear: "清除篩選條件"
29
+ predicates:
30
+ contains: "包含"
31
+ equals: "等於"
32
+ starts_with: "开头"
33
+ ends_with: "完与"
34
+ greater_than: "大於"
35
+ less_than: "小於"
30
36
  main_content: "請編寫 %{model}#main_content 以顯示內容。"
31
37
  logout: "登出"
32
38
  powered_by: "Powered by %{active_admin} %{version}"
@@ -37,6 +43,7 @@
37
43
  one: "顯示 <b>1</b> %{model}"
38
44
  one_page: "顯示 <b>全部 %{n}</b> %{model}"
39
45
  multiple: "總計 <b>%{total}</b> 顯示 %{model} 中<b>%{from}&nbsp;-&nbsp;%{to}</b> 筆"
46
+ multiple_without_total: "顯示 %{model} 中<b>%{from}&nbsp;-&nbsp;%{to}</b> 筆"
40
47
  entry:
41
48
  one: "筆"
42
49
  other: "筆"
@@ -79,3 +86,5 @@
79
86
  links:
80
87
  sign_in: "登錄"
81
88
  forgot_your_password: "忘記密碼?"
89
+ sign_in_with_omniauth_provider: "登入%{provider}"
90
+
@@ -1,37 +1,38 @@
1
- # Installation
1
+ # Install
2
2
 
3
- Installing Active Admin in a Rails application is as easy as adding the gem to
4
- your Gemfile:
3
+ ## Gemfile
4
+
5
+ First add the gem to your Gemfile:
5
6
 
6
- # Gemfile
7
7
  gem 'activeadmin'
8
8
 
9
- ## Running the Generator
9
+ ## Initialize Active Admin
10
10
 
11
- Once you have added the gem to your Gemfile (and any other dependencies), you
12
- need to run the Active Admin install generator.
11
+ Use the command below to initialize Active Admin. It would also create a user model
12
+ named AdminUser.
13
13
 
14
14
  $> rails generate active_admin:install
15
15
 
16
- This will install Active Admin the default settings. By default it will create a
17
- new Devise user / model called AdminUser. To change the name of the user class,
18
- simply pass the class as the last argument:
16
+ To create a user model with a different name, pass it as the last parameter:
19
17
 
20
18
  $> rails generate active_admin:install User
21
19
 
22
- Instead of generating an AdminUser class, this command will create a User class.
23
-
24
- You can skip the Devise user class all together by using the `skip-users` flag:
20
+ You could also skip the creation of this user model. But note that in this case, you
21
+ need to make additional changes in `config/intializers/active_admin.rb`.
25
22
 
26
23
  $> rails generate active_admin:install --skip-users
27
24
 
28
- NOTE: If you don't use the default user settings, you will need to configure the
29
- settings in `config/intializers/active_admin.rb` to suite your needs.
25
+ After the generator finishes, you need to migrate the database:
26
+
27
+ $> rake db:migrate
28
+
29
+ ## Register your models with Active Admin
30
30
 
31
- After running the installer, run `rake db:migrate` to ensure that all db tables
32
- are created.
31
+ This creates a file in `app/admin/` to hold any resource-specific configuration.
33
32
 
34
- ## Upgrading
33
+ $> rails generate active_admin:resource Post
34
+
35
+ # Upgrade
35
36
 
36
37
  To upgrade Active Admin, simply update the version number in your Gemfile, then
37
38
  run the assets generator:
@@ -41,6 +42,9 @@ run the assets generator:
41
42
  This command makes sure you have all the latest assets and your installation is
42
43
  up to date. Each time you upgrade Active Admin, you should run this command.
43
44
 
45
+
46
+ # Gem compatibility
47
+
44
48
  ## will_paginate compatibility
45
49
 
46
50
  If you use `will_paginate` in your app, you need to configure an initializer for
@@ -126,4 +126,4 @@ The "utility navigation" shown at the top right when logged in by default shows
126
126
  admin.add_logout_button_to_menu menu # can also pass priority & html_options for link_to to use
127
127
  end
128
128
  end
129
- end
129
+ end
@@ -50,7 +50,7 @@ in Active Admin:
50
50
  end
51
51
  end
52
52
 
53
- This creates a sidebar section named "Help" containing an unordered list.
53
+ This creates a sidebar section named "Help" containing an unordered list.
54
54
  To view the full customization options, visit [Sidebars](7-sidebars.md).
55
55
 
56
56
  ## Add an Action Item
@@ -81,11 +81,11 @@ and is the functional equivalent of `collection_action`.
81
81
  # do stuff here
82
82
  redirect_to admin_my_page_path, :notice => "You did stuff!"
83
83
  end
84
-
84
+
85
85
  action_item do
86
86
  link_to "Do Stuff", admin_my_page_ex_path, :method => :post
87
87
  end
88
-
88
+
89
89
  content do
90
90
  para "Hello World"
91
91
  end
@@ -1,8 +1,8 @@
1
1
  # Decorators
2
2
 
3
3
  Active Admin supports the use of decorators for resources. Resources will be
4
- be decorated for the index and show blocks. The
5
- [draper](https://github.com/drapergem/draper) gem is recommended but not required
4
+ decorated for the index and show blocks. The
5
+ [draper](https://github.com/drapergem/draper) gem is recommended but not required
6
6
  (more on requirements below). Note, that Active Admin works out of the box with
7
7
  Draper `>= 1.0.0`.
8
8
 
@@ -48,3 +48,19 @@ Then the following is possible
48
48
  end
49
49
  end
50
50
  end
51
+
52
+ ## Forms
53
+
54
+ Note that the resource proveded to form_for also gets decorated.
55
+
56
+ In most cases this will work as expected. However, it is possible to disable
57
+ automatic decoration in the form with the `decorate` option:
58
+
59
+ ActiveAdmin.register Post do
60
+ decorate_with PostDecorator
61
+
62
+ form decorate: false do
63
+ # ...
64
+ end
65
+ end
66
+
@@ -10,22 +10,21 @@ non-breaking space or some text. The text_node method can be used to insert
10
10
  these elements into the page inside of other Arbre components or resource
11
11
  controller functions.
12
12
 
13
- ActiveAdmin.register Post do
14
- show do
15
- panel "Post Details" do
16
- row("") { post.id }
17
- row("Tags") do
18
- text_node link_to "#{tag}",
19
- admin_post_path( q: { tagged_with_contains: tag } )
20
- text_node "&nbsp".html_safe
21
- end
22
- end
23
- end
24
- end
25
-
26
- ## Common Components
27
-
28
- ### Panel Component
13
+ ActiveAdmin.register Post do
14
+ show do
15
+ panel "Post Details" do
16
+ row("") { post.id }
17
+ row("Tags") do
18
+ text_node link_to "#{tag}",
19
+ admin_post_path( q: { tagged_with_contains: tag } )
20
+ text_node "&nbsp".html_safe
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+
27
+ ## Panels
29
28
 
30
29
  A panel is a component that takes up all available horizontal space and takes a
31
30
  title and a hash of attributes as arguments. If a sidebar is present, a panel
@@ -45,47 +44,47 @@ The following code will create two stacked panels:
45
44
 
46
45
  end
47
46
 
48
- ### Columns Component
47
+ ## Columns
49
48
 
50
49
  The Columns component allows you draw content into scalable columns. All you
51
50
  need to do is define the number of columns and the component will take care of
52
51
  the rest.
53
52
 
54
53
  #### Simple Columns
55
-
56
- To create simple columnns, use the #columns method. Within the block, call the
57
- #column method to create a new column.
58
54
 
59
- columns do
60
-
61
- column do
62
- span "Column #1"
63
- end
64
-
65
- column do
66
- span "Column #2"
67
- end
55
+ To create simple columnns, use the #columns method. Within the block, call
56
+ the #column method to create a new column.
57
+
58
+ columns do
59
+
60
+ column do
61
+ span "Column #1"
62
+ end
63
+
64
+ column do
65
+ span "Column #2"
66
+ end
68
67
 
69
- end
68
+ end
70
69
 
71
- #### Multiple Span Columns
70
+ ### Spannig Multiple Columns
72
71
 
73
72
  To create columns that have multiple spans, pass the :span option to the column
74
73
  method.
75
74
 
76
- columns do
75
+ columns do
77
76
  column :span => 2 do
78
- span "Column # 1
77
+ span "Column # 1"
79
78
  end
80
79
  column do
81
- span "Column # 2
80
+ span "Column # 2"
82
81
  end
83
82
  end
84
83
 
85
84
  By default, each column spans 1 column. The above layout would have 2 columns,
86
85
  the first being twice as large as the second.
87
86
 
88
- #### Max and Mix Column Sizes
87
+ ### Custom Column Widths
89
88
 
90
89
  Active Admin uses a fluid width layout, causing column width to be defined
91
90
  using percentages. Due to using this style of layout, columns can shrink or
@@ -94,34 +93,34 @@ columns provide :max_width and :min_width options.
94
93
 
95
94
  columns do
96
95
  column :max_width => "200px", :min_width => "100px" do
97
- span "Column # 1
96
+ span "Column # 1"
98
97
  end
99
98
  column do
100
- span "Column # 2
99
+ span "Column # 2"
101
100
  end
102
101
  end
103
102
 
104
103
  In the above example, the first column will not grow larger than 200px and will
105
104
  not shrink less than 100px.
106
105
 
107
- ### Table For Component
108
-
109
- Table For provides the ability to create tables like those present in
110
- #index_as_table. table_for takes a collection and a hash of options and then
106
+ ## Table For
107
+
108
+ Table For provides the ability to create tables like those present
109
+ in #index_as_table. table_for takes a collection and a hash of options and then
111
110
  uses #column to build the fields to show with the table.
112
111
 
113
- table_for order.payments do
114
- column "Payment Type" { |payment| payment.payment_type.titleize }
115
- column "Received On", :created_at
116
- column "Payment Details & Notes", :payment_details
117
- column "Amount" { |payment| payment.amount_in_dollars }
118
- end
112
+ table_for order.payments do
113
+ column "Payment Type" { |payment| payment.payment_type.titleize }
114
+ column "Received On", :created_at
115
+ column "Payment Details & Notes", :payment_details
116
+ column "Amount" { |payment| payment.amount_in_dollars }
117
+ end
119
118
 
120
119
  the #column method can take a title as its first argument and data
121
120
  (:your_method) as its second (or first if no title provided). Column also
122
121
  takes a block.
123
122
 
124
- ### Status tag
123
+ ## Status tag
125
124
 
126
125
  Status tags provide convenient syntactic sugar for styling items that have
127
126
  status. A common example of where the status tag could be useful is for orders
@@ -131,15 +130,15 @@ status_tag will generate html markup that Active Admin css uses in styling.
131
130
 
132
131
  status_tag('In Progress')
133
132
  # => <span class='status_tag in_progress'>In Progress</span>
134
-
133
+
135
134
  status_tag('active', :ok)
136
135
  # => <span class='status_tag active ok'>Active</span>
137
-
136
+
138
137
  status_tag (
139
- 'active',
140
- :ok,
141
- :class => 'important',
142
- :id => 'status_123',
138
+ 'active',
139
+ :ok,
140
+ :class => 'important',
141
+ :id => 'status_123',
143
142
  :label => 'on'
144
143
  )
145
144
  # => <span class='status_tag active ok important' id='status_123'>on</span>