administrate 0.8.1 → 0.9.0

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.

Potentially problematic release.


This version of administrate might be problematic. Click here for more details.

Files changed (62) hide show
  1. checksums.yaml +5 -5
  2. data/app/assets/stylesheets/administrate/components/_cells.scss +2 -6
  3. data/app/assets/stylesheets/docs.scss +1 -0
  4. data/app/controllers/administrate/application_controller.rb +35 -3
  5. data/app/controllers/concerns/administrate/punditize.rb +36 -0
  6. data/app/helpers/administrate/application_helper.rb +9 -4
  7. data/app/views/administrate/application/_collection.html.erb +9 -7
  8. data/app/views/administrate/application/_form.html.erb +5 -2
  9. data/app/views/administrate/application/_navigation.html.erb +1 -1
  10. data/app/views/administrate/application/edit.html.erb +3 -3
  11. data/app/views/administrate/application/index.html.erb +5 -2
  12. data/app/views/administrate/application/new.html.erb +6 -1
  13. data/app/views/administrate/application/show.html.erb +3 -3
  14. data/app/views/fields/has_many/_index.html.erb +1 -1
  15. data/app/views/fields/polymorphic/_form.html.erb +11 -6
  16. data/app/views/fields/polymorphic/_show.html.erb +8 -4
  17. data/config/locales/administrate.ar.yml +6 -6
  18. data/config/locales/administrate.bs.yml +27 -0
  19. data/config/locales/administrate.ca.yml +28 -0
  20. data/config/locales/administrate.da.yml +6 -6
  21. data/config/locales/administrate.de.yml +8 -8
  22. data/config/locales/administrate.en.yml +6 -6
  23. data/config/locales/administrate.es.yml +6 -6
  24. data/config/locales/administrate.fr.yml +6 -6
  25. data/config/locales/administrate.it.yml +6 -6
  26. data/config/locales/administrate.ja.yml +6 -6
  27. data/config/locales/administrate.ko.yml +6 -6
  28. data/config/locales/administrate.nl.yml +6 -6
  29. data/config/locales/administrate.pl.yml +6 -6
  30. data/config/locales/administrate.pt-BR.yml +6 -6
  31. data/config/locales/administrate.pt.yml +6 -6
  32. data/config/locales/administrate.ru.yml +6 -6
  33. data/config/locales/administrate.sv.yml +6 -6
  34. data/config/locales/administrate.uk.yml +6 -6
  35. data/config/locales/administrate.vi.yml +6 -6
  36. data/config/locales/administrate.zh-CN.yml +6 -6
  37. data/config/locales/administrate.zh-TW.yml +6 -6
  38. data/docs/authorization.md +69 -0
  39. data/docs/customizing_attribute_partials.md +20 -1
  40. data/docs/customizing_dashboards.md +54 -0
  41. data/docs/getting_started.md +82 -1
  42. data/lib/administrate/field/associative.rb +4 -0
  43. data/lib/administrate/field/base.rb +1 -1
  44. data/lib/administrate/field/belongs_to.rb +4 -3
  45. data/lib/administrate/field/date_time.rb +13 -2
  46. data/lib/administrate/field/deferred.rb +6 -5
  47. data/lib/administrate/field/has_many.rb +2 -2
  48. data/lib/administrate/field/has_one.rb +16 -8
  49. data/lib/administrate/field/polymorphic.rb +41 -3
  50. data/lib/administrate/order.rb +38 -5
  51. data/lib/administrate/resource_resolver.rb +2 -2
  52. data/lib/administrate/search.rb +1 -1
  53. data/lib/administrate/version.rb +1 -1
  54. data/lib/generators/administrate/dashboard/USAGE +1 -1
  55. data/lib/generators/administrate/dashboard/dashboard_generator.rb +7 -1
  56. data/lib/generators/administrate/dashboard/templates/controller.rb.erb +2 -2
  57. data/lib/generators/administrate/install/install_generator.rb +13 -6
  58. data/lib/generators/administrate/install/templates/{application_controller.rb → application_controller.rb.erb} +1 -1
  59. data/lib/generators/administrate/routes/routes_generator.rb +5 -0
  60. data/lib/generators/administrate/routes/templates/routes.rb.erb +1 -1
  61. data/lib/generators/administrate/views/field_generator.rb +19 -5
  62. metadata +8 -4
@@ -5,8 +5,9 @@ da:
5
5
  confirm: Er du sikker?
6
6
  destroy: Slet
7
7
  edit: Rediger
8
- show: Vis
9
- new: Ny
8
+ edit_resource: Rediger %{name}
9
+ show_resource: Vis %{name}
10
+ new_resource: Ny %{name}
10
11
  back: Tilbage
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ da:
19
20
  has_many:
