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