andrewroth_activeadmin 0.3.4 → 0.3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +159 -3
- data/CONTRIBUTING.md +113 -0
- data/LICENSE +1 -1
- data/README.rdoc +19 -20
- data/activeadmin.gemspec +3 -1
- data/app/assets/javascripts/active_admin/application.js +9 -0
- data/app/assets/javascripts/active_admin/base.js +4 -12
- data/app/assets/stylesheets/active_admin/_base.css.scss +16 -340
- data/app/assets/stylesheets/active_admin/_forms.css.scss +13 -7
- data/app/assets/stylesheets/active_admin/_header.css.scss +23 -4
- data/app/assets/stylesheets/active_admin/components/_blank_slates.scss +31 -0
- data/app/assets/stylesheets/active_admin/components/_breadcrumbs.scss +20 -0
- data/app/assets/stylesheets/active_admin/components/_buttons.scss +12 -0
- data/app/assets/stylesheets/active_admin/components/_flash_messages.css.scss +2 -0
- data/app/assets/stylesheets/active_admin/components/_grid.scss +9 -0
- data/app/assets/stylesheets/active_admin/components/_links.scss +5 -0
- data/app/assets/stylesheets/active_admin/components/_pagination.scss +34 -0
- data/app/assets/stylesheets/active_admin/components/_panels.scss +6 -0
- data/app/assets/stylesheets/active_admin/components/_scopes.scss +10 -0
- data/app/assets/stylesheets/active_admin/components/_status_tags.scss +12 -0
- data/app/assets/stylesheets/active_admin/components/_table_tools.css.scss +101 -0
- data/app/assets/stylesheets/active_admin/mixins/_all.css.scss +2 -1
- data/app/assets/stylesheets/active_admin/mixins/_buttons.css.scss +50 -13
- data/app/assets/stylesheets/active_admin/mixins/_gradients.css.scss +9 -1
- data/app/assets/stylesheets/active_admin/mixins/_sections.css.scss +7 -5
- data/app/assets/stylesheets/active_admin/mixins/_shadows.css.scss +1 -0
- data/app/assets/stylesheets/active_admin/mixins/_typography.scss +3 -0
- data/app/assets/stylesheets/active_admin/mixins/_variables.css.scss +1 -0
- data/app/assets/stylesheets/active_admin/pages/_dashboard.scss +5 -0
- data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +44 -0
- data/app/assets/stylesheets/active_admin/structure/_footer.scss +14 -0
- data/app/assets/stylesheets/active_admin/structure/_main_structure.scss +26 -0
- data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +44 -0
- data/app/views/active_admin/devise/passwords/edit.html.erb +1 -1
- data/app/views/active_admin/devise/passwords/new.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 +1 -1
- data/app/views/active_admin/devise/unlocks/new.html.erb +1 -1
- data/app/views/active_admin/page/index.html.arb +1 -0
- data/app/views/layouts/active_admin_logged_out.html.erb +2 -2
- data/cucumber.yml +3 -2
- data/docs/1-general-configuration.md +46 -10
- data/docs/6-show-screens.md +7 -0
- data/docs/8-custom-actions.md +12 -2
- data/docs/9-custom-pages.md +84 -0
- data/features/belongs_to.feature +27 -0
- data/features/comments/commenting.feature +3 -2
- data/features/dashboard.feature +18 -0
- data/features/development_reloading.feature +19 -0
- data/features/index/filter_with_check_boxes.feature +25 -0
- data/features/index/index_as_table.feature +14 -0
- data/features/index/index_scopes.feature +42 -0
- data/features/index/pagination.feature +19 -1
- data/features/menu.feature +22 -2
- data/features/registering_assets.feature +2 -2
- data/features/registering_pages.feature +66 -0
- data/features/specifying_actions.feature +5 -0
- data/features/step_definitions/action_item_steps.rb +2 -6
- data/features/step_definitions/action_link_steps.rb +7 -0
- data/features/step_definitions/additional_web_steps.rb +8 -0
- data/features/step_definitions/asset_steps.rb +5 -1
- data/features/step_definitions/breadcrumb_steps.rb +5 -0
- data/features/step_definitions/configuration_steps.rb +56 -8
- data/features/step_definitions/dashboard_steps.rb +5 -1
- data/features/step_definitions/factory_steps.rb +9 -2
- data/features/step_definitions/flash_steps.rb +9 -1
- data/features/step_definitions/index_scope_steps.rb +16 -4
- data/features/step_definitions/member_link_steps.rb +7 -0
- data/features/step_definitions/site_title_steps.rb +15 -0
- data/features/support/paths.rb +6 -0
- data/features/users/logging_out.feature +11 -0
- data/lib/active_admin.rb +25 -10
- data/lib/active_admin/application.rb +63 -20
- data/lib/active_admin/arbre/html/element.rb +10 -0
- data/lib/active_admin/asset_registration.rb +15 -2
- data/lib/active_admin/base_controller.rb +61 -0
- data/lib/active_admin/{resource_controller → base_controller}/menu.rb +1 -1
- data/lib/active_admin/comments.rb +48 -54
- data/lib/active_admin/comments/comment.rb +13 -2
- data/lib/active_admin/comments/namespace_helper.rb +1 -1
- data/lib/active_admin/comments/views/active_admin_comments.rb +7 -3
- data/lib/active_admin/dashboards.rb +4 -0
- data/lib/active_admin/dashboards/dashboard_controller.rb +20 -4
- data/lib/active_admin/dsl.rb +6 -159
- data/lib/active_admin/event.rb +5 -3
- data/lib/active_admin/filter_form_builder.rb +53 -0
- data/lib/active_admin/form_builder.rb +25 -19
- data/lib/active_admin/inputs.rb +14 -0
- data/lib/active_admin/inputs/datepicker_input.rb +11 -0
- data/lib/active_admin/inputs/filter_base.rb +46 -0
- data/lib/active_admin/inputs/filter_check_boxes_input.rb +40 -0
- data/lib/active_admin/inputs/filter_date_range_input.rb +34 -0
- data/lib/active_admin/inputs/filter_numeric_input.rb +55 -0
- data/lib/active_admin/inputs/filter_select_input.rb +23 -0
- data/lib/active_admin/inputs/filter_string_input.rb +22 -0
- data/lib/active_admin/locales/ca.yml +44 -0
- data/lib/active_admin/locales/cs.yml +14 -10
- data/lib/active_admin/locales/de.yml +43 -0
- data/lib/active_admin/locales/en.yml +5 -0
- data/lib/active_admin/locales/hr.yml +40 -0
- data/lib/active_admin/locales/ko.yml +40 -0
- data/lib/active_admin/locales/lv.yml +43 -0
- data/lib/active_admin/locales/nl.yml +40 -0
- data/lib/active_admin/locales/no-NB.yml +40 -0
- data/lib/active_admin/locales/pl.yml +7 -1
- data/lib/active_admin/locales/pt-BR.yml +6 -2
- data/lib/active_admin/namespace.rb +48 -33
- data/lib/active_admin/page.rb +54 -0
- data/lib/active_admin/page_controller.rb +15 -0
- data/lib/active_admin/page_dsl.rb +21 -0
- data/lib/active_admin/page_presenter.rb +30 -0
- data/lib/active_admin/resource.rb +38 -44
- data/lib/active_admin/resource/action_items.rb +5 -0
- data/lib/active_admin/resource/belongs_to.rb +4 -2
- data/lib/active_admin/resource/controllers.rb +35 -0
- data/lib/active_admin/resource/menu.rb +1 -2
- data/lib/active_admin/resource/naming.rb +43 -31
- data/lib/active_admin/resource/page_presenters.rb +28 -0
- data/lib/active_admin/resource/scopes.rb +16 -3
- data/lib/active_admin/resource/sidebars.rb +4 -0
- data/lib/active_admin/resource_collection.rb +88 -0
- data/lib/active_admin/resource_controller.rb +18 -54
- data/lib/active_admin/resource_controller/action_builder.rb +1 -1
- data/lib/active_admin/resource_controller/actions.rb +1 -1
- data/lib/active_admin/resource_controller/callbacks.rb +1 -1
- data/lib/active_admin/resource_controller/collection.rb +8 -4
- data/lib/active_admin/resource_controller/filters.rb +1 -1
- data/lib/active_admin/resource_controller/resource_class_methods.rb +24 -0
- data/lib/active_admin/resource_controller/scoping.rb +1 -1
- data/lib/active_admin/resource_controller/sidebars.rb +1 -1
- data/lib/active_admin/resource_dsl.rb +157 -0
- data/lib/active_admin/router.rb +21 -14
- data/lib/active_admin/scope.rb +15 -3
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_factory.rb +4 -3
- data/lib/active_admin/view_helpers/auto_link_helper.rb +1 -10
- data/lib/active_admin/view_helpers/breadcrumb_helper.rb +25 -21
- data/lib/active_admin/view_helpers/filter_form_helper.rb +0 -150
- data/lib/active_admin/views/components/attributes_table.rb +1 -1
- data/lib/active_admin/views/components/paginated_collection.rb +42 -13
- data/lib/active_admin/views/components/scopes.rb +17 -17
- data/lib/active_admin/views/components/status_tag.rb +6 -5
- data/lib/active_admin/views/components/table_for.rb +6 -2
- data/lib/active_admin/views/header_renderer.rb +31 -12
- data/lib/active_admin/views/index_as_block.rb +2 -2
- data/lib/active_admin/views/index_as_blog.rb +3 -3
- data/lib/active_admin/views/index_as_grid.rb +4 -4
- data/lib/active_admin/views/index_as_table.rb +13 -6
- data/lib/active_admin/views/pages/base.rb +4 -4
- data/lib/active_admin/views/pages/form.rb +49 -0
- data/lib/active_admin/views/pages/index.rb +18 -6
- data/lib/active_admin/views/pages/page.rb +24 -0
- data/lib/active_admin/views/pages/show.rb +1 -1
- data/lib/generators/active_admin/assets/assets_generator.rb +19 -1
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +38 -12
- data/lib/generators/active_admin/install/templates/dashboards.rb +6 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/support/rails_template.rb +11 -0
- data/spec/support/templates/cucumber_with_reloading.rb +5 -0
- data/spec/unit/active_admin_spec.rb +8 -0
- data/spec/unit/application_spec.rb +48 -2
- data/spec/unit/arbre/html/element_finder_methods_spec.rb +58 -2
- data/spec/unit/asset_registration_spec.rb +9 -3
- data/spec/unit/auto_link_spec.rb +2 -2
- data/spec/unit/base_controller_shared_examples.rb +28 -0
- data/spec/unit/base_controller_spec.rb +8 -0
- data/spec/unit/belongs_to_spec.rb +30 -33
- data/spec/unit/comments_spec.rb +45 -15
- data/spec/unit/config_shared_examples.rb +108 -0
- data/spec/unit/dashboard_controller_spec.rb +44 -0
- data/spec/unit/event_spec.rb +6 -0
- data/spec/unit/filter_form_builder_spec.rb +9 -0
- data/spec/unit/form_builder_spec.rb +8 -14
- data/spec/unit/namespace/register_page_spec.rb +102 -0
- data/spec/unit/namespace/register_resource_spec.rb +188 -0
- data/spec/unit/namespace_spec.rb +11 -183
- data/spec/unit/page_controller_spec.rb +8 -0
- data/spec/unit/page_spec.rb +60 -0
- data/spec/unit/resource/menu_spec.rb +1 -51
- data/spec/unit/resource/naming_spec.rb +24 -19
- data/spec/unit/resource/page_presenters_spec.rb +32 -0
- data/spec/unit/resource/scopes_spec.rb +13 -0
- data/spec/unit/resource_collection_spec.rb +101 -0
- data/spec/unit/resource_controller_spec.rb +40 -32
- data/spec/unit/{registration_spec.rb → resource_registration_spec.rb} +0 -0
- data/spec/unit/resource_spec.rb +8 -24
- data/spec/unit/routing_spec.rb +50 -1
- data/spec/unit/scope_spec.rb +18 -4
- data/spec/unit/views/components/paginated_collection_spec.rb +150 -0
- data/spec/unit/views/components/status_tag_spec.rb +9 -0
- data/tasks/test.rake +43 -27
- metadata +140 -31
- data/app/assets/javascripts/active_admin/vendor.js +0 -382
- data/lib/active_admin/comments/configuration.rb +0 -18
- data/lib/active_admin/page_config.rb +0 -15
- data/lib/active_admin/resource_controller/form.rb +0 -42
- data/lib/active_admin/resource_controller/page_configurations.rb +0 -53
- data/lib/active_admin/views/pages/edit.rb +0 -28
- data/lib/active_admin/views/pages/new.rb +0 -28
- data/lib/generators/active_admin/assets/templates/3.0/active_admin.js +0 -427
- data/spec/integration/belongs_to_spec.rb +0 -42
@@ -1,24 +1,25 @@
|
|
1
1
|
cs:
|
2
2
|
active_admin:
|
3
|
+
dashboard: Úvod
|
3
4
|
dashboard_welcome: "Vítejte v Active Admin. Toto je nástěnka. Pro přidání sekcí nástěnky se podívejte do 'app/admin/dashboards.rb'"
|
4
5
|
view: "Zobrazit"
|
5
6
|
edit: "Upravit"
|
6
7
|
delete: "Smazat"
|
7
8
|
delete_confirmation: "Jste si jistí, že chcete tuto položku smazat?"
|
8
|
-
new_model: "Nový
|
9
|
-
edit_model: "Upravit
|
10
|
-
delete_model: "Smazat
|
11
|
-
details: "Detaily
|
9
|
+
new_model: "Nový"
|
10
|
+
edit_model: "Upravit"
|
11
|
+
delete_model: "Smazat"
|
12
|
+
details: "Detaily"
|
12
13
|
cancel: "Zrušit"
|
13
14
|
empty: "Prázdné"
|
14
15
|
previous: "Předešlé"
|
15
16
|
next: "Následující"
|
16
17
|
download: "Stáhnout:"
|
17
|
-
has_many_new: "Přidat nový
|
18
|
+
has_many_new: "Přidat nový"
|
18
19
|
has_many_delete: "Odstranit"
|
19
20
|
filter: "Filtr"
|
20
21
|
clear_filters: "Vyčistit filtry"
|
21
|
-
search_field: "
|
22
|
+
search_field: "%{field}"
|
22
23
|
equal_to: "Přesně"
|
23
24
|
greater_than: "Větší než"
|
24
25
|
less_than: "Menší než"
|
@@ -27,8 +28,11 @@ cs:
|
|
27
28
|
sidebars:
|
28
29
|
filters: "Filtr"
|
29
30
|
pagination:
|
30
|
-
empty: "
|
31
|
-
one: "
|
32
|
-
one_page: "
|
33
|
-
multiple: "
|
31
|
+
empty: "Nenalezen."
|
32
|
+
one: "Zobrazena <b>1</b> položka"
|
33
|
+
one_page: "Počet zobrazených položek %{n}"
|
34
|
+
multiple: "<b>%{from} - %{to}</b> z <b>%{total}</b>"
|
34
35
|
any: "Kterákoliv"
|
36
|
+
blank_slate:
|
37
|
+
content: "Zatím zde není žádný obsah."
|
38
|
+
link: "Vytvořit"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
de:
|
2
|
+
active_admin:
|
3
|
+
dashboard: Übersicht
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Willkommen in Active Admin. Dies ist die Standard-Übersichtsseite."
|
6
|
+
call_to_action: "Siehe 'app/admin/dashboards.rb', um Übersichts-Bereiche hinzuzufügen."
|
7
|
+
view: "Anzeigen"
|
8
|
+
edit: "Bearbeiten"
|
9
|
+
delete: "Löschen"
|
10
|
+
delete_confirmation: "Wollen Sie dieses Element wirklich löschen?"
|
11
|
+
new_model: "%{model} erstellen"
|
12
|
+
edit_model: "%{model} bearbeiten"
|
13
|
+
delete_model: "%{model} löschen"
|
14
|
+
details: "%{model} Details"
|
15
|
+
cancel: "Abbrechen"
|
16
|
+
empty: "Leer"
|
17
|
+
previous: "Zurück"
|
18
|
+
next: "Weiter"
|
19
|
+
download: "Herunterladen:"
|
20
|
+
has_many_new: "%{model} hinzufügen"
|
21
|
+
has_many_delete: "Löschen"
|
22
|
+
filter: "Filtern"
|
23
|
+
clear_filters: "Filter entfernen"
|
24
|
+
search_field: "Durchsuche %{field}"
|
25
|
+
equal_to: "Gleich"
|
26
|
+
greater_than: "Größer als"
|
27
|
+
less_than: "Kleiner als"
|
28
|
+
main_content: "Bitte implementieren Sie %{model}#main_content, um Inhalte anzuzeigen."
|
29
|
+
logout: "Abmelden"
|
30
|
+
sidebars:
|
31
|
+
filters: "Filter"
|
32
|
+
pagination:
|
33
|
+
empty: "Keine %{model} gefunden"
|
34
|
+
one: "Zeige <b>1</b> %{model}"
|
35
|
+
one_page: "Zeige <b>alle %{n}</b> %{model}"
|
36
|
+
multiple: "Zeige %{model} <b>%{from} – %{to}</b> von <b>%{total}</b>"
|
37
|
+
entry:
|
38
|
+
one: "Eintrag"
|
39
|
+
other: "Einträge"
|
40
|
+
any: "Alle"
|
41
|
+
blank_slate:
|
42
|
+
content: "Es gibt noch keine %{resource_name}."
|
43
|
+
link: "Erstellen"
|
@@ -9,7 +9,9 @@ en:
|
|
9
9
|
delete: "Delete"
|
10
10
|
delete_confirmation: "Are you sure you want to delete this?"
|
11
11
|
new_model: "New %{model}"
|
12
|
+
create_model: "New %{model}"
|
12
13
|
edit_model: "Edit %{model}"
|
14
|
+
update_model: "Edit %{model}"
|
13
15
|
delete_model: "Delete %{model}"
|
14
16
|
details: "%{model} Details"
|
15
17
|
cancel: "Cancel"
|
@@ -34,6 +36,9 @@ en:
|
|
34
36
|
one: "Displaying <b>1</b> %{model}"
|
35
37
|
one_page: "Displaying <b>all %{n}</b> %{model}"
|
36
38
|
multiple: "Displaying %{model} <b>%{from} - %{to}</b> of <b>%{total}</b> in total"
|
39
|
+
entry:
|
40
|
+
one: "entry"
|
41
|
+
other: "entries"
|
37
42
|
any: "Any"
|
38
43
|
blank_slate:
|
39
44
|
content: "There are no %{resource_name} yet."
|
@@ -0,0 +1,40 @@
|
|
1
|
+
hr:
|
2
|
+
active_admin:
|
3
|
+
dashboard: "Upravljačka ploča"
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Dobrodošli u Active Admin. Ovo je početna upravljačka ploča."
|
6
|
+
call_to_action: "Da bi ste dodali nove odjeljke na upravljačku ploču, pogledajte 'app/admin/dashboards.rb'"
|
7
|
+
view: "Pregledaj"
|
8
|
+
edit: "Uredi"
|
9
|
+
delete: "Obriši"
|
10
|
+
delete_confirmation: "Jeste li sigurni da želite ovo obrisati?"
|
11
|
+
new_model: "Novi %{model}"
|
12
|
+
edit_model: "Uredi %{model}"
|
13
|
+
delete_model: "Obriši %{model}"
|
14
|
+
details: "%{model} detalji"
|
15
|
+
cancel: "Odustani"
|
16
|
+
empty: "Prazno"
|
17
|
+
previous: "Prijašnji"
|
18
|
+
next: "Sljedeći"
|
19
|
+
download: "Spremi na računalo:"
|
20
|
+
has_many_new: "Dodaj novi %{model}"
|
21
|
+
has_many_delete: "Obriši"
|
22
|
+
filter: "Filter"
|
23
|
+
clear_filters: "Očisti Filtere"
|
24
|
+
search_field: "Pretraži po %{field}"
|
25
|
+
equal_to: "Jednako"
|
26
|
+
greater_than: "Veće Od"
|
27
|
+
less_than: "Manje Od"
|
28
|
+
main_content: "Molim Vas, implementirajte %{model}#main_content da bi ste prikazali sadržaj."
|
29
|
+
logout: "Odjavi se"
|
30
|
+
sidebars:
|
31
|
+
filters: "Filteri"
|
32
|
+
pagination:
|
33
|
+
empty: "Nije pronađen niti jedan %{model}."
|
34
|
+
one: "Prikazan <b>1</b> %{model}"
|
35
|
+
one_page: "Prikazano <b>svih %{n}</b> %{model}"
|
36
|
+
multiple: "Prikazani %{model} <b>%{from} - %{to}</b> od ukupno <b>%{total}</b>"
|
37
|
+
any: "Bilo koji"
|
38
|
+
blank_slate:
|
39
|
+
content: "Još uvijek ne postoji niti jedan zapis tipa %{resource_name}."
|
40
|
+
link: "Kreiraj jedan"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
ko:
|
2
|
+
active_admin:
|
3
|
+
dashboard: "대시보드"
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Active Admin 에 오신 것을 환영합니다. 이것은 디폴트 대시보드 페이지 입니다."
|
6
|
+
call_to_action: "대시보드에 섹션을 추가하시려면 'app/admin/dashboards.rb' 소스를 확인해 주세요."
|
7
|
+
view: "보기"
|
8
|
+
edit: "수정"
|
9
|
+
delete: "삭제"
|
10
|
+
delete_confirmation: "정말로 삭제 하시겠습니까?"
|
11
|
+
new_model: "새 %{model}"
|
12
|
+
edit_model: "%{model} 수정"
|
13
|
+
delete_model: "%{model} 삭제"
|
14
|
+
details: "%{model} 상세보기"
|
15
|
+
cancel: "취소"
|
16
|
+
empty: "비었음"
|
17
|
+
previous: "이전"
|
18
|
+
next: "다음"
|
19
|
+
download: "다운로드:"
|
20
|
+
has_many_new: "%{model} 추가"
|
21
|
+
has_many_delete: "삭제"
|
22
|
+
filter: "필터"
|
23
|
+
clear_filters: "필터 초기화"
|
24
|
+
search_field: "%{field} 검색"
|
25
|
+
equal_to: "같다"
|
26
|
+
greater_than: "크다"
|
27
|
+
less_than: "작다"
|
28
|
+
main_content: "내용을 보시려면 %{model}#main_content 를 구현해 주시기 바랍니다."
|
29
|
+
logout: "로그아웃"
|
30
|
+
sidebars:
|
31
|
+
filters: "필터 목록"
|
32
|
+
pagination:
|
33
|
+
empty: "%{model} 이/가 없습니다."
|
34
|
+
one: "<b>1</b> %{model} 표시중"
|
35
|
+
one_page: "<b>전체 %{n}</b> %{model} 표시중"
|
36
|
+
multiple: "전체 <b>%{total}</b> 중 <b>%{from} - %{to}</b> %{model} 표시중"
|
37
|
+
any: "어떤"
|
38
|
+
blank_slate:
|
39
|
+
content: "아직 %{resource_name} 이/가 없습니다."
|
40
|
+
link: "만들기"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
lv:
|
2
|
+
active_admin:
|
3
|
+
dashboard: Panelis
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Laipni lūgti Active Admin."
|
6
|
+
call_to_action: "Izmantojiet 'app/admin/dashboards.rb', lai pievienotu sadaļas panelim."
|
7
|
+
view: "Apskatīt"
|
8
|
+
edit: "Labot"
|
9
|
+
delete: "Dzēst"
|
10
|
+
delete_confirmation: "Vai Tu tiešām vēlies dzēst?"
|
11
|
+
new_model: "Pievienot '%{model}' ierasktu"
|
12
|
+
edit_model: "Labot '%{model}' ierakstu"
|
13
|
+
delete_model: "Dzēst '%{model}' ierakstu"
|
14
|
+
details: "Apraksts"
|
15
|
+
cancel: "Atcelt"
|
16
|
+
empty: "Tukšs"
|
17
|
+
previous: "Iepriekšējā"
|
18
|
+
next: "Nākošā"
|
19
|
+
download: "Lejuplādēt:"
|
20
|
+
has_many_new: "Pievienot jaunu '%{model}' ierakstu"
|
21
|
+
has_many_delete: "Dzēst"
|
22
|
+
filter: "Filtrēt"
|
23
|
+
clear_filters: "Novākt filtrus"
|
24
|
+
search_field: "Meklēt '%{field}' laukā"
|
25
|
+
equal_to: "Vienāds ar"
|
26
|
+
greater_than: "Lielāks par"
|
27
|
+
less_than: "Mazāks par"
|
28
|
+
main_content: "Lūdzu implementēt %{model}#main_content, lai rādītos saturs."
|
29
|
+
logout: "Iziet"
|
30
|
+
sidebars:
|
31
|
+
filters: "Filtri"
|
32
|
+
pagination:
|
33
|
+
empty: "Nav ierakstu"
|
34
|
+
one: "<b>1</b> ieraksts"
|
35
|
+
one_page: "<b>%{n}</b> ieraksti"
|
36
|
+
multiple: "<b>%{from} - %{to}</b> ieraksti no <b>%{total}</b> kopā"
|
37
|
+
entry:
|
38
|
+
one: "ieraksts"
|
39
|
+
other: "ieraksti"
|
40
|
+
any: "Jebkurš"
|
41
|
+
blank_slate:
|
42
|
+
content: "Sadaļā '%{resource_name}' nav neviena ieraksta."
|
43
|
+
link: "Izveidot jaunu"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
nl:
|
2
|
+
active_admin:
|
3
|
+
dashboard: Dashboard
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Welkom bij Active Admin. Dit is de standaard dashboard pagina"
|
6
|
+
call_to_action: "Maak je dashboard op maat in het bestand 'app/admin/dashboards.rb'"
|
7
|
+
view: "Bekijk"
|
8
|
+
edit: "Wijzig"
|
9
|
+
delete: "Verwijder"
|
10
|
+
delete_confirmation: "Weet je zeker dat je dit wilt verwijderen?"
|
11
|
+
new_model: "Nieuwe %{model}"
|
12
|
+
edit_model: "Wijzig %{model}"
|
13
|
+
delete_model: "Verwijder %{model}"
|
14
|
+
details: "%{model} details"
|
15
|
+
cancel: "Annuleren"
|
16
|
+
empty: "Leeg"
|
17
|
+
previous: "Vorige"
|
18
|
+
next: "Volgende"
|
19
|
+
download: "Download:"
|
20
|
+
has_many_new: "Voeg nieuwe %{model} toe"
|
21
|
+
has_many_delete: "Verwijderen"
|
22
|
+
filter: "Filter"
|
23
|
+
clear_filters: "Maak Filters Ongedaan"
|
24
|
+
search_field: "Zoek %{field}"
|
25
|
+
equal_to: "Gelijk aan"
|
26
|
+
greater_than: "Groter dan"
|
27
|
+
less_than: "Kleiner dan"
|
28
|
+
main_content: "Implementeer %{model}#main_content om de content weer te geven."
|
29
|
+
logout: "Uitloggen"
|
30
|
+
sidebars:
|
31
|
+
filters: "Filters"
|
32
|
+
pagination:
|
33
|
+
empty: "Geen %{model} gevonden"
|
34
|
+
one: "Geeft <b>1</b> %{model} weer"
|
35
|
+
one_page: "Geeft <b>%{n}</b> %{model} weer"
|
36
|
+
multiple: "Geeft %{model} <b>%{from} - %{to}</b> van de <b>%{total}</b> weer"
|
37
|
+
any: "Alle"
|
38
|
+
blank_slate:
|
39
|
+
content: "Er zijn geen %{resource_name} gevonden."
|
40
|
+
link: "Maak aan"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"no-NB":
|
2
|
+
active_admin:
|
3
|
+
dashboard: Oversikt
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Velkommen til Active Admin. Dette er standardoversiktssiden."
|
6
|
+
call_to_action: "Rediger 'app/admin/dashboards.rb' for at legge til elementer i oversikten."
|
7
|
+
view: "Vis"
|
8
|
+
edit: "Rediger"
|
9
|
+
delete: "Slett"
|
10
|
+
delete_confirmation: "Er du sikker på at du vil slette denne?"
|
11
|
+
new_model: "Ny %{model}"
|
12
|
+
edit_model: "Rediger %{model}"
|
13
|
+
delete_model: "Slett %{model}"
|
14
|
+
details: "%{model} Detaljer"
|
15
|
+
cancel: "Avbryt"
|
16
|
+
empty: "Tom"
|
17
|
+
previous: "Forrige"
|
18
|
+
next: "Neste"
|
19
|
+
download: "Last ned:"
|
20
|
+
has_many_new: "Legg til ny %{model}"
|
21
|
+
has_many_delete: "Slett"
|
22
|
+
filter: "Filter"
|
23
|
+
clear_filters: "Fjern filter"
|
24
|
+
search_field: "Søk %{field}"
|
25
|
+
equal_to: "Er lik"
|
26
|
+
greater_than: "Større enn"
|
27
|
+
less_than: "Mindre enn"
|
28
|
+
main_content: "Please implement %{model}#main_content to display content."
|
29
|
+
logout: "Logg ut"
|
30
|
+
sidebars:
|
31
|
+
filters: "Filtere"
|
32
|
+
pagination:
|
33
|
+
empty: "Fannt ingen %{model}"
|
34
|
+
one: "Viser <b>1</b> %{model}"
|
35
|
+
one_page: "Viser <b>alle %{n}</b> %{model}"
|
36
|
+
multiple: "Viser %{model} <b>%{from} - %{to}</b> av <b>%{total}</b> totalt"
|
37
|
+
any: "Noen"
|
38
|
+
blank_slate:
|
39
|
+
content: "Her er det ingen %{resource_name} enda."
|
40
|
+
link: "Opprett en"
|
@@ -1,6 +1,9 @@
|
|
1
1
|
pl:
|
2
2
|
active_admin:
|
3
|
-
|
3
|
+
dashboard: Pulpit
|
4
|
+
dashboard_welcome:
|
5
|
+
welcome: "Witaj w Active Adminie. To jest domyślny pulpit."
|
6
|
+
call_to_action: "Aby dodać sekcje do pulpitu, sprawdź 'app/admin/dashboards.rb'"
|
4
7
|
view: "Podgląd"
|
5
8
|
edit: "Edytuj"
|
6
9
|
delete: "Usuń"
|
@@ -32,3 +35,6 @@ pl:
|
|
32
35
|
one_page: "Wyświetlanie <b>wszystkich %{n}</b> %{model}"
|
33
36
|
multiple: "Wyświetlanie %{model} <b>%{from} - %{to}</b> z <b>%{total}</b>"
|
34
37
|
any: "Jakikolwiek"
|
38
|
+
blank_slate:
|
39
|
+
content: "Nie ma jeszcze zasobu %{resource_name}."
|
40
|
+
link: "Utwórz go"
|
@@ -9,7 +9,9 @@
|
|
9
9
|
delete: "Remover"
|
10
10
|
delete_confirmation: "Você tem certeza que deseja remover este item?"
|
11
11
|
new_model: "Novo(a) %{model}"
|
12
|
+
create_model: "Novo(a) %{model}"
|
12
13
|
edit_model: "Editar %{model}"
|
14
|
+
update_model: "Atualizar %{model}"
|
13
15
|
delete_model: "Remover %{model}"
|
14
16
|
details: "Detalhes do(a) %{model}"
|
15
17
|
cancel: "Cancelar"
|
@@ -34,8 +36,10 @@
|
|
34
36
|
one: "Exibindo <b>1</b> %{model}"
|
35
37
|
one_page: "Exibindo <b>todos(as) os(as) %{n}</b> %{model}"
|
36
38
|
multiple: "Exibindo %{model} <b>%{from} - %{to}</b> de um total de <b>%{total}</b>"
|
39
|
+
entry:
|
40
|
+
one: "registro"
|
41
|
+
other: "registros"
|
37
42
|
any: "Qualquer"
|
38
43
|
blank_slate:
|
39
44
|
content: "Não existem %{resource_name} ainda."
|
40
|
-
link: "Crie uma"
|
41
|
-
|
45
|
+
link: "Crie uma"
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'active_admin/helpers/settings'
|
2
|
+
require 'active_admin/resource_collection'
|
3
|
+
|
1
4
|
module ActiveAdmin
|
2
5
|
|
3
6
|
class ResourceMismatchError < StandardError; end
|
@@ -25,6 +28,7 @@ module ActiveAdmin
|
|
25
28
|
# resource will be accessible from "/posts" and the controller will be PostsController.
|
26
29
|
#
|
27
30
|
class Namespace
|
31
|
+
include Settings
|
28
32
|
|
29
33
|
RegisterEvent = 'active_admin.namespace.register'.freeze
|
30
34
|
|
@@ -33,7 +37,7 @@ module ActiveAdmin
|
|
33
37
|
def initialize(application, name)
|
34
38
|
@application = application
|
35
39
|
@name = name.to_s.underscore.to_sym
|
36
|
-
@resources =
|
40
|
+
@resources = ResourceCollection.new
|
37
41
|
@menu = Menu.new
|
38
42
|
register_module unless root?
|
39
43
|
generate_dashboard_controller
|
@@ -42,8 +46,8 @@ module ActiveAdmin
|
|
42
46
|
# Register a resource into this namespace. The preffered method to access this is to
|
43
47
|
# use the global registration ActiveAdmin.register which delegates to the proper
|
44
48
|
# namespace instance.
|
45
|
-
def register(
|
46
|
-
config = find_or_build_resource(
|
49
|
+
def register(resource_class, options = {}, &block)
|
50
|
+
config = find_or_build_resource(resource_class, options)
|
47
51
|
|
48
52
|
# Register the resource
|
49
53
|
register_resource_controller(config)
|
@@ -60,6 +64,17 @@ module ActiveAdmin
|
|
60
64
|
config
|
61
65
|
end
|
62
66
|
|
67
|
+
def register_page(name, options = {}, &block)
|
68
|
+
config = build_page(name, options)
|
69
|
+
|
70
|
+
# Register the resource
|
71
|
+
register_page_controller(config)
|
72
|
+
parse_page_registration_block(config, &block) if block_given?
|
73
|
+
register_with_menu(config) if config.include_in_menu?
|
74
|
+
|
75
|
+
config
|
76
|
+
end
|
77
|
+
|
63
78
|
def root?
|
64
79
|
name == :root
|
65
80
|
end
|
@@ -92,22 +107,20 @@ module ActiveAdmin
|
|
92
107
|
# loaded. This method gets called to register each resource with the menu system.
|
93
108
|
def load_menu!
|
94
109
|
register_dashboard
|
95
|
-
resources.
|
96
|
-
register_with_menu(
|
110
|
+
resources.each do |resource|
|
111
|
+
register_with_menu(resource) if resource.include_in_menu?
|
97
112
|
end
|
98
113
|
end
|
99
114
|
|
100
115
|
# Returns the first registered ActiveAdmin::Resource instance for a given class
|
101
116
|
def resource_for(klass)
|
102
|
-
|
103
|
-
|
117
|
+
resources.find_by_resource_class(klass)
|
118
|
+
end
|
104
119
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
nil
|
110
|
-
end
|
120
|
+
# Override from ActiveAdmin::Settings to inherit default attributes
|
121
|
+
# from the application
|
122
|
+
def read_default_setting(name)
|
123
|
+
application.send(name)
|
111
124
|
end
|
112
125
|
|
113
126
|
protected
|
@@ -115,33 +128,27 @@ module ActiveAdmin
|
|
115
128
|
# Either returns an existing Resource instance or builds a new
|
116
129
|
# one for the resource and options
|
117
130
|
def find_or_build_resource(resource_class, options)
|
118
|
-
|
119
|
-
|
120
|
-
# If we've already registered this resource, use the existing
|
121
|
-
if @resources.has_key? resource.camelized_resource_name
|
122
|
-
existing_resource = @resources[resource.camelized_resource_name]
|
131
|
+
resources.add Resource.new(self, resource_class, options)
|
132
|
+
end
|
123
133
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
end
|
134
|
+
def build_page(name, options)
|
135
|
+
resources.add Page.new(self, name, options)
|
136
|
+
end
|
128
137
|
|
129
|
-
resource = existing_resource
|
130
|
-
else
|
131
|
-
@resources[resource.camelized_resource_name] = resource
|
132
|
-
end
|
133
138
|
|
134
|
-
|
139
|
+
def register_page_controller(config)
|
140
|
+
eval "class ::#{config.controller_name} < ActiveAdmin::PageController; end"
|
141
|
+
config.controller.active_admin_config = config
|
135
142
|
end
|
136
143
|
|
137
144
|
def unload_resources!
|
138
|
-
resources.each do |
|
145
|
+
resources.each do |resource|
|
139
146
|
parent = (module_name || 'Object').constantize
|
140
|
-
const_name =
|
147
|
+
const_name = resource.controller_name.split('::').last
|
141
148
|
# Remove the const if its been defined
|
142
149
|
parent.send(:remove_const, const_name) if parent.const_defined?(const_name)
|
143
150
|
end
|
144
|
-
@resources =
|
151
|
+
@resources = ResourceCollection.new
|
145
152
|
end
|
146
153
|
|
147
154
|
def unload_dashboard!
|
@@ -163,12 +170,20 @@ module ActiveAdmin
|
|
163
170
|
config.controller.active_admin_config = config
|
164
171
|
end
|
165
172
|
|
166
|
-
def
|
167
|
-
@
|
173
|
+
def resource_dsl
|
174
|
+
@resource_dsl ||= ResourceDSL.new
|
168
175
|
end
|
169
176
|
|
170
177
|
def parse_registration_block(config, &block)
|
171
|
-
|
178
|
+
resource_dsl.run_registration_block(config, &block)
|
179
|
+
end
|
180
|
+
|
181
|
+
def page_dsl
|
182
|
+
@page_dsl ||= PageDSL.new
|
183
|
+
end
|
184
|
+
|
185
|
+
def parse_page_registration_block(config, &block)
|
186
|
+
page_dsl.run_registration_block(config, &block)
|
172
187
|
end
|
173
188
|
|
174
189
|
# Creates a dashboard controller for this config
|