20
21
  more: "Viser %{count} af %{total_count}"
21
22
  none: Ingen
22
- polymorphic:
23
- not_supported: "Formularer med polymorphic relationships er ikke understøttede."
24
- has_one:
25
- not_supported: "Formularer med has_one associationer er ikke understøttede."
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Ryd søgning
28
28
  label: Søg %{resource}
@@ -5,8 +5,9 @@ de:
5
5
  confirm: Sind Sie sicher?
6
6
  destroy: Löschen
7
7
  edit: Editieren
8
- show: Anzeigen
9
- new: Neu
8
+ edit_resource: "%{name} editieren"
9
+ show_resource: "%{name} anzeigen"
10
+ new_resource: "%{name} erstellen"
10
11
  back: Zurück
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ de:
19
20
  has_many:
20
21
  more: "%{count} von %{total_count}"
21
22
  none: Keine
22
- polymorphic:
23
- not_supported: Polymorphe Beziehungen werden nicht unterstützt.
24
- has_one:
25
- not_supported: HasOne Beziehungen werden nicht unterstützt.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} haben das Speichern dieses %{resource_name} verhindert:"
26
26
  search:
27
- clear: Saubere Suche
28
- label: Suche %{resource}
27
+ clear: Suche zurücksetzen
28
+ label: "%{resource} durchsuchen"
@@ -5,8 +5,9 @@ en:
5
5
  confirm: Are you sure?
6
6
  destroy: Destroy
7
7
  edit: Edit
8
- show: Show
9
- new: New
8
+ edit_resource: Edit %{name}
9
+ show_resource: Show %{name}
10
+ new_resource: New %{name}
10
11
  back: Back
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ en:
19
20
  has_many:
20
21
  more: Showing %{count} of %{total_count}
21
22
  none: None
22
- polymorphic:
23
- not_supported: Polymorphic relationship forms are not supported.
24
- has_one:
25
- not_supported: HasOne relationship forms are not supported.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Clear search
28
28
  label: Search %{resource}
@@ -5,8 +5,9 @@ es:
5
5
  confirm: ¿Estás seguro?
6
6
  destroy: Destruir
7
7
  edit: Editar
8
- show: Mostrar
9
- new: Nuevo
8
+ edit_resource: Editar %{name}
9
+ show_resource: Mostrar %{name}
10
+ new_resource: Nuevo %{name}
10
11
  back: Volver
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ es:
19
20
  has_many:
20
21
  more: Mostrando %{count} de %{total_count}
21
22
  none: Ninguno
22
- polymorphic:
23
- not_supported: Los formularios con relaciones polimórficas no están soportados.
24
- has_one:
25
- not_supported: Los formularios con relaciones HasOne no están soportados.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Borrar búsqueda
28
28
  label: Buscar %{resource}
@@ -5,8 +5,9 @@ fr:
5
5
  confirm: Êtes-vous sûr ?
6
6
  destroy: Supprimer
7
7
  edit: Modifier
8
- show: Détails
9
- new: Création
8
+ edit_resource: Modifier %{name}
9
+ show_resource: Détails %{name}
10
+ new_resource: Création %{name}
10
11
  back: Précédent
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ fr:
19
20
  has_many:
20
21
  more: "%{count} sur %{total_count}"
21
22
  none: Aucun
22
- polymorphic:
23
- not_supported: Les relations polymorphiques dans les formulaires ne sont pas supportées.
24
- has_one:
25
- not_supported: Les relations HasOne dans les formulaires ne sont pas supportées.
23
+ form:
24
+ error: erreur
25
+ errors: "%{pluralized_errors} ont empêchés %{resource_name} d'être sauvergardé :"
26
26
  search:
27
27
  clear: Effacer la recherche
28
28
  label: Chercher %{resource}
@@ -5,8 +5,9 @@ it:
5
5
  confirm: Sei sicuro?
6
6
  destroy: Elimina
7
7
  edit: Modifica
8
- show: Visualizza
9
- new: Nuovo
8
+ edit_resource: Modifica %{name}
9
+ show_resource: Visualizza %{name}
10
+ new_resource: Nuovo %{name}
10
11
  back: Indietro
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ it:
19
20
  has_many:
20
21
  more: Visualizzo %{count} di %{total_count}
21
22
  none: Nessuno
22
- polymorphic:
23
- not_supported: Associazioni polimorfiche non ancora supportate. Spiacenti!
24
- has_one:
25
- not_supported: Associazioni HasOne non ancora supportate. Spiacenti!
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Cancella ricerca
28
28
  label: Ricerca %{resource}
