activeadmin 0.4.4 → 0.5.0.pre

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 (310) hide show
  1. data/.gitignore +3 -0
  2. data/.travis.yml +5 -0
  3. data/CHANGELOG.md +50 -0
  4. data/CONTRIBUTING.md +2 -4
  5. data/Gemfile +10 -4
  6. data/Guardfile +0 -1
  7. data/LICENSE +1 -1
  8. data/README.rdoc +19 -8
  9. data/Rakefile +10 -1
  10. data/activeadmin.gemspec +2 -1
  11. data/app/assets/javascripts/active_admin/application.js +3 -9
  12. data/app/assets/javascripts/active_admin/base.js +1 -0
  13. data/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee +64 -0
  14. data/app/assets/javascripts/active_admin/components/jquery.aa.dropdown-menu.js.coffee +107 -0
  15. data/app/assets/javascripts/active_admin/components/jquery.aa.popover.js.coffee +100 -0
  16. data/app/assets/javascripts/active_admin/components/jquery.aa.table-checkbox-toggler.js.coffee +27 -0
  17. data/app/assets/javascripts/active_admin/lib/namespace.js.coffee +3 -0
  18. data/app/assets/javascripts/active_admin/pages/application.js.coffee +13 -0
  19. data/app/assets/javascripts/active_admin/pages/batch_actions.js.coffee +26 -0
  20. data/app/assets/stylesheets/active_admin/_base.css.scss +32 -26
  21. data/app/assets/stylesheets/active_admin/_forms.css.scss +12 -5
  22. data/app/assets/stylesheets/active_admin/_header.css.scss +1 -2
  23. data/app/assets/stylesheets/active_admin/_typography.css.scss +1 -1
  24. data/app/assets/stylesheets/active_admin/components/_batch_actions.css.scss +11 -0
  25. data/app/assets/stylesheets/active_admin/components/_buttons.scss +1 -2
  26. data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +151 -0
  27. data/app/assets/stylesheets/active_admin/components/_flash_messages.css.scss +3 -3
  28. data/app/assets/stylesheets/active_admin/components/_popovers.css.scss +123 -0
  29. data/app/assets/stylesheets/active_admin/components/_status_tags.scss +1 -1
  30. data/app/assets/stylesheets/active_admin/components/_table_tools.css.scss +20 -27
  31. data/app/assets/stylesheets/active_admin/components/_tables.css.scss +1 -0
  32. data/app/assets/stylesheets/active_admin/mixins/_buttons.css.scss +38 -36
  33. data/app/assets/stylesheets/active_admin/mixins/_gradients.css.scss +5 -5
  34. data/app/assets/stylesheets/active_admin/mixins/_icons.css.scss +7 -3
  35. data/app/assets/stylesheets/active_admin/mixins/_variables.css.scss +19 -17
  36. data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +2 -2
  37. data/app/assets/stylesheets/active_admin/print.css.scss +290 -0
  38. data/app/views/active_admin/dashboard/index.html.arb +1 -1
  39. data/app/views/active_admin/devise/passwords/edit.html.erb +17 -14
  40. data/app/views/active_admin/devise/passwords/new.html.erb +4 -4
  41. data/app/views/active_admin/devise/sessions/new.html.erb +6 -6
  42. data/app/views/active_admin/devise/shared/_links.erb +6 -6
  43. data/app/views/active_admin/page/index.html.arb +1 -1
  44. data/app/views/active_admin/resource/edit.html.arb +1 -1
  45. data/app/views/active_admin/resource/index.csv.erb +1 -1
  46. data/app/views/active_admin/resource/index.html.arb +1 -1
  47. data/app/views/active_admin/resource/new.html.arb +1 -1
  48. data/app/views/active_admin/resource/show.html.arb +1 -1
  49. data/app/views/layouts/active_admin.html.arb +1 -1
  50. data/app/views/layouts/active_admin_logged_out.html.erb +2 -2
  51. data/cucumber.yml +1 -1
  52. data/docs/0-installation.md +10 -1
  53. data/docs/{9-custom-pages.md → 10-custom-pages.md} +0 -0
  54. data/docs/2-resource-customization.md +19 -1
  55. data/docs/3-index-pages.md +31 -0
  56. data/docs/4-csv-format.md +9 -0
  57. data/docs/6-show-screens.md +1 -1
  58. data/docs/9-batch-actions.md +161 -0
  59. data/features/dashboard.feature +31 -8
  60. data/features/development_reloading.feature +1 -1
  61. data/features/edit_page.feature +3 -3
  62. data/features/i18n.feature +35 -0
  63. data/features/index/batch_actions.feature +98 -0
  64. data/features/index/filters.feature +26 -0
  65. data/features/index/format_as_csv.feature +35 -0
  66. data/features/index/index_as_table.feature +30 -2
  67. data/features/index/index_blank_slate.feature +8 -3
  68. data/features/index/index_scopes.feature +130 -24
  69. data/features/index/page_title.feature +12 -0
  70. data/features/new_page.feature +3 -3
  71. data/features/registering_pages.feature +61 -0
  72. data/features/root_to.feature +17 -0
  73. data/features/show/default_content.feature +1 -1
  74. data/features/show/page_title.feature +14 -0
  75. data/features/sidebar_sections.feature +26 -0
  76. data/features/site_title.feature +1 -1
  77. data/features/specifying_actions.feature +7 -6
  78. data/features/step_definitions/action_link_steps.rb +1 -1
  79. data/features/step_definitions/additional_web_steps.rb +7 -1
  80. data/features/step_definitions/batch_action_steps.rb +94 -0
  81. data/features/step_definitions/configuration_steps.rb +30 -8
  82. data/features/step_definitions/factory_steps.rb +12 -0
  83. data/features/step_definitions/format_steps.rb +6 -2
  84. data/features/step_definitions/i18n_steps.rb +3 -0
  85. data/features/step_definitions/table_steps.rb +114 -0
  86. data/features/step_definitions/user_steps.rb +30 -4
  87. data/features/support/env.rb +54 -15
  88. data/features/support/paths.rb +2 -0
  89. data/features/users/logging_in.feature +1 -1
  90. data/features/users/logging_out.feature +2 -1
  91. data/features/users/resetting_password.feature +34 -0
  92. data/lib/active_admin.rb +46 -7
  93. data/lib/active_admin/application.rb +30 -15
  94. data/lib/active_admin/base_controller/menu.rb +3 -3
  95. data/lib/active_admin/batch_actions.rb +17 -0
  96. data/lib/active_admin/batch_actions/controller.rb +25 -0
  97. data/lib/active_admin/batch_actions/resource_extension.rb +126 -0
  98. data/lib/active_admin/batch_actions/views/batch_action_form.rb +35 -0
  99. data/lib/active_admin/batch_actions/views/batch_action_popover.rb +28 -0
  100. data/lib/active_admin/batch_actions/views/batch_action_selector.rb +63 -0
  101. data/lib/active_admin/batch_actions/views/selection_cells.rb +37 -0
  102. data/lib/active_admin/comments.rb +5 -2
  103. data/lib/active_admin/comments/comment.rb +4 -3
  104. data/lib/active_admin/comments/views/active_admin_comments.rb +5 -5
  105. data/lib/active_admin/component.rb +1 -18
  106. data/lib/active_admin/csv_builder.rb +8 -3
  107. data/lib/active_admin/dashboards.rb +21 -4
  108. data/lib/active_admin/dashboards/dashboard_controller.rb +1 -5
  109. data/lib/active_admin/dependency_checker.rb +1 -1
  110. data/lib/active_admin/dsl.rb +61 -4
  111. data/lib/active_admin/engine.rb +1 -1
  112. data/lib/active_admin/filters.rb +8 -0
  113. data/lib/active_admin/filters/dsl.rb +12 -0
  114. data/lib/active_admin/filters/forms.rb +93 -0
  115. data/lib/active_admin/filters/resource_extension.rb +92 -0
  116. data/lib/active_admin/form_builder.rb +88 -33
  117. data/lib/active_admin/helpers/collection.rb +23 -0
  118. data/lib/active_admin/helpers/optional_display.rb +1 -1
  119. data/lib/active_admin/inputs/filter_select_input.rb +1 -1
  120. data/lib/active_admin/locales/bg.yml +37 -1
  121. data/lib/active_admin/locales/ca.yml +36 -0
  122. data/lib/active_admin/locales/cs.yml +36 -0
  123. data/lib/active_admin/locales/da.yml +36 -0
  124. data/lib/active_admin/locales/de.yml +42 -0
  125. data/lib/active_admin/locales/en.yml +27 -2
  126. data/lib/active_admin/locales/es.yml +45 -4
  127. data/lib/active_admin/locales/fr.yml +22 -0
  128. data/lib/active_admin/locales/{he_il.yml → he.yml} +37 -2
  129. data/lib/active_admin/locales/hr.yml +49 -5
  130. data/lib/active_admin/locales/hu.yml +21 -0
  131. data/lib/active_admin/locales/it.yml +36 -1
  132. data/lib/active_admin/locales/ja.yml +36 -0
  133. data/lib/active_admin/locales/ko.yml +36 -1
  134. data/lib/active_admin/locales/lv.yml +28 -2
  135. data/lib/active_admin/locales/nl.yml +42 -1
  136. data/lib/active_admin/locales/no-NB.yml +15 -0
  137. data/lib/active_admin/locales/pl.yml +45 -1
  138. data/lib/active_admin/locales/pt-BR.yml +36 -1
  139. data/lib/active_admin/locales/ro.yml +67 -0
  140. data/lib/active_admin/locales/ru.yml +43 -3
  141. data/lib/active_admin/locales/sv-SE.yml +41 -1
  142. data/lib/active_admin/locales/tr.yml +80 -0
  143. data/lib/active_admin/locales/vi.yml +80 -0
  144. data/lib/active_admin/locales/{zh_cn.yml → zh-CN.yml} +42 -2
  145. data/lib/active_admin/locales/zh-TW.yml +36 -1
  146. data/lib/active_admin/menu.rb +55 -30
  147. data/lib/active_admin/menu_builder.rb +65 -0
  148. data/lib/active_admin/menu_item.rb +55 -14
  149. data/lib/active_admin/namespace.rb +25 -55
  150. data/lib/active_admin/page.rb +15 -10
  151. data/lib/active_admin/resource.rb +9 -0
  152. data/lib/active_admin/resource/action_items.rb +4 -4
  153. data/lib/active_admin/resource/controllers.rb +1 -1
  154. data/lib/active_admin/resource/menu.rb +19 -21
  155. data/lib/active_admin/resource/naming.rb +55 -45
  156. data/lib/active_admin/resource/sidebars.rb +0 -13
  157. data/lib/active_admin/resource_collection.rb +10 -10
  158. data/lib/active_admin/resource_controller.rb +5 -5
  159. data/lib/active_admin/resource_controller/actions.rb +2 -0
  160. data/lib/active_admin/resource_controller/collection.rb +13 -4
  161. data/lib/active_admin/resource_dsl.rb +12 -6
  162. data/lib/active_admin/router.rb +27 -8
  163. data/lib/active_admin/scope.rb +1 -0
  164. data/lib/active_admin/sidebar_section.rb +2 -6
  165. data/lib/active_admin/version.rb +1 -1
  166. data/lib/active_admin/view_factory.rb +18 -13
  167. data/lib/active_admin/view_helpers.rb +0 -2
  168. data/lib/active_admin/view_helpers/auto_link_helper.rb +2 -1
  169. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +24 -25
  170. data/lib/active_admin/view_helpers/display_helper.rb +1 -1
  171. data/lib/active_admin/view_helpers/fields_for.rb +44 -0
  172. data/lib/active_admin/view_helpers/form_helper.rb +6 -0
  173. data/lib/active_admin/view_helpers/view_factory_helper.rb +1 -1
  174. data/lib/active_admin/views/components/action_list_popover.rb +29 -0
  175. data/lib/active_admin/views/components/attributes_table.rb +6 -2
  176. data/lib/active_admin/views/components/dropdown_menu.rb +73 -0
  177. data/lib/active_admin/views/components/paginated_collection.rb +13 -14
  178. data/lib/active_admin/views/components/popover.rb +27 -0
  179. data/lib/active_admin/views/components/scopes.rb +8 -13
  180. data/lib/active_admin/views/components/sidebar_section.rb +1 -1
  181. data/lib/active_admin/views/components/site_title.rb +55 -0
  182. data/lib/active_admin/views/components/status_tag.rb +4 -4
  183. data/lib/active_admin/views/components/table_for.rb +18 -18
  184. data/lib/active_admin/views/dashboard_section_renderer.rb +1 -1
  185. data/lib/active_admin/views/footer.rb +18 -0
  186. data/lib/active_admin/views/header.rb +31 -0
  187. data/lib/active_admin/views/index_as_block.rb +3 -0
  188. data/lib/active_admin/views/index_as_blog.rb +4 -0
  189. data/lib/active_admin/views/index_as_grid.rb +2 -0
  190. data/lib/active_admin/views/index_as_table.rb +19 -6
  191. data/lib/active_admin/views/pages/base.rb +14 -48
  192. data/lib/active_admin/views/pages/form.rb +3 -3
  193. data/lib/active_admin/views/pages/index.rb +56 -24
  194. data/lib/active_admin/views/pages/layout.rb +2 -2
  195. data/lib/active_admin/views/pages/page.rb +10 -4
  196. data/lib/active_admin/views/pages/show.rb +11 -8
  197. data/lib/active_admin/views/tabbed_navigation.rb +3 -3
  198. data/lib/active_admin/views/title_bar.rb +50 -0
  199. data/lib/active_admin/views/utility_nav.rb +41 -0
  200. data/lib/generators/active_admin/assets/assets_generator.rb +1 -1
  201. data/lib/generators/active_admin/assets/templates/3.0/active_admin.js +1 -0
  202. data/lib/generators/active_admin/assets/templates/3.1/active_admin.css.scss +26 -3
  203. data/lib/generators/active_admin/devise/devise_generator.rb +2 -2
  204. data/lib/generators/active_admin/install/install_generator.rb +10 -10
  205. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +21 -1
  206. data/lib/generators/active_admin/install/templates/admin_user.rb.erb +20 -0
  207. data/lib/generators/active_admin/install/templates/dashboard.rb +33 -0
  208. data/lib/generators/active_admin/resource/templates/admin.rb +1 -1
  209. data/spec/integration/memory_spec.rb +1 -11
  210. data/spec/javascripts/coffeescripts/jquery.aa.checkbox-toggler-spec.js.coffee +50 -0
  211. data/spec/javascripts/coffeescripts/jquery.aa.popover-spec.js.coffee +82 -0
  212. data/spec/javascripts/coffeescripts/jquery.aa.table-checkbox-toggler-spec.js.coffee +34 -0
  213. data/spec/javascripts/compiled/jquery.aa.checkbox-toggler-spec.js +60 -0
  214. data/spec/javascripts/compiled/jquery.aa.popover-spec.js +106 -0
  215. data/spec/javascripts/compiled/jquery.aa.table-checkbox-toggler-spec.js +37 -0
  216. data/spec/javascripts/fixtures/checkboxes.html +9 -0
  217. data/spec/javascripts/fixtures/table_checkboxes.html +17 -0
  218. data/spec/javascripts/helpers/SpecHelper.js +3 -0
  219. data/spec/javascripts/helpers/vendor/jasmine-fixture-0.0.5.js +108 -0
  220. data/spec/javascripts/helpers/vendor/jasmine-jquery.js +288 -0
  221. data/spec/javascripts/helpers/vendor/sinon-1.2.0.js +2915 -0
  222. data/spec/javascripts/support/jasmine.yml +74 -0
  223. data/spec/javascripts/support/jasmine_config.rb +23 -0
  224. data/spec/javascripts/support/jasmine_runner.rb +32 -0
  225. data/spec/javascripts/support/jquery-ui-1.8.16.custom.min.js +34 -0
  226. data/spec/javascripts/support/jquery.min.js +4 -0
  227. data/spec/spec_helper.rb +13 -13
  228. data/spec/spec_helper_without_rails.rb +2 -3
  229. data/spec/support/detect_rails_version.rb +16 -10
  230. data/spec/support/rails_template.rb +13 -1
  231. data/spec/support/templates/admin/stores.rb +1 -0
  232. data/spec/support/templates/en.yml +6 -0
  233. data/spec/unit/action_builder_spec.rb +38 -0
  234. data/spec/unit/application_spec.rb +12 -16
  235. data/spec/unit/base_controller_shared_examples.rb +3 -6
  236. data/spec/unit/batch_actions/resource_spec.rb +91 -0
  237. data/spec/unit/batch_actions/settings_spec.rb +61 -0
  238. data/spec/unit/breadcrumbs_spec.rb +33 -0
  239. data/spec/unit/comments_spec.rb +6 -0
  240. data/spec/unit/config_shared_examples.rb +17 -64
  241. data/spec/unit/csv_builder_spec.rb +12 -2
  242. data/spec/unit/dashboard_controller_spec.rb +11 -5
  243. data/spec/unit/dsl_include_spec.rb +20 -0
  244. data/spec/unit/{filter_form_builder_spec.rb → filters/filter_form_builder_spec.rb} +10 -7
  245. data/spec/unit/filters/resource_spec.rb +60 -0
  246. data/spec/unit/form_builder_spec.rb +180 -28
  247. data/spec/unit/helpers/collection_spec.rb +65 -0
  248. data/spec/unit/menu_item_spec.rb +48 -53
  249. data/spec/unit/menu_spec.rb +46 -32
  250. data/spec/unit/namespace/register_page_spec.rb +0 -6
  251. data/spec/unit/namespace/register_resource_spec.rb +1 -8
  252. data/spec/unit/namespace_spec.rb +8 -2
  253. data/spec/unit/page_spec.rb +20 -8
  254. data/spec/unit/resource/naming_spec.rb +27 -26
  255. data/spec/unit/resource/sidebars_spec.rb +0 -7
  256. data/spec/unit/resource_collection_spec.rb +11 -11
  257. data/spec/unit/resource_controller/collection_spec.rb +23 -1
  258. data/spec/unit/resource_controller/sidebars_spec.rb +46 -0
  259. data/spec/unit/resource_controller_spec.rb +43 -0
  260. data/spec/unit/resource_registration_spec.rb +2 -13
  261. data/spec/unit/resource_spec.rb +0 -42
  262. data/spec/unit/routing_spec.rb +60 -14
  263. data/spec/unit/scope_spec.rb +7 -0
  264. data/spec/unit/view_factory_spec.rb +9 -6
  265. data/spec/unit/view_helpers/fields_for_spec.rb +41 -0
  266. data/spec/unit/view_helpers/form_helper_spec.rb +18 -0
  267. data/spec/unit/views/components/action_list_popover_spec.rb +30 -0
  268. data/spec/unit/views/components/attributes_table_spec.rb +32 -20
  269. data/spec/unit/views/components/batch_action_popover_spec.rb +33 -0
  270. data/spec/unit/views/components/blank_slate_spec.rb +5 -3
  271. data/spec/unit/views/components/columns_spec.rb +32 -22
  272. data/spec/unit/views/components/paginated_collection_spec.rb +54 -12
  273. data/spec/unit/views/components/panel_spec.rb +11 -6
  274. data/spec/unit/views/components/popover_spec.rb +33 -0
  275. data/spec/unit/views/components/sidebar_section_spec.rb +6 -6
  276. data/spec/unit/views/components/site_title_spec.rb +78 -0
  277. data/spec/unit/views/components/status_tag_spec.rb +17 -10
  278. data/spec/unit/views/components/table_for_spec.rb +37 -17
  279. data/spec/unit/views/pages/layout_spec.rb +51 -10
  280. data/spec/unit/views/tabbed_navigation_spec.rb +44 -23
  281. data/tasks/js.rake +32 -0
  282. data/tasks/test.rake +1 -1
  283. metadata +233 -200
  284. data/lib/active_admin/arbre.rb +0 -22
  285. data/lib/active_admin/arbre/builder.rb +0 -125
  286. data/lib/active_admin/arbre/context.rb +0 -45
  287. data/lib/active_admin/arbre/html/attributes.rb +0 -20
  288. data/lib/active_admin/arbre/html/class_list.rb +0 -24
  289. data/lib/active_admin/arbre/html/collection.rb +0 -27
  290. data/lib/active_admin/arbre/html/document.rb +0 -42
  291. data/lib/active_admin/arbre/html/element.rb +0 -161
  292. data/lib/active_admin/arbre/html/html5_elements.rb +0 -47
  293. data/lib/active_admin/arbre/html/tag.rb +0 -145
  294. data/lib/active_admin/arbre/html/text_node.rb +0 -35
  295. data/lib/active_admin/filter_form_builder.rb +0 -53
  296. data/lib/active_admin/renderer.rb +0 -87
  297. data/lib/active_admin/resource_controller/filters.rb +0 -58
  298. data/lib/active_admin/stylesheets/active_admin/mixins/_utilities.scss +0 -0
  299. data/lib/active_admin/view_helpers/filter_form_helper.rb +0 -36
  300. data/lib/active_admin/view_helpers/renderer_helper.rb +0 -29
  301. data/lib/active_admin/views/header_renderer.rb +0 -82
  302. data/lib/generators/active_admin/assets/templates/dashboards.rb +0 -36
  303. data/lib/generators/active_admin/install/templates/dashboards.rb +0 -44
  304. data/spec/unit/arbre/context_spec.rb +0 -35
  305. data/spec/unit/arbre/html/element_finder_methods_spec.rb +0 -110
  306. data/spec/unit/arbre/html/element_spec.rb +0 -236
  307. data/spec/unit/arbre/html/tag_attributes_spec.rb +0 -61
  308. data/spec/unit/arbre/html/tag_spec.rb +0 -63
  309. data/spec/unit/arbre/html_spec.rb +0 -228
  310. data/spec/unit/renderer_spec.rb +0 -126
