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
@@ -1,7 +1,6 @@
1
- body.active_admin {
2
- span.icon { vertical-align: middle; display: inline-block; }
3
- span.icon svg { vertical-align: baseline; }
4
- }
1
+ span.icon { vertical-align: middle; display: inline-block; }
2
+ span.icon svg { vertical-align: baseline; }
3
+
5
4
 
6
5
  @mixin icon-color ($color) {
7
6
  span.icon svg {
@@ -19,6 +18,4 @@ body.active_admin {
19
18
  @include icon-size($size);
20
19
  }
21
20
 
22
- body.active_admin {
23
- @include icon-size(0.8em);
24
- }
21
+ @include icon-size(0.8em);
@@ -1,29 +1,29 @@
1
1
  // FROM The Compass Framework (compass-style.org)
2
2
  //
3
3
  // Copyright (c) 2009 Christopher M. Eppstein
4
- //
4
+ //
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  // this software and associated documentation files (the "Software"), to deal in
7
7
  // the Software without restriction, including without limitation the rights to
8
8
  // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
9
  // the Software, and to permit persons to whom the Software is furnished to do so,
10
10
  // subject to the following conditions:
11
- //
11
+ //
12
12
  // The above copyright notice and this permission notice shall be included in all
13
13
  // copies or substantial portions of the Software. No attribution is required by
14
14
  // products that make use of this software.
15
- //
15
+ //
16
16
  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
17
  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
18
  // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
19
  // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
20
  // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
21
  // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- //
22
+ //
23
23
  // Except as contained in this notice, the name(s) of the above copyright holders
24
24
  // shall not be used in advertising or otherwise to promote the sale, use or other
25
25
  // dealings in this Software without prior written authorization.
26
- //
26
+ //
27
27
  // Contributors to this project agree to grant all rights to the copyright holder
28
28
  // of the primary product. Attribution is maintained in the source control history
29
29
  // of the product.
@@ -1,6 +1,6 @@
1
- @mixin rounded($radius: 3px) {
2
- -webkit-border-radius: $radius;
3
- -moz-border-radius: $radius;
1
+ @mixin rounded($radius: 3px) {
2
+ -webkit-border-radius: $radius;
3
+ -moz-border-radius: $radius;
4
4
  border-radius: $radius;
5
5
  }
6
6
 
@@ -2,7 +2,7 @@
2
2
  @include secondary-gradient;
3
3
  @include text-shadow;
4
4
  border: solid 1px #cdcdcd;
5
- @include border-colors(#e6e6e6, #d4d4d4, #cdcdcd);
5
+ @include border-colors(#e6e6e6, #d4d4d4, #cdcdcd);
6
6
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 1px #FFF inset;
7
7
 
8
8
  font-size: 1.0em;
@@ -11,8 +11,8 @@
11
11
  margin-bottom: 0.5em;
12
12
  color: $section-header-text-color;
13
13
  @include icon($section-header-text-color, 1.0em);
14
-
15
- padding: 5px 10px 3px 10px;
14
+
15
+ padding: 5px 10px 3px 10px;
16
16
  }
17
17
 
18
18
  @mixin section-background {
@@ -24,11 +24,11 @@
24
24
  @mixin section {
25
25
  @include section-background;
26
26
  margin-bottom: 20px;
27
-
27
+
28
28
  > h3 { @include section-header; }
29
-
29
+
30
30
  > div { padding: 3px $section-padding $section-padding $section-padding; }
31
-
31
+
32
32
  hr {
33
33
  border: none;
34
34
  border-bottom: 1px solid #E8E8E8;
@@ -1,18 +1,18 @@
1
- @mixin shadow($x: 0, $y: 1px, $blur: 2px, $color: rgba(0,0,0,0.37)) {
2
- box-shadow: $x $y $blur $color;
3
- -moz-box-shadow: $x $y $blur $color;
1
+ @mixin shadow($x: 0, $y: 1px, $blur: 2px, $color: rgba(0,0,0,0.37)) {
2
+ box-shadow: $x $y $blur $color;
3
+ -moz-box-shadow: $x $y $blur $color;
4
4
  -webkit-box-shadow: $x $y $blur $color;
5
5
  }
6
6
 
7
7
  @mixin no-shadow {
8
- box-shadow: none;
9
- -moz-box-shadow: none;
8
+ box-shadow: none;
9
+ -moz-box-shadow: none;
10
10
  -webkit-box-shadow: none;
11
11
  }
12
12
 
13
- @mixin inset-shadow($x: 0, $y: 1px, $blur: 2px, $color: #aaa) {
14
- box-shadow: inset $x $y $blur $color;
15
- -moz-box-shadow: inset $x $y $blur $color;
13
+ @mixin inset-shadow($x: 0, $y: 1px, $blur: 2px, $color: #aaa) {
14
+ box-shadow: inset $x $y $blur $color;
15
+ -moz-box-shadow: inset $x $y $blur $color;
16
16
  -webkit-box-shadow: inset $x $y $blur $color;
17
17
  }
18
18
 
@@ -1,3 +1,3 @@
1
1
  @mixin sans-family {
2
2
  font-family: Helvetica, Arial, sans-serif;
3
- }
3
+ }
@@ -23,4 +23,4 @@
23
23
  border-right-color: $sides;
24
24
  border-bottom-color: $bottom;
25
25
  border-left-color: $sides;
26
- }
26
+ }
@@ -3,6 +3,7 @@
3
3
  // to 'app/assets/stylesheets/active_admin.css.scss'.
4
4
 
5
5
  // Colors
6
+ $body-background-color: #FFF;
6
7
  $primary-color: #5E6469 !default;
7
8
  $secondary-color: #f0f0f0 !default;
8
9
  $text-color: #323537 !default;
@@ -10,9 +11,15 @@ $link-color: #38678b !default;
10
11
  $section-header-text-color: $primary-color !default;
11
12
  $current-menu-item-background: lighten($primary-color, 12%) !default;
12
13
  $hover-menu-item-background: lighten($primary-color, 12%) !default;
13
- $table-stripe-color: lighten($primary-color, 57%) !default;
14
+ $table-stripe-color: lighten($primary-color, 57%) !default;
14
15
  $table-selected-color: #d9e4ec !default;
15
16
  $error-color: #932419 !default;
17
+ $blank-slate-primary-color: #AAA;
18
+ $breadcrumbs-color: #8a949e;
19
+ $breadcrumbs-separator-color: #aab2ba;
20
+ $required-field-marker-color: #aaa;
21
+ $form-label-color: $section-header-text-color;
22
+ $page-header-text-color: #cdcdcd;
16
23
 
17
24
  // Sizes
18
25
  $horizontal-page-margin: 30px !default;
@@ -22,3 +29,4 @@ $cell-horizontal-padding: 12px !default;
22
29
  $section-padding: 15px !default;
23
30
  $text-input-horizontal-padding: 10px !default;
24
31
 
32
+ $blank-slate-border: 1px dashed #DADADA
@@ -1,4 +1,4 @@
1
- &.logged_out {
1
+ body.logged_out {
2
2
  background: #e8e9ea;
3
3
 
4
4
  #content_wrapper{
@@ -9,11 +9,9 @@ $text-color: black;
9
9
  @include global-reset;
10
10
 
11
11
  // Partials
12
- body.active_admin {
13
- @import "active_admin/typography";
14
- }
12
+ @import "active_admin/typography";
15
13
 
16
- body.active_admin {
14
+ body {
17
15
  font-family: Helvetica, Arial, sans-serif;
18
16
  line-height: 150%;
19
17
  font-size: 72%;
@@ -24,8 +22,6 @@ body.active_admin {
24
22
  color: $text-color;
25
23
  }
26
24
 
27
- body.active_admin {
28
-
29
25
  a {
30
26
  color: $text-color;
31
27
  text-decoration: none;
@@ -286,5 +282,3 @@ form {
286
282
  }
287
283
  }
288
284
  }
289
-
290
- }
@@ -1,14 +1,14 @@
1
1
  #footer {
2
- padding: 30px 30px;
3
- font-size: 0.8em;
4
- clear: both;
2
+ padding: 30px 30px;
3
+ font-size: 0.8em;
4
+ clear: both;
5
5
 
6
- p {
6
+ p {
7
7
  padding-top: 10px
8
8
  }
9
9
  }
10
10
 
11
- // -------------------------------------- Index Footer (Under Table)
11
+ // -------------------------------------- Index Footer (Under Table)
12
12
  #index_footer { padding-top: 5px; text-align: right; font-size: 0.85em; }
13
13
 
14
14
  .index_content { clear: both; }
@@ -3,24 +3,24 @@
3
3
  width: 100%;
4
4
  }
5
5
 
6
- #active_admin_content {
7
- margin: 0;
8
- padding: 25px $horizontal-page-margin;
9
-
10
- #main_content_wrapper {
11
- float: left;
12
- width: 100%;
6
+ #active_admin_content {
7
+ margin: 0;
8
+ padding: 25px $horizontal-page-margin;
13
9
 
14
- #main_content{
15
- margin-right: 300px;
10
+ #main_content_wrapper {
11
+ float: left;
12
+ width: 100%;
13
+
14
+ #main_content{
15
+ margin-right: 300px;
16
16
  }
17
17
  }
18
18
 
19
19
  &.without_sidebar #main_content_wrapper #main_content{ margin-right: 0; }
20
20
 
21
- #sidebar {
22
- float: left;
23
- width: $sidebar-width;
21
+ #sidebar {
22
+ float: left;
23
+ width: $sidebar-width;
24
24
  margin-left: -$sidebar-width;
25
25
  }
26
- }
26
+ }
@@ -6,39 +6,39 @@
6
6
  display: table;
7
7
  border-bottom-color: #EEE;
8
8
  width: 100%;
9
- position: relative;
10
- margin: 0;
9
+ position: relative;
10
+ margin: 0;
11
11
  margin-bottom: 15px;
12
- padding: 10px $horizontal-page-margin;
12
+ padding: 10px $horizontal-page-margin;
13
13
  z-index: 800;
14
-
14
+
15
15
  #titlebar_left, #titlebar_right {
16
16
  height: 50px;
17
17
  vertical-align: middle;
18
18
  display: table-cell;
19
19
  }
20
-
20
+
21
21
  #titlebar_right {
22
22
  text-align: right;
23
23
  }
24
-
25
- h2 {
24
+
25
+ h2 {
26
26
  margin: 0;
27
- padding: 0;
27
+ padding: 0;
28
28
  font-size: 2.6em;
29
29
  font-weight: bold;
30
30
  }
31
31
 
32
- .action_items {
33
- a {
34
- @include light-button;
32
+ .action_items {
33
+ a {
34
+ @include light-button;
35
35
  padding: 12px 17px 10px;
36
- span.icon { vertical-align: bottom; margin-right: 4px;}
36
+ span.icon { vertical-align: bottom; margin-right: 4px;}
37
37
  margin: 0px;
38
-
38
+
39
39
  &:hover{
40
40
  @include icon-color(#000);
41
41
  }
42
42
  }
43
43
  }
44
- }
44
+ }
@@ -16,4 +16,4 @@
16
16
  <% end %>
17
17
 
18
18
  <%= render 'active_admin/devise/shared/links' %>
19
- </div>
19
+ </div>
@@ -6,7 +6,7 @@
6
6
  f.inputs do
7
7
  resource.class.authentication_keys.each { |key| f.input key, :input_html => {:autofocus => true}}
8
8
  f.input :password
9
- f.input :remember_me, :label => t('active_admin.devise.login.remember_me'), :as => :boolean, :if => false #devise_mapping.rememberable? }
9
+ f.input :remember_me, :label => t('active_admin.devise.login.remember_me'), :as => :boolean if devise_mapping.rememberable?
10
10
  end
11
11
  f.actions do
12
12
  f.action :submit, :label => t('active_admin.devise.login.submit'), :button_html => { :value => t('active_admin.devise.login.submit') }
@@ -17,4 +17,11 @@
17
17
 
18
18
  <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
19
19
  <%= link_to t('active_admin.devise.links.resend_unlock_instructions'), new_unlock_path(resource_name) %><br />
20
- <% end -%>
20
+ <% end -%>
21
+
22
+ <%- if devise_mapping.omniauthable? %>
23
+ <%- resource_class.omniauth_providers.each do |provider| %>
24
+ <%= link_to t('active_admin.devise.links.sign_in_with_omniauth_provider', :provider => provider.to_s.titleize),
25
+ omniauth_authorize_path(resource_name, provider) %><br />
26
+ <% end -%>
27
+ <% end -%>
@@ -7,11 +7,11 @@
7
7
  CSV
8
8
  end
9
9
 
10
- col_sep = active_admin_config.csv_builder.column_separator || active_admin_application.csv_column_separator
11
- options = (active_admin_config.csv_builder.options || active_admin_application.csv_options).merge(:col_sep => col_sep)
10
+ default = active_admin_application.csv_options
11
+ options = default.merge active_admin_config.csv_builder.options
12
+ columns = active_admin_config.csv_builder.columns
12
13
 
13
14
  csv_output = csv_lib.generate(options) do |csv|
14
- columns = active_admin_config.csv_builder.columns
15
15
  csv << columns.map(&:name)
16
16
  collection.each do |resource|
17
17
  csv << columns.map do |column|
@@ -2,15 +2,17 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
-
5
+
6
6
  <title><%= [@page_title, render_or_call_method_or_proc_on(self, ActiveAdmin.application.site_title)].compact.join(" | ") %></title>
7
7
 
8
- <% ActiveAdmin.application.stylesheets.each do |style| %>
9
- <%= stylesheet_link_tag style.path, style.options.dup %>
8
+ <% ActiveAdmin.application.stylesheets.each do |style, options| %>
9
+ <%= stylesheet_link_tag style, options %>
10
10
  <% end %>
11
11
  <% ActiveAdmin.application.javascripts.each do |path| %>
12
12
  <%= javascript_include_tag path %>
13
13
  <% end %>
14
+
15
+ <%= favicon_link_tag ActiveAdmin.application.favicon if ActiveAdmin.application.favicon %>
14
16
 
15
17
  <%= csrf_meta_tag %>
16
18
  </head>
@@ -0,0 +1,101 @@
1
+ bg:
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
+ 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: "по-малко от"
36
+ main_content: "Добавете %{model}#main_content за да видите съдържание."
37
+ logout: "Изход"
38
+ powered_by: "Задвижва се от %{active_admin} %{version}"
39
+ sidebars:
40
+ filters: "Филтри"
41
+ pagination:
42
+ empty: "Не са намерени %{model}"
43
+ one: "Показване на <b>1</b> %{model}"
44
+ one_page: "Показване на <b>всички %{n}</b> %{model}"
45
+ multiple: "Показване %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> от общо <b>%{total}</b>"
46
+ multiple_without_total: "Показване %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
47
+ entry:
48
+ one: "запис"
49
+ other: "записи"
50
+ any: "Без значение"
51
+ blank_slate:
52
+ content: "Все още няма добавени %{resource_name}."
53
+ link: "Създаване"
54
+ batch_actions:
55
+ button_label: "Масови действия"
56
+ delete_confirmation: "Сигурни ли сте, че искате да изтриете тези %{plural_model}? Това действие не може да бъде върнато назад."
57
+ succesfully_destroyed:
58
+ one: "Успешно изтриване на 1 %{model}"
59
+ other: "Успешно изтриване на %{count} %{plural_model}"
60
+ selection_toggle_explanation: "(Инвертиране на маркирането)"
61
+ link: "Създаване"
62
+ action_label: "%{title} избран"
63
+ labels:
64
+ destroy: "Изтриване"
65
+ comments:
66
+ resource_type: "Тип ресурс"
67
+ author_type: "Тип автор"
68
+ body: "Текст"
69
+ author: "Автор"
70
+ title: "Коментар"
71
+ add: "Добавяне на коментар"
72
+ resource: "Ресурс"
73
+ no_comments_yet: "Все още няма коментари."
74
+ title_content: "Коментари (%{count})"
75
+ errors:
76
+ empty_text: "Коментарът с празен текст не беше запазен."
77
+ devise:
78
+ login:
79
+ title: "Вход"
80
+ remember_me: "Запомни ме"
81
+ submit: "Вход"
82
+ reset_password:
83
+ title: "Забравена парола?"
84
+ submit: "Изпращане на нова парола"
85
+ change_password:
86
+ title: "Промяна на моята парола"
87
+ submit: "Промяна на паролата"
88
+ unlock:
89
+ title: "Изпрати отново инструкциите за отключване"
90
+ submit: "Изпрати инструкциите повторно"
91
+ links:
92
+ sign_in: "Вход"
93
+ forgot_your_password: "Забравена парола?"
94
+ sign_in_with_omniauth_provider: "Вход с %{provider}"
95
+ access_denied:
96
+ message: "Нямате права да извършите това действие."
97
+ index_list:
98
+ table: "Таблица"
99
+ block: "Списък"
100
+ grid: "Грид"
101
+ blog: "Блог"