@@ -5,8 +5,9 @@ ja:
5
5
  confirm: 本当によろしいですか?
6
6
  destroy: 削除
7
7
  edit: 編集
8
- show: 参照
9
- new: 新規
8
+ edit_resource: 編集 %{name}
9
+ show_resource: 参照 %{name}
10
+ new_resource: 新規 %{name}
10
11
  back: 戻る
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ ja:
19
20
  has_many:
20
21
  more: "%{total_count} 件中 %{count} 件表示"
21
22
  none: データがありません
22
- polymorphic:
23
- not_supported: フォームでは「多:多」の関連をサポートしていません。
24
- has_one:
25
- not_supported: フォームでは「1:1」の関連をサポートしていません。
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: 検索をクリアする
28
28
  label: サーチ %{resource}
@@ -5,8 +5,9 @@ ko:
5
5
  confirm: 괜찮습니까?
6
6
  destroy: 삭제
7
7
  edit: 편집
8
- show: 보여주기
9
- new: 새로운
8
+ edit_resource: 편집 %{name}
9
+ show_resource: 보여주기 %{name}
10
+ new_resource: 새로운 %{name}
10
11
  back: 뒤로
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ ko:
19
20
  has_many:
20
21
  more: "%{total_count} 개 중에서 %{count} 개"
21
22
  none: 없음
22
- polymorphic:
23
- not_supported: 상속 관계에 대한 양식은 제공되지 않습니다.
24
- has_one:
25
- not_supported: 일대일 관계에 대한 양식은 제공되지 않습니다.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: 검색 초기화
28
28
  label: "%{resource} 검색"
@@ -5,8 +5,9 @@ nl:
5
5
  confirm: Weet u het zeker?
6
6
  destroy: Verwijder
7
7
  edit: Bewerk
8
- show: Toon
9
- new: Nieuw
8
+ edit_resource: Bewerk %{name}
9
+ show_resource: Toon %{name}
10
+ new_resource: Nieuw %{name}
10
11
  back: Terug
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ nl:
19
20
  has_many:
20
21
  more: Resultaat %{count} van %{total_count}
21
22
  none: Geen
22
- polymorphic:
23
- not_supported: Polymorphische relaties formulieren worden niet ondersteund.
24
- has_one:
25
- not_supported: HasOne relaties formulieren worden niet ondersteund.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: CDuidelijke zoek
28
28
  label: Zoeken %{resource}
@@ -5,8 +5,9 @@ pl:
5
5
  confirm: Czy jesteś pewien?
6
6
  destroy: Usuń
7
7
  edit: Edytuj
8
- show: Wyświetl
9
- new: Nowy
8
+ edit_resource: Edytuj %{name}
9
+ show_resource: Wyświetl %{name}
10
+ new_resource: Nowy %{name}
10
11
  back: Wstecz
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ pl:
19
20
  has_many:
20
21
  more: Wyświetlanie %{count} z %{total_count}
21
22
  none: Brak
22
- polymorphic:
23
- not_supported: Relacje polimorficzne nie są obsługiwane.
24
- has_one:
25
- not_supported: Relacje jeden-do-jednego nie są obsługiwane.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Wyczyść wyszukiwanie
28
28
  label: Szukanie %{resource}
@@ -6,8 +6,9 @@ pt-BR:
6
6
  confirm: Você tem certeza?
7
7
  destroy: Deletar
8
8
  edit: Editar
9
- show: Visualizar
10
- new: Criar
9
+ edit_resource: Editar %{name}
10
+ show_resource: Visualizar %{name}
11
+ new_resource: Criar %{name}
11
12
  back: Voltar
12
13
  controller:
13
14
  create:
@@ -20,10 +21,9 @@ pt-BR:
20
21
  has_many:
21
22
  more: "Exibindo %{count} de %{total_count}"
22
23
  none: Nenhum
23
- polymorphic:
24
- not_supported: Relações polimórficas nos formulários não são suportadas.
25
- has_one:
26
- not_supported: Relações um para muitos nos formulários não são suportadas.
24
+ form:
25
+ error: error
26
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
27
27
  search:
28
28
  clear: Limpar pesquisa
29
29
  label: Pesquisa %{resource}
@@ -6,8 +6,9 @@ pt:
6
6
  confirm: Tem certeza?
7
7
  destroy: Remover
8
8
  edit: Editar
9
- show: Visualizar
10
- new: Novo
9
+ edit_resource: Editar %{name}
10
+ show_resource: Visualizar %{name}
11
+ new_resource: Novo %{name}
11
12
  back: Voltar atrás
