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