activeadmin 1.0.0.pre1 → 1.0.0.pre2
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.
- checksums.yaml +4 -4
- data/.travis.yml +18 -16
- data/CHANGELOG.md +18 -1013
- data/Gemfile +18 -11
- data/LICENSE +0 -5
- data/README.md +0 -2
- data/activeadmin.gemspec +3 -1
- data/app/assets/javascripts/active_admin/application.js.coffee +8 -3
- data/app/assets/javascripts/active_admin/base.js.coffee +1 -6
- data/app/assets/javascripts/active_admin/jquery_ui.js.erb +11 -0
- data/app/assets/javascripts/active_admin/lib/flash.js.coffee +1 -1
- data/app/assets/javascripts/active_admin/lib/modal_dialog.js.coffee +11 -3
- data/app/assets/javascripts/active_admin/lib/per_page.js.coffee +5 -1
- data/app/assets/stylesheets/active_admin/_base.scss +1 -4
- data/app/assets/stylesheets/active_admin/_forms.scss +13 -8
- data/app/assets/stylesheets/active_admin/components/_buttons.scss +0 -5
- data/app/assets/stylesheets/active_admin/mixins/_all.scss +0 -1
- data/app/assets/stylesheets/active_admin/mixins/_sections.scss +0 -1
- data/app/assets/stylesheets/active_admin/mixins/_typography.scss +1 -1
- data/app/assets/stylesheets/active_admin/mixins/_variables.scss +1 -1
- data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +0 -5
- data/app/views/layouts/active_admin_logged_out.html.erb +4 -0
- data/config/locales/ar.yml +14 -2
- data/config/locales/de-CH.yml +2 -0
- data/config/locales/de.yml +15 -0
- data/config/locales/en.yml +10 -2
- data/config/locales/es.yml +26 -4
- data/config/locales/fr.yml +5 -0
- data/config/locales/id.yml +135 -0
- data/config/locales/ja.yml +21 -3
- data/config/locales/ko.yml +66 -36
- data/config/locales/nl.yml +14 -1
- data/config/locales/pt-BR.yml +11 -0
- data/config/locales/ru.yml +15 -1
- data/config/locales/sv-SE.yml +45 -5
- data/config/locales/uk.yml +16 -4
- data/config/locales/zh-CN.yml +5 -0
- data/config/locales/zh-TW.yml +32 -1
- data/docs/0-installation.md +7 -1
- data/docs/1-general-configuration.md +9 -0
- data/docs/10-custom-pages.md +10 -0
- data/docs/12-arbre-components.md +1 -1
- data/docs/14-gotchas.md +2 -2
- data/docs/2-resource-customization.md +5 -3
- data/docs/3-index-pages.md +7 -0
- data/docs/3-index-pages/index-as-table.md +4 -0
- data/docs/6-show-pages.md +1 -1
- data/docs/7-sidebars.md +8 -0
- data/features/index/batch_actions.feature +21 -2
- data/features/index/pagination.feature +16 -12
- data/features/meta_tags.feature +21 -0
- data/features/registering_assets.feature +1 -2
- data/features/show/columns.feature +40 -0
- data/features/show/default_content.feature +2 -1
- data/features/step_definitions/asset_steps.rb +3 -3
- data/features/step_definitions/batch_action_steps.rb +11 -2
- data/features/step_definitions/column_steps.rb +8 -0
- data/features/step_definitions/configuration_steps.rb +2 -2
- data/features/step_definitions/factory_steps.rb +3 -2
- data/features/step_definitions/meta_tag_steps.rb +3 -0
- data/features/step_definitions/pagination_steps.rb +8 -0
- data/features/step_definitions/table_steps.rb +2 -1
- data/lib/active_admin.rb +3 -3
- data/lib/active_admin/application.rb +66 -16
- data/lib/active_admin/batch_actions.rb +0 -1
- data/lib/active_admin/batch_actions/controller.rb +2 -2
- data/lib/active_admin/batch_actions/resource_extension.rb +3 -1
- data/lib/active_admin/callbacks.rb +1 -1
- data/lib/active_admin/csv_builder.rb +2 -2
- data/lib/active_admin/dependency.rb +18 -16
- data/lib/active_admin/devise.rb +1 -1
- data/lib/active_admin/dsl.rb +1 -1
- data/lib/active_admin/event.rb +8 -17
- data/lib/active_admin/filters/active.rb +29 -0
- data/lib/active_admin/filters/forms.rb +6 -1
- data/lib/active_admin/filters/humanized.rb +68 -0
- data/lib/active_admin/filters/resource_extension.rb +48 -1
- data/lib/active_admin/form_builder.rb +4 -4
- data/lib/active_admin/generators/boilerplate.rb +37 -0
- data/lib/active_admin/helpers/routes/url_helpers.rb +1 -1
- data/lib/active_admin/inputs.rb +1 -0
- data/lib/active_admin/inputs/filters/date_picker_input.rb +13 -0
- data/lib/active_admin/inputs/filters/date_range_input.rb +1 -1
- data/lib/active_admin/menu.rb +1 -0
- data/lib/active_admin/menu_item.rb +1 -1
- data/lib/active_admin/namespace.rb +5 -5
- data/lib/active_admin/orm/active_record/comments.rb +10 -1
- data/lib/active_admin/orm/active_record/comments/comment.rb +1 -1
- data/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +11 -0
- data/lib/active_admin/resource.rb +9 -3
- data/lib/active_admin/resource/action_items.rb +13 -3
- data/lib/active_admin/resource/belongs_to.rb +6 -2
- data/lib/active_admin/resource/pagination.rb +4 -0
- data/lib/active_admin/resource_collection.rb +3 -1
- data/lib/active_admin/resource_controller/data_access.rb +6 -11
- data/lib/active_admin/resource_controller/decorators.rb +1 -1
- data/lib/active_admin/resource_dsl.rb +8 -2
- data/lib/active_admin/sidebar_section.rb +4 -12
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_factory.rb +1 -2
- data/lib/active_admin/view_helpers.rb +0 -1
- data/lib/active_admin/view_helpers/display_helper.rb +3 -4
- data/lib/active_admin/view_helpers/method_or_proc_helper.rb +3 -3
- data/lib/active_admin/views/components/active_admin_form.rb +3 -3
- data/lib/active_admin/views/components/columns.rb +9 -4
- data/lib/active_admin/views/components/dropdown_menu.rb +0 -2
- data/lib/active_admin/views/components/paginated_collection.rb +35 -13
- data/lib/active_admin/views/components/panel.rb +1 -3
- data/lib/active_admin/views/components/sidebar_section.rb +6 -1
- data/lib/active_admin/views/components/status_tag.rb +3 -2
- data/lib/active_admin/views/components/table_for.rb +2 -1
- data/lib/active_admin/views/index_as_table.rb +2 -2
- data/lib/active_admin/views/pages/base.rb +4 -0
- data/lib/active_admin/views/pages/show.rb +1 -1
- data/lib/generators/active_admin/assets/assets_generator.rb +1 -1
- data/lib/generators/active_admin/assets/templates/{active_admin.css.scss → active_admin.scss} +0 -0
- data/lib/generators/active_admin/devise/devise_generator.rb +7 -19
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +29 -0
- data/lib/generators/active_admin/page/templates/page.rb +1 -1
- data/lib/generators/active_admin/resource/resource_generator.rb +6 -0
- data/lib/generators/active_admin/resource/templates/admin.rb +34 -13
- data/spec/rails_helper.rb +6 -2
- data/spec/requests/memory_spec.rb +1 -3
- data/spec/support/active_admin_request_helpers.rb +27 -0
- data/spec/support/detect_rails_version.rb +1 -1
- data/spec/support/rails_template.rb +7 -0
- data/spec/unit/application_spec.rb +29 -4
- data/spec/unit/batch_actions/resource_spec.rb +5 -0
- data/spec/unit/belongs_to_spec.rb +14 -0
- data/spec/unit/comments_spec.rb +24 -2
- data/spec/unit/controller_filters_spec.rb +25 -28
- data/spec/unit/dsl_spec.rb +1 -1
- data/spec/unit/filters/humanized_spec.rb +56 -0
- data/spec/unit/filters/resource_spec.rb +1 -1
- data/spec/unit/form_builder_spec.rb +71 -11
- data/spec/unit/generators/install_spec.rb +3 -2
- data/spec/unit/pretty_format_spec.rb +15 -1
- data/spec/unit/resource_collection_spec.rb +17 -0
- data/spec/unit/resource_controller_spec.rb +2 -2
- data/spec/unit/resource_registration_spec.rb +3 -3
- data/spec/unit/resource_spec.rb +53 -2
- data/spec/unit/view_factory_spec.rb +0 -2
- data/spec/unit/view_helpers/display_name_spec.rb +6 -4
- data/spec/unit/views/components/{batch_action_popover_spec.rb → batch_action_selector_spec.rb} +9 -13
- data/spec/unit/views/components/columns_spec.rb +17 -0
- data/spec/unit/views/components/paginated_collection_spec.rb +16 -2
- data/spec/unit/views/components/panel_spec.rb +1 -5
- data/spec/unit/views/components/sidebar_section_spec.rb +21 -0
- data/spec/unit/views/components/status_tag_spec.rb +15 -1
- data/spec/unit/views/components/table_for_spec.rb +45 -0
- data/tasks/parallel_tests.rake +1 -1
- data/tasks/test.rake +4 -4
- metadata +29 -30
- data/app/assets/javascripts/active_admin/lib/popover.js.coffee +0 -68
- data/app/assets/stylesheets/active_admin/components/_popovers.scss +0 -122
- data/app/assets/stylesheets/active_admin/mixins/_icons.scss +0 -20
- data/lib/active_admin/batch_actions/views/batch_action_popover.rb +0 -28
- data/lib/active_admin/iconic.rb +0 -53
- data/lib/active_admin/iconic/icons.rb +0 -142
- data/lib/active_admin/view_helpers/icon_helper.rb +0 -12
- data/lib/active_admin/views/components/action_list_popover.rb +0 -29
- data/lib/active_admin/views/components/popover.rb +0 -27
- data/spec/javascripts/coffeescripts/jquery.aa.popover-spec.js.coffee +0 -82
- data/spec/support/integration_example_group.rb +0 -31
- data/spec/unit/event_spec.rb +0 -47
- data/spec/unit/views/components/action_list_popover_spec.rb +0 -40
- data/spec/unit/views/components/popover_spec.rb +0 -33
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe ActiveAdmin::Views::ActionListPopover do
|
4
|
-
|
5
|
-
let(:the_popover) do
|
6
|
-
arbre {
|
7
|
-
action_list_popover id: "my_awesome_action_list_popover" do
|
8
|
-
action "My First Great Action", "#"
|
9
|
-
action "My Second Great Action", "http://www.google.com"
|
10
|
-
end
|
11
|
-
}.children.first
|
12
|
-
end
|
13
|
-
|
14
|
-
it "should have an id" do
|
15
|
-
expect(the_popover.id).to eq "my_awesome_action_list_popover"
|
16
|
-
end
|
17
|
-
|
18
|
-
describe "the action list" do
|
19
|
-
subject do
|
20
|
-
the_popover.find_by_class("popover_contents").first
|
21
|
-
end
|
22
|
-
|
23
|
-
describe '#tag_name' do
|
24
|
-
subject { super().tag_name }
|
25
|
-
it { is_expected.to eql("ul") }
|
26
|
-
end
|
27
|
-
|
28
|
-
describe '#content' do
|
29
|
-
subject { super().content }
|
30
|
-
it{ is_expected.to include("<li><a href=\"#\">My First Great Action</a></li>") }
|
31
|
-
end
|
32
|
-
|
33
|
-
describe '#content' do
|
34
|
-
subject { super().content }
|
35
|
-
it{ is_expected.to include("<li><a href=\"http://www.google.com\">My Second Great Action</a></li>") }
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe ActiveAdmin::Views::Popover do
|
4
|
-
|
5
|
-
let(:the_popover) do
|
6
|
-
render_arbre_component do
|
7
|
-
popover id: "my_awesome_popover" do
|
8
|
-
para "Hello World, this is popover content baby."
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should have the class of 'sidebar_section'" do
|
14
|
-
expect(the_popover.class_list).to include("popover")
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should have an inner content element class of 'popover_contents'" do
|
18
|
-
expect(the_popover.find_by_tag("div").first.class_list).to include("popover_contents")
|
19
|
-
end
|
20
|
-
|
21
|
-
it "should have the popover content in the inner content element" do
|
22
|
-
expect(the_popover.find_by_class("popover_contents").first.content).to include("Hello World, this is popover content baby.")
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should have an id" do
|
26
|
-
expect(the_popover.id).to eq "my_awesome_popover"
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should be hidden" do
|
30
|
-
expect(the_popover.attributes).to include(style: "display: none");
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|