12
13
  controller:
13
14
  create:
@@ -20,10 +21,9 @@ pt:
20
21
  has_many:
21
22
  more: "Mostrando %{count} de %{total_count}"
22
23
  none: Nenhum
23
- polymorphic:
24
- not_supported: Relações polimórficas nos formulários não são suportadas.
25
- has_one:
26
- not_supported: Relações um para muitos nos formulários não são suportadas.
24
+ form:
25
+ error: error
26
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
27
27
  search:
28
28
  clear: Limpar pesquisa
29
29
  label: Pesquisa %{resource}
@@ -5,8 +5,9 @@ ru:
5
5
  confirm: Вы уверены?
6
6
  destroy: Удалить
7
7
  edit: Редактировать
8
- show: Показать
9
- new: Новый
8
+ edit_resource: Редактировать %{name}
9
+ show_resource: Показать %{name}
10
+ new_resource: Новый %{name}
10
11
  back: Вернуться назад
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ ru:
19
20
  has_many:
20
21
  more: "%{count} из %{total_count}"
21
22
  none: Нет
22
- polymorphic:
23
- not_supported: Полиморфные отношения в формах не поддерживаются.
24
- has_one:
25
- not_supported: HasOne отношения в формах не поддерживаются.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Очистить поиск
28
28
  label: Поиск %{resource}
@@ -5,8 +5,9 @@ sv:
5
5
  confirm: Är du säker?
6
6
  destroy: Ta bort
7
7
  edit: Ändra
8
- show: Visa
9
- new: Ny
8
+ edit_resource: Ändra %{name}
9
+ show_resource: Visa %{name}
10
+ new_resource: Ny %{name}
10
11
  back: Tillbaka
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ sv:
19
20
  has_many:
20
21
  more: "%{count} av %{total_count}"
21
22
  none: Inga
22
- polymorphic:
23
- not_supported: Formulär med polymorfiska relationer stöds inte.
24
- has_one:
25
- not_supported: Formulär med HasOne relationer stöds inte.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Rensa sökningen
28
28
  label: Sök %{resource}
@@ -5,8 +5,9 @@ uk:
5
5
  confirm: Ви впевнені?
6
6
  destroy: Видалити
7
7
  edit: Редагувати
8
- show: Показати
9
- new: Новий
8
+ edit_resource: Редагувати %{name}
9
+ show_resource: Показати %{name}
10
+ new_resource: Новий %{name}
10
11
  back: Назад
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ uk:
19
20
  has_many:
20
21
  more: "%{count} із %{total_count}"
21
22
  none: Немає
22
- polymorphic:
23
- not_supported: Поліморфні відношення у формах не підтримуються.
24
- has_one:
25
- not_supported: HasOne відношення у формах не підтримуються.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Очистити пошук
28
28
  label: пошук %{resource}
@@ -5,8 +5,9 @@ vi:
5
5
  confirm: Bạn có chắc không?
6
6
  destroy: Xóa
7
7
  edit: Sửa
8
- show: Xem
9
- new: Mới
8
+ edit_resource: Sửa %{name}
9
+ show_resource: Xem %{name}
10
+ new_resource: Mới %{name}
10
11
  back: Trở lại
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ vi:
19
20
  has_many:
20
21
  more: "%{count} trên %{total_count}"
21
22
  none: Không
22
- polymorphic:
23
- not_supported: Quan hệ Polymorphic chưa được hỗ trợ.
24
- has_one:
25
- not_supported: Quan hệ HasOne chưa được hỗ trợ.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: Tìm kiếm rõ ràng
28
28
  label: Tìm kiếm %{resource}
@@ -5,8 +5,9 @@ zh-CN:
5
5
  confirm: 确定?
6
6
  destroy: 删除
7
7
  edit: 编辑
8
- show: 查看
9
- new: 新建
8
+ edit_resource: 编辑 %{name}
9
+ show_resource: 查看 %{name}
10
+ new_resource: 新建 %{name}
10
11
  back: 返回
11
12
  controller:
12
13
  create:
@@ -19,10 +20,9 @@ zh-CN:
19
20
  has_many:
20
21
  more: 显示所有 %{total_count} 中 %{count} 条
21
22
  none: 无
22
- polymorphic:
23
- not_supported: Polymorphic 关系暂不支持
24
- has_one:
25
- not_supported: HasOne 关系暂不支持.
23
+ form:
24
+ error: error
25
+ errors: "%{pluralized_errors} prohibited this %{resource_name} from being saved:"
26
26
  search:
27
27
  clear: 清除搜索
28
28
  label: 搜索 %{resource}