@@ -1,4 +1,4 @@
1
- body.logged_in {
1
+ &.logged_in {
2
2
  .flash {
3
3
  @include gradient(#f7f1d3, #f5edc5);
4
4
  @include text-shadow(#fafafa);
@@ -25,7 +25,7 @@ body.logged_in {
25
25
  }
26
26
  }
27
27
 
28
- body.logged_out {
28
+ &.logged_out {
29
29
  .flash {
30
30
  @include no-shadow;
31
31
  @include text-shadow(#fff);
@@ -36,4 +36,4 @@ body.logged_out {
36
36
  margin-bottom: 10px;
37
37
  padding: 0;
38
38
  }
39
- }
39
+ }
@@ -0,0 +1,123 @@
1
+ .popover {
2
+ display: inline-block;
3
+ position: absolute;
4
+ background-color: white;
5
+ padding: 2px;
6
+ @include box-shadow(rgba(0,0,0,0.4) 0 1px 3px, lighten($primary-color, 15%) 0px 1px 0px 0px inset);
7
+ background-color: $primary-color;
8
+ @include gradient(lighten($primary-color, 4%), darken($primary-color, 5%));
9
+ border: solid 1px darken($primary-color, 10%);
10
+ border-top-color: darken($primary-color, 4%);
11
+ border-bottom-color: darken($primary-color, 17%);
12
+
13
+ border-radius: 4px;
14
+
15
+ .popover_nipple{
16
+
17
+ // The nipple's border
18
+ content: "";
19
+ position: absolute;
20
+ top: -6px;
21
+ display: block;
22
+ width: 0;
23
+ height: 0;
24
+ border-width: 0 6px 6px;
25
+ border-style: solid;
26
+ border-color: darken($primary-color, 4%) transparent;
27
+ z-index: 100;
28
+
29
+ // The nipple's inner shadow
30
+
31
+ &:before {
32
+ content: ' ';
33
+ position: absolute;
34
+ width: 0;
35
+ height: 0;
36
+ border-width: 0 5px 5px;
37
+ border-style: solid;
38
+ border-color: lighten($primary-color, 15%) transparent;
39
+ left: -5px;
40
+ top: 1px;
41
+ }
42
+
43
+ // The nipple's background color
44
+
45
+ &:after {
46
+ content: ' ';
47
+ position: absolute;
48
+ width: 0;
49
+ height: 0;
50
+ border-width: 0 5px 5px;
51
+ border-style: solid;
52
+ border-color: lighten($primary-color, 4%) transparent;
53
+ left: -5px;
54
+ top: 2px;
55
+ }
56
+ }
57
+
58
+ .popover_contents {
59
+ display: block;
60
+ background-color: #FFF;
61
+ border: solid 1px darken($primary-color, 10%);
62
+ @include box-shadow(lighten($primary-color, 5%) 0px 1px 0px 0px);
63
+ border-radius: 3px;
64
+ margin: 0;
65
+ overflow: hidden;
66
+ padding: 8px;
67
+ }
68
+
69
+ }
70
+
71
+ //-------------------------------------- Popover with action list
72
+
73
+ .popover {
74
+ ul.popover_contents {
75
+ list-style-type: none;
76
+ padding: 0;
77
+
78
+ li {
79
+ display: block;
80
+ border-bottom: solid 1px #ebebeb;
81
+ @include box-sizing(border-box);
82
+
83
+ a {
84
+ display: block;
85
+ @include box-sizing(padding-box);
86
+ font-size: 0.95em;
87
+ font-weight: bold;
88
+ padding: 7px 16px 5px;
89
+ text-decoration: none;
90
+ text-align: center;
91
+ -webkit-font-smoothing: antialiased;
92
+
93
+ &:hover {
94
+ @include highlight-gradient;
95
+ @include text-shadow(#5a83aa);
96
+ color: #FFF;
97
+ }
98
+
99
+ &:active {
100
+ @include reverse-highlight-gradient;
101
+ color: #FFF;
102
+ }
103
+
104
+ }
105
+
106
+ &:first-child {
107
+ a {
108
+ border-top-left-radius: 2px;
109
+ border-top-right-radius: 2px;
110
+ }
111
+
112
+ }
113
+
114
+ &:last-child {
115
+ a {
116
+ border-bottom-left-radius: 2px;
117
+ border-bottom-right-radius: 2px;
118
+ }
119
+ border: none;
120
+ }
121
+ }
122
+ }
123
+ }
@@ -1,4 +1,4 @@
1
- .status {
1
+ .status_tag {
2
2
  background: darken($secondary-color, 15%);
3
3
  color: #fff;
4
4
  text-transform: uppercase;
@@ -16,39 +16,31 @@
16
16
  .table_tools_segmented_control + .table_tools_button {
17
17
  margin-left: 6px;
18
18
  }
19
+
19
20
  }
20
21
 
21
- a.table_tools_button {
22
+
23
+ a.table_tools_button, .table_tools .dropdown_menu_button {
22
24
  @include light-button;
25
+ @include gradient(#FFFFFF, #F0F0F0);
26
+ @include border-colors(#d9d9d9, #d0d0d0, #c5c5c5);
23
27
  font-size: 0.9em;
24
- color: #777;
25
28
  text-decoration: none;
26
29
  padding: 4px 14px 4px;
27
30
  position: relative;
28
-
29
- &.selected {
30
- @include box-shadow(0 1px 0px rgba(0,0,0,0.10), 0 0 0 1px #FFF inset, 0 0 10px rgba(120,175,220,0.36));
31
-
32
- &:active {
33
- @include box-shadow(0 1px 0px rgba(0,0,0,0.10), 0 0 0 1px #FFF inset, 0 0 10px rgba(120,175,220,0.36), 0, 1px, 2px, rgba(0,0,0,0.30));
31
+ -webkit-transition: all 0.08s ease-in;
32
+
33
+ &:not(.disabled) {
34
+ &:hover {
35
+ @include gradient(#FFFFFF, #F6F6F6);
34
36
  }
35
- }
36
37
 
37
- &.dropdown_button {
38
- padding-right: 20px;
39
-
40
- .arrow {
41
- border-color: #777 transparent transparent;
42
- border-style: solid;
43
- border-width: 3px 3px 0;
44
- height: 0;
45
- position: absolute;
46
- top: 8px;
47
- right: 9px;
48
- width: 0;
38
+ &:active {
39
+ @include border-colors(#d7d7d7, #c8c8c8, #c3c3c3);
40
+ @include box-shadow(0 1px 1px 0 rgba(0,0,0,0.17) inset );
41
+ @include gradient(#FFFFFF, #E8E8E8);
49
42
  }
50
43
  }
51
-
52
44
  }
53
45
 
54
46
  .table_tools_segmented_control {
@@ -83,19 +75,20 @@ a.table_tools_button {
83
75
  border-bottom-right-radius: 12px;
84
76
  }
85
77
  }
86
-
78
+
87
79
  &.selected {
80
+
88
81
  a {
89
- background: #F0F0F0;
82
+ @include gradient(#F0F0F0, #FDFDFD);
90
83
  @include box-shadow(0 1px 1px 0 rgba(0,0,0,0.1) inset);
91
- color: #8a8a8a;
92
84
  cursor: default;
93
85
 
94
86
  &:hover {
95
- color: #8a8a8a;
87
+ @include gradient(#F0F0F0, #FDFDFD);
96
88
  }
97
89
  }
98
90
  }
91
+
99
92
  }
100
93
 
101
- }
94
+ }
@@ -26,6 +26,7 @@ table.index_table {
26
26
  text-decoration: none;
27
27
  display: block;
28
28
  white-space: nowrap;
29
+ -webkit-font-smoothing: antialiased;
29
30
  }
30
31
 
31
32
  &.sortable a {
@@ -1,11 +1,5 @@
1
- @mixin default-button {
2
- @include gradient(lighten($primary-color, 15%), darken($primary-color, 12%));
1
+ @mixin basic-button {
3
2
  @include rounded(200px);
4
- @include text-shadow(#000);
5
- @include box-shadow(0 1px 0px rgba(0,0,0,0.10), 0 0 0 1px rgba(255,255,255, 0.2) inset);
6
- border: solid 1px #484e53;
7
- @include border-colors(#616a71, #484e53, #363b3f);
8
- color: #efefef;
9
3
  display: inline-block;
10
4
  font-weight: bold;
11
5
  font-size: 1.0em;
@@ -15,48 +9,56 @@
15
9
  padding: 7px 16px 6px;
16
10
  text-decoration: none;
17
11
  -webkit-font-smoothing: antialiased;
18
-
19
- &:hover {
20
- color: #FFF;
21
- @include icon-color(#fff);
22
- @include gradient(lighten($primary-color, 18%), darken($primary-color, 9%));
12
+
13
+ &.disabled {
14
+ opacity: 0.5;
15
+ cursor: default;
23
16
  }
17
+
18
+ }
19
+
20
+ @mixin default-button {
21
+ @include basic-button;
22
+ @include gradient(lighten($primary-color, 15%), darken($primary-color, 12%));
23
+ @include text-shadow(#000);
24
+ @include box-shadow(0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0px rgba(255,255,255, 0.2) inset);
25
+ border: solid 1px #484e53;
26
+ @include border-colors(#616a71, #484e53, #363b3f);
27
+ color: #efefef;
24
28
 
25
- &:active {
26
- @include box-shadow(0 1px 3px rgba(0,0,0,0.40) inset, 0 1px 0 0px #FFF);
27
- @include gradient(lighten($primary-color, 13%), darken($primary-color, 14%));
29
+ &:not(.disabled) {
30
+ &:hover{
31
+ @include gradient(lighten($primary-color, 18%), darken($primary-color, 9%));
32
+ }
33
+
34
+ &:active {
35
+ @include box-shadow(0 1px 3px rgba(0,0,0,0.40) inset, 0 1px 0 0px #FFF);
36
+ @include gradient(lighten($primary-color, 8%), darken($primary-color, 17%));
37
+ }
28
38
  }
29
39
  }
30
40
 
31
41
  @mixin light-button {
32
- @include default-button;
33
- @include gradient(#fdfdfd, #e8e8e8);
34
- @include box-shadow(0 1px 0px rgba(0,0,0,0.10), 0 0 0 1px rgba(255,255,255, 0.8) inset);
42
+ @include basic-button;
43
+ @include gradient(#FFFFFF, #E7E7E7);
44
+ @include box-shadow(0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0 rgba(255,255,255, 0.8) inset);
45
+ border: solid 1px #c7c7c7;
35
46
  @include border-colors(#d3d3d3, #c7c7c7, #c2c2c2);
36
47
  @include text-shadow;
37
- color: #777;
38
- &:hover {
39
- @include icon-color(#444);
40
- color: #444;
41
- @include gradient(#fdfdfd, #eaeaea);
42
- }
43
- &:active {
44
- @include box-shadow(0 1px 3px rgba(0,0,0,0.18) inset, 0 1px 0 0px #EEE);
45
- @include gradient(#fcfcfc, #e5e4e5);
46
- }
47
-
48
- &.disabled {
49
- color: #777;
50
- cursor: default;
51
- opacity: 0.6;
52
-
48
+ color: $primary-color;
49
+
50
+ &:not(.disabled) {
53
51
  &:hover {
54
- color: #777;
52
+ @include gradient(#FFFFFF, #F1F1F1);
55
53
  }
54
+
56
55
  &:active {
57
- @include box-shadow(0 1px 0px rgba(0,0,0,0.10), 0 0 0 1px #FFF inset);
56
+ @include box-shadow(0 1px 2px rgba(0,0,0,0.22) inset, 0 1px 0 0px #EEE);
57
+ @include border-colors(#c2c2c2, #b9b9b9, #b7b7b7);
58
+ @include gradient(#F3F3F3, #D8D8D8);
58
59
  }
59
60
  }
61
+
60
62
  }
61
63
 
62
64
  @mixin dark-button {
@@ -1,14 +1,14 @@
1
- $secondary-gradient-start: #efefef;
2
- $secondary-gradient-stop: #dfe1e2;
1
+ $secondary-gradient-start: #efefef !default;
2
+ $secondary-gradient-stop: #dfe1e2 !default;
3
3
 
4
4
  @mixin gradient($start, $end){
5
5
  background: $start;
6
6
  background: -webkit-gradient(linear, left top, left bottom, from($start), to($end));
7
7
  background: -moz-linear-gradient(-90deg, $start, $end);
8
8
  // IE 6 & 7
9
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$start}, endColorstr=#{$end});
9
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start}', endColorstr='#{$end}');
10
10
  // IE 8
11
- -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$start}, endColorstr=#{$end});
11
+ -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start}', endColorstr='#{$end}');
12
12
  }
13
13
 
14
14
  @mixin primary-gradient {
@@ -34,4 +34,4 @@ $secondary-gradient-stop: #dfe1e2;
34
34
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
35
35
  // IE 8
36
36
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
37
- }
37
+ }
@@ -1,5 +1,7 @@
1
- span.icon { vertical-align: middle; display: inline-block; }
2
- span.icon svg { vertical-align: baseline; }
1
+ body.active_admin {
2
+ span.icon { vertical-align: middle; display: inline-block; }
3
+ span.icon svg { vertical-align: baseline; }
4
+ }
3
5
 
4
6
  @mixin icon-color ($color) {
5
7
  span.icon svg {
@@ -17,4 +19,6 @@ span.icon svg { vertical-align: baseline; }
17
19
  @include icon-size($size);
18
20
  }
19
21
 
20
- @include icon-size(0.8em);
22
+ body.active_admin {
23
+ @include icon-size(0.8em);
24
+ }
@@ -1,22 +1,24 @@
1
- // Variables used throughout Active Admin
1
+ // Variables used throughout Active Admin.
2
+ // They can be overridden by prepending your own
3
+ // to 'app/assets/stylesheets/active_admin.css.scss'.
2
4
 
3
5
  // Colors
4
- $primary-color: #5E6469;
5
- $secondary-color: #f0f0f0;
6
- $text-color: #323537;
7
- $link-color: #38678b;
8
- $section-header-text-color: $primary-color;
9
- $current-menu-item-background: lighten($primary-color, 12%);
10
- $hover-menu-item-background: lighten($primary-color, 12%);
11
- $table-stripe-color: lighten($primary-color, 57%);
12
- $table-selected-color: #d9e4ec;
13
- $error-color: #932419;
6
+ $primary-color: #5E6469 !default;
7
+ $secondary-color: #f0f0f0 !default;
8
+ $text-color: #323537 !default;
9
+ $link-color: #38678b !default;
10
+ $section-header-text-color: $primary-color !default;
11
+ $current-menu-item-background: lighten($primary-color, 12%) !default;
12
+ $hover-menu-item-background: lighten($primary-color, 12%) !default;
13
+ $table-stripe-color: lighten($primary-color, 57%) !default;
14
+ $table-selected-color: #d9e4ec !default;
15
+ $error-color: #932419 !default;
14
16
 
15
17
  // Sizes
16
- $horizontal-page-margin: 30px;
17
- $sidebar-width: 270px;
18
- $cell-padding: 5px 10px 3px 10px;
19
- $cell-horizontal-padding: 12px;
20
- $section-padding: 15px;
21
- $text-input-horizontal-padding: 10px;
18
+ $horizontal-page-margin: 30px !default;
19
+ $sidebar-width: 270px !default;
20
+ $cell-padding: 5px 10px 3px 10px !default;
21
+ $cell-horizontal-padding: 12px !default;
22
+ $section-padding: 15px !default;
23
+ $text-input-horizontal-padding: 10px !default;
22
24
 
@@ -1,4 +1,4 @@
1
- body.logged_out {
1
+ &.logged_out {
2
2
  background: #e8e9ea;
3
3
 
4
4
  #content_wrapper{
@@ -41,4 +41,4 @@ body.logged_out {
41
41
  a { float: right; margin-top: -32px; }
42
42
  }
43
43
 
44
- }
44
+ }
@@ -0,0 +1,290 @@
1
+ /* Active Admin Print Stylesheet */
2
+
3
+ // Set colors used elsewhere
4
+ $primary-color: black;
5
+ $text-color: black;
6
+
7
+ // Reset
8
+ @import "active_admin/mixins/reset";
9
+ @include global-reset;
10
+
11
+ // Partials
12
+ body.active_admin {
13
+ @import "active_admin/typography";
14
+ }
15
+
16
+ body.active_admin {
17
+ font-family: Helvetica, Arial, sans-serif;
18
+ line-height: 150%;
19
+ font-size: 72%;
20
+ background: #fff;
21
+ width: 99%;
22
+ margin: 0;
23
+ padding: .5%;
24
+ color: $text-color;
25
+ }
26
+
27
+ body.active_admin {
28
+
29
+ a {
30
+ color: $text-color;
31
+ text-decoration: none;
32
+ }
33
+
34
+ h3 {
35
+ font-weight: bold;
36
+ margin-bottom: .5em;
37
+ }
38
+
39
+ // Header
40
+ #header {
41
+ float: left;
42
+
43
+ #tabs, #utility_nav {
44
+ display: none;
45
+ }
46
+
47
+ h1{
48
+ font-weight: bold;
49
+ }
50
+ }
51
+
52
+ .flashes {
53
+ display: none;
54
+ }
55
+
56
+ #title_bar {
57
+ float: right;
58
+
59
+ h2 {
60
+ line-height: 2em;
61
+ margin: 0;
62
+ }
63
+
64
+ .breadcrumb, #titlebar_right {
65
+ display: none;
66
+ }
67
+ }
68
+
69
+ // Content
70
+ #active_admin_content {
71
+ border-top: thick solid black;
72
+ clear: both;
73
+ margin-top: 2em;
74
+ padding-top: 3em;
75
+ }
76
+
77
+ // Footer
78
+ #footer {
79
+ display: none;
80
+ }
81
+
82
+ // Tables
83
+ .table_tools {
84
+ ul {
85
+ padding: 0;
86
+ margin: 0;
87
+ list-style-type: none;
88
+
89
+ li {
90
+ display: none;
91
+ padding: 0;
92
+ margin-bottom: 1em;
93
+
94
+ &.scope.selected {
95
+ display: block;
96
+
97
+ &:before {
98
+ content: "Showing ";
99
+ }
100
+
101
+ a {
102
+ font-weight: bold;
103
+ }
104
+
105
+ span {
106
+ display: inline-block;
107
+ font-weight: normal;
108
+ font-size: .9em;
109
+ }
110
+ }
111
+ }
112
+
113
+ }
114
+ }
115
+
116
+ table {
117
+ margin-bottom: 1.5em;
118
+ text-align: left;
119
+ width: 100%;
120
+
121
+ thead {
122
+ display: table-header-group;
123
+
124
+ th {
125
+ background: none;
126
+ border-bottom: medium solid black;
127
+ font-weight: bold;
128
+
129
+ a{
130
+ text-decoration: none;
131
+ }
132
+ }
133
+ }
134
+
135
+ th, td {
136
+ padding: .5em 1em;
137
+
138
+ .member_link {
139
+ display: none;
140
+ }
141
+ }
142
+
143
+ td {
144
+ border-bottom: thin solid black;
145
+ }
146
+
147
+ tr{
148
+ page-break-inside: avoid;
149
+ }
150
+ }
151
+
152
+ // Index
153
+ #index_footer, .pagination_information {
154
+ display: none;
155
+ }
156
+
157
+ .index_grid {
158
+ td {
159
+ border: none;
160
+ text-align: center;
161
+ vertical-align: middle;
162
+
163
+ img {
164
+ max-width: 1in;
165
+ }
166
+ }
167
+ }
168
+
169
+ // Show
170
+ .panel {
171
+ border-bottom: thick solid #ccc;
172
+ margin-bottom: 3em;
173
+ padding-bottom: 2em;
174
+ page-break-inside: avoid;
175
+
176
+ &:last-child {
177
+ border-bottom: none;
178
+ }
179
+ }
180
+
181
+ .comments {
182
+ form {
183
+ display: none;
184
+ }
185
+
186
+ .active_admin_comment {
187
+ border-top: thin solid black;
188
+ padding-top: 1em;
189
+
190
+ .active_admin_comment_meta {
191
+ h4 {
192
+ font-size: 1em;
193
+ font-weight: bold;
194
+ float: left;
195
+ margin-right: .5em;
196
+ margin-bottom: 0;
197
+ }
198
+
199
+ span {
200
+ font-size: .9em;
201
+ font-style: italic;
202
+ vertical-align: top;
203
+ }
204
+ }
205
+
206
+ .active_admin_comment_body {
207
+ clear: both;
208
+ margin-bottom: 1em;
209
+ }
210
+ }
211
+ }
212
+
213
+
214
+ // Attribute Tables
215
+ .attributes_table {
216
+ border-top: medium solid black;
217
+
218
+ th {
219
+ border-bottom: thin solid black;
220
+ vertical-align: top;
221
+
222
+ &:after {
223
+ content: ':';
224
+ }
225
+ }
226
+
227
+ td {
228
+ img {
229
+ max-height: 4in;
230
+ max-width: 6in;
231
+ }
232
+ }
233
+ }
234
+
235
+ // Sidebars
236
+ #filters_sidebar_section {
237
+ display: none;
238
+ }
239
+
240
+ // Forms
241
+ form {
242
+ fieldset {
243
+ border-top: thick solid #ccc;
244
+ padding-top: 2em;
245
+ margin-bottom: 2em;
246
+
247
+ &:last-child {
248
+ border-bottom: none;
249
+ }
250
+ }
251
+
252
+ .buttons, abbr {
253
+ display: none;
254
+ }
255
+ ol {
256
+ list-style-type: none;
257
+ padding: 0;
258
+ margin: 0;
259
+
260
+ li{
261
+ border-top: thin solid black;
262
+ margin: 0;
263
+ padding: 1em 0;
264
+ overflow: hidden;
265
+
266
+ &.password, &.hidden {
267
+ display: none;
268
+ }
269
+
270
+ label {
271
+ font-weight: bold;
272
+ float: left;
273
+ width: 20%;
274
+ }
275
+
276
+ input, textarea, select {
277
+ background: none;
278
+ border: 0;
279
+ font: Arial, Helvetica, sans-serif;
280
+ }
281
+
282
+ input[type=file] {
283
+ display: none;
284
+ }
285
+
286
+ }
287
+ }
288
+ }
289
+
290
+ }