activeadmin 4.0.0.beta5 → 4.0.0.beta6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activeadmin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/app/controllers/active_admin/base_controller/authorization.rb +1 -1
- data/app/views/active_admin/resource/index.html.arb +1 -1
- data/config/locales/zh-CN.yml +4 -0
- data/config/locales/zh-TW.yml +49 -19
- data/lib/active_admin/batch_actions/resource_extension.rb +1 -1
- data/lib/active_admin/collection_decorator.rb +1 -1
- data/lib/active_admin/dsl.rb +1 -1
- data/lib/active_admin/pundit_adapter.rb +1 -1
- data/lib/active_admin/resource/page_presenters.rb +2 -2
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/views/components/panel.rb +1 -1
- data/lib/active_admin/views/components/scopes.rb +1 -1
- data/lib/generators/active_admin/assets/templates/tailwind.config.js +1 -1
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +1 -1
- data/lib/generators/active_admin/resource/templates/resource.rb.erb +2 -2
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae5beac30e61d16239350a2ce265955eefa469bbd3c156f39c6ad2bb5b511b73
|
4
|
+
data.tar.gz: 2923f344a31b07a6bc511a286c296469a9ad9ecaf3758a789d14ab9415f3adbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bc67eaefc12d5cc00268ce242f0280f521568423a8996370896b0c94ad95cc7e756bec83efeedc01be0f24252dabe3aea971001b6fed58a9274a257f3bd4e16
|
7
|
+
data.tar.gz: dfc14a5d1260b9e198080e1b249cfdbd7d7612335964aac605fc15d83f6fffe176b4a094d494b36898bb6666299ba869f579e02fb9abe1c213c8e228f72fb654
|
data/CHANGELOG.md
CHANGED
@@ -451,7 +451,7 @@ _No changes_.
|
|
451
451
|
* Fixed `if:` scope option when a lambda is passed. [#5501] by [@deivid-rodriguez]
|
452
452
|
* Comment validation adding redundant errors when resource is missing. [#5517] by [@deivid-rodriguez]
|
453
453
|
* Fixed resource filtering by association when the resource has custom primary key. [#5446] by [@wasifhossain]
|
454
|
-
* Fixed "create
|
454
|
+
* Fixed "create another" checkbox styling. [#5324] by [@faucct]
|
455
455
|
|
456
456
|
## 1.3.1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.3.0..v1.3.1)
|
457
457
|
|
@@ -40,7 +40,7 @@ module ActiveAdmin
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# Authorize the action and subject. Available in the controller
|
43
|
-
# as well as all the views. If the action is not
|
43
|
+
# as well as all the views. If the action is not allowed, it raises
|
44
44
|
# an ActiveAdmin::AccessDenied exception.
|
45
45
|
#
|
46
46
|
# @param [Symbol] action The action to check if the user has permission
|
@@ -58,7 +58,7 @@ def build_index_list
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
# Returns the actual class for
|
61
|
+
# Returns the actual class for rendering the main content on the index
|
62
62
|
# page. To set this, use the :as option in the page_presenter block.
|
63
63
|
def find_index_renderer_class(klass)
|
64
64
|
if klass.is_a?(Class)
|
data/config/locales/zh-CN.yml
CHANGED
@@ -45,6 +45,8 @@
|
|
45
45
|
scopes:
|
46
46
|
all: "所有"
|
47
47
|
search_status:
|
48
|
+
title: "搜索条件"
|
49
|
+
title_with_scope: "搜索条件 %{name}"
|
48
50
|
no_current_filters: "无"
|
49
51
|
status_tag:
|
50
52
|
"yes": "是"
|
@@ -62,6 +64,8 @@
|
|
62
64
|
multiple: "显示所有 <b>%{total}</b> %{model}中的<b>%{from} - %{to}</b> 条"
|
63
65
|
multiple_without_total: "%{model}中的<b>%{from} - %{to}</b> 条"
|
64
66
|
per_page: "每页:"
|
67
|
+
previous: "上一页"
|
68
|
+
next: "下一页"
|
65
69
|
entry:
|
66
70
|
one: "条目"
|
67
71
|
other: "条目"
|
data/config/locales/zh-TW.yml
CHANGED
@@ -1,10 +1,27 @@
|
|
1
1
|
"zh-TW":
|
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}"
|
@@ -13,41 +30,52 @@
|
|
13
30
|
empty: "空的"
|
14
31
|
previous: "前一個"
|
15
32
|
next: "下一個"
|
16
|
-
download: "
|
33
|
+
download: "下載:"
|
17
34
|
has_many_new: "增加新的 %{model}"
|
18
35
|
has_many_delete: "刪除"
|
19
|
-
has_many_remove: "
|
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:
|
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": "未知"
|
30
55
|
logout: "登出"
|
31
|
-
powered_by: "
|
56
|
+
powered_by: "由 %{active_admin} %{version} 提供"
|
32
57
|
sidebars:
|
33
58
|
filters: "篩選條件"
|
34
|
-
search_status: "
|
59
|
+
search_status: "搜尋狀態"
|
35
60
|
pagination:
|
36
|
-
empty: "找不到 %{model}
|
61
|
+
empty: "找不到 %{model}"
|
37
62
|
one: "顯示 <b>1</b> %{model}"
|
38
63
|
one_page: "顯示 <b>全部 %{n}</b> %{model}"
|
39
64
|
multiple: "總計 <b>%{total}</b> 顯示 %{model} 中<b>%{from} - %{to}</b> 筆"
|
40
65
|
multiple_without_total: "顯示 %{model} 中<b>%{from} - %{to}</b> 筆"
|
66
|
+
per_page: "每頁 "
|
67
|
+
previous: "前一個"
|
68
|
+
next: "下一個"
|
41
69
|
entry:
|
42
70
|
one: "筆"
|
43
71
|
other: "筆"
|
44
72
|
any: "任何"
|
45
73
|
blank_slate:
|
46
|
-
content: "尚無 %{resource_name}"
|
74
|
+
content: "尚無 %{resource_name}。"
|
47
75
|
link: "建立一筆"
|
48
76
|
batch_actions:
|
49
|
-
button_label: "
|
50
|
-
default_confirmation: "
|
77
|
+
button_label: "批次操作"
|
78
|
+
default_confirmation: "你確定要這樣做嗎?"
|
51
79
|
delete_confirmation: "你確定要刪除這些 %{plural_model} 嗎?"
|
52
80
|
succesfully_destroyed:
|
53
81
|
one: "成功刪除 1 %{model}"
|
@@ -57,18 +85,18 @@
|
|
57
85
|
labels:
|
58
86
|
destroy: "刪除"
|
59
87
|
comments:
|
60
|
-
created_at: "
|
61
|
-
resource_type: "
|
88
|
+
created_at: "建立時間"
|
89
|
+
resource_type: "資源類型"
|
62
90
|
author_type: "作者身份"
|
63
91
|
body: "內文"
|
64
92
|
author: "作者"
|
65
93
|
add: "新增評論"
|
66
94
|
delete: "刪除評論"
|
67
|
-
delete_confirmation: "
|
95
|
+
delete_confirmation: "你確定要刪除這個評論嗎?"
|
68
96
|
resource: "資源"
|
69
97
|
no_comments_yet: "尚無評論"
|
70
98
|
author_missing: "匿名"
|
71
|
-
title_content: "
|
99
|
+
title_content: "%{count} 則評論"
|
72
100
|
errors:
|
73
101
|
empty_text: "評論儲存失敗,不允許空白的內容。"
|
74
102
|
devise:
|
@@ -80,6 +108,8 @@
|
|
80
108
|
title: "子網域"
|
81
109
|
password:
|
82
110
|
title: "密碼"
|
111
|
+
password_confirmation:
|
112
|
+
title: "確認密碼"
|
83
113
|
sign_up:
|
84
114
|
title: "註冊"
|
85
115
|
submit: "註冊"
|
@@ -89,7 +119,7 @@
|
|
89
119
|
submit: "登入"
|
90
120
|
reset_password:
|
91
121
|
title: "忘記密碼?"
|
92
|
-
submit: "
|
122
|
+
submit: "重設密碼"
|
93
123
|
change_password:
|
94
124
|
title: "更改你的密碼"
|
95
125
|
submit: "更改我的密碼"
|
@@ -97,8 +127,8 @@
|
|
97
127
|
title: "重新發送解鎖指示"
|
98
128
|
submit: "重新發送解鎖指示"
|
99
129
|
resend_confirmation_instructions:
|
100
|
-
title:
|
101
|
-
submit:
|
130
|
+
title: "重新發送確認信"
|
131
|
+
submit: "重新發送確認信"
|
102
132
|
links:
|
103
133
|
sign_up: "註冊"
|
104
134
|
sign_in: "登入"
|
@@ -107,6 +137,6 @@
|
|
107
137
|
resend_unlock_instructions: "重新發送解鎖指示"
|
108
138
|
resend_confirmation_instructions: "重新發送確認信"
|
109
139
|
access_denied:
|
110
|
-
message: "
|
140
|
+
message: "你沒有權限執行此項操作"
|
111
141
|
index_list:
|
112
142
|
table: "表格"
|
@@ -95,7 +95,7 @@ module ActiveAdmin
|
|
95
95
|
# => Will create an action that appears in the action list popover
|
96
96
|
#
|
97
97
|
# BatchAction.new(:flag) { |selection| redirect_to collection_path, notice: "#{selection.length} users flagged" }
|
98
|
-
# => Will create an action that uses a block to process the request (which receives one
|
98
|
+
# => Will create an action that uses a block to process the request (which receives one parameter of the selected objects)
|
99
99
|
#
|
100
100
|
# BatchAction.new("Perform Long Operation on") { |selection| }
|
101
101
|
# => You can create batch actions with a title instead of a Symbol
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module ActiveAdmin
|
3
3
|
# This class decorates a collection of objects delegating
|
4
|
-
#
|
4
|
+
# methods to behave like an Array. It's used to decouple ActiveAdmin
|
5
5
|
# from Draper and thus being able to use PORO decorators as well.
|
6
6
|
#
|
7
7
|
# It's implementation is heavily based on the Draper::CollectionDecorator
|
data/lib/active_admin/dsl.rb
CHANGED
@@ -30,7 +30,7 @@ module ActiveAdmin
|
|
30
30
|
@config
|
31
31
|
end
|
32
32
|
|
33
|
-
# Include a module with this resource. The modules'
|
33
|
+
# Include a module with this resource. The modules' `included` method
|
34
34
|
# is called with the instance of the `ActiveAdmin::DSL` passed into it.
|
35
35
|
#
|
36
36
|
# eg:
|
@@ -19,7 +19,7 @@ module ActiveAdmin
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def scope_collection(collection, action = Auth::READ)
|
22
|
-
# scoping is
|
22
|
+
# scoping is applicable only to read/index action
|
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
|
@@ -51,7 +51,7 @@ module ActiveAdmin
|
|
51
51
|
# Stores a config for all index actions supplied
|
52
52
|
#
|
53
53
|
# @param [Symbol] index_as The index type to store in the configuration
|
54
|
-
# @param [PagePresenter] page_presenter The
|
54
|
+
# @param [PagePresenter] page_presenter The instance of PagePresenter to store
|
55
55
|
def set_index_presenter(index_as, page_presenter)
|
56
56
|
page_presenters[:index] ||= {}
|
57
57
|
|
@@ -64,7 +64,7 @@ module ActiveAdmin
|
|
64
64
|
page_presenters[:index][index_as] = page_presenter
|
65
65
|
end
|
66
66
|
|
67
|
-
# Returns the actual class for
|
67
|
+
# Returns the actual class for rendering the main content on the index
|
68
68
|
# page. To set this, use the :as option in the page_presenter block.
|
69
69
|
#
|
70
70
|
# @param [Symbol, Class] symbol_or_class The component symbol or class
|
data/lib/active_admin/version.rb
CHANGED
@@ -22,7 +22,7 @@ module ActiveAdmin
|
|
22
22
|
|
23
23
|
# Override children? to only report children when the panel's
|
24
24
|
# contents have been added to. This ensures that the panel
|
25
|
-
#
|
25
|
+
# correctly appends string values, etc.
|
26
26
|
def children?
|
27
27
|
@contents.children?
|
28
28
|
end
|
@@ -4,7 +4,7 @@ require "active_admin/view_helpers/method_or_proc_helper"
|
|
4
4
|
module ActiveAdmin
|
5
5
|
module Views
|
6
6
|
# Renders a collection of ActiveAdmin::Scope objects as a
|
7
|
-
# simple list with a
|
7
|
+
# simple list with a separator
|
8
8
|
class Scopes < ActiveAdmin::Component
|
9
9
|
include ActiveAdmin::ScopeChain
|
10
10
|
|
@@ -203,7 +203,7 @@ ActiveAdmin.setup do |config|
|
|
203
203
|
#
|
204
204
|
# config.namespace :admin do |admin|
|
205
205
|
# admin.build_menu :default do |menu|
|
206
|
-
# menu.add label: "My Great Website", url: "https://mygreatwebsite.example.com", html_options: { target:
|
206
|
+
# menu.add label: "My Great Website", url: "https://mygreatwebsite.example.com", html_options: { target: "_blank" }
|
207
207
|
# end
|
208
208
|
# end
|
209
209
|
|
@@ -16,7 +16,7 @@ ActiveAdmin.register <%= class_name %> do
|
|
16
16
|
# Add or remove filters to toggle their visibility
|
17
17
|
<%= filters %>
|
18
18
|
|
19
|
-
# Add or remove columns to toggle their
|
19
|
+
# Add or remove columns to toggle their visibility in the index action
|
20
20
|
index do
|
21
21
|
selectable_column
|
22
22
|
id_column
|
@@ -24,7 +24,7 @@ ActiveAdmin.register <%= class_name %> do
|
|
24
24
|
actions
|
25
25
|
end
|
26
26
|
|
27
|
-
# Add or remove rows to toggle their
|
27
|
+
# Add or remove rows to toggle their visibility in the show action
|
28
28
|
show do
|
29
29
|
attributes_table_for(resource) do
|
30
30
|
<%= rows %>
|
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.beta6
|
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-05-03 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: arbre
|
@@ -31,6 +31,20 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.0'
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: csv
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
34
48
|
- !ruby/object:Gem::Dependency
|
35
49
|
name: formtastic
|
36
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -385,7 +399,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
385
399
|
requirements:
|
386
400
|
- - ">="
|
387
401
|
- !ruby/object:Gem::Version
|
388
|
-
version: '
|
402
|
+
version: '3.0'
|
389
403
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
390
404
|
requirements:
|
391
405
|
- - ">"
|