activeadmin 4.0.0.beta13 → 4.0.0.beta15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/UPGRADING.md +2 -2
- data/app/controllers/active_admin/resource_controller/data_access.rb +8 -3
- data/app/helpers/active_admin/display_helper.rb +1 -1
- data/app/helpers/active_admin/layout_helper.rb +2 -2
- data/config/locales/ar.yml +68 -34
- data/config/locales/ja.yml +4 -0
- data/config/locales/ko.yml +50 -8
- data/config/locales/pl.yml +2 -0
- data/config/locales/ru.yml +35 -0
- data/config/locales/zh-CN.yml +4 -0
- data/config/locales/zh-TW.yml +4 -0
- data/lib/active_admin/form_builder.rb +4 -5
- data/lib/active_admin/pundit_adapter.rb +2 -2
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/views/components/active_admin_form.rb +1 -13
- data/lib/generators/active_admin/assets/templates/tailwind.config.js +5 -3
- data/plugin.js +4 -4
- metadata +6 -7
- data/vendor/bundle/offense.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c171428850e5fab8af1e553c56c973d18dab2b7f91e02c07e327f1a919fd09bb
|
4
|
+
data.tar.gz: bde954565901b45c90a715451deb0c76c71e449d1cc72263ddbdb11be4de8665
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a6fb3316ae2c992190d4af4b760cc4fe58a02370346eb75e31457fa597effea6fff4193c57e129393d214cb9345646236fa619eb8f541138dd754fe7927d9cb
|
7
|
+
data.tar.gz: c91b6faf65562a1157fc208e115a94968aa23e1998366cdd940656ff1e2dfac4f4b352c560764d3a38b8349bc02ec7c4e5ab888b2a2d3c608a63b82c88ede8ff
|
data/UPGRADING.md
CHANGED
@@ -8,14 +8,14 @@ ActiveAdmin v4 uses TailwindCSS. It has **mobile web, dark mode and RTL support*
|
|
8
8
|
|
9
9
|
These instructions assume the `cssbundling-rails` and `importmap-rails` gems are already installed and you have run their install commands in your app. If you haven't done so, please do before continuing.
|
10
10
|
|
11
|
-
Update your `Gemfile` with `gem "activeadmin", "4.0.0.
|
11
|
+
Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta15"` and then run `gem install activeadmin --pre`.
|
12
12
|
|
13
13
|
Now, run `rails generate active_admin:assets` to replace the old assets with the new files.
|
14
14
|
|
15
15
|
Then add the npm package and update the `build:css` script.
|
16
16
|
|
17
17
|
```
|
18
|
-
yarn add @activeadmin/activeadmin@4.0.0-
|
18
|
+
yarn add @activeadmin/activeadmin@4.0.0-beta15
|
19
19
|
npm pkg set scripts.build:css="tailwindcss -i ./app/assets/stylesheets/active_admin.css -o ./app/assets/builds/active_admin.css --minify -c tailwind-active_admin.config.js"
|
20
20
|
```
|
21
21
|
|
@@ -168,11 +168,16 @@ module ActiveAdmin
|
|
168
168
|
#
|
169
169
|
# @return [void]
|
170
170
|
def update_resource(object, attributes)
|
171
|
-
|
171
|
+
status = nil
|
172
|
+
ActiveRecord::Base.transaction do
|
173
|
+
object = assign_attributes(object, attributes)
|
172
174
|
|
173
|
-
|
174
|
-
|
175
|
+
run_update_callbacks object do
|
176
|
+
status = save_resource(object)
|
177
|
+
raise ActiveRecord::Rollback unless status
|
178
|
+
end
|
175
179
|
end
|
180
|
+
status
|
176
181
|
end
|
177
182
|
|
178
183
|
# Destroys an object from the database and calls appropriate callbacks.
|
@@ -24,7 +24,7 @@ module ActiveAdmin
|
|
24
24
|
def display_name(resource)
|
25
25
|
unless resource.nil?
|
26
26
|
result = render_in_context(resource, display_name_method_for(resource))
|
27
|
-
if result.to_s
|
27
|
+
if result.to_s.strip.present?
|
28
28
|
ERB::Util.html_escape(result)
|
29
29
|
else
|
30
30
|
ERB::Util.html_escape(render_in_context(resource, DISPLAY_NAME_FALLBACK))
|
@@ -22,7 +22,7 @@ module ActiveAdmin
|
|
22
22
|
|
23
23
|
def action_items_for_action
|
24
24
|
@action_items_for_action ||= begin
|
25
|
-
if active_admin_config
|
25
|
+
if active_admin_config&.action_items?
|
26
26
|
active_admin_config.action_items_for(params[:action], self)
|
27
27
|
else
|
28
28
|
[]
|
@@ -32,7 +32,7 @@ module ActiveAdmin
|
|
32
32
|
|
33
33
|
def sidebar_sections_for_action
|
34
34
|
@sidebar_sections_for_action ||= begin
|
35
|
-
if active_admin_config
|
35
|
+
if active_admin_config&.sidebar_sections?
|
36
36
|
active_admin_config.sidebar_sections_for(params[:action], self)
|
37
37
|
else
|
38
38
|
[]
|
data/config/locales/ar.yml
CHANGED
@@ -1,10 +1,27 @@
|
|
1
1
|
ar:
|
2
|
+
activerecord:
|
3
|
+
models:
|
4
|
+
comment:
|
5
|
+
one: "تعليق"
|
6
|
+
other: "تعليقات"
|
7
|
+
active_admin/comment:
|
8
|
+
one: "تعليق"
|
9
|
+
other: "تعليقات"
|
10
|
+
attributes:
|
11
|
+
active_admin/comment:
|
12
|
+
author_type: "نوع الكاتب"
|
13
|
+
body: "المحتوى"
|
14
|
+
created_at: "وقت الإنشاء"
|
15
|
+
namespace: "النطاق"
|
16
|
+
resource_type: "نوع المصدر"
|
17
|
+
updated_at: "وقت التعديل"
|
2
18
|
active_admin:
|
3
|
-
dashboard: "لوحة
|
19
|
+
dashboard: "لوحة التحكم"
|
4
20
|
view: "عرض"
|
5
21
|
edit: "تعديل"
|
6
22
|
delete: "حذف"
|
7
23
|
delete_confirmation: "هل تريد تأكيد الحذف؟"
|
24
|
+
create_another: "انشاء %{model} آخر"
|
8
25
|
new_model: "%{model} جديد"
|
9
26
|
edit_model: "تعديل %{model}"
|
10
27
|
delete_model: "حذف %{model}"
|
@@ -17,71 +34,88 @@ ar:
|
|
17
34
|
has_many_new: "إضافة %{model} جديد"
|
18
35
|
has_many_delete: "حذف"
|
19
36
|
has_many_remove: "إزالة"
|
37
|
+
move: "نقل"
|
20
38
|
filters:
|
21
39
|
buttons:
|
22
|
-
filter: "
|
23
|
-
clear: "
|
40
|
+
filter: "فرز"
|
41
|
+
clear: "إلغاء الفرز"
|
42
|
+
predicates:
|
43
|
+
from: "من"
|
44
|
+
to: "إلى"
|
45
|
+
scopes:
|
46
|
+
all: "الكل"
|
24
47
|
search_status:
|
25
|
-
|
48
|
+
title: "الفرز الحالي"
|
49
|
+
title_with_scope: "الفرز الحالي لـ %{name}"
|
50
|
+
no_current_filters: "بدون فرز"
|
26
51
|
status_tag:
|
27
52
|
"yes": "نعم"
|
28
53
|
"no": "لا"
|
29
|
-
"unset": "
|
54
|
+
"unset": "غير محدد"
|
55
|
+
toggle_dark_mode: "تبديل الوضع الليلي"
|
56
|
+
toggle_main_navigation_menu: "عرض القائمة الرئيسية"
|
57
|
+
toggle_section: "عرض القسم"
|
58
|
+
toggle_user_menu: "عرض قائمة المستخدم"
|
30
59
|
logout: "تسجيل الخروج"
|
31
|
-
powered_by: "
|
60
|
+
powered_by: "بواسطة %{active_admin} %{version}"
|
32
61
|
sidebars:
|
33
62
|
filters: "المُرشحات"
|
34
|
-
search_status: "
|
63
|
+
search_status: "حالة البحث"
|
35
64
|
pagination:
|
36
|
-
empty: "لا يوجد %{model}
|
37
|
-
one: "عرض <b>1</b>
|
38
|
-
one_page: "عرض <b
|
39
|
-
multiple: "عرض
|
40
|
-
multiple_without_total: "عرض
|
65
|
+
empty: "لا يوجد %{model}"
|
66
|
+
one: "عرض <b>1</b> من <b>1</b>"
|
67
|
+
one_page: "عرض <b>كل %{n}</b>"
|
68
|
+
multiple: "عرض <b>%{from}-%{to}</b> من <b>%{total}</b>"
|
69
|
+
multiple_without_total: "عرض <b>%{from}-%{to}</b>"
|
70
|
+
per_page: "لكل صفحة "
|
71
|
+
previous: "السابق"
|
72
|
+
next: "التالي"
|
41
73
|
entry:
|
42
74
|
one: "مدخل"
|
43
75
|
other: "مدخلات"
|
44
76
|
any: "أي"
|
45
77
|
blank_slate:
|
46
|
-
content: "
|
78
|
+
content: "لا يوجد %{resource_name}"
|
47
79
|
link: "إنشاء"
|
48
80
|
batch_actions:
|
49
|
-
button_label: "
|
81
|
+
button_label: "إجراء جماعي"
|
50
82
|
default_confirmation: "هل أنت متأكّد؟"
|
51
83
|
delete_confirmation: "هل أنت متأكّد من حذف هذه %{plural_model}؟"
|
52
84
|
succesfully_destroyed:
|
53
|
-
one: "حُذف بنجاح
|
85
|
+
one: "حُذف بنجاح %{model}"
|
54
86
|
other: "حُذف بنجاح %{count} %{plural_model}"
|
55
|
-
selection_toggle_explanation: "(
|
87
|
+
selection_toggle_explanation: "(تبديل التحديد)"
|
56
88
|
action_label: "اُختير %{title}"
|
57
89
|
labels:
|
58
90
|
destroy: "حذف"
|
59
91
|
comments:
|
92
|
+
created_at: "أُنشئ"
|
60
93
|
resource_type: "نوع المصدر"
|
61
94
|
author_type: "نوع الؤلّف"
|
62
|
-
body: "
|
95
|
+
body: "المحتوى"
|
63
96
|
author: "مؤلّف"
|
64
97
|
add: "إضافة تعليق"
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
98
|
+
delete: "حذف تعليق"
|
99
|
+
delete_confirmation: "هل أنت متأكّد من حذف التعليق؟"
|
100
|
+
resource: "مدخل"
|
101
|
+
no_comments_yet: "لا يوجد تعليقات."
|
102
|
+
author_missing: "المؤلف مجهول"
|
103
|
+
title_content: "التعليقات (%{count})"
|
69
104
|
errors:
|
70
105
|
empty_text: "لم يُحفظ التعليق، النص فارغ."
|
71
|
-
created_at: "أُنشئ"
|
72
|
-
delete: "حذف تعليق"
|
73
|
-
delete_confirmation: "هل أنت متأكّد من حذف هذه التعليقات؟"
|
74
106
|
devise:
|
75
107
|
username:
|
76
108
|
title: "اسم المستخدم"
|
77
109
|
email:
|
78
110
|
title: "البريد الإلكترونيّ"
|
79
111
|
subdomain:
|
80
|
-
title: "
|
112
|
+
title: "النطاق الفرعي"
|
81
113
|
password:
|
82
114
|
title: "كلمة المرور"
|
115
|
+
password_confirmation:
|
116
|
+
title: "تأكيد كلمة المرور"
|
83
117
|
sign_up:
|
84
|
-
title: "
|
118
|
+
title: "التسجيل"
|
85
119
|
submit: "تسجيل"
|
86
120
|
login:
|
87
121
|
title: "تسجيل الدخول"
|
@@ -91,22 +125,22 @@ ar:
|
|
91
125
|
title: "هل نسيت كلمة المرور؟"
|
92
126
|
submit: "استرجاع كلمة المرور"
|
93
127
|
change_password:
|
94
|
-
title: "تغير كلمة المرور
|
95
|
-
submit: "تغير كلمة المرور
|
128
|
+
title: "تغير كلمة المرور"
|
129
|
+
submit: "تغير كلمة المرور"
|
96
130
|
unlock:
|
97
|
-
title: "إعادة إرسال تعليمات
|
98
|
-
submit: "إعادة إرسال تعليمات
|
131
|
+
title: "إعادة إرسال تعليمات تنشيط الحساب"
|
132
|
+
submit: "إعادة إرسال تعليمات تنشيط الحساب"
|
99
133
|
resend_confirmation_instructions:
|
100
|
-
title: "إعادة ارسال تعليمات
|
101
|
-
submit: "إعادة ارسال تعليمات
|
134
|
+
title: "إعادة ارسال تعليمات تأكيد البريد الإلكتروني"
|
135
|
+
submit: "إعادة ارسال تعليمات تأكيد البريد الإلكتروني"
|
102
136
|
links:
|
103
137
|
sign_up: "التسجيل"
|
104
138
|
sign_in: "تسجيل الدخول"
|
105
139
|
forgot_your_password: "هل نسيت كلمة المرور؟"
|
106
140
|
sign_in_with_omniauth_provider: "تسجيل الدخول بـ %{provider}"
|
107
141
|
resend_unlock_instructions: "إعادة إرسال تعليمات تنشيط الحساب"
|
108
|
-
resend_confirmation_instructions: "إعادة إرسال تعليمات تأكيد
|
142
|
+
resend_confirmation_instructions: "إعادة إرسال تعليمات تأكيد البريد الإلكتروني"
|
109
143
|
access_denied:
|
110
|
-
message: "
|
144
|
+
message: "غير مصرح لك تنفيذ هذا الإجراء."
|
111
145
|
index_list:
|
112
146
|
table: "جدول"
|
data/config/locales/ja.yml
CHANGED
@@ -31,6 +31,10 @@ ja:
|
|
31
31
|
"yes": "はい"
|
32
32
|
"no": "いいえ"
|
33
33
|
"unset": "いいえ"
|
34
|
+
toggle_dark_mode: "ダークモードを切り替える"
|
35
|
+
toggle_main_navigation_menu: "メインナビゲーションメニューを切り替える"
|
36
|
+
toggle_section: "セクションを切り替える"
|
37
|
+
toggle_user_menu: "ユーザーメニューを切り替える"
|
34
38
|
logout: "ログアウト"
|
35
39
|
powered_by: "Powered by %{active_admin} %{version}"
|
36
40
|
sidebars:
|
data/config/locales/ko.yml
CHANGED
@@ -1,34 +1,63 @@
|
|
1
1
|
ko:
|
2
|
+
activerecord:
|
3
|
+
models:
|
4
|
+
comment:
|
5
|
+
one: "댓글"
|
6
|
+
other: "댓글들"
|
7
|
+
active_admin/comment:
|
8
|
+
one: "댓글"
|
9
|
+
other: "댓글들"
|
10
|
+
attributes:
|
11
|
+
active_admin/comment:
|
12
|
+
author_type: "글쓴이 유형"
|
13
|
+
body: "본문"
|
14
|
+
created_at: "작성시간"
|
15
|
+
namespace: "네임스페이스"
|
16
|
+
resource_type: "첨부파일 형태"
|
17
|
+
updated_at: "수정시간"
|
2
18
|
active_admin:
|
3
19
|
dashboard: "대시보드"
|
4
20
|
view: "보기"
|
5
21
|
edit: "수정"
|
6
22
|
delete: "삭제"
|
7
23
|
delete_confirmation: "정말로 삭제 하시겠습니까?"
|
24
|
+
create_another: "다른 %{model} 생성"
|
8
25
|
new_model: "%{model} 추가"
|
9
26
|
edit_model: "%{model} 수정"
|
10
27
|
delete_model: "%{model} 삭제"
|
11
28
|
details: "%{model} 상세보기"
|
12
29
|
cancel: "취소"
|
13
|
-
empty: "
|
30
|
+
empty: "비어있음"
|
14
31
|
previous: "이전"
|
15
32
|
next: "다음"
|
16
33
|
download: "다운로드:"
|
17
|
-
has_many_new: "%{model} 추가"
|
34
|
+
has_many_new: "새 %{model} 추가"
|
18
35
|
has_many_delete: "삭제"
|
19
36
|
has_many_remove: "삭제"
|
37
|
+
move: "이동"
|
20
38
|
filters:
|
21
39
|
buttons:
|
22
40
|
filter: "필터"
|
23
41
|
clear: "필터 초기화"
|
42
|
+
predicates:
|
43
|
+
from: "시작"
|
44
|
+
to: "끝"
|
45
|
+
scopes:
|
46
|
+
all: "전체"
|
24
47
|
search_status:
|
48
|
+
title: "검색 중"
|
49
|
+
title_with_scope: "%{name} 검색 중"
|
25
50
|
no_current_filters: "현재 적용된 필터가 없습니다"
|
26
51
|
status_tag:
|
27
52
|
"yes": "있음"
|
28
53
|
"no": "없음"
|
29
|
-
"unset": "없음"
|
54
|
+
"unset": "알 수 없음"
|
55
|
+
toggle_dark_mode: "다크모드 전환"
|
56
|
+
toggle_main_navigation_menu: "메인 메뉴 전환"
|
57
|
+
toggle_section: "섹션 전환"
|
58
|
+
toggle_user_menu: "사용자 메뉴 전환"
|
30
59
|
logout: "로그아웃"
|
31
|
-
powered_by: "
|
60
|
+
powered_by: "%{active_admin} %{version} 제공"
|
32
61
|
sidebars:
|
33
62
|
filters: "필터 목록"
|
34
63
|
search_status: "검색 상태"
|
@@ -38,6 +67,9 @@ ko:
|
|
38
67
|
one_page: "<b>%{n}</b>개 %{model} 표시중"
|
39
68
|
multiple: "<b>%{total}</b>개 중 <b>%{from} - %{to}</b> %{model} 표시중"
|
40
69
|
multiple_without_total: "<b>%{from} - %{to}</b> %{model} 표시중"
|
70
|
+
per_page: "페이지당 "
|
71
|
+
previous: "이전"
|
72
|
+
next: "다음"
|
41
73
|
entry:
|
42
74
|
one: "항목"
|
43
75
|
other: "항목들"
|
@@ -59,13 +91,16 @@ ko:
|
|
59
91
|
comments:
|
60
92
|
created_at: "작성시간"
|
61
93
|
resource_type: "첨부파일 형태"
|
62
|
-
author_type: "글쓴이
|
63
|
-
body: "
|
94
|
+
author_type: "글쓴이 유형"
|
95
|
+
body: "본문"
|
64
96
|
author: "글쓴이"
|
65
97
|
add: "댓글 추가"
|
98
|
+
delete: "댓글 삭제"
|
99
|
+
delete_confirmation: "정말로 이 댓글을 삭제하시겠습니까?"
|
66
100
|
resource: "첨부파일"
|
67
101
|
no_comments_yet: "아직 댓글이 없습니다."
|
68
|
-
|
102
|
+
author_missing: "익명"
|
103
|
+
title_content: "댓글 (%{count}개)"
|
69
104
|
errors:
|
70
105
|
empty_text: "댓글이 저장되지 않았습니다. 내용을 입력해주세요."
|
71
106
|
devise:
|
@@ -77,8 +112,10 @@ ko:
|
|
77
112
|
title: "서브도메인"
|
78
113
|
password:
|
79
114
|
title: "비밀번호"
|
115
|
+
password_confirmation:
|
116
|
+
title: "비밀번호 확인"
|
80
117
|
sign_up:
|
81
|
-
title: "
|
118
|
+
title: "회원가입"
|
82
119
|
submit: "가입하기"
|
83
120
|
login:
|
84
121
|
title: "로그인"
|
@@ -97,8 +134,13 @@ ko:
|
|
97
134
|
title: "계정 승인 요청하기"
|
98
135
|
submit: "계정 승인 요청하기"
|
99
136
|
links:
|
137
|
+
sign_up: "회원가입"
|
100
138
|
sign_in: "로그인"
|
101
139
|
forgot_your_password: "비밀번호를 잊으셨나요?"
|
102
140
|
sign_in_with_omniauth_provider: "%{provider} 으로 로그인"
|
103
141
|
resend_unlock_instructions: "계정 잠금 해제하기"
|
104
142
|
resend_confirmation_instructions: "계정 승인 요청하기"
|
143
|
+
access_denied:
|
144
|
+
message: "이 작업을 수행할 권한이 없습니다."
|
145
|
+
index_list:
|
146
|
+
table: "테이블"
|
data/config/locales/pl.yml
CHANGED
data/config/locales/ru.yml
CHANGED
@@ -1,10 +1,31 @@
|
|
1
1
|
ru:
|
2
|
+
activerecord:
|
3
|
+
models:
|
4
|
+
comment:
|
5
|
+
one: "Комментарий"
|
6
|
+
few: "Комментария"
|
7
|
+
many: "Комментариев"
|
8
|
+
other: "Комментариев"
|
9
|
+
active_admin/comment:
|
10
|
+
one: "Комментарий"
|
11
|
+
few: "Комментария"
|
12
|
+
many: "Комментариев"
|
13
|
+
other: "Комментариев"
|
14
|
+
attributes:
|
15
|
+
active_admin/comment:
|
16
|
+
author_type: "Тип автора"
|
17
|
+
body: "Текст"
|
18
|
+
created_at: "Дата создания"
|
19
|
+
namespace: "Пространство имён"
|
20
|
+
resource_type: "Тип ресурса"
|
21
|
+
updated_at: "Дата обновления"
|
2
22
|
active_admin:
|
3
23
|
dashboard: "Панель управления"
|
4
24
|
view: "Открыть"
|
5
25
|
edit: "Изменить"
|
6
26
|
delete: "Удалить"
|
7
27
|
delete_confirmation: "Вы уверены, что хотите удалить это?"
|
28
|
+
create_another: "Создать ещё %{model}"
|
8
29
|
new_model: "Создать %{model}"
|
9
30
|
edit_model: "Изменить %{model}"
|
10
31
|
delete_model: "Удалить %{model}"
|
@@ -17,6 +38,7 @@ ru:
|
|
17
38
|
has_many_new: "Добавить %{model}"
|
18
39
|
has_many_delete: "Удалить"
|
19
40
|
has_many_remove: "Убрать"
|
41
|
+
move: "Переместить"
|
20
42
|
filters:
|
21
43
|
buttons:
|
22
44
|
filter: "Фильтровать"
|
@@ -24,12 +46,20 @@ ru:
|
|
24
46
|
predicates:
|
25
47
|
from: "От"
|
26
48
|
to: "До"
|
49
|
+
scopes:
|
50
|
+
all: "Все"
|
27
51
|
search_status:
|
52
|
+
title: "Текущий поиск"
|
53
|
+
title_with_scope: "Текущий поиск %{name}"
|
28
54
|
no_current_filters: "Ни один"
|
29
55
|
status_tag:
|
30
56
|
"yes": "Да"
|
31
57
|
"no": "Нет"
|
32
58
|
"unset": "Нет"
|
59
|
+
toggle_dark_mode: "Переключить тёмную тему"
|
60
|
+
toggle_main_navigation_menu: "Переключить главное меню"
|
61
|
+
toggle_section: "Переключить секцию"
|
62
|
+
toggle_user_menu: "Переключить пользовательское меню"
|
33
63
|
logout: "Выйти"
|
34
64
|
powered_by: "Работает на %{active_admin} %{version}"
|
35
65
|
sidebars:
|
@@ -41,6 +71,9 @@ ru:
|
|
41
71
|
one_page: "Результат: <b>%{n}</b> %{model}"
|
42
72
|
multiple: "Результат: %{model} <b>%{from} - %{to}</b> из <b>%{total}</b>"
|
43
73
|
multiple_without_total: "Результат: %{model} <b>%{from} - %{to}</b>"
|
74
|
+
per_page: "На странице "
|
75
|
+
previous: "Предыдущая"
|
76
|
+
next: "Следующая"
|
44
77
|
entry:
|
45
78
|
one: "запись"
|
46
79
|
few: "записи"
|
@@ -87,6 +120,8 @@ ru:
|
|
87
120
|
title: "Поддомен"
|
88
121
|
password:
|
89
122
|
title: "Пароль"
|
123
|
+
password_confirmation:
|
124
|
+
title: "Подтверждение пароля"
|
90
125
|
sign_up:
|
91
126
|
title: "Зарегистрироваться"
|
92
127
|
submit: "Зарегистрироваться"
|
data/config/locales/zh-CN.yml
CHANGED
data/config/locales/zh-TW.yml
CHANGED
@@ -95,7 +95,7 @@ module ActiveAdmin
|
|
95
95
|
contents = without_wrapper { inputs(options, &form_block) }
|
96
96
|
contents ||= "".html_safe
|
97
97
|
|
98
|
-
js = new_record ? js_for_has_many(
|
98
|
+
js = new_record ? js_for_has_many(&form_block) : ""
|
99
99
|
contents << js
|
100
100
|
end
|
101
101
|
|
@@ -159,14 +159,13 @@ module ActiveAdmin
|
|
159
159
|
end
|
160
160
|
|
161
161
|
# Capture the ADD JS
|
162
|
-
def js_for_has_many(
|
162
|
+
def js_for_has_many(&form_block)
|
163
163
|
assoc_name = assoc_klass.model_name
|
164
164
|
placeholder = "NEW_#{assoc_name.to_s.underscore.upcase.tr('/', '_')}_RECORD"
|
165
|
-
opts =
|
165
|
+
opts = options.merge(
|
166
166
|
for: [assoc, assoc_klass.new],
|
167
|
-
class: class_string,
|
168
167
|
for_options: { child_index: placeholder }
|
169
|
-
|
168
|
+
)
|
170
169
|
html = template.capture { __getobj__.send(:inputs_for_nested_attributes, opts, &form_block) }
|
171
170
|
text = new_record.is_a?(String) ? new_record : I18n.t("active_admin.has_many_new", model: assoc_name.human)
|
172
171
|
|
@@ -23,7 +23,7 @@ module ActiveAdmin
|
|
23
23
|
# which means there is no way how to scope other actions
|
24
24
|
Pundit.policy_scope!(user, namespace(collection))
|
25
25
|
rescue Pundit::NotDefinedError => e
|
26
|
-
if default_policy_class
|
26
|
+
if default_policy_class&.const_defined?(:Scope)
|
27
27
|
default_policy_class::Scope.new(user, collection).resolve
|
28
28
|
else
|
29
29
|
raise e
|
@@ -95,7 +95,7 @@ module ActiveAdmin
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def default_policy_class
|
98
|
-
ActiveAdmin.application.pundit_default_policy
|
98
|
+
ActiveAdmin.application.pundit_default_policy&.constantize
|
99
99
|
end
|
100
100
|
|
101
101
|
def default_policy(subject)
|
data/lib/active_admin/version.rb
CHANGED
@@ -132,23 +132,11 @@ module ActiveAdmin
|
|
132
132
|
legend = args.shift if args.first.is_a?(::String)
|
133
133
|
legend = html_options.delete(:name) if html_options.key?(:name)
|
134
134
|
legend_tag = legend ? helpers.tag.legend(legend, class: "fieldset-title") : ""
|
135
|
-
fieldset_attrs =
|
135
|
+
fieldset_attrs = helpers.tag.attributes html_options
|
136
136
|
@opening_tag = "<fieldset #{fieldset_attrs}>#{legend_tag}<ol>"
|
137
137
|
@closing_tag = "</ol></fieldset>"
|
138
138
|
super(*(args << html_options), &block)
|
139
139
|
end
|
140
|
-
|
141
|
-
private
|
142
|
-
|
143
|
-
def tag_attributes(html_options)
|
144
|
-
if Rails::VERSION::MAJOR <= 6
|
145
|
-
# Reimplement tag.attributes to backport support for Rails 6.1.
|
146
|
-
# TODO: this can be removed when support for Rails 6.x is dropped
|
147
|
-
helpers.tag.tag_options(html_options.to_h).to_s.strip.html_safe
|
148
|
-
else
|
149
|
-
helpers.tag.attributes html_options
|
150
|
-
end
|
151
|
-
end
|
152
140
|
end
|
153
141
|
|
154
142
|
class SemanticActionsProxy < FormtasticProxy
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
import { execSync } from 'child_process';
|
2
|
+
import activeAdminPlugin from '@activeadmin/activeadmin/plugin';
|
3
|
+
|
2
4
|
const activeAdminPath = execSync('bundle show activeadmin', { encoding: 'utf-8' }).trim();
|
3
5
|
|
4
|
-
|
6
|
+
export default {
|
5
7
|
content: [
|
6
8
|
`${activeAdminPath}/vendor/javascript/flowbite.js`,
|
7
9
|
`${activeAdminPath}/plugin.js`,
|
@@ -14,6 +16,6 @@ module.exports = {
|
|
14
16
|
],
|
15
17
|
darkMode: "selector",
|
16
18
|
plugins: [
|
17
|
-
|
19
|
+
activeAdminPlugin
|
18
20
|
]
|
19
21
|
}
|
data/plugin.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import plugin from 'tailwindcss/plugin';
|
2
|
+
import defaultTheme from 'tailwindcss/defaultTheme';
|
3
|
+
import colors from 'tailwindcss/colors';
|
4
4
|
const { spacing, borderWidth, borderRadius } = defaultTheme;
|
5
5
|
|
6
6
|
// https://github.com/tailwindlabs/tailwindcss/discussions/9336
|
@@ -28,7 +28,7 @@ const svgToTinyDataUri = (() => {
|
|
28
28
|
return svgToTinyDataUri;
|
29
29
|
})();
|
30
30
|
|
31
|
-
|
31
|
+
export default plugin(
|
32
32
|
function({ addBase, addComponents, theme }) {
|
33
33
|
addBase({
|
34
34
|
[[
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.beta15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Maresh
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2024-
|
18
|
+
date: 2024-12-07 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: arbre
|
@@ -107,14 +107,14 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '7.0'
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '7.0'
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: ransack
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -377,7 +377,6 @@ files:
|
|
377
377
|
- lib/generators/active_admin/resource/templates/resource.rb.erb
|
378
378
|
- lib/generators/active_admin/views_generator.rb
|
379
379
|
- plugin.js
|
380
|
-
- vendor/bundle/offense.rb
|
381
380
|
- vendor/javascript/flowbite.js
|
382
381
|
- vendor/javascript/rails_ujs_esm.js
|
383
382
|
homepage: https://activeadmin.info
|
@@ -400,14 +399,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
400
399
|
requirements:
|
401
400
|
- - ">="
|
402
401
|
- !ruby/object:Gem::Version
|
403
|
-
version: '3.
|
402
|
+
version: '3.1'
|
404
403
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
405
404
|
requirements:
|
406
405
|
- - ">="
|
407
406
|
- !ruby/object:Gem::Version
|
408
407
|
version: '0'
|
409
408
|
requirements: []
|
410
|
-
rubygems_version: 3.5.
|
409
|
+
rubygems_version: 3.5.15
|
411
410
|
signing_key:
|
412
411
|
specification_version: 4
|
413
412
|
summary: Active Admin is a Ruby on Rails plugin for generating administration style
|
data/vendor/bundle/offense.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
puts "Ciao"
|